Label validator function has been left behind, although it's not
checking for anything right now - might be useful in future.
Change-Id: I74c744dc957d73aef7556aff00837611dadbada7
Validate the existance of the subnet referenced by fixed_subnet. It's
not checked if the subnet is associated to the fixed_network.
Closes-Bug: #2038109
Change-Id: Ia75f0ae525b768ad5b965d22b522cca6f80dcab2
The validate_fixed_network() validator looks for an available network
matching the id or name, if no networks match a FixedNetworkNotFound
exception is raised, if more than one networks match then the Conflict
exception is raised.
Partial-Bug: #2038109
Change-Id: I7fb0122889feb4f8fa039be5752e8ac3fbc23b94
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I6245a207ec65df0ef11a798b4cffe3157abccb73
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: Spyros Trigazis <spyridon.trigazis@cern.ch>
A user may not rely on nova-keypairs to access their cluster
such as a preconfigured SSSD.
story: 2004402
task: 28035
Change-Id: I77fbdc174d3dddfd312fb8dac20516314d4c182e
Add flavor_id as an option during cluster create. If not given,
the default is taken from the cluster template.
Add flavor_id in the Cluster object and use that instead
of the one from ClusterTemplate.
Update both magnum and magnum cli documentation to reflect the above changes.
Partial-Bug: #1699245
Change-Id: Ib60c05cce1cf2639ca4740abdd264403033433f9
This is not correct,
because assertEqual(False, A) is a stricter check than assertFalse(A).
assertFalse(None) passes, but assertEqual(False, None) will fail.
Therefore, this patch weakened our tests.
Change-Id: I35c8978d8e189c894038b8d1e974938ffff71fcc
Swarm cluster can be created by specifying any of the scheduler
strategy supported by swarm. The strategy can be specified
while creating cluster template using labels parameter, Ex:-
--labels swarm_strategy=spread
Supported values for swarm_strategy=spread, binpack, random
Change-Id: If471f10a3b1f955638a77d5afe462aebdeb4277c
Implements: blueprint add-support-different-strategy-in-swarmbay
Keypair can now be added during Cluster create command. This allows
Clusters to be created from the same ClusterTemplate but have
different keypair values when created. If not specified on create
then the value from the ClusterTemplate will be used. Adds keypair_id
to Cluster object and uses of keypair_id will use the value from Cluster
instead of ClusterTemplate.
Added release note for new features in magnum and magnum CLI.
Change-Id: I177a5aa06f881156944a9f74c9ccc3cd2abac492
Implements: blueprint keypair-override-on-create
This patch is the first of 3 patches to change the internal
usage of the terms Bay and BayModel. This patch updates
BayModel to ClusterTemplate. No functionality should be
changed by this patch, just naming and db updates.
Change-Id: I0803e81be6482962be2878a8ea2c7480f89111ac
Implements: blueprint rename-bay-to-cluster
This reverts commit 15162ce33a.
Mesos services were not working, so reverted the patch
which renamed slave to agent.
Change-Id: I94a9a36e649f48f8e31386226226261ef459ce25
Closes-Bug: #1617407
Mesos community has renamed slave to agent. This change reflect
this renaming in the code.
Change-Id: Ic97a827345b62f812ed63180cd1f5820e2200682
Closes-Bug: #1516188
1. Check the network name to see if there is duplicate name. If so,
advise user to use network ID.
2. External network cannot be private network, so filter the query
for the external network with this attribute to validate.
Change-Id: Ic02add0338cef344d02ef68c8372488fbe0b8fcd
Closes-Bug: #1591018
mesos_slave_executor_env_variables is mesos executor
environment variables, and it should be a json form.
(1) validate mesos_slave_executor_env_variables
if matching the json form.
(2) modify the mesos slave configure file
(3) unit test
Partially-Implements:blueprint mesos-slave-flags
Change-Id: I35e56515f321b0df52b3ba0e8aba48d7dd421d58
Add the baymodel mesos_slave_image_providers labels validate and
mesos_slave_image_providers unit test
Change-Id: I63d36fb531783013d9f7762dd992a26508043448
Partially-Implements:blueprint mesos-slave-flags
Add the baymodel mesos-slave-isolatin labels validate and
mesos_slave_isolation unit test
Change-Id: I4826d3fec757e43da664f17226294a7caecd3508
Partially-Implements:blueprint mesos-slave-flags
Now, when we create baymodel with the invalid flavor_id and
master_flavor_id parameters, the baymodel can be created
successfully.
We need to validate the flavor_id and master_flavor before
creating baymodel.
Change-Id: Id6768d8246c97d56e529cbc1cab6c8c7d28ca43a
Closed-Bug: #1547345
For good user experience, we should validate Baymodel's image
in Bay creation. The following 3 conditions will be checked:
1. Image not existed - 404 Not Found
2. Found multiple images with same image name - 409 Conflict
3. Image 'os_distro' field is None or empty string - 404 Not Found
Patially-Implements: blueprint api-parameter-validation
Change-Id: I54a75c005cd7dbf406e6dd31a2f27e8e46c0612c
For good user experience, we should validate if Baymodel's keypair
is existed in Bay creation. When create a Bay, a 404 NotFound will
be raised if keypair in Bay's Baymodel isn't existed.
Patially-Implements: blueprint api-parameter-validation
Change-Id: I01f06ab54c5713b91ba6d8ead0d224bbe3d570e4
For good user experience, we should validate if Baymodel's network
is existed in Bay creation. When create a Bay, a 404 NotFound will
be raised if external_network in Bay's Baymodel isn't existed.
Change-Id: Iec2e06380ca53268b85bcdd7d1539f5d10a09181
Patially-Implements: blueprint api-parameter-validation
Currently when we create a Bay, the API parameter validation toward
Bay's Baymodel is not enough to prevent bay creation failure,
due to non-existed or unprivileged OpenStack resources(flavor,
image, keypair, external_network, fixted_network) can be
referenced and there're no check/validation toward them.
We should check the existence of flavor in Bay creation.
A 404 NotFound will be raised if flavor in Bay's Baymodel isn't existed.
Change-Id: I34e97e32a952c5d65dd2c37fbd99c202456f4877
Patially-Implements: blueprint api-parameter-validation