Implement Tempest Scenario Tests for Stack Updates
This change contains some of the new Tempest scenario tests to be used for testing the Valet stack update functionality. Specifically, these tests ensure that non-valet heat stacks are still working when Valet is in place. Change-Id: I8de4a54f90b768a24767e0ab3317aa348462a0f8 Story: #2001139 Task: #4860
This commit is contained in:
parent
8d11af2357
commit
aba24df431
@ -15,12 +15,14 @@
|
||||
|
||||
"""Analyzer."""
|
||||
|
||||
from collections import defaultdict
|
||||
import json
|
||||
import os
|
||||
from tempest import config
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from collections import defaultdict
|
||||
from tempest import config
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
@ -42,20 +44,22 @@ class Analyzer(object):
|
||||
self.tries = CONF.valet.TRIES_TO_SHOW_SERVER
|
||||
|
||||
def check(self, resources, levels, group_types):
|
||||
"""Checking if all instances are on the Appropriate hosts and racks """
|
||||
"""Checking if all instances are on the Appropriate hosts and racks."""
|
||||
self.log.log_info("Starting to check instances location")
|
||||
result = True
|
||||
|
||||
self.init_servers_list()
|
||||
self.init_resources(resources)
|
||||
ins_group = self.init_instances_for_group(resources,
|
||||
levels, group_types)
|
||||
ins_group = self.init_instances_for_group(resources, levels,
|
||||
group_types)
|
||||
|
||||
try:
|
||||
for group_type in ins_group:
|
||||
for group_resource in ins_group[group_type]:
|
||||
instances = group_resource[:2]
|
||||
level = group_resource[2]
|
||||
num_groups = len(group_resource) - 2
|
||||
instances = group_resource[:num_groups]
|
||||
level = group_resource[num_groups]
|
||||
group_name = group_resource[-1]
|
||||
|
||||
fn = \
|
||||
{
|
||||
@ -64,7 +68,7 @@ class Analyzer(object):
|
||||
"exclusivity": self.are_we_alone
|
||||
}[group_type]
|
||||
|
||||
result = result and fn(instances, level)
|
||||
result = result and fn(instances, group_name, level)
|
||||
|
||||
except Exception as ex:
|
||||
self.log.log_error("Exception at method check: %s" % ex,
|
||||
@ -74,7 +78,8 @@ class Analyzer(object):
|
||||
return result
|
||||
|
||||
def init_instances_for_group(self, resources, levels, group_types):
|
||||
self.log.log_info("initializing instances for groups")
|
||||
"""Init instances for a group with the given resources."""
|
||||
self.log.log_info("initializing instances for group")
|
||||
ins_group = defaultdict(list)
|
||||
index = 0
|
||||
|
||||
@ -82,13 +87,11 @@ class Analyzer(object):
|
||||
self.group_instance_name[grp] = \
|
||||
resources.groups[grp].group_resources
|
||||
resources.groups[grp].group_resources.append(levels[index])
|
||||
resources.groups[grp].group_resources.append(grp)
|
||||
ins_group[group_types[index]].append(
|
||||
resources.groups[grp].group_resources)
|
||||
++index
|
||||
|
||||
# replacing group for it's instances
|
||||
ins_group = self.organize(ins_group)
|
||||
|
||||
return ins_group
|
||||
|
||||
def init_resources(self, resources):
|
||||
@ -139,8 +142,7 @@ class Analyzer(object):
|
||||
|
||||
return hosts
|
||||
|
||||
def are_the_same(self, res_name, level):
|
||||
"""Return true if host aren't the same otherwise return False."""
|
||||
def are_the_same(self, res_name, group_name, level):
|
||||
self.log.log_info("verifying instances are on the same host/racks")
|
||||
hosts_list = self.get_instance_host(res_name)
|
||||
self.log.log_debug("hosts to compare: %s" % hosts_list)
|
||||
@ -159,8 +161,8 @@ class Analyzer(object):
|
||||
return False
|
||||
return True
|
||||
|
||||
def are_different(self, res_name, level):
|
||||
"""Check if all hosts (and racks) are different for all instances."""
|
||||
def are_different(self, res_name, group_name, level):
|
||||
"""Checking if all hosts (and racks) are different for all instances"""
|
||||
self.log.log_info("verifying instances are on different hosts/racks")
|
||||
diction = {}
|
||||
hosts_list = self.get_instance_host(res_name)
|
||||
@ -179,12 +181,14 @@ class Analyzer(object):
|
||||
return False
|
||||
return True
|
||||
|
||||
def are_we_alone(self, ins_for_group, level):
|
||||
"""Return True if no other instances in group on server."""
|
||||
self.log.log_info("verifying instances are on the "
|
||||
"same group hosts/racks")
|
||||
def are_we_alone(self, ins_for_group, group_name, level):
|
||||
self.log.log_info(
|
||||
"verifying instances are on the same group hosts/racks")
|
||||
|
||||
exclusivity_group_hosts = self.get_exclusivity_group_hosts()
|
||||
# Get the hosts which are involved in the exclusivity group. There
|
||||
# could be potentially many if group is at the rack level, or only one
|
||||
# if at the host level.
|
||||
exclusivity_group_hosts = self.get_exclusivity_group_hosts(group_name)
|
||||
|
||||
self.log.log_debug(
|
||||
"exclusivity group hosts are: %s " % exclusivity_group_hosts)
|
||||
@ -195,13 +199,13 @@ class Analyzer(object):
|
||||
for host in exclusivity_group_hosts:
|
||||
instances = self.instances_on_host[host]
|
||||
|
||||
self.log.log_debug("exclusivity group instances are: %s " % instances)
|
||||
|
||||
if level == "rack":
|
||||
instances = self.get_rack_instances(
|
||||
set(self.host_instance_dict.values()))
|
||||
|
||||
# host_instance_dict should be all the instances on the rack
|
||||
self.log.log_debug("exclusivity group instances are: %s " % instances)
|
||||
|
||||
# host_instance_dict should be all the instances on the host/rack
|
||||
if len(instances) < 1:
|
||||
return False
|
||||
|
||||
@ -211,28 +215,23 @@ class Analyzer(object):
|
||||
|
||||
return not instances
|
||||
|
||||
def organize(self, ins_group):
|
||||
"""Organize internal groups, return ins_group."""
|
||||
internal_ins = []
|
||||
for x in ins_group:
|
||||
for y in ins_group[x]:
|
||||
if y[0] in self.group_instance_name.keys():
|
||||
internal_ins.append(self.group_instance_name[y[0]][0])
|
||||
internal_ins.append(self.group_instance_name[y[1]][0])
|
||||
internal_ins.append(y[2])
|
||||
ins_group.pop(x)
|
||||
ins_group[x].append(internal_ins)
|
||||
return ins_group
|
||||
def get_exclusivity_group_hosts(self, group_name):
|
||||
"""Get all hosts with the exclusivity group instances on them.
|
||||
|
||||
def get_exclusivity_group_hosts(self):
|
||||
"""Get all hosts that exclusivity group instances are located on """
|
||||
The group could be rack level or host level.
|
||||
"""
|
||||
servers_list = self.nova_client.list_servers()
|
||||
exclusivity_hosts = []
|
||||
for serv in servers_list["servers"]:
|
||||
if "exclusivity" in serv["name"]:
|
||||
server = self.nova_client.show_server(serv["id"])
|
||||
exclusivity_hosts.append(
|
||||
server["server"]["OS-EXT-SRV-ATTR:host"])
|
||||
server = self.nova_client.show_server(serv["id"])
|
||||
if server:
|
||||
valet_meta = server["server"]["metadata"]["valet"]
|
||||
if valet_meta:
|
||||
groups = json.loads(valet_meta)["groups"]
|
||||
for grp in groups:
|
||||
if group_name == grp:
|
||||
exclusivity_hosts.append(server["server"]
|
||||
["OS-EXT-SRV-ATTR:host"])
|
||||
return set(exclusivity_hosts)
|
||||
|
||||
def get_group_instances(self, resources, group_ins):
|
||||
|
@ -16,13 +16,15 @@
|
||||
"""Scenario Base."""
|
||||
|
||||
import os
|
||||
import traceback
|
||||
|
||||
from heatclient.common import template_utils
|
||||
from tempest import config
|
||||
from tempest import exceptions
|
||||
from tempest import test
|
||||
from tempest_lib.common.utils import data_utils
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from valet.tests.tempest.scenario.analyzer import Analyzer
|
||||
from valet.tests.tempest.scenario.general_logger import GeneralLogger
|
||||
from valet.tests.tempest.scenario.resources import TemplateResources
|
||||
from valet.tests.tempest.services.client import ValetClient
|
||||
|
||||
@ -47,6 +49,7 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
"""Setup resource, set catalog_type."""
|
||||
super(ScenarioTestCase, cls).resource_setup()
|
||||
cls.catalog_type = CONF.placement.catalog_type
|
||||
cls.logger = GeneralLogger("scenario")
|
||||
|
||||
@classmethod
|
||||
def resource_cleanup(cls):
|
||||
@ -64,10 +67,9 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
cls.os.auth_provider, CONF.placement.catalog_type,
|
||||
CONF.identity.region, **cls.os.default_params_with_timeout_values)
|
||||
|
||||
cls.possible_topdir = os.path.normpath(
|
||||
os.path.join(os.path.abspath(__file__), os.pardir))
|
||||
cls.topdir = os.path.normpath(os.path.join(os.path.abspath(__file__),
|
||||
os.pardir))
|
||||
cls.stack_identifier = None
|
||||
cls.tries = CONF.valet.TRIES_TO_CREATE
|
||||
|
||||
def run_test(self, logger, stack_name, template_path, levels, group_types):
|
||||
"""Scenario.
|
||||
@ -77,7 +79,7 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
"""
|
||||
self.log = logger
|
||||
self.log.log_info(" ******** Running Test ******** ")
|
||||
tmplt_url = self.possible_topdir + template_path
|
||||
tmplt_url = self.topdir + template_path
|
||||
template = TemplateResources(tmplt_url)
|
||||
|
||||
env_data = self.get_env_file(tmplt_url)
|
||||
@ -94,8 +96,9 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
|
||||
self.log.log_info(" ********** THE END ****************")
|
||||
|
||||
def create_stack(self, stack_name, env_data, template_resources, levels,
|
||||
group_types):
|
||||
def create_valet_stack(self, stack_name, env_data, template_resources,
|
||||
levels, group_types):
|
||||
"""Create Valet Specific Stack """
|
||||
try:
|
||||
groups = template_resources.groups
|
||||
index = 0
|
||||
@ -118,7 +121,7 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
instance.name = generated_name
|
||||
|
||||
res = self.wait_for_stack(stack_name, env_data, template_resources)
|
||||
self.addCleanup(self.delete_stack)
|
||||
self.addCleanup(self.delete_valet_stack)
|
||||
return res
|
||||
|
||||
except Exception:
|
||||
@ -135,7 +138,7 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
group_type=group_type)
|
||||
group_id = v_group['id']
|
||||
tenant_id = self.tenants_client.tenant_id
|
||||
self.addCleanup(self._delete_group, group_id)
|
||||
self.addCleanup(self.delete_group, group_id)
|
||||
|
||||
self.valet_client.add_members(group_id, [tenant_id])
|
||||
|
||||
@ -169,7 +172,7 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
self.log.log_error("Failed to load environment file",
|
||||
traceback.format_exc())
|
||||
|
||||
def _delete_group(self, group_id):
|
||||
def delete_group(self, group_id):
|
||||
try:
|
||||
self.valet_client.delete_all_members(group_id)
|
||||
self.valet_client.delete_group(group_id)
|
||||
@ -178,8 +181,7 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
traceback.format_exc())
|
||||
raise
|
||||
|
||||
def delete_stack(self):
|
||||
"""Use heat client to delete stack."""
|
||||
def delete_valet_stack(self):
|
||||
try:
|
||||
self.heat_client.delete_stack(self.stack_identifier)
|
||||
self.heat_client.wait_for_stack_status(
|
||||
@ -210,18 +212,66 @@ class ScenarioTestCase(test.BaseTestCase):
|
||||
self.stack_identifier, "CREATE_COMPLETE",
|
||||
failure_pattern='^.*CREATE_FAILED$')
|
||||
|
||||
except exceptions.StackBuildErrorException as ex:
|
||||
if "Ostro error" in str(ex) and self.tries > 0:
|
||||
msg = "Ostro error - try number %d"
|
||||
self.log.log_error(
|
||||
msg % (CONF.valet.TRIES_TO_CREATE - self.tries + 2))
|
||||
self.tries -= 1
|
||||
self.delete_stack()
|
||||
time.sleep(CONF.valet.PAUSE)
|
||||
self.wait_for_stack(stack_name, env_data, template_resources)
|
||||
else:
|
||||
self.log.log_error("Failed to create stack",
|
||||
traceback.format_exc())
|
||||
return False
|
||||
except Exception:
|
||||
self.log.log_error("Failed to create stack",
|
||||
traceback.format_exc())
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def get_env(self, env_path):
|
||||
if os.path.exists(env_path):
|
||||
with open(env_path, "r") as f:
|
||||
filedata = f.read()
|
||||
return filedata
|
||||
else:
|
||||
return None
|
||||
|
||||
def create_stack(self, stack_name, template_path, env_path=None):
|
||||
"""Create more generic stack (valet or not) """
|
||||
if env_path is None:
|
||||
env_path = "/templates/std_env.env"
|
||||
full_env_path = self.topdir + env_path
|
||||
|
||||
full_template_path = self.topdir + template_path
|
||||
tpl_files, template = template_utils.get_template_contents(
|
||||
full_template_path)
|
||||
env = self.get_env(full_env_path)
|
||||
|
||||
name = data_utils.rand_name(name=stack_name)
|
||||
new_stack = self.heat_client.create_stack(name, template=template,
|
||||
environment=env,
|
||||
files=tpl_files)
|
||||
stack_id = new_stack["stack"]["id"]
|
||||
full_stack_id = name + "/" + stack_id
|
||||
|
||||
self.heat_client.wait_for_stack_status(stack_id, "CREATE_COMPLETE")
|
||||
self.addCleanup(self.delete_stack, full_stack_id)
|
||||
|
||||
return full_stack_id, name
|
||||
|
||||
def check_stack(self, stack_id, template, levels, group_types):
|
||||
analyzer = Analyzer(self.logger, stack_id, self.heat_client,
|
||||
self.nova_client)
|
||||
template_res = TemplateResources(self.topdir + template)
|
||||
self.assertEqual(True, analyzer.check(template_res, levels,
|
||||
group_types))
|
||||
|
||||
def update_stack(self, stack_id, stack_name, template_path, env_path=None):
|
||||
if env_path is None:
|
||||
env_path = "/templates/std_env.env"
|
||||
full_env_path = self.topdir + env_path
|
||||
|
||||
full_template_path = self.topdir + template_path
|
||||
tpl_files, template = template_utils.get_template_contents(
|
||||
full_template_path)
|
||||
env = self.get_env(full_env_path)
|
||||
|
||||
self.heat_client.update_stack(stack_identifier=stack_id,
|
||||
name=stack_name, template=template,
|
||||
environment=env, files=tpl_files)
|
||||
self.heat_client.wait_for_stack_status(stack_id, "UPDATE_COMPLETE")
|
||||
|
||||
def delete_stack(self, stack_id):
|
||||
self.heat_client.delete_stack(stack_id)
|
||||
self.heat_client.wait_for_stack_status(stack_id, "DELETE_COMPLETE")
|
||||
|
@ -0,0 +1,152 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Template which creates multiple types of non-valet resources.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
cscf_RSG:
|
||||
type: OS::Neutron::SecurityGroup
|
||||
properties:
|
||||
description: Allow all
|
||||
name: cscf_RSG
|
||||
rules:
|
||||
- { direction: ingress, ethertype: IPv4 }
|
||||
- { direction: egress, ethertype: IPv4 }
|
||||
- { direction: ingress, ethertype: IPv6 }
|
||||
- { direction: egress, ethertype: IPv6 }
|
||||
|
||||
cscf_internal_network_0:
|
||||
type: OS::Neutron::Net
|
||||
properties:
|
||||
name: cscf_internal_network_0
|
||||
admin_state_up: True
|
||||
shared: False
|
||||
|
||||
cscf_internal_subnet_0:
|
||||
type: OS::Neutron::Subnet
|
||||
properties:
|
||||
name: cscf_internal_subnet_0
|
||||
ip_version: 4
|
||||
network: { get_resource: cscf_internal_network_0 }
|
||||
cidr: 10.200.212.0/24
|
||||
enable_dhcp: False
|
||||
gateway_ip: null
|
||||
|
||||
oam_server_group:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: oam_server_group
|
||||
policies: ["anti-affinity"]
|
||||
|
||||
oam_internal_0_port_0:
|
||||
type: OS::Neutron::Port
|
||||
depends_on:
|
||||
- cscf_internal_subnet_0
|
||||
properties:
|
||||
name: oam_internal_0_port_0
|
||||
network: { get_resource: cscf_internal_network_0 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.200.212.14
|
||||
allowed_address_pairs:
|
||||
- ip_address: "0.0.0.0/1"
|
||||
- ip_address: "128.0.0.0/1"
|
||||
- ip_address: "::/1"
|
||||
- ip_address: "8000::/1"
|
||||
|
||||
oam_oam_0_port_1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
name: oam_oam_0_port_1
|
||||
network: { get_param: network1 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.100.1.10
|
||||
allowed_address_pairs:
|
||||
- ip_address: 10.100.1.7
|
||||
|
||||
oam_server_0:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: {get_param: avail-zone1}
|
||||
scheduler_hints: { group: { get_resource: oam_server_group } }
|
||||
name: oam_server_0
|
||||
flavor: {get_param: flavor1}
|
||||
image: {get_param: image1}
|
||||
networks:
|
||||
- port: { get_resource: oam_internal_0_port_0 }
|
||||
- port: { get_resource: oam_oam_0_port_1 }
|
||||
|
||||
oam_internal_1_port_0:
|
||||
type: OS::Neutron::Port
|
||||
depends_on:
|
||||
- cscf_internal_subnet_0
|
||||
properties:
|
||||
name: oam_internal_1_port_0
|
||||
network: { get_resource: cscf_internal_network_0 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.200.212.15
|
||||
allowed_address_pairs:
|
||||
- ip_address: "0.0.0.0/1"
|
||||
- ip_address: "128.0.0.0/1"
|
||||
- ip_address: "::/1"
|
||||
- ip_address: "8000::/1"
|
||||
|
||||
oam_oam_1_port_1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
name: oam_oam_1_port_1
|
||||
network: {get_param: network1}
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.100.1.11
|
||||
allowed_address_pairs:
|
||||
- ip_address: 10.100.1.7
|
||||
|
||||
oam_server_1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: {get_param: avail-zone1}
|
||||
scheduler_hints: { group: { get_resource: oam_server_group } }
|
||||
name: oam_server_1
|
||||
flavor: {get_param: flavor1}
|
||||
image: {get_param: image1}
|
||||
networks:
|
||||
- port: { get_resource: oam_internal_1_port_0 }
|
||||
- port: { get_resource: oam_oam_1_port_1 }
|
||||
|
||||
outputs:
|
||||
internal_net_id:
|
||||
description: internal network
|
||||
value: {get_resource: cscf_internal_network_0}
|
||||
|
||||
cscf_security_group:
|
||||
description: cscf security group
|
||||
value: {get_resource: cscf_RSG}
|
@ -0,0 +1,95 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Template which creates multiple types of non-valet resources.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
cscf_RSG:
|
||||
type: OS::Neutron::SecurityGroup
|
||||
properties:
|
||||
description: Allow all
|
||||
name: cscf_RSG
|
||||
rules:
|
||||
- { direction: ingress, ethertype: IPv4 }
|
||||
- { direction: egress, ethertype: IPv4 }
|
||||
- { direction: ingress, ethertype: IPv6 }
|
||||
- { direction: egress, ethertype: IPv6 }
|
||||
|
||||
oam_server_group:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: oam_server_group
|
||||
policies: ["anti-affinity"]
|
||||
|
||||
oam_oam_0_port_1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
name: oam_oam_0_port_1
|
||||
network: { get_param: network1 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.100.1.10
|
||||
allowed_address_pairs:
|
||||
- ip_address: 10.100.1.7
|
||||
|
||||
oam_server_0:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: {get_param: avail-zone1}
|
||||
scheduler_hints: { group: { get_resource: oam_server_group } }
|
||||
name: oam_server_0
|
||||
flavor: {get_param: flavor1}
|
||||
image: {get_param: image1}
|
||||
networks:
|
||||
- port: { get_resource: oam_oam_0_port_1 }
|
||||
|
||||
oam_oam_1_port_1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
name: oam_oam_1_port_1
|
||||
network: {get_param: network1}
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.100.1.11
|
||||
allowed_address_pairs:
|
||||
- ip_address: 10.100.1.7
|
||||
|
||||
oam_server_1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: {get_param: avail-zone1}
|
||||
scheduler_hints: { group: { get_resource: oam_server_group } }
|
||||
name: oam_server_1
|
||||
flavor: {get_param: flavor1}
|
||||
image: {get_param: image1}
|
||||
networks:
|
||||
- port: { get_resource: oam_oam_1_port_1 }
|
||||
|
||||
outputs:
|
||||
cscf_security_group:
|
||||
description: cscf security group
|
||||
value: {get_resource: cscf_RSG}
|
@ -0,0 +1,151 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Template which creates multiple types of non-valet resources.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
cscf_RSG:
|
||||
type: OS::Neutron::SecurityGroup
|
||||
properties:
|
||||
description: Allow all
|
||||
name: cscf_RSG
|
||||
rules:
|
||||
- { direction: ingress, ethertype: IPv4 }
|
||||
- { direction: egress, ethertype: IPv4 }
|
||||
- { direction: ingress, ethertype: IPv4, protocol: tcp }
|
||||
|
||||
cscf_internal_network_0:
|
||||
type: OS::Neutron::Net
|
||||
properties:
|
||||
name: cscf_internal_network_0
|
||||
admin_state_up: True
|
||||
shared: False
|
||||
|
||||
cscf_internal_subnet_0:
|
||||
type: OS::Neutron::Subnet
|
||||
properties:
|
||||
name: cscf_internal_subnet_0
|
||||
ip_version: 4
|
||||
network: { get_resource: cscf_internal_network_0 }
|
||||
cidr: 10.200.212.0/24
|
||||
enable_dhcp: False
|
||||
gateway_ip: null
|
||||
|
||||
oam_server_group:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: oam_server_group
|
||||
policies: ["anti-affinity"]
|
||||
|
||||
oam_internal_0_port_0:
|
||||
type: OS::Neutron::Port
|
||||
depends_on:
|
||||
- cscf_internal_subnet_0
|
||||
properties:
|
||||
name: oam_internal_0_port_0
|
||||
network: { get_resource: cscf_internal_network_0 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.200.212.14
|
||||
allowed_address_pairs:
|
||||
- ip_address: "0.0.0.0/1"
|
||||
- ip_address: "128.0.0.0/1"
|
||||
- ip_address: "::/1"
|
||||
- ip_address: "8000::/1"
|
||||
|
||||
oam_oam_0_port_1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
name: oam_oam_0_port_1
|
||||
network: { get_param: network1 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.100.1.10
|
||||
allowed_address_pairs:
|
||||
- ip_address: 10.100.1.7
|
||||
|
||||
oam_server_0:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: {get_param: avail-zone1}
|
||||
scheduler_hints: { group: { get_resource: oam_server_group } }
|
||||
name: oam_server_0
|
||||
flavor: {get_param: flavor1}
|
||||
image: {get_param: image1}
|
||||
networks:
|
||||
- port: { get_resource: oam_internal_0_port_0 }
|
||||
- port: { get_resource: oam_oam_0_port_1 }
|
||||
|
||||
oam_internal_1_port_0:
|
||||
type: OS::Neutron::Port
|
||||
depends_on:
|
||||
- cscf_internal_subnet_0
|
||||
properties:
|
||||
name: oam_internal_1_port_0
|
||||
network: { get_resource: cscf_internal_network_0 }
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.200.212.15
|
||||
allowed_address_pairs:
|
||||
- ip_address: "0.0.0.0/1"
|
||||
- ip_address: "128.0.0.0/1"
|
||||
- ip_address: "::/1"
|
||||
- ip_address: "8000::/1"
|
||||
|
||||
oam_oam_1_port_1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
name: oam_oam_1_port_1
|
||||
network: {get_param: network1}
|
||||
security_groups:
|
||||
- { get_resource: cscf_RSG }
|
||||
fixed_ips:
|
||||
- ip_address: 10.100.1.11
|
||||
allowed_address_pairs:
|
||||
- ip_address: 10.100.1.7
|
||||
|
||||
oam_server_1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: {get_param: avail-zone1}
|
||||
scheduler_hints: { group: { get_resource: oam_server_group } }
|
||||
name: oam_server_1
|
||||
flavor: {get_param: flavor1}
|
||||
image: {get_param: image1}
|
||||
networks:
|
||||
- port: { get_resource: oam_internal_1_port_0 }
|
||||
- port: { get_resource: oam_oam_1_port_1 }
|
||||
|
||||
outputs:
|
||||
internal_net_id:
|
||||
description: internal network
|
||||
value: {get_resource: cscf_internal_network_0}
|
||||
|
||||
cscf_security_group:
|
||||
description: cscf security group
|
||||
value: {get_resource: cscf_RSG}
|
@ -0,0 +1,37 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create a single nova server
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -0,0 +1,43 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create a single nova server
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
nova_server_group:
|
||||
type: string
|
||||
description: 'nova server group to put the inner server into'
|
||||
|
||||
resources:
|
||||
|
||||
my-inner-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_param: nova_server_group}
|
@ -0,0 +1,43 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create a single nova server
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
nova_server_group:
|
||||
type: string
|
||||
description: 'nova server group to put the inner server into'
|
||||
|
||||
resources:
|
||||
|
||||
my-inner-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor2 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_param: nova_server_group}
|
@ -0,0 +1,37 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: UPDATED Create a single nova server
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -0,0 +1,37 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create a single nova server
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor2 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -41,3 +41,7 @@ resources:
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
@ -0,0 +1,56 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create a single nova server
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
nova_server_group:
|
||||
type: string
|
||||
description: 'nova server group to put the inner server into'
|
||||
|
||||
resources:
|
||||
|
||||
my-inner-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_param: nova_server_group}
|
||||
|
||||
my-inner-vm-resource2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: inner-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_param: nova_server_group}
|
||||
|
@ -0,0 +1,51 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_1_instance.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
|
@ -0,0 +1,60 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_1_instance_nova_group.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
nova_server_group: {get_resource: nova_server_group1}
|
@ -0,0 +1,60 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_1_instance_nova_group_upd_flavor.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
nova_server_group: {get_resource: nova_server_group1}
|
@ -0,0 +1,51 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_1_instance_upd_desc.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
|
@ -0,0 +1,51 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_1_instance_upd_flavor.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
|
@ -0,0 +1,51 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_2_instances.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
|
@ -0,0 +1,51 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 2
|
||||
resource_def:
|
||||
type: nested_inner_1_instance.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
|
@ -0,0 +1,60 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Outer portion of the nested heat template. Creates a server and calls the inner template.
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-outer-vm-resource:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: outer-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
nova_server_group: {get_resource: nova_server_group1}
|
||||
|
||||
vm-group:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 1
|
||||
resource_def:
|
||||
type: nested_inner_2_instances_nova_group.yaml
|
||||
properties:
|
||||
avail-zone1: { get_param: avail-zone1 }
|
||||
image1: { get_param: image1 }
|
||||
flavor1: { get_param: flavor1 }
|
||||
flavor2: { get_param: flavor2 }
|
||||
network1: { get_param: network1 }
|
||||
nova_server_group: {get_resource: nova_server_group1}
|
@ -0,0 +1,47 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -0,0 +1,58 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
my-instance-3:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-3
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
@ -0,0 +1,37 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -0,0 +1,47 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: UPDATED Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -0,0 +1,47 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor2 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
@ -0,0 +1,47 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
@ -0,0 +1,66 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
nova_server_group2:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group2
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group2}
|
||||
|
@ -0,0 +1,59 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
@ -0,0 +1,90 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
nova_server_group2:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group2
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
my-instance-3:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-3
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group2}
|
||||
|
||||
my-instance-4:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-4
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group2}
|
||||
|
@ -0,0 +1,59 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- anti-affinity
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
@ -0,0 +1,59 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
description: Create stack host level affinity 2 Instances
|
||||
|
||||
parameters:
|
||||
|
||||
avail-zone1:
|
||||
type: string
|
||||
description: 'availability zone 1'
|
||||
|
||||
image1:
|
||||
type: string
|
||||
description: 'name of the image 1'
|
||||
|
||||
network1:
|
||||
type: string
|
||||
description: 'name of the network 1'
|
||||
|
||||
flavor1:
|
||||
type: string
|
||||
description: 'name of the flavor 1'
|
||||
|
||||
flavor2:
|
||||
type: string
|
||||
description: 'name of the flavor 2'
|
||||
|
||||
resources:
|
||||
|
||||
nova_server_group1:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: nova_server_group1
|
||||
policies:
|
||||
- affinity
|
||||
|
||||
my-instance-1:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-1
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor2 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
||||
my-instance-2:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
availability_zone: { get_param: avail-zone1 }
|
||||
name: test-2
|
||||
image: { get_param: image1 }
|
||||
flavor: { get_param: flavor1 }
|
||||
networks:
|
||||
- network: { get_param: network1 }
|
||||
scheduler_hints:
|
||||
group: {get_resource: nova_server_group1}
|
||||
|
8
valet/tests/tempest/scenario/templates/std_env.env
Normal file
8
valet/tests/tempest/scenario/templates/std_env.env
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
parameters:
|
||||
avail-zone1: nova
|
||||
image1: TestVM
|
||||
network1: admin_floating_net
|
||||
flavor1: m1.tiny
|
||||
flavor2: m1.small
|
||||
|
@ -0,0 +1,236 @@
|
||||
#
|
||||
# Copyright 2014-2017 AT&T Intellectual Property
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from tempest import config
|
||||
from tempest import test
|
||||
|
||||
from valet.tests.tempest.scenario.scenario_base import ScenarioTestCase
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class TestStackUpdatesNonValet(ScenarioTestCase):
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e001')
|
||||
def test_updates_no_groups_upd_desc(self):
|
||||
# Update the stack description in the template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_no_groups_upd_desc",
|
||||
"/templates/no_groups_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/no_groups_2_instances_upd_desc.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e002')
|
||||
def test_updates_no_groups_upd_flavor(self):
|
||||
# Update the flavor of one of the servers (tiny->small)
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_no_groups_upd_flavor",
|
||||
"/templates/no_groups_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/no_groups_2_instances_upd_flavor.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e003')
|
||||
def test_updates_no_groups_add_server(self):
|
||||
# Add a server to the template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_no_groups_add_server",
|
||||
"/templates/no_groups_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/no_groups_2_instances_add_server.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e004')
|
||||
def test_updates_no_groups_remove_server(self):
|
||||
# Remove a server from the template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_no_groups_remove_server",
|
||||
"/templates/no_groups_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/no_groups_2_instances_remove_server.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e005')
|
||||
def test_updates_nova_group_remove_server(self):
|
||||
# Remove a server from an existing Nova Server group
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_remove_server",
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_1_instance.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e006')
|
||||
def test_updates_nova_group_add_server(self):
|
||||
# Add a server to an existing Nova Server group
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_add_server",
|
||||
"/templates/nova_group_1_instance.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e007')
|
||||
def test_updates_nova_group_upd_flavor(self):
|
||||
# Update the flavor of a server in a Nova Server group
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_upd_flavor",
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_2_instances_upd_flavor.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e008')
|
||||
def test_updates_nova_group_add_group(self):
|
||||
# Add a new Nova Server group
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_add_group",
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_2_instances_2_groups.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e009')
|
||||
def test_updates_nova_group_remove_group(self):
|
||||
# Remove a Nova Server group
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_remove_group",
|
||||
"/templates/nova_group_2_instances_2_groups.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e00a')
|
||||
def test_updates_nova_group_upd_group_policy(self):
|
||||
# Change the group policy of a Nova Server group (affinity ->
|
||||
# anti-affinity)
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_upd_group_policy",
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_2_instances_antiaffinity.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e00b')
|
||||
def test_updates_nova_group_move_server(self):
|
||||
# Move a server from one Nova Server group to another
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_move_server",
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nova_group_1_instance_2_groups.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e00c')
|
||||
def test_updates_nova_group_remove_group_assignment(self):
|
||||
# Remove the Nova Server group assignment from the existing servers
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nova_group_remove_group_assignment",
|
||||
"/templates/nova_group_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/no_groups_2_instances.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e00d')
|
||||
def test_updates_multiple_resources_upd_security_rule(self):
|
||||
# Change the security rules for one of the networks
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_multiple_resources_upd_security_rule",
|
||||
"/templates/multiple_resource_types.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/multiple_resource_types_upd_secrule.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e00e')
|
||||
def test_updates_multiple_resources_remove_network(self):
|
||||
# Remove the network, and the associated ports for both servers
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_multiple_resources_remove_network",
|
||||
"/templates/multiple_resource_types.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/"
|
||||
"multiple_resource_types_remove_network.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e00f')
|
||||
def test_updates_nested_upd_desc(self):
|
||||
# Update the stack description on both inner and outer templates
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_upd_desc",
|
||||
"/templates/nested_total_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_2_instances_upd_desc.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e010')
|
||||
def test_updates_nested_upd_flavor(self):
|
||||
# Update the flavor of the inner template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_upd_flavor",
|
||||
"/templates/nested_total_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_2_instances_upd_flavor.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e011')
|
||||
def test_updates_nested_add_server(self):
|
||||
# Add a server to the inner template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_add_server",
|
||||
"/templates/nested_total_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_3_instances.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e012')
|
||||
def test_updates_nested_remove_server(self):
|
||||
# Remove a server from the inner template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_remove_server",
|
||||
"/templates/nested_total_3_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_2_instances.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e013')
|
||||
def test_updates_nested_increase_inner_instance_count(self):
|
||||
# Increase the count of inner template instances in the outer template.
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_increase_inner_instance_count",
|
||||
"/templates/nested_total_2_instances.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/"
|
||||
"nested_total_3_instances_count_increase.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e014')
|
||||
def test_updates_nested_decrease_inner_instance_count(self):
|
||||
# Decrease the count of inner template instances in the outer template.
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_decrease_inner_instance_count",
|
||||
"/templates/nested_total_3_instances_count_increase.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_2_instances.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e015')
|
||||
def test_updates_nested_nova_group_upd_flavor(self):
|
||||
# Update the flavor of the nova server inside the inner template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_nova_group_upd_flavor",
|
||||
"/templates/nested_total_2_instances_nova_group.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/"
|
||||
"nested_total_2_instances_nova_group_upd_flavor.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e016')
|
||||
def test_updates_nested_nova_group_add_server(self):
|
||||
# Add a nova server to the nova group inside the inner template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_nova_group_add_server",
|
||||
"/templates/nested_total_2_instances_nova_group.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_3_instances_nova_group.yml")
|
||||
|
||||
@test.idempotent_id('f323b3ba-82f8-4db7-8ea6-00005869e017')
|
||||
def test_updates_nested_nova_group_remove_server(self):
|
||||
# Remove one of the nova servers from the group inside the inner
|
||||
# template
|
||||
stack_id, stack_name = self.create_stack(
|
||||
"test_updates_nested_nova_group_remove_server",
|
||||
"/templates/nested_total_3_instances_nova_group.yml")
|
||||
self.update_stack(stack_id, stack_name,
|
||||
"/templates/nested_total_2_instances_nova_group.yml")
|
Loading…
x
Reference in New Issue
Block a user