Make private network optional

If a fixed_network and fixed_subnet is specified no private network
is created by the templates and the specified network is
used instead for VMs provisioning, like in the Ironic driver.

Currently missing is the code to handle the use case where you
specify a fixed_network but not a fixed_subnet, this will come
in a following patch.

Partially Implements: blueprint decouple-private-network
Change-Id: I2003eb709b22b905063d846eb71570fc5e033618
changes/54/380354/34
Mathieu Velten 7 years ago
parent a60529cb11
commit 22fb89a6e1

@ -0,0 +1,8 @@
resource_registry:
"Magnum::NetworkSwitcher": ../fragments/network_switcher_existing.yaml
# Cluster template
"Magnum::Optional::Neutron::Subnet": "OS::Heat::None"
"Magnum::Optional::Neutron::Net": "OS::Heat::None"
"Magnum::Optional::Neutron::Router": "OS::Heat::None"
"Magnum::Optional::Neutron::RouterInterface": "OS::Heat::None"

@ -0,0 +1,8 @@
resource_registry:
"Magnum::NetworkSwitcher": ../fragments/network_switcher_private.yaml
# Cluster template
"Magnum::Optional::Neutron::Subnet": "OS::Neutron::Subnet"
"Magnum::Optional::Neutron::Net": "OS::Neutron::Net"
"Magnum::Optional::Neutron::Router": "OS::Neutron::Router"
"Magnum::Optional::Neutron::RouterInterface": "OS::Neutron::RouterInterface"

@ -0,0 +1,27 @@
heat_template_version: 2014-10-16
parameters:
private_network:
type: string
default: ""
existing_network:
type: string
default: ""
private_subnet:
type: string
default: ""
existing_subnet:
type: string
default: ""
outputs:
network:
value: {get_param: existing_network}
subnet:
value: {get_param: existing_subnet}

@ -0,0 +1,27 @@
heat_template_version: 2014-10-16
parameters:
private_network:
type: string
default: ""
existing_network:
type: string
default: ""
private_subnet:
type: string
default: ""
existing_subnet:
type: string
default: ""
outputs:
network:
value: {get_param: private_network}
subnet:
value: {get_param: private_subnet}

@ -5,12 +5,19 @@ description: >
router for our server.
parameters:
existing_network:
type: string
default: ""
fixed_network_cidr:
existing_subnet:
type: string
default: ""
private_network_cidr:
type: string
description: network range for fixed ip network
fixed_network_name:
private_network_name:
type: string
description: fixed network name
default: ""
@ -24,37 +31,45 @@ parameters:
description: uuid/name of a network to use for floating ip addresses
resources:
fixed_network:
type: OS::Neutron::Net
private_network:
type: Magnum::Optional::Neutron::Net
properties:
name: {get_param: fixed_network_name}
name: {get_param: private_network_name}
fixed_subnet:
type: OS::Neutron::Subnet
private_subnet:
type: Magnum::Optional::Neutron::Subnet
properties:
cidr: {get_param: fixed_network_cidr}
network: {get_resource: fixed_network}
cidr: {get_param: private_network_cidr}
network: {get_resource: private_network}
dns_nameservers:
- {get_param: dns_nameserver}
extrouter:
type: OS::Neutron::Router
type: Magnum::Optional::Neutron::Router
properties:
external_gateway_info:
network: {get_param: external_network}
extrouter_inside:
type: OS::Neutron::RouterInterface
type: Magnum::Optional::Neutron::RouterInterface
properties:
router_id: {get_resource: extrouter}
subnet: {get_resource: fixed_subnet}
subnet: {get_resource: private_subnet}
network_switch:
type: Magnum::NetworkSwitcher
properties:
private_network: {get_resource: private_network}
private_subnet: {get_resource: private_subnet}
existing_network: {get_param: existing_network}
existing_subnet: {get_param: existing_subnet}
outputs:
fixed_network:
description: >
Created fixed network ID
value: {get_resource: fixed_network}
Network ID where to provision machines
value: {get_attr: [network_switch, network]}
fixed_subnet:
description: >
Created fixed subnet ID
value: {get_resource: fixed_subnet}
Subnet ID where to provision machines
value: {get_attr: [network_switch, subnet]}

