summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conductor/conductor/data/service.py3
-rw-r--r--conductor/conductor/solver/optimizer/constraints/hpa.py11
-rw-r--r--conductor/conductor/tests/functional/simulators/aaisim/responses/get_onap_regions.json342
-rw-r--r--conductor/conductor/tests/unit/solver/test_hpa.py6
-rw-r--r--conductor/doc/template/README.md388
-rw-r--r--conductor/tools/postman_collection/HPA-Conductor.postman_collection.json67
-rw-r--r--docs/homingspecification.rst420
7 files changed, 1013 insertions, 224 deletions
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/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/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/tools/postman_collection/HPA-Conductor.postman_collection.json b/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json
index 2d98bc7..93dc954 100644
--- a/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json
+++ b/conductor/tools/postman_collection/HPA-Conductor.postman_collection.json
@@ -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,50 @@
],
"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\":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 \"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\":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 \"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",
@@ -370,57 +413,57 @@
],
"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": ""
},
{
- "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": ""
},
{
- "id": "2eac9633-c6d7-45d3-8fb9-06f14f8fa181",
+ "id": "755142fc-4ccf-4ec9-b146-d63385b04948",
"key": "music_port",
"value": "8080",
"type": "string",
diff --git a/docs/homingspecification.rst b/docs/homingspecification.rst
index bb1798b..9e10730 100644
--- a/docs/homingspecification.rst
+++ b/docs/homingspecification.rst
@@ -376,6 +376,7 @@ region.
**Examples**
+**``Service Candidate``**
.. code:: json
{
@@ -396,7 +397,225 @@ region.
"complex_name": "dalls_one",
"cloud_owner": "att-aic",
"cloud_region_version": "1.1",
- "physical_location_id": "DLLSTX9A",
+ "physical_location_id": "DLLSTX9A"
+ }
+
+**``Cloud Candidate``**
+.. code:: 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
@@ -547,6 +766,17 @@ Constraint Types
| | clouds/regions/availabil |
| | ity-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. |
+-------------------------------------------+--------------------------+
@@ -850,6 +1080,194 @@ Or, to place two demands in the same region:
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 eg, 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. |
++-------------+--------------------------------------------------------+
+
+.. code:: 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**
+
+.. code:: 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. |
++--------------+--------------------------------------------------------+
+
+.. code:: 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.
+ .. code:: json
+ {
+ "request":{
+ "vCPU":10,
+ "Memory":{
+ "quantity":{
+ "get_param":"REQUIRED_MEM"
+ },
+ "unit":"GB"
+ },
+ "Storage":{
+ "quantity":{
+ "get_param":"REQUIRED_DISK"
+ },
+ "unit":"GB"
+ }
+ }
+ }
+
Inventory Group
~~~~~~~~~~~~~~~