Descriptionall: introduce environs.Prechecker
This introduces a new interface, environs.Prechecker,
which is an optional interface that an environs.Environ
may implement.
Prechecker has two methods: PrecheckInstance and
PrecheckContainer. These methods will check if
constraints can possibly be met by the environment.
They will be used to check if an environment is capable
of creating an instance with the specified series and
constraints, or container with the specified type.
If the methods return nil, that does not necessarily
mean that the constraints are satisfied; if a non-nil
error is returned, then it means that the constraints
are definitely not satisfiable.
The local, ec2, azure and openstack Environ implementatons
will now disallow creating containers. When the work to
support addressability is done, this needs to be changed.
Currently, maas lets everything through.
The interface is not currently used anywhere. This will
be done in a followup.
https://code.launchpad.net/~axwalk/juju-core/sanity-check-constraints/+merge/185015
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : all: implements Environ.SanityCheckConstraints #
Total comments: 16
Patch Set 3 : all: implements Environ.SanityCheckConstraints #Patch Set 4 : all: introduce environs.Preflighter #Patch Set 5 : all: introduce environs.Preflighter #
Total comments: 8
Patch Set 6 : all: introduce environs.Prechecker #
Total comments: 10
Patch Set 7 : all: introduce environs.Prechecker #Patch Set 8 : all: introduce environs.Prechecker #
Total comments: 3
Patch Set 9 : all: introduce environs.Prechecker #
MessagesTotal messages: 29
|