diff options
author | 2017-07-27 15:04:07 +0000 | |
---|---|---|
committer | 2017-07-27 15:04:07 +0000 | |
commit | 162c03ef301396072c1934e7e7e0c40a841b4fe2 (patch) | |
tree | 7a2a2781949252436450ff5832962785061a774a /app/test/fetch/api_fetch/test_data/api_fetch_host_project_hosts.py | |
parent | b88c78e3cf2bef22aa2f1c4d0bf305e303bc15f0 (diff) | |
parent | 7e83d0876ddb84a45e130eeba28bc40ef53c074b (diff) |
Merge "Calipso initial release for OPNFV"
Diffstat (limited to 'app/test/fetch/api_fetch/test_data/api_fetch_host_project_hosts.py')
-rw-r--r-- | app/test/fetch/api_fetch/test_data/api_fetch_host_project_hosts.py | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/app/test/fetch/api_fetch/test_data/api_fetch_host_project_hosts.py b/app/test/fetch/api_fetch/test_data/api_fetch_host_project_hosts.py new file mode 100644 index 0000000..3ef1ac7 --- /dev/null +++ b/app/test/fetch/api_fetch/test_data/api_fetch_host_project_hosts.py @@ -0,0 +1,225 @@ +############################################################################### +# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) # +# and others # +# # +# All rights reserved. This program and the accompanying materials # +# are made available under the terms of the Apache License, Version 2.0 # +# which accompanies this distribution, and is available at # +# http://www.apache.org/licenses/LICENSE-2.0 # +############################################################################### +HOST_DOC = { + "host": "node-6.cisco.com", + "host_type": [], + "id": "node-6.cisco.com", + "name": "node-6.cisco.com", + "parent_id": "internal", + "parent_type": "availability_zone", + "services": { + "nova-cert": { + "active": True, + "available": True, + }, + "nova-conductor": { + "active": True, + "available": True, + }, + "nova-consoleauth": { + "active": True, + "available": True, + }, + "nova-scheduler": { + "active": True, + "available": True, + } + }, + "zone": "internal" +} + +NONEXISTENT_TYPE = "nova" +COMPUTE_TYPE = "Compute" +ZONE = "internal" +HOST_ZONE = "Test" + +REGION_NAME = "RegionOne" +TEST_PROJECT_NAME = "Test" +PROJECT_NAME = "admin" + +AVAILABILITY_ZONE_RESPONSE = { + "availabilityZoneInfo": [ + { + "hosts": { + "node-6.cisco.com": { + "nova-cert": { + "active": True, + "available": True, + }, + "nova-conductor": { + "active": True, + "available": True, + }, + "nova-consoleauth": { + "active": True, + "available": True, + }, + "nova-scheduler": { + "active": True, + "available": True, + } + } + }, + "zoneName": "internal", + "zoneState": { + "available": True + } + }, + { + "hosts": { + "node-5.cisco.com": { + "nova-compute": { + "active": True, + "available": True, + } + } + }, + "zoneName": "osdna-zone", + "zoneState": { + "available": True + } + } + ] +} + +AVAILABILITY_ERROR_RESPONSE = {'status': 400} + +HYPERVISORS_RESPONSE = { + "hypervisors": [] +} + +HYPERVISORS_ERROR_RESPONSE = {'status': 400} + +HOST_TO_BE_FETCHED_IP = { + "host": "node-5.cisco.com", + "id": "node-5.cisco.com" +} + +IP_ADDRESS_RESPONSE = [ + { + "ip_address": "192.168.0.4" + } +] + +HOSTS_TO_BE_FETCHED_NETWORK_DETAILS = [ + { + "host": "node-6.cisco.com", + "host_type": [ + "Controller" + ], + "id": "node-6.cisco.com", + "name": "node-6.cisco.com", + }, + { + "host": "node-5.cisco.com", + "host_type": [ + "Compute" + ], + "id": "node-5.cisco.com", + "name": "node-5.cisco.com", + } +] + +NETWORKS_DETAILS_RESPONSE = [ + { + "configurations": "{}", + "host": "node-6.cisco.com" + }, + { + "configurations": "{}", + "host": "node-6.cisco.com", + }, + { + "configurations": "{}", + "host": "node-6.cisco.com", + } +] + +REGION_URL = "http://192.168.0.2:8776/v2/329e0576da594c62a911d0dccb1238a7" +AVAILABILITY_ZONE = { + "hosts": { + "node-6.cisco.com": { + "nova-cert": { + "active": True, + "available": True, + }, + "nova-conductor": { + "active": True, + "available": True, + }, + "nova-consoleauth": { + "active": True, + "available": True, + }, + "nova-scheduler": { + "active": True, + "available": True, + } + } + }, + "zoneName": "internal" +} + +HOST_NAME = "node-6.cisco.com" + +GET_FOR_REGION_INFO = [ + { + "config": { + }, + "host": "node-6.cisco.com", + "host_type": [ + "Controller", + "Network" + ], + "id": "node-6.cisco.com", + "name": "node-6.cisco.com", + "parent_id": "internal", + "parent_type": "availability_zone", + "services": { + "nova-cert": { + "active": True, + "available": True, + }, + "nova-conductor": { + "active": True, + "available": True, + }, + "nova-consoleauth": { + "active": True, + "available": True, + }, + "nova-scheduler": { + "active": True, + "available": True, + } + }, + "zone": "internal" + }, + { + "host": "node-5.cisco.com", + "host_type": [ + "Compute" + ], + "id": "node-5.cisco.com", + "ip_address": "192.168.0.4", + "name": "node-5.cisco.com", + "os_id": "1", + "parent_id": "osdna-zone", + "parent_type": "availability_zone", + "services": { + "nova-compute": { + "active": True, + "available": True, + "updated_at": "2016-10-21T18:22:42.000000" + } + }, + "zone": "osdna-zone" + } +] |