summaryrefslogtreecommitdiffstats
path: root/conductor
diff options
context:
space:
mode:
Diffstat (limited to 'conductor')
-rw-r--r--conductor/conductor/common/music/api.py3
-rw-r--r--conductor/conductor/data/service.py3
-rw-r--r--conductor/conductor/solver/optimizer/constraints/hpa.py11
-rwxr-xr-xconductor/conductor/tests/functional/simulators/aaisim/Dockerfile18
-rwxr-xr-xconductor/conductor/tests/functional/simulators/aaisim/aaisim.py54
-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
-rw-r--r--conductor/conductor/tests/functional/simulators/aaisim/responses/get_onap_regions.json342
-rwxr-xr-xconductor/conductor/tests/functional/simulators/build_aaisim.sh19
-rwxr-xr-xconductor/conductor/tests/functional/simulators/build_multicloudsim.sh22
-rwxr-xr-xconductor/conductor/tests/functional/simulators/destroy_aaisim.sh21
-rwxr-xr-xconductor/conductor/tests/functional/simulators/destroy_multicloudsim.sh23
-rwxr-xr-xconductor/conductor/tests/functional/simulators/multicloudsim/Dockerfile39
-rwxr-xr-xconductor/conductor/tests/functional/simulators/multicloudsim/multicloudsim.py90
-rwxr-xr-xconductor/conductor/tests/functional/simulators/multicloudsim/requirements.txt1
-rw-r--r--conductor/conductor/tests/functional/simulators/multicloudsim/responses/healthcheck.json1
-rw-r--r--conductor/conductor/tests/functional/simulators/multicloudsim/responses/post_check_vim_capacity.json1
-rwxr-xr-xconductor/conductor/tests/functional/simulators/run_aaisim.sh19
-rwxr-xr-xconductor/conductor/tests/functional/simulators/run_multicloudsim.sh21
-rw-r--r--conductor/conductor/tests/unit/solver/test_hpa.py6
-rw-r--r--conductor/doc/template/README.md388
-rw-r--r--conductor/requirements.txt2
-rw-r--r--conductor/test-requirements.txt1
-rw-r--r--conductor/tools/postman_collection/HPA-Conductor.postman_collection.json224
24 files changed, 1425 insertions, 240 deletions
diff --git a/conductor/conductor/common/music/api.py b/conductor/conductor/common/music/api.py
index 306f016..b3bb5fc 100644
--- a/conductor/conductor/common/music/api.py
+++ b/conductor/conductor/common/music/api.py
@@ -63,9 +63,6 @@ MUSIC_API_OPTS = [
cfg.IntOpt('replication_factor',
default=1,
help='Replication factor'),
- cfg.BoolOpt('debug',
- default=False,
- help='Log debug messages. Default value is False.'),
cfg.BoolOpt('mock',
default=False,
help='Use mock API'),
diff --git a/conductor/conductor/data/service.py b/conductor/conductor/data/service.py
index 5912963..f4e3aac 100644
--- a/conductor/conductor/data/service.py
+++ b/conductor/conductor/data/service.py
@@ -454,10 +454,9 @@ class DataEndpoint(object):
# exists. This is an invalid condition.
if candidate.get("flavor_map") and candidate["flavor_map"].get(
label_name):
- error = True
LOG.error(_LE("Flavor mapping for label name {} already"
"exists").format(label_name))
- return {'response': None, 'error': error}
+ continue
# RPC call to inventory provider for matching hpa capabilities
results = self.ip_ext_manager.map_method(
diff --git a/conductor/conductor/solver/optimizer/constraints/hpa.py b/conductor/conductor/solver/optimizer/constraints/hpa.py
index 9ef37df..98d95d9 100644
--- a/conductor/conductor/solver/optimizer/constraints/hpa.py
+++ b/conductor/conductor/solver/optimizer/constraints/hpa.py
@@ -59,10 +59,11 @@ class HPA(constraint.Constraint):
response = (cei.get_candidates_with_hpa(label_name,
_candidate_list,
flavorProperties))
- if response:
- _candidate_list = response
- else:
- LOG.error(_LE("Flavor mapping for label name {} already"
- "exists").format(label_name))
+ _candidate_list = response
+ if not response:
+ LOG.error(_LE("No matching candidates for HPA exists").format(
+ label_name))
+ break
+ # No need to continue.
return _candidate_list
diff --git a/conductor/conductor/tests/functional/simulators/aaisim/Dockerfile b/conductor/conductor/tests/functional/simulators/aaisim/Dockerfile
index 3f241b0..9ab4213 100755
--- a/conductor/conductor/tests/functional/simulators/aaisim/Dockerfile
+++ b/conductor/conductor/tests/functional/simulators/aaisim/Dockerfile
@@ -1,3 +1,21 @@
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
# Use an official Python runtime as a parent image
FROM python:2.7
diff --git a/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py b/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py
index 2e60bd3..53bd099 100755
--- a/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py
+++ b/conductor/conductor/tests/functional/simulators/aaisim/aaisim.py
@@ -1,3 +1,21 @@
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
import web
import web.webapi
import json
@@ -10,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',
)
@@ -84,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"
+ }
+ ]
+}
diff --git a/conductor/conductor/tests/functional/simulators/aaisim/responses/get_onap_regions.json b/conductor/conductor/tests/functional/simulators/aaisim/responses/get_onap_regions.json
index 6634426..79f67ea 100644
--- a/conductor/conductor/tests/functional/simulators/aaisim/responses/get_onap_regions.json
+++ b/conductor/conductor/tests/functional/simulators/aaisim/responses/get_onap_regions.json
@@ -205,122 +205,99 @@
"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": "cpuInstructionSetExtensions",
+ "hpa-feature": "instructionSetExtensions",
"hpa-version": "v1",
"architecture": "Intel64",
- "resource-version": "1521306560982",
+ "resource-version": "1522167731759",
"hpa-feature-attributes": [
{
"hpa-attribute-key": "instructionSetExtensions",
- "hpa-attribute-value": "{\"value\":{['AAA', 'BBB', 'CCC', 'DDD']}}",
- "resource-version": "1521306560989"
+ "hpa-attribute-value": "{\"value\": [\"aes\", \"sse\", \"avx\", \"smt\"]}",
+ "resource-version": "1522167731767"
}
]
},
{
- "hpa-capability-id": "167ad6a2-7d9c-4bf2-9a1b-30e5311b8c66",
- "hpa-feature": "numa",
+ "hpa-capability-id": "8fa22e64-41b4-471f-96ad-6c4708635e4c",
+ "hpa-feature": "cpuTopology",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306561020",
+ "resource-version": "1522167732555",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "numaCpu-1",
- "hpa-attribute-value": {
- "value": 4
- },
- "resource-version": "1521306561060"
- },
- {
- "hpa-attribute-key": "numaNodes",
- "hpa-attribute-value": {
- "value": 2
- },
- "resource-version": "1521306561088"
- },
- {
- "hpa-attribute-key": "numaCpu-0",
- "hpa-attribute-value": {
- "value": 2
- },
- "resource-version": "1521306561028"
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "{\"value\":\"8\"}",
+ "resource-version": "1522167732563"
},
{
- "hpa-attribute-key": "numaMem-0",
- "hpa-attribute-value": {
- "value": 2,
- "unit": "GB"
- },
- "resource-version": "1521306561044"
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "{\"value\":\"6\"}",
+ "resource-version": "1522167732582"
},
{
- "hpa-attribute-key": "numaMem-1",
- "hpa-attribute-value": {
- "value": 4,
- "unit": "GB"
- },
- "resource-version": "1521306561074"
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "{\"value\":\"8\"}",
+ "resource-version": "1522167732599"
}
]
},
{
- "hpa-capability-id": "13ec6d4d-7fee-48d8-9e4a-c598feb101ed",
- "hpa-feature": "basicCapabilities",
+ "hpa-capability-id": "167ad6a2-7d9c-4bf2-9a1b-30e5311b8c66",
+ "hpa-feature": "numa",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306560909",
+ "resource-version": "1522167731791",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "numVirtualCpu",
- "hpa-attribute-value": {
- "value": 64
- },
- "resource-version": "1521306560932"
+ "hpa-attribute-key": "numaCpu-1",
+ "hpa-attribute-value": "{\"value\":\"4\"}",
+ "resource-version": "1522167731822"
},
{
- "hpa-attribute-key": "virtualMemSize",
- "hpa-attribute-value": {
- "value": 65536,
- "unit": "MB"
- },
- "resource-version": "1521306560954"
- }
- ]
- },
- {
- "hpa-capability-id": "8fa22e64-41b4-471f-96ad-6c4708635e4c",
- "hpa-feature": "cpuTopology",
- "hpa-version": "v1",
- "architecture": "generic",
- "resource-version": "1521306561109",
- "hpa-feature-attributes": [
+ "hpa-attribute-key": "numaNodes",
+ "hpa-attribute-value": "{\"value\":\"2\"}",
+ "resource-version": "1522167731855"
+ },
{
- "hpa-attribute-key": "numCpuCores",
- "hpa-attribute-value": {
- "value": 8
- },
- "resource-version": "1521306561114"
+ "hpa-attribute-key": "numaCpu-0",
+ "hpa-attribute-value": "{\"value\":\"2\"}",
+ "resource-version": "1522167731797"
},
{
- "hpa-attribute-key": "numCpuThreads",
- "hpa-attribute-value": {
- "value": 8
- },
- "resource-version": "1521306561138"
+ "hpa-attribute-key": "numaMem-1",
+ "hpa-attribute-value": "{\"value\":\"4\", \"unit\":\"GB\" }",
+ "resource-version": "1522167731835"
},
{
- "hpa-attribute-key": "numCpuSockets",
- "hpa-attribute-value": {
- "value": 6
- },
- "resource-version": "1521306561126"
+ "hpa-attribute-key": "numaMem-0",
+ "hpa-attribute-value": "{\"value\":\"2\", \"unit\":\"GB\" }",
+ "resource-version": "1522167731810"
}
]
}
]
},
- "resource-version": "1521306560203"
+ "resource-version": "1522167730970"
},
{
"flavor-id": "f5aa2b2e-3206-41b6-80d5-cf041b098c43",
@@ -336,16 +313,21 @@
"hpa-capabilities": {
"hpa-capability": [
{
- "hpa-capability-id": "4d04f4d8-e257-4442-8417-19a525e56096",
- "hpa-feature": "cpuInstructionSetExtensions",
+ "hpa-capability-id": "c140c945-1532-4908-86c9-d7f71416f1dd",
+ "hpa-feature": "cpuPinning",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306561223",
+ "resource-version": "1522167732665",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "instructionSetExtensions",
- "hpa-attribute-value": "{\"value\":{['A11', 'B22']}}",
- "resource-version": "1521306561228"
+ "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"prefer\"}",
+ "resource-version": "1522167732681"
+ },
+ {
+ "hpa-attribute-key": "logicalCpuPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"dedicated\"}",
+ "resource-version": "1522167732670"
}
]
},
@@ -354,37 +336,26 @@
"hpa-feature": "ovsDpdk",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306561170",
+ "resource-version": "1522167732641",
"hpa-feature-attributes": [
{
"hpa-attribute-key": "dataProcessingAccelerationLibrary",
- "hpa-attribute-value": {
- "value": "v18.02"
- },
- "resource-version": "1521306561175"
+ "hpa-attribute-value": "{\"value\":\"v18.02\"}",
+ "resource-version": "1522167732646"
}
]
},
{
- "hpa-capability-id": "c140c945-1532-4908-86c9-d7f71416f1dd",
- "hpa-feature": "cpuPinning",
+ "hpa-capability-id": "4d04f4d8-e257-4442-8417-19a525e56096",
+ "hpa-feature": "instructionSetExtensions",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306561191",
+ "resource-version": "1522167732698",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "logicalCpuPinningPolicy",
- "hpa-attribute-value": {
- "value": "dedicated"
- },
- "resource-version": "1521306561196"
- },
- {
- "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
- "hpa-attribute-value": {
- "value": "prefer"
- },
- "resource-version": "1521306561206"
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": "{\"value\":[\"aes\", \"avx\"]}",
+ "resource-version": "1522167732704"
}
]
},
@@ -393,28 +364,23 @@
"hpa-feature": "basicCapabilities",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306561244",
+ "resource-version": "1522167732720",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "numVirtualCpu",
- "hpa-attribute-value": {
- "value": 32
- },
- "resource-version": "1521306561259"
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "{\"value\":\"131072\", \"unit\":\"MB\" }",
+ "resource-version": "1522167732725"
},
{
- "hpa-attribute-key": "virtualMemSize",
- "hpa-attribute-value": {
- "value": 131072,
- "unit": "MB"
- },
- "resource-version": "1521306561248"
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "{\"value\":\"32\"}",
+ "resource-version": "1522167732736"
}
]
}
]
},
- "resource-version": "1521306561164"
+ "resource-version": "1522167732632"
}
]
},
@@ -765,76 +731,65 @@
"hpa-capabilities": {
"hpa-capability": [
{
- "hpa-capability-id": "11a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
- "hpa-feature": "cpuInstructionSetExtensions",
+ "hpa-capability-id": "01a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
+ "hpa-feature": "instructionSetExtensions",
"hpa-version": "v1",
"architecture": "Intel64",
- "resource-version": "1521306714796",
+ "resource-version": "1522170267454",
"hpa-feature-attributes": [
{
"hpa-attribute-key": "instructionSetExtensions",
- "hpa-attribute-value": "{\"value\":{['aes', 'sse', 'avx', 'smt']}}",
- "resource-version": "1521306714799"
+ "hpa-attribute-value": "{\"value\": [\"aes\", \"sse\", \"avx\", \"smt\"]}",
+ "resource-version": "1522170267458"
}
]
},
{
- "hpa-capability-id": "23ec6d4d-7fee-48d8-9e4a-c598feb101ed",
- "hpa-feature": "basicCapabilities",
+ "hpa-capability-id": "9fa22e64-41b4-471f-96ad-6c4708635e4c",
+ "hpa-feature": "cpuTopology",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306714769",
+ "resource-version": "1522170267472",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "virtualMemSize",
- "hpa-attribute-value": {
- "value": 65536,
- "unit": "MB"
- },
- "resource-version": "1521306714782"
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "{\"value\":\"16\"}",
+ "resource-version": "1522170267475"
},
{
- "hpa-attribute-key": "numVirtualCpu",
- "hpa-attribute-value": {
- "value": 32
- },
- "resource-version": "1521306714773"
+ "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": "9fa22e64-41b4-471f-96ad-6c4708635e4c",
- "hpa-feature": "cpuTopology",
+ "hpa-capability-id": "23ec6d4d-7fee-48d8-9e4a-c598feb101ed",
+ "hpa-feature": "basicCapabilities",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306714813",
+ "resource-version": "1522170267426",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "numCpuThreads",
- "hpa-attribute-value": {
- "value": 8
- },
- "resource-version": "1521306714841"
- },
- {
- "hpa-attribute-key": "numCpuCores",
- "hpa-attribute-value": {
- "value": 16
- },
- "resource-version": "1521306714817"
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "{\"value\":\"65536\", \"unit\":\"MB\" }",
+ "resource-version": "1522170267440"
},
{
- "hpa-attribute-key": "numCpuSockets",
- "hpa-attribute-value": {
- "value": 2
- },
- "resource-version": "1521306714826"
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "{\"value\":\"32\"}",
+ "resource-version": "1522170267431"
}
]
}
]
},
- "resource-version": "1521306714764"
+ "resource-version": "1522170267420"
},
{
"flavor-id": "e5aa2b2e-3206-41b6-80d5-cf041b098c43",
@@ -850,26 +805,21 @@
"hpa-capabilities": {
"hpa-capability": [
{
- "hpa-capability-id": "5565615b-1077-4bb5-a340-c5be48db2aaa",
- "hpa-feature": "basicCapabilities",
+ "hpa-capability-id": "d140c945-1532-4908-86c9-d7f71416f1dd",
+ "hpa-feature": "cpuPinning",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306714950",
+ "resource-version": "1522170267537",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "numVirtualCpu",
- "hpa-attribute-value": {
- "value": 32
- },
- "resource-version": "1521306714964"
+ "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"prefer\"}",
+ "resource-version": "1522170267550"
},
{
- "hpa-attribute-key": "virtualMemSize",
- "hpa-attribute-value": {
- "value": 131072,
- "unit": "MB"
- },
- "resource-version": "1521306714954"
+ "hpa-attribute-key": "logicalCpuPinningPolicy",
+ "hpa-attribute-value": "{\"value\":\"dedicated\"}",
+ "resource-version": "1522170267541"
}
]
},
@@ -878,57 +828,51 @@
"hpa-feature": "ovsDpdk",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306714876",
+ "resource-version": "1522170267519",
"hpa-feature-attributes": [
{
"hpa-attribute-key": "dataProcessingAccelerationLibrary",
- "hpa-attribute-value": {
- "value": "v17.02"
- },
- "resource-version": "1521306714881"
+ "hpa-attribute-value": "{\"value\":\"v17.02\"}",
+ "resource-version": "1522170267523"
}
]
},
{
- "hpa-capability-id": "d140c945-1532-4908-86c9-d7f71416f1dd",
- "hpa-feature": "cpuPinning",
+ "hpa-capability-id": "01a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
+ "hpa-feature": "instructionSetExtensions",
"hpa-version": "v1",
- "architecture": "generic",
- "resource-version": "1521306714899",
+ "architecture": "Intel64",
+ "resource-version": "1522170267564",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
- "hpa-attribute-value": {
- "value": "prefer"
- },
- "resource-version": "1521306714915"
- },
- {
- "hpa-attribute-key": "logicalCpuPinningPolicy",
- "hpa-attribute-value": {
- "value": "dedicated"
- },
- "resource-version": "1521306714904"
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": "{\"value\": [\"avx\", \"smt\"]}",
+ "resource-version": "1522170267568"
}
]
},
{
- "hpa-capability-id": "5d04f4d8-e257-4442-8417-19a525e56096",
- "hpa-feature": "cpuInstructionSetExtensions",
+ "hpa-capability-id": "5565615b-1077-4bb5-a340-c5be48db2aaa",
+ "hpa-feature": "basicCapabilities",
"hpa-version": "v1",
"architecture": "generic",
- "resource-version": "1521306714931",
+ "resource-version": "1522170267582",
"hpa-feature-attributes": [
{
- "hpa-attribute-key": "instructionSetExtensions",
- "hpa-attribute-value": "{\"value\":{['aes', 'avx']}}",
- "resource-version": "1521306714936"
+ "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": "1521306714871"
+ "resource-version": "1522170267514"
}
]
},
diff --git a/conductor/conductor/tests/functional/simulators/build_aaisim.sh b/conductor/conductor/tests/functional/simulators/build_aaisim.sh
index 0fcd129..441b6b9 100755
--- a/conductor/conductor/tests/functional/simulators/build_aaisim.sh
+++ b/conductor/conductor/tests/functional/simulators/build_aaisim.sh
@@ -1,3 +1,22 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
cd ./aaisim
docker build -t aaisim .
diff --git a/conductor/conductor/tests/functional/simulators/build_multicloudsim.sh b/conductor/conductor/tests/functional/simulators/build_multicloudsim.sh
new file mode 100755
index 0000000..054a41f
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/build_multicloudsim.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
+cd ./multicloudsim
+docker build -t multicloudsim .
+
diff --git a/conductor/conductor/tests/functional/simulators/destroy_aaisim.sh b/conductor/conductor/tests/functional/simulators/destroy_aaisim.sh
index ddc3798..0bf2ac0 100755
--- a/conductor/conductor/tests/functional/simulators/destroy_aaisim.sh
+++ b/conductor/conductor/tests/functional/simulators/destroy_aaisim.sh
@@ -1,4 +1,23 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
docker stop aaisim
-docker rm aasim
+docker rm aaisim
docker rmi aaisim
diff --git a/conductor/conductor/tests/functional/simulators/destroy_multicloudsim.sh b/conductor/conductor/tests/functional/simulators/destroy_multicloudsim.sh
new file mode 100755
index 0000000..48a9c9e
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/destroy_multicloudsim.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
+docker stop multicloudsim
+docker rm multicloudsim
+docker rmi multicloudsim
+
diff --git a/conductor/conductor/tests/functional/simulators/multicloudsim/Dockerfile b/conductor/conductor/tests/functional/simulators/multicloudsim/Dockerfile
new file mode 100755
index 0000000..aeaf2b9
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/multicloudsim/Dockerfile
@@ -0,0 +1,39 @@
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
+# Use an official Python runtime as a parent image
+FROM python:2.7
+
+# Set the working directory to /su/python/webpy-rest-dockerized
+WORKDIR /opt/multicloudsim
+
+# Copy the current directory contents into the container at /app
+ADD ./ /opt/multicloudsim
+
+# Install any needed packages specified in requirements.txt
+RUN pip install web.py
+
+# Make port 80 available to the world outside this container
+EXPOSE 8082
+
+# Define environment variable
+ENV NAME multicloudsim
+
+# Run multicloudsim.py when the container launches
+CMD ["/bin/sh", "-c", "python -u multicloudsim.py 8082 > /tmp/multicloudsim.log 2>&1"]
+
diff --git a/conductor/conductor/tests/functional/simulators/multicloudsim/multicloudsim.py b/conductor/conductor/tests/functional/simulators/multicloudsim/multicloudsim.py
new file mode 100755
index 0000000..d3d2228
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/multicloudsim/multicloudsim.py
@@ -0,0 +1,90 @@
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
+import web
+import web.webapi
+import json
+
+from subprocess import Popen, PIPE
+from xml.dom import minidom
+
+
+urls = (
+ '/healthcheck','healthcheck',
+ '/api/multicloud/v0/check_vim_capacity','post_check_vim_capacity',
+)
+
+
+myok = {"ok":"ok"}
+json_data={}
+
+replydir = "./responses/"
+
+def replyToAaiGet(web, replydir, replyfile):
+ print ("------------------------------------------------------")
+ 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 healthcheck:
+ def GET(self):
+ print ("------------------------------------------------------")
+ replyfile = "healthcheck.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 post_check_vim_capacity:
+ def POST(self):
+ print ("------------------------------------------------------")
+ replyfile = "post_check_vim_capacity.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__":
+ app = web.application(urls, globals())
+ app.run()
diff --git a/conductor/conductor/tests/functional/simulators/multicloudsim/requirements.txt b/conductor/conductor/tests/functional/simulators/multicloudsim/requirements.txt
new file mode 100755
index 0000000..c077218
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/multicloudsim/requirements.txt
@@ -0,0 +1 @@
+web
diff --git a/conductor/conductor/tests/functional/simulators/multicloudsim/responses/healthcheck.json b/conductor/conductor/tests/functional/simulators/multicloudsim/responses/healthcheck.json
new file mode 100644
index 0000000..b0bd6da
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/multicloudsim/responses/healthcheck.json
@@ -0,0 +1 @@
+{"status":"success"}
diff --git a/conductor/conductor/tests/functional/simulators/multicloudsim/responses/post_check_vim_capacity.json b/conductor/conductor/tests/functional/simulators/multicloudsim/responses/post_check_vim_capacity.json
new file mode 100644
index 0000000..aef2ee9
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/multicloudsim/responses/post_check_vim_capacity.json
@@ -0,0 +1 @@
+{"VIMs": ["HPA-cloud_cloud-region-1"]}
diff --git a/conductor/conductor/tests/functional/simulators/run_aaisim.sh b/conductor/conductor/tests/functional/simulators/run_aaisim.sh
index 21c7bb3..203de16 100755
--- a/conductor/conductor/tests/functional/simulators/run_aaisim.sh
+++ b/conductor/conductor/tests/functional/simulators/run_aaisim.sh
@@ -1,2 +1,21 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
docker run -d --name aaisim -p 8081:8081 aaisim
diff --git a/conductor/conductor/tests/functional/simulators/run_multicloudsim.sh b/conductor/conductor/tests/functional/simulators/run_multicloudsim.sh
new file mode 100755
index 0000000..50f4c8f
--- /dev/null
+++ b/conductor/conductor/tests/functional/simulators/run_multicloudsim.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+# Copyright (c) 2018 AT&T Intellectual Property
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -------------------------------------------------------------------------
+#
+docker run -d --name multicloudsim -p 8082:8082 multicloudsim
+
diff --git a/conductor/conductor/tests/unit/solver/test_hpa.py b/conductor/conductor/tests/unit/solver/test_hpa.py
index c9bbbbc..3964c06 100644
--- a/conductor/conductor/tests/unit/solver/test_hpa.py
+++ b/conductor/conductor/tests/unit/solver/test_hpa.py
@@ -77,9 +77,9 @@ class TestHPA(unittest.TestCase):
client_mock.call.return_value = None
request_mock.cei = cei.ConstraintEngineInterface(client_mock)
- self.assertEqual(self.candidate_list,
- self.hpa.solve(mock_decision_path,
- self.candidate_list, request_mock))
+ self.assertEqual(None, self.hpa.solve(mock_decision_path,
+ self.candidate_list,
+ request_mock))
client_mock.call.side_effect = [hpa_candidate_list_1,
hpa_candidate_list_2]
diff --git a/conductor/doc/template/README.md b/conductor/doc/template/README.md
index f8afcca..a2a60bf 100644
--- a/conductor/doc/template/README.md
+++ b/conductor/doc/template/README.md
@@ -219,6 +219,7 @@ The following is the schema for a valid ``candidate``:
**Examples**
+**``Service Candidate``**
```json
{
"candidate_id": "1ac71fb8-ad43-4e16-9459-c3f372b8236d",
@@ -238,10 +239,226 @@ The following is the schema for a valid ``candidate``:
"complex_name": "dalls_one",
"cloud_owner": "att-aic",
"cloud_region_version": "1.1",
- "physical_location_id": "DLLSTX9A",
+ "physical_location_id": "DLLSTX9A"
+}
+```
+**``Cloud Candidate``**
+```json
+{
+ "candidate_id": "NYCNY55",
+ "candidate_type": "cloud",
+ "inventory_type": "cloud",
+ "inventory_provider": "aai",
+ "cost": "100",
+ "location_id": "NYCNY55",
+ "location_type": "azure",
+ "latitude": "40.7128",
+ "longitude": "-74.0060",
+ "city": "New York",
+ "state": "NY",
+ "country": "USA",
+ "region": "US",
+ "complex_name": "ny_one",
+ "cloud_owner": "att-aic",
+ "cloud_region_version": "1.1",
+ "physical_location_id": "NYCNY55",
+ "flavors": {
+ "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":"01a4bfe1-1993-4fda-bd1c-ef333b4f76a9",
+ "hpa-feature":"cpuInstructionSetExtensions",
+ "hpa-version":"v1",
+ "architecture":"Intel64",
+ "resource-version":"1521306560982",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"instructionSetExtensions",
+ "hpa-attribute-value":"{\"value\":{['AAA', 'BBB', 'CCC', 'DDD']}}",
+ "resource-version":"1521306560989"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id":"167ad6a2-7d9c-4bf2-9a1b-30e5311b8c66",
+ "hpa-feature":"numa",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306561020",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"numaCpu-1",
+ "hpa-attribute-value":"{\"value\":4}",
+ "resource-version":"1521306561060"
+ },
+ {
+ "hpa-attribute-key":"numaNodes",
+ "hpa-attribute-value":"{\"value\":2}",
+ "resource-version":"1521306561088"
+ },
+ {
+ "hpa-attribute-key":"numaCpu-0",
+ "hpa-attribute-value":"{\"value\":2}",
+ "resource-version":"1521306561028"
+ },
+ {
+ "hpa-attribute-key":"numaMem-0",
+ "hpa-attribute-value":"{\"value\":2, \"unit\":\"GB\" }",
+ "resource-version":"1521306561044"
+ },
+ {
+ "hpa-attribute-key":"numaMem-1",
+ "hpa-attribute-value":"{\"value\":4, \"unit\":\"GB\" }",
+ "resource-version":"1521306561074"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id":"13ec6d4d-7fee-48d8-9e4a-c598feb101ed",
+ "hpa-feature":"basicCapabilities",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306560909",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"numVirtualCpu",
+ "hpa-attribute-value":"{\"value\":64}",
+ "resource-version":"1521306560932"
+ },
+ {
+ "hpa-attribute-key":"virtualMemSize",
+ "hpa-attribute-value":"{\"value\":65536, \"unit\":\"MB\" }",
+ "resource-version":"1521306560954"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id":"8fa22e64-41b4-471f-96ad-6c4708635e4c",
+ "hpa-feature":"cpuTopology",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306561109",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"numCpuCores",
+ "hpa-attribute-value":"{\"value\":8}",
+ "resource-version":"1521306561114"
+ },
+ {
+ "hpa-attribute-key":"numCpuThreads",
+ "hpa-attribute-value":"{\"value\":8}",
+ "resource-version":"1521306561138"
+ },
+ {
+ "hpa-attribute-key":"numCpuSockets",
+ "hpa-attribute-value":"{\"value\":6}",
+ "resource-version":"1521306561126"
+ }
+ ]
+ }
+ ]
+ },
+ "resource-version":"1521306560203"
+ },
+ {
+ "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":"4d04f4d8-e257-4442-8417-19a525e56096",
+ "hpa-feature":"cpuInstructionSetExtensions",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306561223",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"instructionSetExtensions",
+ "hpa-attribute-value":"{\"value\":{['A11', 'B22']}}",
+ "resource-version":"1521306561228"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id":"8d36a8fe-bfee-446a-bbcb-881ee66c8f78",
+ "hpa-feature":"ovsDpdk",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306561170",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"dataProcessingAccelerationLibrary",
+ "hpa-attribute-value":"{\"value\":\"v18.02\"}",
+ "resource-version":"1521306561175"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id":"c140c945-1532-4908-86c9-d7f71416f1dd",
+ "hpa-feature":"cpuPinning",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306561191",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"logicalCpuPinningPolicy",
+ "hpa-attribute-value":"{\"value\":\"dedicated\"}",
+ "resource-version":"1521306561196"
+ },
+ {
+ "hpa-attribute-key":"logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value":"{value:\"prefer\"}",
+ "resource-version":"1521306561206"
+ }
+ ]
+ },
+ {
+ "hpa-capability-id":"4565615b-1077-4bb5-a340-c5be48db2aaa",
+ "hpa-feature":"basicCapabilities",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "resource-version":"1521306561244",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"numVirtualCpu",
+ "hpa-attribute-value":"{\"value\":32}",
+ "resource-version":"1521306561259"
+ },
+ {
+ "hpa-attribute-key":"virtualMemSize",
+ "hpa-attribute-value":"{\"value\":131072, \"unit\":\"MB\" }",
+ "resource-version":"1521306561248"
+ }
+ ]
+ }
+ ]
+ },
+ "resource-version":"1521306561164"
+ }
+ ]
+ }
}
```
-
**Questions**
* Currently, candidates are either service instances or cloud regions. As new services are on-boarded, this can be evolved to represent different types of resources.
@@ -325,6 +542,8 @@ constraints:
| ``inventory_group`` | Constraint that enforces two or more demands are satisfied using candidates from a pre-established group in the inventory. |
| ``region_fit`` | Constraint that ensures available capacity in an existing cloud region for an incoming demand. |
| ``zone`` | Constraint that enforces co-location/diversity at the granularities of clouds/regions/availability-zones. |
+| ``hpa`` | Constraint that recommends cloud region with an optimal flavor based on required HPA capabilities for an incoming demand. |
+| ``vim_fit`` | Constraint that checks if the incoming demand fits the VIM instance. |
| ``license`` (Deferred) | License availability constraint. |
| ``network_between_demands`` (Deferred) | Network constraint between each pair of a list of demands. |
| ``network_to_location`` (Deferred) | Network constraint between each of a list of demands and a specific location/address. |
@@ -536,6 +755,171 @@ constraints:
* These categories could be any of the following: ``disaster_zone``, ``region``, ``complex``, ``time_zone``, and ``maintenance_zone``. Really, we are talking affinity/anti-affinity at the level of DCs, but these terms may cause confusion with affinity/anti-affinity in OpenStack.
+### HPA
+
+Constrain each demand's inventory candidates based on cloud regions' Hardware platform capabilities (HPA)
+
+Requirements mapped to the inventory provider specified properties, referenced by the demands. For example, properties could be hardware capabilities provided by the platform through flavors or cloud-region eg:(CPU-Pinning, NUMA), features supported by the services, etc.
+
+**Schema**
+
+| Property | Value |
+|---------------|-------------------------------------------------------------|
+| ``evaluate`` | List of flavorLabel, flavorProperties of each VM of the VNF demand. |
+
+```yaml
+constraints:
+ hpa_constraint:
+ type: hpa
+ demands: [my_vnf_demand, my_other_vnf_demand]
+ properties:
+ evaluate:
+ - [ List of {flavorLabel : {flavor label name},
+ flavorProperties: HPACapability DICT} ]
+HPACapability DICT :
+ hpa-feature: basicCapabilities
+ hpa-version: v1
+ architecture: generic
+ hpa-feature-attributes:
+ - HPAFEATUREATTRIBUTES LIST
+
+HPAFEATUREATTRIBUTES LIST:
+ hpa-attribute-key: String
+ hpa-attribute-value: String
+ operator: One of OPERATOR
+ unit: String
+OPERATOR : ['=', '<', '>', '<=', '>=', 'ALL']
+```
+
+**Example**
+```json
+{
+ "hpa_constraint":{
+ "type":"hpa",
+ "demands":[
+ "vG"
+ ],
+ "properties":{
+ "evaluate":[
+ {
+ "flavorLabel":"flavor_label_1",
+ "flavorProperties":[
+ {
+ "hpa-feature":"basicCapabilities",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "mandatory": "True",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"numVirtualCpu",
+ "hpa-attribute-value":"32",
+ "operator":"="
+ },
+ {
+ "hpa-attribute-key":"virtualMemSize",
+ "hpa-attribute-value":"64",
+ "operator":"=",
+ "unit":"GB"
+ }
+ ]
+ },
+ {
+ "hpa-feature":"ovsDpdk",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "mandatory": "False",
+ "score": "10",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"dataProcessingAccelerationLibrary",
+ "hpa-attribute-value":"v18.02",
+ "operator":"="
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "flavorLabel":"flavor_label_2",
+ "flavorProperties":[
+ {
+ "hpa-feature":"basicCapabilities",
+ "hpa-version":"v1",
+ "architecture":"generic",
+ "mandatory": "False",
+ "score": "5",
+ "hpa-feature-attributes":[
+ {
+ "hpa-attribute-key":"numVirtualCpu",
+ "hpa-attribute-value":"8",
+ "operator":">="
+ },
+ {
+ "hpa-attribute-key":"virtualMemSize",
+ "hpa-attribute-value":"16",
+ "operator":">=",
+ "unit":"GB"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
+```
+
+### VIM Fit
+
+Constrain each demand's inventory candidates based on capacity check for available capacity at the VIM instances.
+
+Requirements are sent as an opaque request object understood by the VIM controllers or MultiCloud. Each controller is defined and implemented as a plugin in Conductor.
+
+A vim controller plugin knows how to communicate with a particular endpoint (via HTTP/REST, DMaaP, etc.), obtain necessary information, and make a decision. The endpoint and credentials can be configured through plugin settings.
+
+**Schema**
+
+| Property | Value |
+|---------------|-------------------------------------------------------------|
+| ``controller``| Name of a vim controller. (e.g., multicloud) |
+| ``request`` | Opaque dictionary of key/value pairs. Values must be strings or numbers. Encoded and sent to the vim controller via a plugin. |
+
+For example, to place two demands in different disaster zones:
+
+```yaml
+constraints:
+ check_cloud_capacity:
+ type: vim_fit
+ demands: [my_vnf_demand, my_other_vnf_demand]
+ properties:
+ controller: multicloud
+ request: REQUEST_DICT
+```
+
+**Notes**
+
+* For ONAP Beijing release the REQUEST_DICT is of the following format as defined by the policy for vim_fit. The REQUEST_DICT is an opaque request object defined through policy, so it is not restricted to this format. In ONAP Beijing release MultiCloud supports the check_vim_capacity using the following grammar.
+ ```json
+ {
+ "request":{
+ "vCPU":10,
+ "Memory":{
+ "quantity":{
+ "get_param":"REQUIRED_MEM"
+ },
+ "unit":"GB"
+ },
+ "Storage":{
+ "quantity":{
+ "get_param":"REQUIRED_DISK"
+ },
+ "unit":"GB"
+ }
+ }
+ }
+ ```
+
### Inventory Group
Constrain demands such that inventory items are grouped across two demands.
diff --git a/conductor/requirements.txt b/conductor/requirements.txt
index c587704..9359e26 100644
--- a/conductor/requirements.txt
+++ b/conductor/requirements.txt
@@ -5,7 +5,7 @@
cotyledon # Apache-2.0
futurist>=0.11.0 # Apache-2.0
lxml>=2.3 # BSD
-oslo.config<5.6.0,>=3.9.0 # Apache-2.0
+oslo.config>=3.9.0 # Apache-2.0
oslo.i18n>=2.1.0 # Apache-2.0
oslo.log>=1.14.0 # Apache-2.0
# oslo.policy>=0.5.0 # Apache-2.0
diff --git a/conductor/test-requirements.txt b/conductor/test-requirements.txt
index 3150f00..c0e68d0 100644
--- a/conductor/test-requirements.txt
+++ b/conductor/test-requirements.txt
@@ -11,7 +11,6 @@ kombu>=3.0.25 # BSD
mock>=2.0 # BSD
mox3>=0.7.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
-psycopg2>=2.5 # LGPL/ZPL
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
diff --git a/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json b/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json
index 2d98bc7..e87530a 100644
--- a/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json
+++ b/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json
@@ -1,13 +1,13 @@
{
"info": {
- "_postman_id": "239540d1-161b-4d72-9fbb-12c97ddeec8d",
"name": "HPA-Conductor",
+ "_postman_id": "76f7e1ce-02fb-72bc-33ff-4d56c1259b78",
+ "description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Plans",
- "description": "",
"item": [
{
"name": "Create Plan Sanity - Simple",
@@ -37,7 +37,7 @@
],
"body": {
"mode": "raw",
- "raw": "{ \r\n \"name\":\"vCPE-Sanity1\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":32.89748,\r\n \"customer_long\":-97.040443,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 5000 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ "raw": "{ \r\n \"name\":\"vCPE-Sanity1\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":32.89748,\r\n \"customer_long\":-97.040443,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
},
"url": {
"raw": "{{conductor}}/plans",
@@ -80,7 +80,7 @@
],
"body": {
"mode": "raw",
- "raw": "{ \r\n \"name\":\"vCPE-Sanity1\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":32.89748,\r\n \"customer_long\":-97.040443,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 5000 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"check_cloud_capacity\":{ \r\n \"type\":\"vim_fit\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"controller\":\"multicloud\",\r\n \"request\":{ \r\n \"vCPU\":10,\r\n \"Memory\":{ \r\n \"quantity\":{ \r\n \"get_param\":\"REQUIRED_MEM\"\r\n },\r\n \"unit\":\"GB\"\r\n },\r\n \"Storage\":{ \r\n \"quantity\":{ \r\n \"get_param\":\"REQUIRED_DISK\"\r\n },\r\n \"unit\":\"GB\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ "raw": "{ \r\n \"name\":\"vCPE-Sanity1\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":32.89748,\r\n \"customer_long\":-97.040443,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"check_cloud_capacity\":{ \r\n \"type\":\"vim_fit\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"controller\":\"multicloud\",\r\n \"request\":{ \r\n \"vCPU\":10,\r\n \"Memory\":{ \r\n \"quantity\":{ \r\n \"get_param\":\"REQUIRED_MEM\"\r\n },\r\n \"unit\":\"GB\"\r\n },\r\n \"Storage\":{ \r\n \"quantity\":{ \r\n \"get_param\":\"REQUIRED_DISK\"\r\n },\r\n \"unit\":\"GB\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
},
"url": {
"raw": "{{conductor}}/plans",
@@ -123,7 +123,179 @@
],
"body": {
"mode": "raw",
- "raw": "{ \r\n \"name\":\"vCPE-with-HPA\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":32.89748,\r\n \"customer_long\":-97.040443,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n },\r\n \"brg_loc\":{ \r\n \"pnf_host_name\":{ \r\n \"get_param\":\"pnf_id\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vGMuxInfra\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"service\",\r\n \"attributes\":{ \r\n \"equipment_type\":\"vG_Mux\",\r\n \"customer_id\":\"some_company\"\r\n },\r\n \"excluded_candidates\":[ \r\n { \r\n \"candidate_id\":\"1ac71fb8-ad43-4e16-9459-c3f372b8236d\"\r\n }\r\n ],\r\n \"existing_placement\":[ \r\n { \r\n \"candidate_id\":\"21d5f3e8-e714-4383-8f99-cc480144505a\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vgmux_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vGMuxInfra\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"colocation\":{ \r\n \"type\":\"zone\",\r\n \"demands\":[ \r\n \"vGMuxInfra\",\r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"qualifier\":\"same\",\r\n \"category\":\"region\"\r\n }\r\n },\r\n \"hpa_constraint\":{ \r\n \"type\":\"hpa\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"evaluate\":[ \r\n { \r\n \"label\":\"flavor_label_1\",\r\n \"features\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"cpuPinning\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\",\r\n \"hpa-attribute-value\":\"prefer\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"logicalCpuPinningPolicy\",\r\n \"hpa-attribute-value\":\"dedicated\",\r\n \"operator\":\"=\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n { \r\n \"label\":\"flavor_label_2\",\r\n \"features\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"8\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"16\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"memoryPageSize\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"memoryPageSize\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vGMuxInfra\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ "raw": "{ \r\n \"name\":\"vCPE-with-HPA\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":45.395968,\r\n \"customer_long\":-71.135344,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{\r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{\r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"hpa_constraint\":{ \r\n \"type\":\"hpa\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"evaluate\":[ \r\n { \r\n \"flavorLabel\":\"flavor_label_1\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\">=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\">=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"cpuPinning\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\",\r\n \"hpa-attribute-value\":\"prefer\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"logicalCpuPinningPolicy\",\r\n \"hpa-attribute-value\":\"dedicated\",\r\n \"operator\":\"=\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n { \r\n \"flavorLabel\":\"flavor_label_2\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"8\",\r\n \"operator\":\">=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"16\",\r\n \"operator\":\">=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"ovsDpdk\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\r\n \"hpa-attribute-value\":\"v18.02\",\r\n \"operator\":\"=\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ },
+ "url": {
+ "raw": "{{conductor}}/plans",
+ "host": [
+ "{{conductor}}"
+ ],
+ "path": [
+ "plans"
+ ]
+ },
+ "description": "Plans"
+ },
+ "response": []
+ },
+ {
+ "name": "Create Plan with HPA Simple",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ "var data = JSON.parse(responseBody);",
+ "postman.setEnvironmentVariable(\"plan_id\", data['id']);"
+ ]
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "X-Auth-Token",
+ "value": "{{auth_token}}"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{ \r\n \"name\":\"vCPE-with-HPA\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":45.395968,\r\n \"customer_long\":-71.135344,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{\r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"hpa_constraint\":{ \r\n \"type\":\"hpa\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"evaluate\":[ \r\n { \r\n \"flavorLabel\":\"flavor_label_1\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"32\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"64\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"ovsDpdk\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\r\n \"hpa-attribute-value\":\"v18.02\",\r\n \"operator\":\"=\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n { \r\n \"flavorLabel\":\"flavor_label_2\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\": \"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"8\",\r\n \"operator\":\">=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"16\",\r\n \"operator\":\">=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n },\r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ },
+ "url": {
+ "raw": "{{conductor}}/plans",
+ "host": [
+ "{{conductor}}"
+ ],
+ "path": [
+ "plans"
+ ]
+ },
+ "description": "Plans"
+ },
+ "response": []
+ },
+ {
+ "name": "Create Plan with HPA unmatched requirements",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ "var data = JSON.parse(responseBody);",
+ "postman.setEnvironmentVariable(\"plan_id\", data['id']);"
+ ]
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "X-Auth-Token",
+ "value": "{{auth_token}}"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{ \r\n \"name\":\"vCPE-with-HPA-unmatched-requirements\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":45.395968,\r\n \"customer_long\":-71.135344,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vgmux_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"hpa_constraint\":{ \r\n \"type\":\"hpa\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"evaluate\":[ \r\n { \r\n \"flavorLabel\":\"flavor_label_1\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"60\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"64\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n { \r\n \"flavorLabel\":\"flavor_label_2\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\":\"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"30\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"128\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ },
+ "url": {
+ "raw": "{{conductor}}/plans",
+ "host": [
+ "{{conductor}}"
+ ],
+ "path": [
+ "plans"
+ ]
+ },
+ "description": "Plans"
+ },
+ "response": []
+ },
+ {
+ "name": "Create Plan with HPA requirement mandatory",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ "var data = JSON.parse(responseBody);",
+ "postman.setEnvironmentVariable(\"plan_id\", data['id']);"
+ ]
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "X-Auth-Token",
+ "value": "{{auth_token}}"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{ \r\n \"name\":\"vCPE-with-HPA-requirement-mandatory\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":45.395968,\r\n \"customer_long\":-71.135344,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"hpa_constraint\":{ \r\n \"type\":\"hpa\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"evaluate\":[ \r\n { \r\n \"flavorLabel\":\"flavor_label_1\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"64\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"64\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\":\"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n { \r\n \"flavorLabel\":\"flavor_label_2\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"32\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"128\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"ovsDpdk\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\r\n \"hpa-attribute-value\":\"v18.02\",\r\n \"operator\":\"=\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
+ },
+ "url": {
+ "raw": "{{conductor}}/plans",
+ "host": [
+ "{{conductor}}"
+ ],
+ "path": [
+ "plans"
+ ]
+ },
+ "description": "Plans"
+ },
+ "response": []
+ },
+ {
+ "name": "Create Plan with HPA requirement optional",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ "var data = JSON.parse(responseBody);",
+ "postman.setEnvironmentVariable(\"plan_id\", data['id']);"
+ ]
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "X-Auth-Token",
+ "value": "{{auth_token}}"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{ \r\n \"name\":\"vCPE-HPA-Requirement-Optional\",\r\n \"template\":{ \r\n \"homing_template_version\":\"2017-10-10\",\r\n \"parameters\":{ \r\n \"service_name\":\"Residential vCPE\",\r\n \"service_id\":\"vcpe_service_id\",\r\n \"customer_lat\":45.395968,\r\n \"customer_long\":-71.135344,\r\n \"REQUIRED_MEM\":4,\r\n \"REQUIRED_DISK\":100,\r\n \"pnf_id\":\"some_pnf_id\"\r\n },\r\n \"locations\":{ \r\n \"customer_loc\":{ \r\n \"latitude\":{ \r\n \"get_param\":\"customer_lat\"\r\n },\r\n \"longitude\":{ \r\n \"get_param\":\"customer_long\"\r\n }\r\n }\r\n },\r\n \"demands\":{ \r\n \"vG\":[ \r\n { \r\n \"inventory_provider\":\"aai\",\r\n \"inventory_type\":\"cloud\"\r\n }\r\n ]\r\n },\r\n \"constraints\":{ \r\n \"constraint_vg_customer\":{ \r\n \"type\":\"distance_to_location\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"distance\":\"< 100 km\",\r\n \"location\":\"customer_loc\"\r\n }\r\n },\r\n \"hpa_constraint\":{ \r\n \"type\":\"hpa\",\r\n \"demands\":[ \r\n \"vG\"\r\n ],\r\n \"properties\":{ \r\n \"evaluate\":[ \r\n { \r\n \"flavorLabel\":\"flavor_label_1\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\">=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"8\",\r\n \"operator\":\">=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"instructionSetExtensions\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"Intel64\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"instructionSetExtensions\",\r\n \"hpa-attribute-value\":[\"aes\", \"sse\", \"avx\", \"smt\"],\r\n \"operator\":\"ALL\",\r\n \"unit\":\"\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\":\"False\",\r\n \"score\":\"3\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n { \r\n \"flavorLabel\":\"flavor_label_2\",\r\n \"flavorProperties\":[ \r\n { \r\n \"hpa-feature\":\"basicCapabilities\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"True\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numVirtualCpu\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\">=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"virtualMemSize\",\r\n \"hpa-attribute-value\":\"8\",\r\n \"operator\":\">=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"ovsDpdk\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\": \"False\",\r\n \"score\":\"5\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\r\n \"hpa-attribute-value\":\"v18.02\",\r\n \"operator\":\"=\"\r\n }\r\n ]\r\n },\r\n { \r\n \"hpa-feature\":\"numa\",\r\n \"hpa-version\":\"v1\",\r\n \"architecture\":\"generic\",\r\n \"mandatory\":\"False\",\r\n \"score\":\"3\",\r\n \"hpa-feature-attributes\":[ \r\n { \r\n \"hpa-attribute-key\":\"numaNodes\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaCpu-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-0\",\r\n \"hpa-attribute-value\":\"2\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n },\r\n { \r\n \"hpa-attribute-key\":\"numaMem-1\",\r\n \"hpa-attribute-value\":\"4\",\r\n \"operator\":\"=\",\r\n \"unit\":\"GB\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"optimization\":{ \r\n \"minimize\":{ \r\n \"sum\":[ \r\n { \r\n \"distance_between\":[ \r\n \"customer_loc\",\r\n \"vG\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"timeout\":5,\r\n \"limit\":3\r\n}"
},
"url": {
"raw": "{{conductor}}/plans",
@@ -273,7 +445,10 @@
"request": {
"method": "GET",
"header": [],
- "body": {},
+ "body": {
+ "mode": "raw",
+ "raw": ""
+ },
"url": {
"raw": "{{music}}/MUSIC/rest/keyspaces/conductor/tables/plans/rows/?id={{plan_id}}",
"host": [
@@ -304,7 +479,10 @@
"request": {
"method": "GET",
"header": [],
- "body": {},
+ "body": {
+ "mode": "raw",
+ "raw": ""
+ },
"url": {
"raw": "{{music}}/MUSIC/rest/keyspaces/conductor/tables/plans/rows",
"host": [
@@ -328,7 +506,10 @@
"request": {
"method": "GET",
"header": [],
- "body": {},
+ "body": {
+ "mode": "raw",
+ "raw": ""
+ },
"url": {
"raw": "{{music}}/MUSIC/rest/version",
"host": [
@@ -370,61 +551,58 @@
],
"variable": [
{
- "id": "67c04fe5-65e5-49c1-9eef-2a4ab7369851",
+ "id": "f0c65a3a-71ea-4efa-951d-3ac6665c756b",
"key": "conductor_root",
"value": "http://{{host}}:{{port}}",
"type": "string"
},
{
- "id": "3d4932b3-5c48-414e-939c-09d2686c0fcb",
+ "id": "8489511a-d30a-491c-8c9a-d2800a6496b1",
"key": "music",
"value": "http://{{music_host}}:{{music_port}}",
- "type": "string",
- "description": ""
+ "type": "string"
},
{
- "id": "936b25bf-6d03-4f39-93b6-d1bc13e2d6b4",
+ "id": "afd96c65-d94f-4f8f-a25a-c920e5c80a06",
"key": "conductor",
"value": "{{conductor_root}}/{{version}}",
"type": "string"
},
{
- "id": "07bbd7ba-467d-4db4-81e9-cc3f354dc556",
+ "id": "5390d5f6-eeea-4b2e-a622-0768143f5dd8",
"key": "version",
"value": "v1",
"type": "string"
},
{
- "id": "9cf0167a-3be1-4bc4-956e-622e00d892f8",
+ "id": "f025ecbd-011d-4433-bc95-46e5783ab7dc",
"key": "Accept",
"value": "application/json",
"type": "string"
},
{
- "id": "46f7b0fa-6e8f-4af4-96f1-35233948c014",
+ "id": "44d9c205-327d-4926-8149-fde868c9f819",
"key": "host",
"value": "otconap5.sc.intel.com",
"type": "string"
},
{
- "id": "2fa308ce-9e2e-4c6e-a4b4-fb45aa945d71",
+ "id": "dc240e5d-1c19-4f04-9173-136a89727bb0",
"key": "port",
"value": "8091",
"type": "string"
},
{
- "id": "7df576d5-4744-4577-b2d8-8eb4e7748f63",
+ "id": "da3d359f-bc48-47b5-99da-5ed69469cb5f",
"key": "music_host",
"value": "10.3.79.140",
- "type": "string",
- "description": ""
+ "type": "string"
},
{
- "id": "2eac9633-c6d7-45d3-8fb9-06f14f8fa181",
+ "id": "755142fc-4ccf-4ec9-b146-d63385b04948",
"key": "music_port",
"value": "8080",
- "type": "string",
- "description": ""
+ "type": "string"
}
]
} \ No newline at end of file