diff --git a/magnum/tests/functional/api/v1/test_bay.py b/magnum/tests/functional/api/v1/test_bay.py index c8f5586..77415ac 100755 --- a/magnum/tests/functional/api/v1/test_bay.py +++ b/magnum/tests/functional/api/v1/test_bay.py @@ -58,7 +58,7 @@ class BayTest(base.BaseTempestTest): creds=self.creds, type_of_creds='default', request_type='cert') - model = datagen.valid_swarm_baymodel() + model = datagen.valid_swarm_mode_baymodel() _, self.baymodel = self._create_baymodel(model) # NOTE (dimtruck) by default tempest sets timeout to 20 mins. diff --git a/magnum/tests/functional/api/v1/test_baymodel.py b/magnum/tests/functional/api/v1/test_baymodel.py index c95d38b..0bdce36 100644 --- a/magnum/tests/functional/api/v1/test_baymodel.py +++ b/magnum/tests/functional/api/v1/test_baymodel.py @@ -74,7 +74,7 @@ class BayModelTest(base.BaseTempestTest): @testtools.testcase.attr('positive') def test_create_get_public_baymodel(self): - gen_model = datagen.valid_swarm_baymodel(is_public=True) + gen_model = datagen.valid_swarm_mode_baymodel(is_public=True) self.assertRaises( exceptions.Forbidden, self.baymodel_client.post_baymodel, gen_model) diff --git a/magnum/tests/functional/api/v1/test_baymodel_admin.py b/magnum/tests/functional/api/v1/test_baymodel_admin.py index 9f8642e..67f5b15 100644 --- a/magnum/tests/functional/api/v1/test_baymodel_admin.py +++ b/magnum/tests/functional/api/v1/test_baymodel_admin.py @@ -57,7 +57,7 @@ class BayModelAdminTest(base.BaseTempestTest): @testtools.testcase.attr('positive') def test_create_get_public_baymodel(self): - gen_model = datagen.valid_swarm_baymodel(is_public=True) + gen_model = datagen.valid_swarm_mode_baymodel(is_public=True) resp, model = self._create_baymodel(gen_model) resp, model = self.baymodel_client.get_baymodel(model.uuid) diff --git a/magnum/tests/functional/api/v1/test_cluster.py b/magnum/tests/functional/api/v1/test_cluster.py index fc2a148..59b7004 100755 --- a/magnum/tests/functional/api/v1/test_cluster.py +++ b/magnum/tests/functional/api/v1/test_cluster.py @@ -63,7 +63,7 @@ class ClusterTest(base.BaseTempestTest): creds=self.creds, type_of_creds='default', request_type='cert') - model = datagen.valid_swarm_cluster_template() + model = datagen.valid_swarm_mode_cluster_template() _, self.cluster_template = self._create_cluster_template(model) # NOTE (dimtruck) by default tempest sets timeout to 20 mins. diff --git a/magnum/tests/functional/api/v1/test_cluster_template.py b/magnum/tests/functional/api/v1/test_cluster_template.py index b005373..8713248 100644 --- a/magnum/tests/functional/api/v1/test_cluster_template.py +++ b/magnum/tests/functional/api/v1/test_cluster_template.py @@ -79,7 +79,7 @@ class ClusterTemplateTest(base.BaseTempestTest): @testtools.testcase.attr('positive') def test_create_get_public_cluster_template(self): - gen_model = datagen.valid_swarm_cluster_template(is_public=True) + gen_model = datagen.valid_swarm_mode_cluster_template(is_public=True) self.assertRaises( exceptions.Forbidden, self.cluster_template_client.post_cluster_template, gen_model) diff --git a/magnum/tests/functional/api/v1/test_cluster_template_admin.py b/magnum/tests/functional/api/v1/test_cluster_template_admin.py index 22f4ee9..b8a2e83 100644 --- a/magnum/tests/functional/api/v1/test_cluster_template_admin.py +++ b/magnum/tests/functional/api/v1/test_cluster_template_admin.py @@ -59,7 +59,7 @@ class ClusterTemplateAdminTest(base.BaseTempestTest): @testtools.testcase.attr('positive') def test_create_get_public_cluster_template(self): - gen_model = datagen.valid_swarm_cluster_template(is_public=True) + gen_model = datagen.valid_swarm_mode_cluster_template(is_public=True) resp, model = self._create_cluster_template(gen_model) resp, model = \ diff --git a/magnum/tests/functional/common/datagen.py b/magnum/tests/functional/common/datagen.py index 2fa3fc4..b9a31f2 100644 --- a/magnum/tests/functional/common/datagen.py +++ b/magnum/tests/functional/common/datagen.py @@ -37,6 +37,7 @@ def gen_coe_dep_network_driver(coe): allowed_driver_types = { 'kubernetes': ['flannel', None], 'swarm': ['docker', 'flannel', None], + 'swarm-mode': ['docker', None], 'mesos': ['docker', None], } driver_types = allowed_driver_types[coe] @@ -47,6 +48,7 @@ def gen_coe_dep_volume_driver(coe): allowed_driver_types = { 'kubernetes': ['cinder', None], 'swarm': ['rexray', None], + 'swarm-mode': ['rexray', None], 'mesos': ['rexray', None], } driver_types = allowed_driver_types[coe] @@ -103,7 +105,7 @@ def baymodel_data(**kwargs): data = { "name": data_utils.rand_name('bay'), - "coe": "swarm", + "coe": "swarm-mode", "tls_disabled": False, "network_driver": None, "volume_driver": None, @@ -208,8 +210,8 @@ def baymodel_valid_data_with_specific_coe(coe): image_id=config.Config.image_id, coe=coe) -def valid_swarm_baymodel(is_public=False): - """Generates a valid swarm baymodel with valid data +def valid_swarm_mode_baymodel(is_public=False): + """Generates a valid swarm mode baymodel with valid data :returns: BayModelEntity with generated data """ @@ -218,7 +220,7 @@ def valid_swarm_baymodel(is_public=False): flavor_id=config.Config.flavor_id, public=is_public, dns_nameserver=config.Config.dns_nameserver, master_flavor_id=config.Config.master_flavor_id, - keypair_id=config.Config.keypair_id, coe="swarm", + keypair_id=config.Config.keypair_id, coe="swarm-mode", cluster_distro=None, external_network_id=config.Config.nic_id, http_proxy=None, https_proxy=None, no_proxy=None, @@ -343,7 +345,7 @@ def cluster_template_data(**kwargs): data = { "name": data_utils.rand_name('cluster'), - "coe": "swarm", + "coe": "swarm-mode", "tls_disabled": False, "network_driver": None, "volume_driver": None, @@ -485,8 +487,8 @@ def cluster_template_valid_data_with_specific_coe(coe): image_id=config.Config.image_id, coe=coe) -def valid_swarm_cluster_template(is_public=False): - """Generates a valid swarm cluster_template with valid data +def valid_swarm_mode_cluster_template(is_public=False): + """Generates a valid swarm-mode cluster_template with valid data :returns: ClusterTemplateEntity with generated data """ @@ -496,7 +498,7 @@ def valid_swarm_cluster_template(is_public=False): public=is_public, dns_nameserver=config.Config.dns_nameserver, master_flavor_id=master_flavor_id, - coe="swarm", + coe="swarm-mode", cluster_distro=None, external_network_id=config.Config.nic_id, http_proxy=None, https_proxy=None,