Commit Graph

24 Commits

Author SHA1 Message Date
Michal Nasiadka ed699b0c9a Drop k8s_fedora_atomic_v1 driver
Change-Id: I3551ae244ecf99f67a9b142c964c020a5fae70a3
2024-02-27 16:35:35 +00:00
Michal Nasiadka bc79012f46 Drop Swarm support
Label validator function has been left behind, although it's not
checking for anything right now - might be useful in future.

Change-Id: I74c744dc957d73aef7556aff00837611dadbada7
2024-01-24 13:20:21 +13:00
Felipe Reyes a8bce0bfee Add validator for fixed_subnet
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
2023-11-28 11:14:44 -03:00
Felipe Reyes 753baadbb8 Add validator for fixed_network.
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
2023-10-06 08:25:40 -03:00
guilhermesteinmuller 6e8657912c Drop Mesos code
The coe mesos has not been maintained for quite some
time and hasn't got much attention from the community
in general. As discussed in the mailing list [1] we
are dropping for now.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-December/026230.html

Co-Authored-By: jake.yip@ardc.edu.au

Change-Id: Ie7de9a37bfad6214f52d0605409e74d62a51df47
2023-03-07 14:02:05 +11:00
Sean McGinnis 45fd25c572 Use unittest.mock instead of third party mock
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>
2020-04-29 17:10:23 +03:00
Jim Bach 8f4643d85c Make providing a keypair optional
A user may not rely on nova-keypairs to access their cluster
such as a preconfigured SSSD.

story: 2004402
task: 28035

Change-Id: I77fbdc174d3dddfd312fb8dac20516314d4c182e
2018-11-21 16:17:46 +00:00
Ricardo Rocha 84006f63d7 Allow flavor_id on cluster create
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
2017-12-15 16:32:40 +00:00
indicoliteplus 37093b2436 Revert "Using assertFalse(A) instead of assertEqual(False, A)"
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
2017-06-15 12:46:54 +08:00
yatin 2d160ecfcb Support scheduler strategy for swarm cluster
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
2016-11-03 12:00:57 +05:30
Jaycen Grant 06f056f606 Allow keypair to be added during cluster create
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
2016-10-06 17:25:09 +00:00
Jaycen Grant 0b7c6401dd Rename BayModel DB, Object, and internal usage to ClusterTemplate
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
2016-09-01 14:47:39 -07:00
yatin 272903ff9e Revert "Update mesos slave to mesos agent"
This reverts commit 15162ce33a.

Mesos services were not working, so reverted the patch
which renamed slave to agent.

Change-Id: I94a9a36e649f48f8e31386226226261ef459ce25
Closes-Bug: #1617407
2016-08-30 08:49:45 +05:30
Rajiv Kumar 1f1a4c871a Increased test coverage
Test coverage for attr_validation.py has been increased from 94%
to 100%

Change-Id: I7e43b5c31ef6d338933a2bf1b4728a323f4b95d7
Partial-Bug: #1511667
2016-08-10 15:34:35 +05:30
Rajiv Kumar 15162ce33a Update mesos slave to mesos agent
Mesos community has renamed slave to agent. This change reflect
this renaming in the code.

Change-Id: Ic97a827345b62f812ed63180cd1f5820e2200682
Closes-Bug: #1516188
2016-07-18 08:51:17 +05:30
PanFengyun ae0b77a55a Improve validation for the external network parameter
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
2016-07-05 14:35:55 +08:00
wangqun 3bd8d5eb8b Add mesos_slave_executor_env_variables validate
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
2016-05-20 08:23:25 +00:00
wangqun f23be29dd7 Add mesos_slave_image_providers validate
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
2016-05-12 05:51:32 +00:00
wangqun f7f78f6b56 Add mesos_slave_isolation validate
Add the baymodel mesos-slave-isolatin labels validate and
mesos_slave_isolation unit test

Change-Id: I4826d3fec757e43da664f17226294a7caecd3508
Partially-Implements:blueprint mesos-slave-flags
2016-05-09 02:40:02 +00:00
wangqun 4d39d8cc94 Fix baymodel with invalid parameter can created.
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
2016-03-02 15:44:09 -05:00
houming-wang 3d3eaa1269 Validate image when create a Bay
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
2015-12-09 07:44:55 -05:00
houming-wang 8ab451ec39 Validate keypair when create a bay
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
2015-11-30 16:18:31 +08:00
houming-wang 6e6fcb7b6d Validate external network when create a bay
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
2015-11-27 22:20:58 -05:00
houming-wang 00add124ec Validate baymodel's flavor when create a bay
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
2015-11-26 09:28:06 -05:00