summaryrefslogtreecommitdiffstats
path: root/conductor
diff options
context:
space:
mode:
Diffstat (limited to 'conductor')
-rwxr-xr-xconductor/conductor/tests/functional/simulators/aaisim/aaisim.py36
-rw-r--r--conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_1.json195
-rw-r--r--conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_2.json161
3 files changed, 392 insertions, 0 deletions
diff --git a/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py b/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py
index 2a96e97..53bd099 100755
--- a/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py
+++ b/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py
@@ -28,6 +28,8 @@ urls = (
'/healthcheck','healthcheck',
'/aai/v13/cloud-infrastructure/cloud-regions/','get_regions',
'/aai/v13/cloud-infrastructure/complexes/complex/DLLSTX233','get_complex_DLLSTX233',
+ '/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/HPA-cloud/cloud-region-1/flavors/', 'get_flavors_region_1',
+ '/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/HPA-cloud/cloud-region-2/flavors/', 'get_flavors_region_2',
)
@@ -102,6 +104,40 @@ class get_complex_DLLSTX233:
web.header('X-TransactionId', trid)
return json.dumps(json_data)
+class get_flavors_region_1:
+ def GET(self):
+ print ("------------------------------------------------------")
+ replyfile = "get_flavors_cloud_region_1.json"
+ #replyToAaiGet (web, replydir, replyfile)
+ fullreply = replydir + replyfile
+ trid=web.ctx.env.get('X_TRANSACTIONID','111111')
+ #print ("X-TransactionId : {}".format(trid))
+ print ("this is the context : {}".format(web.ctx.fullpath))
+ with open(fullreply) as json_file:
+ json_data = json.load(json_file)
+ print(json_data)
+
+ web.header('Content-Type', 'application/json')
+ web.header('X-TransactionId', trid)
+ return json.dumps(json_data)
+
+class get_flavors_region_2:
+ def GET(self):
+ print ("------------------------------------------------------")
+ replyfile = "get_flavors_cloud_region_2.json"
+ #replyToAaiGet (web, replydir, replyfile)
+ fullreply = replydir + replyfile
+ trid=web.ctx.env.get('X_TRANSACTIONID','111111')
+ #print ("X-TransactionId : {}".format(trid))
+ print ("this is the context : {}".format(web.ctx.fullpath))
+ with open(fullreply) as json_file:
+ json_data = json.load(json_file)
+ print(json_data)
+
+ web.header('Content-Type', 'application/json')
+ web.header('X-TransactionId', trid)
+ return json.dumps(json_data)
+
if __name__ == "__main__":
diff --git a/conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_1.json b/conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_1.json
new file mode 100644
index 0000000..863bf3a
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_1.json
@@ -0,0 +1,195 @@
+{
+ "flavor": [
+ {
+ "flavor-id": "9cf8220b-4d96-4c30-a426-2e9382f3fff2",
+ "flavor-name": "flavor-numa-cpu-topology-instruction-set",
+ "flavor-vcpus": 64,
+ "flavor-ram": 65536,
+ "flavor-disk": 1048576,
+ "flavor-ephemeral": 128,
+ "flavor-swap": "0",
+ "flavor-is-public": false,
+ "flavor-selflink": "pXtX",
+ "flavor-disabled": false,
+ "hpa-capabilities": {
+ "hpa-capability": [
+ {
+ "hpa-capability-id": "13ec6d4d-7fee-48d8-9e4a-c598feb101ed",
+ "hpa-feature": "basicCapabilities",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167731012",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "{\"value\":\"64\"}",
+ "resource-version": "1522167731037"
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "{\"value\":\"65536\", \"unit\":\"MB\" }",
+ "resource-version": "1522167731729"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "01a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
+ "hpa-feature": "instructionSetExtensions",
+ "hpa-version": "v1",
+ "architecture": "Intel64",
+ "resource-version": "1522167731759",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": "{\"value\": [\"aes\", \"sse\", \"avx\", \"smt\"]}",
+ "resource-version": "1522167731767"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "8fa22e64-41b4-471f-96ad-6c4708635e4c",
+ "hpa-feature": "cpuTopology",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167732555",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "{\"value\":\"8\"}",
+ "resource-version": "1522167732563"
+ },
+ {
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "{\"value\":\"6\"}",
+ "resource-version": "1522167732582"
+ },
+ {
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "{\"value\":\"8\"}",
+ "resource-version": "1522167732599"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "167ad6a2-7d9c-4bf2-9a1b-30e5311b8c66",
+ "hpa-feature": "numa",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167731791",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numaCpu-1",
+ "hpa-attribute-value": "{\"value\":\"4\"}",
+ "resource-version": "1522167731822"
+ },
+ {
+ "hpa-attribute-key": "numaNodes",
+ "hpa-attribute-value": "{\"value\":\"2\"}",
+ "resource-version": "1522167731855"
+ },
+ {
+ "hpa-attribute-key": "numaCpu-0",
+ "hpa-attribute-value": "{\"value\":\"2\"}",
+ "resource-version": "1522167731797"
+ },
+ {
+ "hpa-attribute-key": "numaMem-1",
+ "hpa-attribute-value": "{\"value\":\"4\", \"unit\":\"GB\" }",
+ "resource-version": "1522167731835"
+ },
+ {
+ "hpa-attribute-key": "numaMem-0",
+ "hpa-attribute-value": "{\"value\":\"2\", \"unit\":\"GB\" }",
+ "resource-version": "1522167731810"
+ }
+ ]
+ }
+ ]
+ },
+ "resource-version": "1522167730970"
+ },
+ {
+ "flavor-id": "f5aa2b2e-3206-41b6-80d5-cf041b098c43",
+ "flavor-name": "flavor-cpu-pinning-ovsdpdk-instruction-set",
+ "flavor-vcpus": 32,
+ "flavor-ram": 131072,
+ "flavor-disk": 2097152,
+ "flavor-ephemeral": 128,
+ "flavor-swap": "0",
+ "flavor-is-public": false,
+ "flavor-selflink": "pXtX",
+ "flavor-disabled": false,
+ "hpa-capabilities": {
+ "hpa-capability": [
+ {
+ "hpa-capability-id": "c140c945-1532-4908-86c9-d7f71416f1dd",
+ "hpa-feature": "cpuPinning",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167732665",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"prefer\"}",
+ "resource-version": "1522167732681"
+ },
+ {
+ "hpa-attribute-key": "logicalCpuPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"dedicated\"}",
+ "resource-version": "1522167732670"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "8d36a8fe-bfee-446a-bbcb-881ee66c8f78",
+ "hpa-feature": "ovsDpdk",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167732641",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value": "{\"value\":\"v18.02\"}",
+ "resource-version": "1522167732646"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "4d04f4d8-e257-4442-8417-19a525e56096",
+ "hpa-feature": "instructionSetExtensions",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167732698",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": "{\"value\":[\"aes\", \"avx\"]}",
+ "resource-version": "1522167732704"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "4565615b-1077-4bb5-a340-c5be48db2aaa",
+ "hpa-feature": "basicCapabilities",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522167732720",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "{\"value\":\"131072\", \"unit\":\"MB\" }",
+ "resource-version": "1522167732725"
+ },
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "{\"value\":\"32\"}",
+ "resource-version": "1522167732736"
+ }
+ ]
+ }
+ ]
+ },
+ "resource-version": "1522167732632"
+ }
+ ]
+}
diff --git a/conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_2.json b/conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_2.json
new file mode 100644
index 0000000..4530c30
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/aaisim/responses/get_flavors_cloud_region_2.json
@@ -0,0 +1,161 @@
+{
+ "flavor": [
+ {
+ "flavor-id": "acf8220b-4d96-4c30-a426-2e9382f3fff2",
+ "flavor-name": "flavor-cpu-topology-instruction-set",
+ "flavor-vcpus": 32,
+ "flavor-ram": 65536,
+ "flavor-disk": 1048576,
+ "flavor-ephemeral": 128,
+ "flavor-swap": "0",
+ "flavor-is-public": false,
+ "flavor-selflink": "pXtX",
+ "flavor-disabled": false,
+ "hpa-capabilities": {
+ "hpa-capability": [
+ {
+ "hpa-capability-id": "01a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
+ "hpa-feature": "instructionSetExtensions",
+ "hpa-version": "v1",
+ "architecture": "Intel64",
+ "resource-version": "1522170267454",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": "{\"value\": [\"aes\", \"sse\", \"avx\", \"smt\"]}",
+ "resource-version": "1522170267458"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "9fa22e64-41b4-471f-96ad-6c4708635e4c",
+ "hpa-feature": "cpuTopology",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522170267472",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "{\"value\":\"16\"}",
+ "resource-version": "1522170267475"
+ },
+ {
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "{\"value\":\"2\"}",
+ "resource-version": "1522170267485"
+ },
+ {
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "{\"value\":\"8\"}",
+ "resource-version": "1522170267494"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "23ec6d4d-7fee-48d8-9e4a-c598feb101ed",
+ "hpa-feature": "basicCapabilities",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522170267426",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "{\"value\":\"65536\", \"unit\":\"MB\" }",
+ "resource-version": "1522170267440"
+ },
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "{\"value\":\"32\"}",
+ "resource-version": "1522170267431"
+ }
+ ]
+ }
+ ]
+ },
+ "resource-version": "1522170267420"
+ },
+ {
+ "flavor-id": "e5aa2b2e-3206-41b6-80d5-cf041b098c43",
+ "flavor-name": "flavor-cpu-pinning-ovsdpdk-instruction-set",
+ "flavor-vcpus": 32,
+ "flavor-ram": 131072,
+ "flavor-disk": 2097152,
+ "flavor-ephemeral": 128,
+ "flavor-swap": "0",
+ "flavor-is-public": false,
+ "flavor-selflink": "pXtX",
+ "flavor-disabled": false,
+ "hpa-capabilities": {
+ "hpa-capability": [
+ {
+ "hpa-capability-id": "d140c945-1532-4908-86c9-d7f71416f1dd",
+ "hpa-feature": "cpuPinning",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522170267537",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"prefer\"}",
+ "resource-version": "1522170267550"
+ },
+ {
+ "hpa-attribute-key": "logicalCpuPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"dedicated\"}",
+ "resource-version": "1522170267541"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "9d36a8fe-bfee-446a-bbcb-881ee66c8f78",
+ "hpa-feature": "ovsDpdk",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522170267519",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value": "{\"value\":\"v17.02\"}",
+ "resource-version": "1522170267523"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "01a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
+ "hpa-feature": "instructionSetExtensions",
+ "hpa-version": "v1",
+ "architecture": "Intel64",
+ "resource-version": "1522170267564",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": "{\"value\": [\"avx\", \"smt\"]}",
+ "resource-version": "1522170267568"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id": "5565615b-1077-4bb5-a340-c5be48db2aaa",
+ "hpa-feature": "basicCapabilities",
+ "hpa-version": "v1",
+ "architecture": "generic",
+ "resource-version": "1522170267582",
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "{\"value\":\"32\"}",
+ "resource-version": "1522170267594"
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "{\"value\":\"131072\", \"unit\":\"MB\" }",
+ "resource-version": "1522170267585"
+ }
+ ]
+ }
+ ]
+ },
+ "resource-version": "1522170267514"
+ }
+ ]
+}