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
This commit is contained in:
parent
53285cfb1a
commit
317e1e69ca
|
@ -185,13 +185,6 @@ class BayModelTest(base.BaseTempestTest):
|
|||
exceptions.BadRequest,
|
||||
self.baymodel_client.post_baymodel, gen_model)
|
||||
|
||||
@testtools.testcase.attr('negative')
|
||||
def test_create_baymodel_missing_keypair(self):
|
||||
gen_model = datagen.baymodel_data_with_missing_keypair()
|
||||
self.assertRaises(
|
||||
exceptions.NotFound,
|
||||
self.baymodel_client.post_baymodel, gen_model)
|
||||
|
||||
@testtools.testcase.attr('negative')
|
||||
def test_update_baymodel_invalid_patch(self):
|
||||
# get json object
|
||||
|
|
|
@ -200,13 +200,11 @@ class ClusterTemplateTest(base.BaseTempestTest):
|
|||
exceptions.BadRequest,
|
||||
self.cluster_template_client.post_cluster_template, gen_model)
|
||||
|
||||
@testtools.testcase.attr('negative')
|
||||
@testtools.testcase.attr('positive')
|
||||
def test_create_cluster_template_missing_keypair(self):
|
||||
gen_model = \
|
||||
datagen.cluster_template_data_with_missing_keypair()
|
||||
self.assertRaises(
|
||||
exceptions.NotFound,
|
||||
self.cluster_template_client.post_cluster_template, gen_model)
|
||||
resp, model = self._create_cluster_template(gen_model)
|
||||
|
||||
@testtools.testcase.attr('negative')
|
||||
def test_update_cluster_template_invalid_patch(self):
|
||||
|
|
|
@ -502,7 +502,6 @@ def valid_swarm_cluster_template(is_public=False):
|
|||
public=is_public,
|
||||
dns_nameserver=config.Config.dns_nameserver,
|
||||
master_flavor_id=master_flavor_id,
|
||||
keypair_id=config.Config.keypair_id,
|
||||
coe="swarm", docker_volume_size=3,
|
||||
cluster_distro=None,
|
||||
external_network_id=config.Config.nic_id,
|
||||
|
@ -535,6 +534,7 @@ def cluster_data(name=data_utils.rand_name('cluster'),
|
|||
data = {
|
||||
"name": name,
|
||||
"cluster_template_id": cluster_template_id,
|
||||
"keypair": config.Config.keypair_id,
|
||||
"node_count": node_count,
|
||||
"discovery_url": None,
|
||||
"create_timeout": create_timeout,
|
||||
|
|
Loading…
Reference in New Issue