aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/core/vnf.py7
-rw-r--r--functest/opnfv_tests/sdn/odl/odl.py2
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.py47
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py55
-rw-r--r--functest/tests/unit/odl/test_odl.py10
5 files changed, 57 insertions, 64 deletions
diff --git a/functest/core/vnf.py b/functest/core/vnf.py
index 0da8f6db..05baf432 100644
--- a/functest/core/vnf.py
+++ b/functest/core/vnf.py
@@ -50,8 +50,9 @@ class VnfOnBoarding(testcase.TestCase):
def __init__(self, **kwargs):
super(VnfOnBoarding, self).__init__(**kwargs)
- self.user_name = self.case_name
- self.tenant_name = self.case_name
+ self.uuid = uuid.uuid4()
+ self.user_name = "{}-{}".format(self.case_name, self.uuid)
+ self.tenant_name = "{}-{}".format(self.case_name, self.uuid)
self.snaps_creds = {}
self.created_object = []
self.os_project = None
@@ -106,7 +107,7 @@ class VnfOnBoarding(testcase.TestCase):
"""
try:
self.__logger.info(
- "Prepare VNF: %s, description: %s", self.tenant_name,
+ "Prepare VNF: %s, description: %s", self.case_name,
self.tenant_description)
snaps_creds = openstack_tests.get_credentials(
os_env_file=self.env_file)
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index 6af49ffa..4c33c495 100644
--- a/functest/opnfv_tests/sdn/odl/odl.py
+++ b/functest/opnfv_tests/sdn/odl/odl.py
@@ -183,8 +183,6 @@ class ODLTests(robotframework.RobotFramework):
kwargs['odlip'] = os.environ['SDN_CONTROLLER_IP']
kwargs['odlwebport'] = '8081'
kwargs['odlrestconfport'] = '8081'
- elif installer_type == 'joid':
- kwargs['odlip'] = os.environ['SDN_CONTROLLER']
elif installer_type == 'compass':
kwargs['odlrestconfport'] = '8080'
elif installer_type == 'daisy':
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
index 60434ca9..8efbf40a 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
@@ -63,8 +63,6 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
except Exception:
raise Exception("VNF config file not found")
- self.snaps_creds = ''
-
config_file = os.path.join(self.case_dir, self.config)
self.orchestrator = dict(
requirements=get_config("orchestrator.requirements", config_file),
@@ -126,7 +124,7 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
name=image_name, image_user='cloud',
img_format='qcow2', image_file=image_file))
image_creator.create()
- # self.created_object.append(image_creator)
+ self.created_object.append(image_creator)
def deploy_orchestrator(self):
"""
@@ -146,10 +144,12 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
self.created_object.append(keypair_creator)
self.__logger.info("Creating full network ...")
- subnet_settings = SubnetConfig(name='cloudify_ims_subnet',
- cidr='10.67.79.0/24')
- network_settings = NetworkConfig(name='cloudify_ims_network',
- subnet_settings=[subnet_settings])
+ subnet_settings = SubnetConfig(
+ name='cloudify_ims_subnet-{}'.format(self.uuid),
+ cidr='10.67.79.0/24')
+ network_settings = NetworkConfig(
+ name='cloudify_ims_network-{}'.format(self.uuid),
+ subnet_settings=[subnet_settings])
network_creator = OpenStackNetwork(self.snaps_creds, network_settings)
network_creator.create()
self.created_object.append(network_creator)
@@ -157,7 +157,7 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
router_creator = OpenStackRouter(
self.snaps_creds,
RouterConfig(
- name='cloudify_ims_router',
+ name='cloudify_ims_router-{}'.format(self.uuid),
external_gateway=ext_net_name,
internal_subnets=[subnet_settings.name]))
router_creator.create()
@@ -168,23 +168,23 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
sg_rules = list()
sg_rules.append(
SecurityGroupRuleConfig(
- sec_grp_name="sg-cloudify-manager",
+ sec_grp_name="sg-cloudify-manager-{}".format(self.uuid),
direction=Direction.ingress, protocol=Protocol.tcp,
port_range_min=1, port_range_max=65535))
sg_rules.append(
SecurityGroupRuleConfig(
- sec_grp_name="sg-cloudify-manager",
+ sec_grp_name="sg-cloudify-manager-{}".format(self.uuid),
direction=Direction.ingress, protocol=Protocol.udp,
port_range_min=1, port_range_max=65535))
- securit_group_creator = OpenStackSecurityGroup(
+ security_group_creator = OpenStackSecurityGroup(
self.snaps_creds,
SecurityGroupConfig(
- name="sg-cloudify-manager",
+ name="sg-cloudify-manager-{}".format(self.uuid),
rule_settings=sg_rules))
- securit_group_creator.create()
- self.created_object.append(securit_group_creator)
+ security_group_creator.create()
+ self.created_object.append(security_group_creator)
# orchestrator VM flavor
self.__logger.info("Get or create flavor for cloudify manager vm ...")
@@ -202,23 +202,24 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
image_user='centos',
exists=True)
- port_settings = PortConfig(name='cloudify_manager_port',
- network_name=network_settings.name)
+ port_settings = PortConfig(
+ name='cloudify_manager_port-{}'.format(self.uuid),
+ network_name=network_settings.name)
manager_settings = VmInstanceConfig(
- name='cloudify_manager',
+ name='cloudify_manager-{}'.format(self.uuid),
flavor=flavor_settings.name,
port_settings=[port_settings],
- security_group_names=[securit_group_creator.sec_grp_settings.name],
+ security_group_names=[
+ security_group_creator.sec_grp_settings.name],
floating_ip_settings=[FloatingIpConfig(
- name='cloudify_manager_fip',
+ name='cloudify_manager_fip-{}'.format(self.uuid),
port_name=port_settings.name,
router_name=router_creator.router_settings.name)])
- manager_creator = OpenStackVmInstance(self.snaps_creds,
- manager_settings,
- image_settings,
- keypair_settings)
+ manager_creator = OpenStackVmInstance(
+ self.snaps_creds, manager_settings, image_settings,
+ keypair_settings)
self.__logger.info("Creating cloudify manager VM")
manager_creator.create()
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index 020085ba..74c6d398 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -135,10 +135,9 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
if image_file and image_name:
image_creator = OpenStackImage(
self.snaps_creds,
- ImageConfig(name=image_name,
- image_user='cloud',
- img_format='qcow2',
- image_file=image_file))
+ ImageConfig(
+ name=image_name, image_user='cloud',
+ img_format='qcow2', image_file=image_file))
image_creator.create()
self.created_object.append(image_creator)
@@ -160,10 +159,12 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
self.created_object.append(keypair_creator)
self.__logger.info("Creating full network ...")
- subnet_settings = SubnetConfig(name='cloudify_vrouter_subnet',
- cidr='10.67.79.0/24')
- network_settings = NetworkConfig(name='cloudify_vrouter_network',
- subnet_settings=[subnet_settings])
+ subnet_settings = SubnetConfig(
+ name='cloudify_vrouter_subnet-{}'.format(self.uuid),
+ cidr='10.67.79.0/24')
+ network_settings = NetworkConfig(
+ name='cloudify_vrouter_network-{}'.format(self.uuid),
+ subnet_settings=[subnet_settings])
network_creator = OpenStackNetwork(self.snaps_creds, network_settings)
network_creator.create()
self.created_object.append(network_creator)
@@ -171,7 +172,7 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
router_creator = OpenStackRouter(
self.snaps_creds,
RouterConfig(
- name='cloudify_vrouter_router',
+ name='cloudify_vrouter_router-{}'.format(self.uuid),
external_gateway=ext_net_name,
internal_subnets=[subnet_settings.name]))
router_creator.create()
@@ -181,20 +182,22 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
self.__logger.info("Creating security group for cloudify manager vm")
sg_rules = list()
sg_rules.append(
- SecurityGroupRuleConfig(sec_grp_name="sg-cloudify-manager",
- direction=Direction.ingress,
- protocol=Protocol.tcp, port_range_min=1,
- port_range_max=65535))
+ SecurityGroupRuleConfig(
+ sec_grp_name="sg-cloudify-manager-{}".format(self.uuid),
+ direction=Direction.ingress,
+ protocol=Protocol.tcp, port_range_min=1,
+ port_range_max=65535))
sg_rules.append(
- SecurityGroupRuleConfig(sec_grp_name="sg-cloudify-manager",
- direction=Direction.ingress,
- protocol=Protocol.udp, port_range_min=1,
- port_range_max=65535))
+ SecurityGroupRuleConfig(
+ sec_grp_name="sg-cloudify-manager-{}".format(self.uuid),
+ direction=Direction.ingress,
+ protocol=Protocol.udp, port_range_min=1,
+ port_range_max=65535))
security_group_creator = OpenStackSecurityGroup(
self.snaps_creds,
SecurityGroupConfig(
- name="sg-cloudify-manager",
+ name="sg-cloudify-manager-{}".format(self.uuid),
rule_settings=sg_rules))
security_group_creator.create()
@@ -216,24 +219,24 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
image_user='centos',
exists=True)
- port_settings = PortConfig(name='cloudify_manager_port',
- network_name=network_settings.name)
+ port_settings = PortConfig(
+ name='cloudify_manager_port-{}'.format(self.uuid),
+ network_name=network_settings.name)
manager_settings = VmInstanceConfig(
- name='cloudify_manager',
+ name='cloudify_manager-{}'.format(self.uuid),
flavor=flavor_settings.name,
port_settings=[port_settings],
security_group_names=[
security_group_creator.sec_grp_settings.name],
floating_ip_settings=[FloatingIpConfig(
- name='cloudify_manager_fip',
+ name='cloudify_manager_fip-{}'.format(self.uuid),
port_name=port_settings.name,
router_name=router_creator.router_settings.name)])
- manager_creator = OpenStackVmInstance(self.snaps_creds,
- manager_settings,
- image_settings,
- keypair_settings)
+ manager_creator = OpenStackVmInstance(
+ self.snaps_creds, manager_settings, image_settings,
+ keypair_settings)
self.__logger.info("Creating cloudify manager VM")
manager_creator.create()
diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py
index d803d413..c11948bb 100644
--- a/functest/tests/unit/odl/test_odl.py
+++ b/functest/tests/unit/odl/test_odl.py
@@ -407,16 +407,6 @@ class ODLRunTesting(ODLTesting):
odlip=self._sdn_controller_ip, odlwebport='8081',
odlrestconfport='8081')
- def test_joid_no_controller_ip(self):
- os.environ["INSTALLER_TYPE"] = "joid"
- self.assertEqual(self.test.run(), testcase.TestCase.EX_RUN_ERROR)
-
- def test_joid(self):
- os.environ["SDN_CONTROLLER"] = self._sdn_controller_ip
- os.environ["INSTALLER_TYPE"] = "joid"
- self._test_run(testcase.TestCase.EX_OK, None,
- odlip=self._sdn_controller_ip, odlwebport='8080')
-
def test_compass(self):
os.environ["INSTALLER_TYPE"] = "compass"
self._test_run(testcase.TestCase.EX_OK, None,