@ -81,18 +81,9 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
def get_env_files(self, cluster_template):
env_files = []
if cluster_template.docker_volume_size is None:
env_files.append('no_volume.yaml')
else:
env_files.append('with_volume.yaml')
if cluster_template.master_lb_enabled:
env_files.append('with_master_lb.yaml')
else:
env_files.append('no_master_lb.yaml')
if cluster_template.floating_ip_enabled:
env_files.append('enable_floating_ip.yaml')
else:
env_files.append('disable_floating_ip.yaml')
return [template_def.COMMON_ENV_PATH + ef for ef in env_files]
template_def.add_priv_net_env_file(env_files, cluster_template)
template_def.add_volume_env_file(env_files, cluster_template)
template_def.add_lb_env_file(env_files, cluster_template)
template_def.add_fip_env_file(env_files, cluster_template)
return env_files

@ -60,6 +60,10 @@ class K8sTemplateDefinition(template_def.BaseTemplateDefinition):
self.add_parameter('external_network',
cluster_template_attr='external_network_id',
required=True)
self.add_parameter('fixed_network',
cluster_template_attr='fixed_network')
self.add_parameter('fixed_subnet',
cluster_template_attr='fixed_subnet')
self.add_parameter('network_driver',
cluster_template_attr='network_driver')
self.add_parameter('volume_driver',

@ -58,6 +58,10 @@ class SwarmFedoraTemplateDefinition(template_def.BaseTemplateDefinition):
self.add_parameter('external_network',
cluster_template_attr='external_network_id',
required=True)
self.add_parameter('fixed_network',
cluster_template_attr='fixed_network')
self.add_parameter('fixed_subnet',
cluster_template_attr='fixed_subnet')
self.add_parameter('network_driver',
cluster_template_attr='network_driver')
self.add_parameter('tls_disabled',
@ -115,14 +119,8 @@ class SwarmFedoraTemplateDefinition(template_def.BaseTemplateDefinition):
def get_env_files(self, cluster_template):
env_files = []
if cluster_template.docker_volume_size is None:
env_files.append('no_volume.yaml')
else:
env_files.append('with_volume.yaml')
template_def.add_priv_net_env_file(env_files, cluster_template)
template_def.add_volume_env_file(env_files, cluster_template)
template_def.add_lb_env_file(env_files, cluster_template)
if cluster_template.master_lb_enabled:
env_files.append('with_master_lb.yaml')
else:
env_files.append('no_master_lb.yaml')
return [template_def.COMMON_ENV_PATH + ef for ef in env_files]
return env_files

@ -313,3 +313,31 @@ class BaseTemplateDefinition(TemplateDefinition):
else:
cluster.discovery_url = discovery_url
return discovery_url
def add_lb_env_file(env_files, cluster_template):
if cluster_template.master_lb_enabled:
env_files.append(COMMON_ENV_PATH + 'with_master_lb.yaml')
else:
env_files.append(COMMON_ENV_PATH + 'no_master_lb.yaml')
def add_volume_env_file(env_files, cluster_template):
if cluster_template.docker_volume_size is None:
env_files.append(COMMON_ENV_PATH + 'no_volume.yaml')
else:
env_files.append(COMMON_ENV_PATH + 'with_volume.yaml')
def add_fip_env_file(env_files, cluster_template):
if cluster_template.floating_ip_enabled:
env_files.append(COMMON_ENV_PATH + 'enable_floating_ip.yaml')
else:
env_files.append(COMMON_ENV_PATH + 'disable_floating_ip.yaml')
def add_priv_net_env_file(env_files, cluster_template):
if cluster_template.fixed_network:
env_files.append(COMMON_ENV_PATH + 'no_private_network.yaml')
else:
env_files.append(COMMON_ENV_PATH + 'with_private_network.yaml')

@ -32,18 +32,10 @@ class CoreOSK8sTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
def get_env_files(self, cluster_template):
env_files = []
if cluster_template.master_lb_enabled:
env_files.append(
template_def.COMMON_ENV_PATH + 'with_master_lb.yaml')
else:
env_files.append(
template_def.COMMON_ENV_PATH + 'no_master_lb.yaml')
if cluster_template.floating_ip_enabled:
env_files.append(
template_def.COMMON_ENV_PATH + 'enable_floating_ip.yaml')
else:
env_files.append(
template_def.COMMON_ENV_PATH + 'disable_floating_ip.yaml')
template_def.add_priv_net_env_file(env_files, cluster_template)
template_def.add_lb_env_file(env_files, cluster_template)
template_def.add_fip_env_file(env_files, cluster_template)
return env_files

@ -16,6 +16,16 @@ parameters:
description: uuid/name of a network to use for floating ip addresses
default: public
fixed_network:
type: string
description: uuid/name of an existing network to use to provision machines
default: ""
fixed_subnet:
type: string
description: uuid/name of an existing subnet to use to provision machines
default: ""
server_image:
type: string
default: CoreOS
@ -212,10 +222,12 @@ resources:
network:
type: ../../common/templates/network.yaml
properties:
fixed_network_cidr: {get_param: fixed_network_cidr}
existing_network: {get_param: fixed_network}
existing_subnet: {get_param: fixed_subnet}
private_network_cidr: {get_param: fixed_network_cidr}
dns_nameserver: {get_param: dns_nameserver}
external_network: {get_param: external_network}
fixed_network_name: private
private_network_name: private
api_lb:
type: ../../common/templates/lb.yaml

@ -16,6 +16,16 @@ parameters:
description: uuid/name of a network to use for floating ip addresses
default: public
fixed_network:
type: string
description: uuid/name of an existing network to use to provision machines
default: ""
fixed_subnet:
type: string
description: uuid/name of an existing subnet to use to provision machines
default: ""
server_image:
type: string
description: glance image used to boot the server
@ -276,10 +286,12 @@ resources:
network:
type: ../../common/templates/network.yaml
properties:
fixed_network_cidr: {get_param: fixed_network_cidr}
existing_network: {get_param: fixed_network}
existing_subnet: {get_param: fixed_subnet}
private_network_cidr: {get_param: fixed_network_cidr}
dns_nameserver: {get_param: dns_nameserver}
external_network: {get_param: external_network}
fixed_network_name: private
private_network_name: private
api_lb:
type: ../../common/templates/lb.yaml

@ -24,6 +24,10 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
self.add_parameter('external_network',
cluster_template_attr='external_network_id',
required=True)
self.add_parameter('fixed_network',
cluster_template_attr='fixed_network')
self.add_parameter('fixed_subnet',
cluster_template_attr='fixed_subnet')
self.add_parameter('number_of_slaves',
cluster_attr='node_count')
self.add_parameter('master_flavor',
@ -78,10 +82,12 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
**kwargs)
def get_env_files(self, cluster_template):
if cluster_template.master_lb_enabled:
return [template_def.COMMON_ENV_PATH + 'with_master_lb.yaml']
else:
return [template_def.COMMON_ENV_PATH + 'no_master_lb.yaml']
env_files = []
template_def.add_priv_net_env_file(env_files, cluster_template)
template_def.add_lb_env_file(env_files, cluster_template)
return env_files
@property
def driver_module_path(self):

@ -17,6 +17,16 @@ parameters:
description: uuid/name of a network to use for floating ip addresses
default: public
fixed_network:
type: string
description: uuid/name of an existing network to use to provision machines
default: ""
fixed_subnet:
type: string
description: uuid/name of an existing subnet to use to provision machines
default: ""
server_image:
type: string
default: ubuntu-mesos
@ -207,7 +217,9 @@ resources:
network:
type: ../../common/templates/network.yaml
properties:
fixed_network_cidr: {get_param: fixed_network_cidr}
existing_network: {get_param: fixed_network}
existing_subnet: {get_param: fixed_subnet}
private_network_cidr: {get_param: fixed_network_cidr}
dns_nameserver: {get_param: dns_nameserver}
external_network: {get_param: external_network}

@ -21,6 +21,16 @@ parameters:
type: string
description: uuid/name of a network to use for floating ip addresses
fixed_network:
type: string
description: uuid/name of an existing network to use to provision machines
default: ""
fixed_subnet:
type: string
description: uuid/name of an existing subnet to use to provision machines
default: ""
discovery_url:
type: string
description: url provided for node discovery
@ -246,7 +256,9 @@ resources:
network:
type: ../../common/templates/network.yaml
properties:
fixed_network_cidr: {get_param: fixed_network_cidr}
existing_network: {get_param: fixed_network}
existing_subnet: {get_param: fixed_subnet}
private_network_cidr: {get_param: fixed_network_cidr}
dns_nameserver: {get_param: dns_nameserver}
external_network: {get_param: external_network}

@ -34,6 +34,8 @@ class TestClusterConductorWithK8s(base.TestCase):
'keypair_id': 'keypair_id',
'dns_nameserver': 'dns_nameserver',
'external_network_id': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'network_driver': 'network_driver',
'volume_driver': 'volume_driver',
'docker_volume_size': 20,
@ -153,6 +155,8 @@ class TestClusterConductorWithK8s(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'network_driver': 'network_driver',
'volume_driver': 'volume_driver',
'dns_nameserver': 'dns_nameserver',
@ -191,9 +195,11 @@ class TestClusterConductorWithK8s(base.TestCase):
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml',
'../../common/templates/environments/disable_floating_ip.yaml'],
'../../common/templates/environments/disable_floating_ip.yaml',
],
env_files)
@patch('requests.get')
@ -234,6 +240,8 @@ class TestClusterConductorWithK8s(base.TestCase):
'docker_storage_driver': 'devicemapper',
'docker_volume_size': 20,
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'flannel_backend': 'vxlan',
'flannel_network_cidr': '10.101.0.0/16',
'flannel_network_subnetlen': '26',
@ -267,9 +275,11 @@ class TestClusterConductorWithK8s(base.TestCase):
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml',
'../../common/templates/environments/disable_floating_ip.yaml'],
'../../common/templates/environments/disable_floating_ip.yaml',
],
env_files)
@patch('requests.get')
@ -285,7 +295,7 @@ class TestClusterConductorWithK8s(base.TestCase):
'docker_volume_size', 'fixed_network', 'http_proxy',
'https_proxy', 'no_proxy', 'network_driver',
'master_flavor_id', 'docker_storage_driver',
'volume_driver']
'volume_driver', 'fixed_subnet']
for key in not_required:
self.cluster_template_dict[key] = None
self.cluster_dict['discovery_url'] = 'https://discovery.etcd.io/test'
@ -334,9 +344,11 @@ class TestClusterConductorWithK8s(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/no_volume.yaml',
['../../common/templates/environments/with_private_network.yaml',
'../../common/templates/environments/no_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml',
'../../common/templates/environments/disable_floating_ip.yaml'],
'../../common/templates/environments/disable_floating_ip.yaml',
],
env_files)
@patch('requests.get')
@ -368,6 +380,8 @@ class TestClusterConductorWithK8s(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'minion_flavor': 'flavor_id',
@ -398,7 +412,8 @@ class TestClusterConductorWithK8s(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/no_master_lb.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/no_master_lb.yaml',
'../../common/templates/environments/disable_floating_ip.yaml'],
env_files)
@ -429,6 +444,8 @@ class TestClusterConductorWithK8s(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'minion_flavor': 'flavor_id',
@ -459,7 +476,8 @@ class TestClusterConductorWithK8s(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/no_master_lb.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/no_master_lb.yaml',
'../../common/templates/environments/disable_floating_ip.yaml'],
env_files)
@ -614,6 +632,8 @@ class TestClusterConductorWithK8s(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -649,9 +669,11 @@ class TestClusterConductorWithK8s(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml',
'../../common/templates/environments/disable_floating_ip.yaml'],
'../../common/templates/environments/disable_floating_ip.yaml',
],
env_files)
reqget.assert_called_once_with('http://etcd/test?size=1')

