ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2016-present Ciena Corporation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | import unittest |
| 17 | import subprocess |
| 18 | from docker import Client |
| 19 | from itertools import chain |
| 20 | from nose.tools import * |
| 21 | from scapy.all import * |
| 22 | from CordContainer import * |
| 23 | import threading |
| 24 | import time |
| 25 | import os |
| 26 | import json |
| 27 | import pexpect |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 28 | import urllib |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 29 | log.setLevel('INFO') |
| 30 | |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 31 | flatten = lambda l: chain.from_iterable(l) |
| 32 | |
| 33 | class xos_exchange(unittest.TestCase): |
| 34 | |
| 35 | dckr = Client() |
| 36 | test_path = os.path.dirname(os.path.realpath(__file__)) |
| 37 | XOS_BASE_CONTAINER_IMAGE = 'xosproject/xos-base:latest' |
| 38 | XOS_BASE_CONTAINER_NAME = 'xos-base' |
| 39 | XOS_BASE_CONTAINER_PORTS = [8000] |
| 40 | XOS_SYN_OPENSTACK_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-openstack' |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 41 | XOS_SYN_OPENSTACK_CONTAINER_NAME = 'xos-synchronizer' |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 42 | XOS_SYN_OPENSTACK_CONTAINER_PORTS = [8000] |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 43 | XOS_POSTGRESQL_CONTAINER_IMAGE = 'xosproject/xos-postgres' |
| 44 | XOS_POSTGRESQL_CONTAINER_NAME = 'xos-db-postgres' |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 45 | XOS_POSTGRESQL_CONTAINER_PORTS = [5432] |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 46 | XOS_SYNDICATE_MS_CONTAINER_IMAGE = 'xosproject/syndicate-ms' |
| 47 | XOS_SYNDICATE_MS_CONTAINER_NAME = 'xos-syndicate-ms' |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 48 | XOS_SYNDICATE_MS_CONTAINER_PORTS = [8080] |
| 49 | XOS_SYNCHRONIZER_VTR_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-vtr' |
| 50 | XOS_SYNCHRONIZER_VTR_CONTAINER_NAME = 'xos-synchronizer-vtr' |
| 51 | XOS_SYNCHRONIZER_VTR_CONTAINER_PORTS = [8080] |
| 52 | XOS_SYNCHRONIZER_VSG_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-vsg' |
| 53 | XOS_SYNCHRONIZER_VSG_CONTAINER_NAME = 'xos-synchronizer-vsg' |
| 54 | XOS_SYNCHRONIZER_VSG_CONTAINER_PORTS = [8080] |
| 55 | XOS_SYNCHRONIZER_ONOS_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-onos' |
| 56 | XOS_SYNCHRONIZER_ONOS_CONTAINER_NAME = 'xos-synchronizer-onos' |
| 57 | XOS_SYNCHRONIZER_ONOS_CONTAINER_PORTS = [8080] |
| 58 | XOS_SYNCHRONIZER_FABRIC_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-fabric' |
| 59 | XOS_SYNCHRONIZER_FABRIC_CONTAINER_NAME = 'xos-synchronizer-fabric' |
| 60 | XOS_SYNCHRONIZER_FABRIC_CONTAINER_PORTS = [8080] |
| 61 | XOS_SYNCHRONIZER_VTN_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-vtn' |
| 62 | XOS_SYNCHRONIZER_VTN_CONTAINER_NAME = 'xos-synchronizer-vtn' |
| 63 | XOS_SYNCHRONIZER_VTN_CONTAINER_PORTS = [8080] |
| 64 | XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_IMAGE = 'xosproject/xos-synchronizer-onboarding' |
| 65 | XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_NAME = 'xos-synchronizer-onboarding' |
| 66 | XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_PORTS = [8080] |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 67 | XOS_API_ERROR_STRING_MATCH_1 = 'The resource you\'re looking for doesn\'t exist' |
| 68 | XOS_API_ERROR_STRING_MATCH_2 = 'Application Error' |
| 69 | XOS_API_UTILS_POST_LOGIN = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/login/' |
| 70 | #XOS_API_UTILS_GET_PORTFORWARDING = 'https://private-anon-873978896e-xos.apiary-mock.com/api/portforwarding/port' |
| 71 | XOS_API_UTILS_GET_PORT_FORWARDING = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/portforwarding/' |
| 72 | XOS_API_UTILS_GET_SLICES_PLUS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/slicesplus/' |
| 73 | XOS_API_UTILS_GET_SYNCHRONIZER = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/synchronizer/' |
| 74 | XOS_API_UTILS_GET_ONBOARDING_STATUS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/onboarding/service/ready' |
| 75 | XOS_API_UTILS_POST_TOSCA_RECIPE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/tosca/run/' |
| 76 | XOS_API_UTILS_GET_SSH_KEYS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/utility/sshkeys/' |
| 77 | XOS_API_TENANT_GET_ALL_SUBSCRIBERS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/' |
| 78 | XOS_API_TENANT_GET_SUBSCRIBER_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/' |
| 79 | XOS_API_TENANT_DELETE_SUBSCRIBER = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/' |
| 80 | XOS_API_TENANT_GET_SUBSCRIBER_FEATURE_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/' |
| 81 | XOS_API_TENANT_GET_READ_SUBSCRIBER_UPLINK_SPEED = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/uplink_speed/' |
| 82 | XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_UPLINK_SPEED = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/uplink_speed/' |
| 83 | XOS_API_TENANT_GET_READ_SUBSCRIBER_DOWNLINK_SPEED = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/downlink_speed/' |
| 84 | XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_DOWNLINK_SPEED = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/downlink_speed/' |
| 85 | XOS_API_TENANT_GET_READ_SUBSCRIBER_FEATURE_CDN = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/cdn/' |
| 86 | XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_FEATURE_CDN = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/cdn/' |
| 87 | XOS_API_TENANT_GET_READ_SUBSCRIBER_FEATURE_UVERSE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/uverse/' |
| 88 | XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_FEATURE_UVERSE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/uverse/' |
| 89 | XOS_API_TENANT_GET_READ_SUBSCRIBER_FEATURE_STATUS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/status/' |
| 90 | XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_FEATURE_STATUS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/subscriber/subscriber_id/features/status/' |
| 91 | XOS_API_TENANT_GET_ALL_TRUCKROLL = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/truckroll/truckroll_id/' |
| 92 | XOS_API_TENANT_POST_CREATE_TRUCKROLL = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/truckroll/truckroll_id/' |
| 93 | XOS_API_TENANT_GET_TRUCKROLL_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/truckroll/truckroll_id/' |
| 94 | XOS_API_TENANT_DELETE_TRUCKROLL_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/truckroll/truckroll_id/' |
| 95 | XOS_API_TENANT_GET_ALL_vOLT = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/volt/volt_id/' |
| 96 | XOS_API_TENANT_POST_CREATE_vOLT = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/volt/volt_id/' |
| 97 | XOS_API_TENANT_GET_vOLT_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/cord/volt/volt_id/' |
| 98 | XOS_API_TENANT_GET_ALL_ONOS_APPS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/tenant/onos/app/' |
| 99 | XOS_API_SERVICE_GET_ALL_EXAMPLE_SERVICE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/service/exampleservice/' |
| 100 | XOS_API_SERVICE_GET_ALL_ONOS_SERVICE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/service/onos/' |
| 101 | XOS_API_SERVICE_GET_ALL_vSG = 'https://private-anon-873978896e-xos.apiary-mock.com/api/service/vsg/' |
| 102 | XOS_API_CORE_GET_ALL_DEPLOYMENTS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/deployments/id/' |
| 103 | XOS_API_CORE_POST_CREATE_DEPLOYMENTS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/deployments/id/' |
| 104 | XOS_API_CORE_GET_DEPLOYMENT_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/deployments/id/' |
| 105 | XOS_API_CORE_DELETE_DEPLOYMENTS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/deployments/id/' |
| 106 | XOS_API_CORE_GET_ALL_FLAVORS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/flavoryys/id/' |
| 107 | XOS_API_CORE_POST_CREATE_FLAVORS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/flavors/id/' |
| 108 | XOS_API_CORE_GET_FLAVOR_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/flavors/id/' |
| 109 | XOS_API_CORE_DELETE_FLAVORS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/flavors/id/' |
| 110 | XOS_API_CORE_GET_ALL_INSTANCES = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/instances/' |
| 111 | XOS_API_CORE_POST_CREATE_INSTANCES = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/instances/?no_hyperlinks=1' |
| 112 | XOS_API_CORE_GET_INSTANCE_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/instances/id/' |
| 113 | XOS_API_CORE_DELETE_INSTANCES= 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/instances/id/' |
| 114 | XOS_API_CORE_GET_ALL_NODES = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/nodes/id/' |
| 115 | XOS_API_CORE_GET_ALL_SERVICES = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/services/id/' |
| 116 | XOS_API_CORE_POST_CREATE_SERVICE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/services/id/' |
| 117 | XOS_API_CORE_GET_SERVICE_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/services/id/' |
| 118 | XOS_API_CORE_DELETE_SERVICE = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/services/id/' |
| 119 | XOS_API_CORE_GET_ALL_SITES = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/sites/' |
| 120 | XOS_API_CORE_GET_SITES_DETAILS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/sites/id/' |
| 121 | XOS_API_CORE_GET_ALL_SLICES = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/slices/id/' |
| 122 | XOS_API_CORE_GET_ALL_USERS = 'https://private-anon-873978896e-xos.apiary-mock.com/api/core/users/id/' |
| 123 | |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 124 | |
| 125 | def setUp(self): |
| 126 | ''' Activate the XOS containers''' |
| 127 | self.maxDiff = None ##for assert_equal compare outputs on failure |
| 128 | |
| 129 | def tearDown(self): |
| 130 | '''Deactivate the xos containers''' |
| 131 | log.info('Tear down setup') |
| 132 | self.CURRENT_PORT_NUM = 4 |
| 133 | |
| 134 | def exists(self, name): |
| 135 | return '/{0}'.format(name) in list(flatten(n['Names'] for n in self.dckr.containers())) |
| 136 | |
| 137 | |
| 138 | def img_exists(self, image): |
| 139 | cnt = filter(lambda c: c['Image'] == image, self.dckr.containers()) |
| 140 | return image in [ctn['RepoTags'][0] if ctn['RepoTags'] else '' for ctn in self.dckr.images()] |
| 141 | |
| 142 | def xos_containers_check(self, name, image): |
| 143 | if self.exists(name) != True: |
| 144 | if name == self.XOS_BASE_CONTAINER_NAME: |
| 145 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
| 146 | xosBase = Xos_base(prefix = Container.IMAGE_PREFIX, update = False) |
| 147 | if name == self.XOS_SYN_OPENSTACK_CONTAINER_NAME: |
| 148 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 149 | xosSynOpenstack = XosSynchronizerOpenstack(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 150 | if name == self.XOS_POSTGRESQL_CONTAINER_NAME: |
| 151 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 152 | xosPostgresql = XosPostgresql(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 153 | if name == self.XOS_SYNDICATE_MS_CONTAINER_NAME: |
| 154 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 155 | xosSyndicateMs = XosSyndicateMs(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 156 | if name == self.XOS_SYNCHRONIZER_VTR_CONTAINER_NAME: |
| 157 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 158 | xosSynOpenstack = XosSyncVtr(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 159 | if name == self.XOS_SYNCHRONIZER_VSG_CONTAINER_NAME: |
| 160 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 161 | xosSynOpenstack = XosSyncVsg(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 162 | if name == self.XOS_SYNCHRONIZER_ONOS_CONTAINER_NAME: |
| 163 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 164 | xosSynOpenstack = XosSyncOnos(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 165 | if name == self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_NAME: |
| 166 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 167 | xosSynOpenstack = XosSyncFabric(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 168 | if name == self.XOS_SYNCHRONIZER_VTN_CONTAINER_NAME: |
| 169 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 170 | xosSynOpenstack = XosSyncVtn(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 171 | if name == self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_NAME: |
| 172 | log.info('%s container is not running, hence build and run it, waiting until container is up' %name) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 173 | xosSynOpenstack = XosSynchronizerOnboarding(prefix = Container.IMAGE_PREFIX, update = False) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 174 | if self.img_exists(image) != True: |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 175 | log.info('%s container image is not built on host' %name) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 176 | assert_equal(False, True) |
| 177 | if self.exists(name) != True: |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 178 | log.info('%s container image is build on host' %name) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 179 | assert_equal(False, True) |
| 180 | |
| 181 | def container_status(self, image, name): |
| 182 | ''' This function is checking that container is up and running''' |
| 183 | self.xos_containers_check(name, image) |
| 184 | container_info = self.dckr.containers(filters ={'name':name, 'status':'running'}) |
| 185 | log.info('Xos container info= %s' %container_info) |
| 186 | |
| 187 | if not container_info: |
| 188 | ## forcely failing test case |
| 189 | log.info('%s container is not running, container info %s' %(name,container_info)) |
| 190 | assert_equal(False, True) |
| 191 | else: |
| 192 | container_status = container_info[0]['Status'] |
| 193 | log.info('Xos container status= %s' %container_status) |
| 194 | assert_equal(container_status.split(' ')[0], 'Up') |
| 195 | return container_info |
| 196 | |
| 197 | def container_ping(self, image, name): |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 198 | ''' This function is checking if container is reachable ''' |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 199 | container_info = self.container_status(image= image, name= name) |
| 200 | container_ip = container_info[0]['NetworkSettings']['Networks']['bridge']['IPAddress'] |
| 201 | ping_status = os.system('ping {} -c 3'.format(container_ip)) |
| 202 | if ping_status != 0: |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 203 | log.info('%s container is not reachable, response %s = '%(name,ping_status)) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 204 | assert_equal(ping_status, 0) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 205 | log.info('%s container is not reachable, response = %s'%(name,ping_status)) |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 206 | assert_equal(ping_status, 0) |
| 207 | |
| 208 | def container_listening_ports_info(self, image, name, ports_list): |
| 209 | ''' This function is checking that container ports are as excpeted ''' |
| 210 | container_public_ports = [] |
| 211 | container_info = self.container_status(image= image, name= name) |
| 212 | container_ports = container_info[0]['Ports'] |
| 213 | container_public_ports.append(container_ports[0]['PublicPort']) |
| 214 | log.info('%s container is listening on these ports = %s'%(name,container_ports)) |
| 215 | log.info('%s container is listening on these public ports = %s'%(name,container_public_ports)) |
| 216 | for n in range(0,len(ports_list)): |
| 217 | port = ports_list[n] |
| 218 | if port in container_public_ports: |
| 219 | assert_equal(True, True) |
| 220 | else: |
| 221 | log.info('%s container is not listening on %s port which is not expected' %(name,n)) |
| 222 | assert_equal(False, True) |
| 223 | |
| 224 | def container_stop_start(self): |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 225 | ''' This function is checking if container is stopped and started running again''' |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 226 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 227 | def validate_url_response_data(self, url): |
| 228 | ''' This function is checking url responce and cross check errors on it output ''' |
| 229 | response = urllib.urlopen(url) |
| 230 | data = response.read() |
| 231 | log.info('This is PORT FORWARDING URL reponse data {}'.format(data)) |
| 232 | if not data: |
| 233 | log.info('{} Url did not returned any output from opencloud setup'.format(url)) |
| 234 | assert_equal(True, False) |
| 235 | if self.XOS_API_ERROR_STRING_MATCH_1 in data: |
| 236 | log.info('Not an expected output from url'.format(url)) |
| 237 | assert_equal(True, False) |
| 238 | if self.XOS_API_ERROR_STRING_MATCH_2 in data: |
| 239 | log.info('Not an expected output from url'.format(url)) |
| 240 | assert_equal(True, False) |
| 241 | |
| 242 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 243 | def test_xos_base_container_status(self): |
| 244 | self.container_status(image = self.XOS_BASE_CONTAINER_IMAGE, name = self.XOS_BASE_CONTAINER_NAME) |
| 245 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 246 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 247 | def test_xos_base_container_ping(self): |
| 248 | self.container_ping(image = self.XOS_BASE_CONTAINER_IMAGE, name = self.XOS_BASE_CONTAINER_NAME) |
| 249 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 250 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 251 | def test_xos_base_container_listening_ports(self): |
| 252 | self.container_listening_ports_info(image = self.XOS_BASE_CONTAINER_IMAGE, name = self.XOS_BASE_CONTAINER_NAME, |
| 253 | ports_list = self.XOS_BASE_CONTAINER_PORTS) |
| 254 | |
| 255 | def test_xos_sync_openstack_container_status(self): |
| 256 | self.container_status(image = self.XOS_SYN_OPENSTACK_CONTAINER_IMAGE, name = self.XOS_SYN_OPENSTACK_CONTAINER_NAME) |
| 257 | |
| 258 | def test_xos_sync_openstack_container_ping(self): |
| 259 | self.container_ping(image = self.XOS_SYN_OPENSTACK_CONTAINER_IMAGE, name = self.XOS_SYN_OPENSTACK_CONTAINER_NAME) |
| 260 | |
| 261 | def test_xos_sync_openstack_container_listening_ports(self): |
| 262 | self.container_listening_ports_info(image = self.XOS_SYN_OPENSTACK_CONTAINER_IMAGE, |
| 263 | name = self.XOS_SYN_OPENSTACK_CONTAINER_NAME, |
| 264 | ports_list = self.XOS_SYN_OPENSTACK_CONTAINER_PORTS) |
| 265 | |
| 266 | def test_xos_postgresql_container_status(self): |
| 267 | self.container_status(image = self.XOS_POSTGRESQL_CONTAINER_IMAGE, name = self.XOS_POSTGRESQL_CONTAINER_NAME) |
| 268 | |
| 269 | def test_xos_postgresql_container_ping(self): |
| 270 | self.container_ping(image = self.XOS_POSTGRESQL_CONTAINER_IMAGE, name = self.XOS_POSTGRESQL_CONTAINER_NAME) |
| 271 | |
| 272 | def test_xos_postgresql_container_listening_ports(self): |
| 273 | self.container_listening_ports_info(image = self.XOS_POSTGRESQL_CONTAINER_IMAGE, |
| 274 | name = self.XOS_POSTGRESQL_CONTAINER_NAME, |
| 275 | ports_list = self.XOS_POSTGRESQL_CONTAINER_PORTS) |
| 276 | |
| 277 | def test_xos_syndicate_ms_container_status(self): |
| 278 | self.container_status(image = self.XOS_SYNDICATE_MS_CONTAINER_IMAGE, name = self.XOS_SYNDICATE_MS_CONTAINER_NAME) |
| 279 | |
| 280 | def test_xos_syndicate_ms_container_ping(self): |
| 281 | self.container_ping(image = self.XOS_SYNDICATE_MS_CONTAINER_IMAGE, name = self.XOS_SYNDICATE_MS_CONTAINER_NAME) |
| 282 | |
| 283 | def test_xos_syndicate_ms_container_listening_ports(self): |
| 284 | self.container_listening_ports_info(image = self.XOS_SYNDICATE_MS_CONTAINER_IMAGE, |
| 285 | name = self.XOS_SYNDICATE_MS_CONTAINER_NAME, |
| 286 | ports_list = self.XOS_SYNDICATE_MS_CONTAINER_PORTS) |
| 287 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 288 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 289 | def test_xos_sync_vtr_container_status(self): |
| 290 | self.container_status(image = self.XOS_SYNCHRONIZER_VTR_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_VTR_CONTAINER_NAME) |
| 291 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 292 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 293 | def test_xos_sync_vtr_container_ping(self): |
| 294 | self.container_ping(image = self.XOS_SYNCHRONIZER_VTR_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_VTR_CONTAINER_NAME) |
| 295 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 296 | @nottest |
| 297 | def ztest_xos_sync_vtr_container_listening_ports(self): |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 298 | self.container_listening_ports_info(image = self.XOS_SYNCHRONIZER_VTR_CONTAINER_IMAGE, |
| 299 | name = self.XOS_SYNCHRONIZER_VTR_CONTAINER_NAME, |
| 300 | ports_list = self.XOS_SYNCHRONIZER_VTR_CONTAINER_PORTS) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 301 | |
| 302 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 303 | def test_xos_sync_vsg_container_status(self): |
| 304 | self.container_status(image = self.XOS_SYNCHRONIZER_VSG_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_VSG_CONTAINER_NAME) |
| 305 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 306 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 307 | def test_xos_sync_vsg_container_ping(self): |
| 308 | self.container_ping(image = self.XOS_SYNCHRONIZER_VSG_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_VSG_CONTAINER_NAME) |
| 309 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 310 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 311 | def test_xos_sync_vsg_container_listening_ports(self): |
| 312 | self.container_listening_ports_info(image = self.XOS_SYNCHRONIZER_VSG_CONTAINER_IMAGE, |
| 313 | name = self.XOS_SYNCHRONIZER_VSG_CONTAINER_NAME, |
| 314 | ports_list = self.XOS_SYNCHRONIZER_VSG_CONTAINER_PORTS) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 315 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 316 | def test_xos_sync_onos_container_status(self): |
| 317 | self.container_status(image = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_NAME) |
| 318 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 319 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 320 | def test_xos_sync_onos_container_ping(self): |
| 321 | self.container_ping(image = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_NAME) |
| 322 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 323 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 324 | def test_xos_sync_onos_container_listening_ports(self): |
| 325 | self.container_listening_ports_info(image = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_IMAGE, |
| 326 | name = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_NAME, |
| 327 | ports_list = self.XOS_SYNCHRONIZER_ONOS_CONTAINER_PORTS) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 328 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 329 | def test_xos_sync_fabric_container_status(self): |
| 330 | self.container_status(image = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_NAME) |
| 331 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 332 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 333 | def test_xos_sync_fabric_container_ping(self): |
| 334 | self.container_ping(image = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_NAME) |
| 335 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 336 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 337 | def test_xos_sync_fabric_container_listening_ports(self): |
| 338 | self.container_listening_ports_info(image = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_IMAGE, |
| 339 | name = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_NAME, |
| 340 | ports_list = self.XOS_SYNCHRONIZER_FABRIC_CONTAINER_PORTS) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 341 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 342 | def test_xos_sync_vtn_container_status(self): |
| 343 | self.container_status(image = self.XOS_SYNCHRONIZER_VTN_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_VTN_CONTAINER_NAME) |
| 344 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 345 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 346 | def test_xos_sync_vtn_container_ping(self): |
| 347 | self.container_ping(image = self.XOS_SYNCHRONIZER_VTN_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_VTN_CONTAINER_NAME) |
| 348 | |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 349 | @nottest |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 350 | def test_xos_sync_vtn_container_listening_ports(self): |
| 351 | self.container_listening_ports_info(image = self.XOS_SYNCHRONIZER_VTN_CONTAINER_IMAGE, |
| 352 | name = self.XOS_SYNCHRONIZER_VTN_CONTAINER_NAME, |
| 353 | ports_list = self.XOS_SYNCHRONIZER_VTN_CONTAINER_PORTS) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 354 | |
ChetanGaonker | 2c0e9bb | 2016-09-21 13:38:37 -0700 | [diff] [blame] | 355 | def test_xos_sync_onboarding_container_status(self): |
| 356 | self.container_status(image = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_IMAGE) |
| 357 | |
| 358 | def test_xos_sync_onboarding_container_ping(self): |
| 359 | self.container_ping(image = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_IMAGE, name = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_IMAGE) |
| 360 | |
| 361 | def test_xos_sync_onboarding_container_listening_ports(self): |
| 362 | self.container_listening_ports_info(image = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_IMAGE, |
| 363 | name = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_NAME, |
| 364 | ports_list = self.XOS_SYNCHRONIZER_ONBOARDING_CONTAINER_PORTS) |
ChetanGaonker | c220e0d | 2016-10-05 05:06:25 -0700 | [diff] [blame] | 365 | |
| 366 | def test_xos_api_post_login(self): |
| 367 | response = urllib.urlopen(self.XOS_API_UTILS_POST_LOGIN) |
| 368 | data = response.read() |
| 369 | |
| 370 | def test_xos_api_get_utils_port_forwarding(self): |
| 371 | self.validate_url_response_data(url = self.XOS_API_UTILS_GET_PORT_FORWARDING) |
| 372 | |
| 373 | def test_xos_api_get_utils_slices_plus(self): |
| 374 | self.validate_url_response_data(url = self.XOS_API_UTILS_GET_SLICES_PLUS) |
| 375 | |
| 376 | def test_xos_api_get_utils_synchronizer(self): |
| 377 | self.validate_url_response_data(url = self.XOS_API_UTILS_GET_SYNCHRONIZER) |
| 378 | |
| 379 | def test_xos_api_get_utils_onboarding_status(self): |
| 380 | self.validate_url_response_data(url = self.XOS_API_UTILS_GET_ONBOARDING_STATUS) |
| 381 | |
| 382 | def test_xos_api_post_utils_tosca_recipe(self): |
| 383 | self.validate_url_response_data(url = self.XOS_API_UTILS_POST_TOSCA_RECIPE) |
| 384 | |
| 385 | def test_xos_api_get_utils_ssh_keys(self): |
| 386 | self.validate_url_response_data(url = self.XOS_API_UTILS_GET_SSH_KEYS) |
| 387 | |
| 388 | def test_xos_api_get_tenant_all_subscribers(self): |
| 389 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_ALL_SUBSCRIBERS) |
| 390 | |
| 391 | def test_xos_api_get_tenant_subscribers_details(self): |
| 392 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_SUBSCRIBER_DETAILS) |
| 393 | |
| 394 | def test_xos_api_get_tenant_subscriber_delete(self): |
| 395 | self.validate_url_response_data(url = self.XOS_API_TENANT_DELETE_SUBSCRIBER) |
| 396 | |
| 397 | def test_xos_api_get_tenant_subscribers_feature_details(self): |
| 398 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_SUBSCRIBER_FEATURE_DETAILS) |
| 399 | |
| 400 | def test_xos_api_get_tenant_read_subscribers_feature_uplink_speed(self): |
| 401 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_READ_SUBSCRIBER_UPLINK_SPEED) |
| 402 | |
| 403 | def test_xos_api_tenant_put_update_subscribers_feature_uplink_speed(self): |
| 404 | self.validate_url_response_data(url = self.XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_UPLINK_SPEED) |
| 405 | |
| 406 | def test_xos_api_get_tenant_read_subscribers_feature_downlink_speed(self): |
| 407 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_READ_SUBSCRIBER_DOWNLINK_SPEED) |
| 408 | |
| 409 | def test_xos_api_tenant_put_update_subscribers_feature_downlink_speed(self): |
| 410 | self.validate_url_response_data(url = self.XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_DOWNLINK_SPEED) |
| 411 | |
| 412 | def test_xos_api_get_tenant_read_subscribers_feature_cdn(self): |
| 413 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_READ_SUBSCRIBER_FEATURE_CDN) |
| 414 | |
| 415 | def test_xos_api_tenant_put_update_subscribers_feature_cdn(self): |
| 416 | self.validate_url_response_data(url = self.XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_FEATURE_CDN) |
| 417 | |
| 418 | def test_xos_api_get_tenant_read_subscribers_feature_uverse(self): |
| 419 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_READ_SUBSCRIBER_FEATURE_UVERSE) |
| 420 | |
| 421 | def test_xos_api_tenant_put_update_subscribers_feature_uverse(self): |
| 422 | self.validate_url_response_data(url = self.XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_FEATURE_UVERSE) |
| 423 | |
| 424 | def test_xos_api_get_tenant_read_subscribers_feature_status(self): |
| 425 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_READ_SUBSCRIBER_FEATURE_STATUS) |
| 426 | |
| 427 | def test_xos_api_tenant_put_update_subscribers_feature_status(self): |
| 428 | self.validate_url_response_data(url = self.XOS_API_TENANT_PUT_UPDATE_SUBSCRIBER_FEATURE_STATUS) |
| 429 | |
| 430 | def test_xos_api_tenant_get_all_truckroll(self): |
| 431 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_ALL_TRUCKROLL) |
| 432 | |
| 433 | def test_xos_api_tenant_post_create_truckroll(self): |
| 434 | self.validate_url_response_data(url = self.XOS_API_TENANT_POST_CREATE_TRUCKROLL) |
| 435 | |
| 436 | def test_xos_api_tenant_get_truckroll_details(self): |
| 437 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_TRUCKROLL_DETAILS) |
| 438 | |
| 439 | def test_xos_api_tenant_delete_trucroll(self): |
| 440 | self.validate_url_response_data(url = self.XOS_API_TENANT_DELETE_TRUCKROLL_DETAILS) |
| 441 | |
| 442 | def test_xos_api_tenant_get_all_volt(self): |
| 443 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_ALL_vOLT) |
| 444 | |
| 445 | def test_xos_api_tenant_post_create_vOLT(self): |
| 446 | self.validate_url_response_data(url = self.XOS_API_TENANT_POST_CREATE_vOLT) |
| 447 | |
| 448 | def test_xos_api_tenant_get_volt_details(self): |
| 449 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_vOLT_DETAILS) |
| 450 | |
| 451 | def test_xos_api_tenant_get_all_onos_apps(self): |
| 452 | self.validate_url_response_data(url = self.XOS_API_TENANT_GET_ALL_ONOS_APPS) |
| 453 | |
| 454 | def test_xos_api_service_get_all_example_service(self): |
| 455 | self.validate_url_response_data(url = self.XOS_API_SERVICE_GET_ALL_EXAMPLE_SERVICE) |
| 456 | |
| 457 | def test_xos_api_service_get_all_onos_service(self): |
| 458 | self.validate_url_response_data(url = self.XOS_API_SERVICE_GET_ALL_ONOS_SERVICE) |
| 459 | |
| 460 | def test_xos_api_service_get_all_vsg(self): |
| 461 | self.validate_url_response_data(url = self.XOS_API_SERVICE_GET_ALL_vSG) |
| 462 | |
| 463 | def test_xos_api_core_get_all_deployments(self): |
| 464 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_DEPLOYMENTS) |
| 465 | |
| 466 | def test_xos_api_core_post_create_deployments(self): |
| 467 | self.validate_url_response_data(url = self.XOS_API_CORE_POST_CREATE_DEPLOYMENTS) |
| 468 | |
| 469 | def test_xos_api_core_get_deployment_details(self): |
| 470 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_DEPLOYMENT_DETAILS) |
| 471 | |
| 472 | def test_xos_api_core_delete_deployment(self): |
| 473 | self.validate_url_response_data(url = self.XOS_API_CORE_DELETE_DEPLOYMENTS) |
| 474 | |
| 475 | def test_xos_api_core_get_all_flavors(self): |
| 476 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_FLAVORS) |
| 477 | |
| 478 | def test_xos_api_core_post_create_flavors(self): |
| 479 | self.validate_url_response_data(url = self.XOS_API_CORE_POST_CREATE_FLAVORS) |
| 480 | |
| 481 | def test_xos_api_core_get_flavor_details(self): |
| 482 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_FLAVOR_DETAILS) |
| 483 | |
| 484 | def test_xos_api_core_delete_flavors(self): |
| 485 | self.validate_url_response_data(url = self.XOS_API_CORE_DELETE_FLAVORS) |
| 486 | |
| 487 | def test_xos_api_core_get_all_instances(self): |
| 488 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_INSTANCES) |
| 489 | |
| 490 | def test_xos_api_core_post_create_instances(self): |
| 491 | self.validate_url_response_data(url = self.XOS_API_CORE_POST_CREATE_INSTANCES) |
| 492 | |
| 493 | def test_xos_api_core_get_instance_details(self): |
| 494 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_INSTANCE_DETAILS) |
| 495 | |
| 496 | def test_xos_api_core_delete_instance(self): |
| 497 | self.validate_url_response_data(url = self.XOS_API_CORE_DELETE_INSTANCES) |
| 498 | |
| 499 | def test_xos_api_core_get_all_nodes(self): |
| 500 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_NODES) |
| 501 | |
| 502 | def test_xos_api_core_get_all_services(self): |
| 503 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_SERVICES) |
| 504 | |
| 505 | def test_xos_api_core_post_create_service(self): |
| 506 | self.validate_url_response_data(url = self.XOS_API_CORE_POST_CREATE_SERVICE) |
| 507 | |
| 508 | def test_xos_api_core_get_service_details(self): |
| 509 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_SERVICE_DETAILS) |
| 510 | |
| 511 | def test_xos_api_core_delete_service(self): |
| 512 | self.validate_url_response_data(url = self.XOS_API_CORE_DELETE_SERVICE) |
| 513 | |
| 514 | def test_xos_api_core_get_all_sites(self): |
| 515 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_SITES) |
| 516 | |
| 517 | def test_xos_api_core_get_site_details(self): |
| 518 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_SITES_DETAILS) |
| 519 | |
| 520 | def test_xos_api_core_get_all_slices(self): |
| 521 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_SLICES) |
| 522 | |
| 523 | def test_xos_api_core_get_all_users(self): |
| 524 | self.validate_url_response_data(url = self.XOS_API_CORE_GET_ALL_USERS) |
| 525 | |