Add contrail check tests to rst.
Change-Id: I65e8b4a4cf10bb78ee314cdb141418fbfc210040
This commit is contained in:
@@ -42,6 +42,7 @@ Steps
|
||||
node-09: 'contrail-analytics';
|
||||
node-dpdk: 'compute', dpdk';
|
||||
4. Run OSTF tests
|
||||
5. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -88,6 +89,7 @@ Steps
|
||||
node-5: "compute", "ceph-osd";
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -134,6 +136,7 @@ Steps
|
||||
5. Delete node-05 with "compute" role
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -181,6 +184,7 @@ Steps
|
||||
node-dpdk: "compute", "dpdk";
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -226,6 +230,7 @@ Steps
|
||||
5. Delete node "node-dpdk" with "dpdk" and "compute" roles
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -307,6 +312,7 @@ Steps
|
||||
node-5: 'controller', 'ceph-osd';
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -352,6 +358,7 @@ Steps
|
||||
5. Delete node-01 with "controller" role
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -399,6 +406,136 @@ Steps
|
||||
node-5: 'contrail-config', 'contrail-control', 'contrail-db', 'contrail-analytics';
|
||||
8. Deploy changes
|
||||
9. Run OSTF
|
||||
10. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Contrail DPDK boot instance
|
||||
---------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
test_dpdk_boot_snapshot_vm
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Launch instance, create snapshot, launch instance from snapshot.
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create no default network with subnet.
|
||||
2. Get existing flavor with hpgs.
|
||||
3. Launch an instance using the default image and flavor with hpgs
|
||||
in the hpgs availability zone.
|
||||
4. Make snapshot of the created instance.
|
||||
5. Delete the last created instance.
|
||||
6. Launch another instance from the snapshot created in step 4
|
||||
and flavor with hpgs in the hpgs availability zone.
|
||||
7. Delete the last created instance.
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Contrail DPDK boot instance from volume
|
||||
---------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
test_dpdk_volume
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Create volume and boot instance from it.
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create no default network with subnet.
|
||||
2. Get existing flavor with hpgs.
|
||||
3. Create a new small-size volume from image.
|
||||
4. Wait for volume status to become "available".
|
||||
5. Launch an instance using the default image and flavor with hpgs
|
||||
in the hpgs availability zone.
|
||||
6. Wait for "Active" status.
|
||||
7. Delete the last created instance.
|
||||
8. Delete volume and verify that volume deleted.
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Contrail DPDK Check network connectivity from instance via floating IP
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
test_dpdk_check_public_connectivity_from_instance
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Check network connectivity from instance via floating IP
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create no default network with subnet.
|
||||
2. Create Router_01, set gateway and add interface
|
||||
to external network.
|
||||
3. Get existing flavor with hpgs.
|
||||
4. Create a new security group (if it doesn`t exist yet).
|
||||
5. Launch an instance using the default image and flavor with hpgs
|
||||
in the hpgs availability zone.
|
||||
6. Create a new floating IP.
|
||||
7. Assign the new floating IP to the instance.
|
||||
8. Check connectivity to the floating IP using ping command.
|
||||
9. Check that public IP 8.8.8.8 can be pinged from instance.
|
||||
10. Delete instance.
|
||||
|
||||
|
||||
Expected results
|
||||
|
||||
@@ -34,6 +34,7 @@ Steps
|
||||
4. And contrail-control, contrail-config, contrail-db and contrail-analytics nodes
|
||||
5. Deploy cluster
|
||||
6. Run OSTF tests
|
||||
7. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -74,6 +75,7 @@ Steps
|
||||
5. Add a node with compute+ceph roles
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -114,6 +116,7 @@ Steps
|
||||
5. Delete a node with compute role
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -155,6 +158,7 @@ Steps
|
||||
5. Add a node with compute+sriov role
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -195,6 +199,7 @@ Steps
|
||||
5. Delete a node with compute+sriov roles
|
||||
6. Deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Run contrail check tests
|
||||
|
||||
|
||||
Expected results
|
||||
@@ -317,3 +322,86 @@ Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors
|
||||
|
||||
|
||||
Contrail SRIOV boot instance
|
||||
----------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
test_sriov_boot_snapshot_vm
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Launch instance, create snapshot, launch instance from snapshot.
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create physical network.
|
||||
2. Create a subnet.
|
||||
3. Create a port.
|
||||
4. Boot the instance with the port on the SRIOV host.
|
||||
5. Create snapshot of instance.
|
||||
6. Delete the instance created in step 5.
|
||||
7. Launch instance from snapshot.
|
||||
8. Delete the instance created in step 7.
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Contrail SRIOV boot instance from volume
|
||||
----------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
test_sriov_volume
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Create volume and boot instance from it.
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create physical network.
|
||||
2. Create a subnet.
|
||||
3. Create a port.
|
||||
4. Create a new small-size volume from image.
|
||||
5. Wait for volume status to become "available".
|
||||
6. Launch instance from created volume and port on the SRIOV host.
|
||||
7. Wait for "Active" status.
|
||||
8. Delete instance.
|
||||
9. Delete volume and verify that volume deleted..
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
@@ -84,16 +84,16 @@ class TestContrailCheck(object):
|
||||
results[test_name] = 'Passed'
|
||||
except Exception as exc:
|
||||
if exc.message == 'SkipTest':
|
||||
logger.debug('{0} skipped.'.format(test_name))
|
||||
logger.info('{0} skipped.'.format(test_name))
|
||||
results[test_name] = 'Skipped'
|
||||
else:
|
||||
logger.debug('{0} failed with error {1}'.format(
|
||||
logger.info('{0} failed with error {1}'.format(
|
||||
test_name, exc))
|
||||
results[test_name] = 'Failed'
|
||||
try:
|
||||
self._clear_openstack()
|
||||
except Exception as exc:
|
||||
logger.debug('{0}'.format(exc))
|
||||
logger.info('{0}'.format(exc))
|
||||
return results
|
||||
|
||||
def _create_table_of_results(self, test_results):
|
||||
@@ -116,7 +116,7 @@ class TestContrailCheck(object):
|
||||
according bug
|
||||
"""
|
||||
test_result = self._run_tests(set_tests)
|
||||
logger.debug('{0}'.format(self._create_table_of_results(test_result)))
|
||||
logger.info('{0}'.format(self._create_table_of_results(test_result)))
|
||||
if should_fail:
|
||||
for failed_test in should_fail:
|
||||
test_result.pop(failed_test)
|
||||
@@ -138,17 +138,17 @@ class TestContrailCheck(object):
|
||||
|
||||
def _remove_network(self):
|
||||
"""Remove network."""
|
||||
logger.debug('Remove network.')
|
||||
logger.info('Remove network.')
|
||||
network_id = self.os_conn.nova.networks.find(label=self.net_name).id
|
||||
if network_id:
|
||||
try:
|
||||
self.os_conn.neutron.delete_network(network_id)
|
||||
except Exception as exc:
|
||||
logger.debug('Network was not deleted. {0}'.format(exc))
|
||||
logger.info('Network was not deleted. {0}'.format(exc))
|
||||
|
||||
def _remove_subnets(self):
|
||||
"""Remove subnets."""
|
||||
logger.debug('Remove subnets.')
|
||||
logger.info('Remove subnets.')
|
||||
subnet_ids = [
|
||||
sub['id'] for sub in self.os_conn.neutron.list_subnets()['subnets']
|
||||
if sub['name'] == self.net_name]
|
||||
@@ -157,11 +157,11 @@ class TestContrailCheck(object):
|
||||
try:
|
||||
self.os_conn.neutron.delete_subnet(subnet_id)
|
||||
except Exception as exc:
|
||||
logger.debug('Subnet was not deleted. {0}'.format(exc))
|
||||
logger.info('Subnet was not deleted. {0}'.format(exc))
|
||||
|
||||
def _remove_routers(self):
|
||||
"""Remove routers."""
|
||||
logger.debug('Remove routers.')
|
||||
logger.info('Remove routers.')
|
||||
router_ids = [
|
||||
router['id']
|
||||
for router in self.os_conn.neutron.list_routers()['routers']
|
||||
@@ -178,11 +178,11 @@ class TestContrailCheck(object):
|
||||
router, {"subnet_id": subnet_ids[0]})
|
||||
self.os_conn.neutron.delete_router(router)
|
||||
except Exception as exc:
|
||||
logger.debug('Router was not deleted. {0}'.format(exc))
|
||||
logger.info('Router was not deleted. {0}'.format(exc))
|
||||
|
||||
def _remove_instances(self):
|
||||
"""Remove instances."""
|
||||
logger.debug('Remove instances.')
|
||||
logger.info('Remove instances.')
|
||||
instances = self.os_conn.get_servers()
|
||||
if instances:
|
||||
for instance in instances:
|
||||
@@ -192,11 +192,11 @@ class TestContrailCheck(object):
|
||||
self.os_conn.verify_srv_deleted(instance),
|
||||
"Instance was not deleted.")
|
||||
except Exception as exc:
|
||||
logger.debug('Instance was not deleted. {0}'.format(exc))
|
||||
logger.info('Instance was not deleted. {0}'.format(exc))
|
||||
|
||||
def _remove_security_groups(self):
|
||||
"""Remove security groups."""
|
||||
logger.debug('Remove security groups.')
|
||||
logger.info('Remove security groups.')
|
||||
security_groups = [
|
||||
sg
|
||||
for sg
|
||||
@@ -207,25 +207,25 @@ class TestContrailCheck(object):
|
||||
try:
|
||||
self.os_conn.nova.security_groups.delete(group['id'])
|
||||
except Exception as exc:
|
||||
logger.debug(
|
||||
logger.info(
|
||||
'Security group {0} was not deleted. {1}'.format(
|
||||
group['name'], exc))
|
||||
|
||||
def _remove_floating_ips(self):
|
||||
"""Remove floatig ips."""
|
||||
logger.debug('Remove floatig ips.')
|
||||
logger.info('Remove floatig ips.')
|
||||
floating_ips = self.os_conn.nova.floating_ips.list()
|
||||
if floating_ips:
|
||||
for fip in floating_ips:
|
||||
try:
|
||||
self.os_conn.nova.floating_ips.delete(fip)
|
||||
except Exception as exc:
|
||||
logger.debug('Floating ip {0} was not deleted. {1}'.format(
|
||||
logger.info('Floating ip {0} was not deleted. {1}'.format(
|
||||
fip, exc))
|
||||
|
||||
def _remove_images(self):
|
||||
"""Remove images."""
|
||||
logger.debug('Remove image.')
|
||||
logger.info('Remove image.')
|
||||
images = [
|
||||
image for image in self.os_conn.nova.images.list()
|
||||
if image['name'] == self.image_name]
|
||||
@@ -234,7 +234,7 @@ class TestContrailCheck(object):
|
||||
try:
|
||||
self.os_conn.nova.images.delete(image.id)
|
||||
except Exception as exc:
|
||||
logger.debug('Image {0} was not deleted. {1}'.format(
|
||||
logger.info('Image {0} was not deleted. {1}'.format(
|
||||
image.name, exc))
|
||||
|
||||
def test_dpdk_boot_snapshot_vm(self):
|
||||
@@ -649,5 +649,5 @@ class TestContrailCheck(object):
|
||||
nailgun_nodes)
|
||||
|
||||
for node in devops_nodes:
|
||||
logger.debug("Check contrail status for node {}".format(node.name))
|
||||
logger.info("Check contrail status for node {}".format(node.name))
|
||||
check_status(node.name)
|
||||
|
||||
Reference in New Issue
Block a user