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