@ -47,6 +47,8 @@ class TestClusterConductorWithMesos(base.TestCase):
'mesos_slave_work_dir': '/tmp/mesos/slave'
},
'master_lb_enabled': False,
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
}
self.cluster_dict = {
'id': 1,
@ -99,6 +101,8 @@ class TestClusterConductorWithMesos(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -128,7 +132,8 @@ class TestClusterConductorWithMesos(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/no_master_lb.yaml'],
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/no_master_lb.yaml'],
env_files)
@patch('magnum.objects.ClusterTemplate.get_by_uuid')
@ -139,7 +144,8 @@ class TestClusterConductorWithMesos(base.TestCase):
mock_objects_cluster_template_get_by_uuid):
not_required = ['image_id', 'master_flavor_id', 'flavor_id',
'dns_nameserver', 'fixed_network', 'http_proxy',
'https_proxy', 'no_proxy', 'volume_driver']
'https_proxy', 'no_proxy', 'volume_driver',
'fixed_subnet']
for key in not_required:
self.cluster_template_dict[key] = None
@ -179,7 +185,8 @@ class TestClusterConductorWithMesos(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/no_master_lb.yaml'],
['../../common/templates/environments/with_private_network.yaml',
'../../common/templates/environments/no_master_lb.yaml'],
env_files)
@patch('magnum.objects.ClusterTemplate.get_by_uuid')
@ -204,6 +211,8 @@ class TestClusterConductorWithMesos(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -233,7 +242,8 @@ class TestClusterConductorWithMesos(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_master_lb.yaml'],
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_master_lb.yaml'],
env_files)
@patch('magnum.objects.ClusterTemplate.get_by_uuid')
@ -259,6 +269,8 @@ class TestClusterConductorWithMesos(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -288,7 +300,8 @@ class TestClusterConductorWithMesos(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_master_lb.yaml'],
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_master_lb.yaml'],
env_files)
@patch('magnum.conductor.utils.retrieve_cluster_template')

@ -37,6 +37,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
'docker_volume_size': 20,
'docker_storage_driver': 'devicemapper',
'external_network_id': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'cluster_distro': 'fedora-atomic',
'coe': 'swarm',
'http_proxy': 'http_proxy',
@ -111,6 +113,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -144,7 +148,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml'],
env_files)
@ -181,6 +186,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -216,7 +223,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml'],
env_files)
@ -233,7 +241,7 @@ class TestClusterConductorWithSwarm(base.TestCase):
'docker_volume_size', 'fixed_network', 'http_proxy',
'https_proxy', 'no_proxy', 'network_driver',
'master_flavor_id', 'docker_storage_driver',
'volume_driver', 'rexray_preempt']
'volume_driver', 'rexray_preempt', 'fixed_subnet']
for key in not_required:
self.cluster_template_dict[key] = None
self.cluster_dict['discovery_url'] = 'https://discovery.etcd.io/test'
@ -280,7 +288,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/no_volume.yaml',
['../../common/templates/environments/with_private_network.yaml',
'../../common/templates/environments/no_volume.yaml',
'../../common/templates/environments/no_master_lb.yaml'],
env_files)
@ -313,6 +322,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -346,7 +357,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/with_master_lb.yaml'],
env_files)
@ -380,6 +392,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
expected = {
'ssh_key_name': 'keypair_id',
'external_network': 'external_network_id',
'fixed_network': 'fixed_network',
'fixed_subnet': 'fixed_subnet',
'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id',
'master_flavor': 'master_flavor_id',
@ -413,7 +427,8 @@ class TestClusterConductorWithSwarm(base.TestCase):
}
self.assertEqual(expected, definition)
self.assertEqual(
['../../common/templates/environments/with_volume.yaml',
['../../common/templates/environments/no_private_network.yaml',
'../../common/templates/environments/with_volume.yaml',
'../../common/templates/environments/with_master_lb.yaml'],
env_files)

Loading…
Cancel
Save