diff options
author | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2019-04-08 15:05:22 +0200 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2019-04-18 17:05:54 +0200 |
commit | fc3ead31e631f69fabf0baaa20c10bf955ce374b (patch) | |
tree | 5227f20b49628ddf2e3ac533d0cd1dcb9d32a9e8 /osdf/templates/conductor_interface.json | |
parent | 2d59800cf61a90e2a80902186bdce3b28e5ae14d (diff) |
Traffic Distributtion support added
* New local polcies for vFW TD use case
* Fixed encoding for conductor_request template and parameters
section modified to accept all requestParameters
* Conductor request can have many attributes in the
'attributes' section - all that are defined in the vnf policy file
* Conductor request can have many request parameters in the
'requestParameters' section. The parameters come from QueryPolicies.
Before list of suppoted parameters was hardcoded
* Optional 'unique' parameter added to the placementDemand section.
It is already supported by conductor for all inventory types
* Improved debug logs for local policies
* Unit tests added for expanded request format
Change-Id: I41f219c366a3a77881c7096e64a6272edbada23b
Issue-ID: OPTFRA-443
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'osdf/templates/conductor_interface.json')
-rwxr-xr-x | osdf/templates/conductor_interface.json | 80 |
1 files changed, 39 insertions, 41 deletions
diff --git a/osdf/templates/conductor_interface.json b/osdf/templates/conductor_interface.json index 7377c48..0b8e6a1 100755 --- a/osdf/templates/conductor_interface.json +++ b/osdf/templates/conductor_interface.json @@ -1,41 +1,39 @@ -{
- "name": "{{ name }}",
- "files": {},
- "timeout": {{ timeout }},
- "limit": {{ limit }},
- "template": {
- "homing_template_version": "2017-10-10",
- "parameters": {
- "service_name": "{{ service_type }}",
- "service_id": "{{ service_id }}",
- "customer_lat": {{ latitude }},
- "customer_long": {{ longitude }},
- "REQUIRED_DISK": "{{ required_disk }}",
- "REQUIRED_MEM": "{{ required_mem }}"
- },
- "locations": {
- "customer_loc": {
- "latitude": { "get_param": "customer_lat" },
- "longitude": { "get_param": "customer_long" }
- }
- },
- "demands": {{ json.dumps(demand_list) }},
- {% set comma_main = joiner(",") %}
- "constraints": {
- {% set comma=joiner(",") %}
- {% for elem in policy_groups %} {{ comma() }}
- {% for key, value in elem.items() %}
- "{{key}}": {{ json.dumps(value) }}
- {% endfor %}
- {% endfor %}
- },
- "optimization": {
- {% set comma=joiner(",") %}
- {% for elem in optimization_policies %} {{ comma() }}
- {% for key, value in elem.items() %}
- "{{key}}": {{ json.dumps(value) }}
- {% endfor %}
- {% endfor %}
- }
- }
-}
+{ + "name": "{{ name }}", + "files": {}, + "timeout": {{ timeout }}, + "limit": {{ limit }}, + "template": { + "homing_template_version": "2017-10-10", + "parameters": { + {% set comma=joiner(",") %} + {% for key, value in request_params.items() %} {{ comma() }} + "{{key}}": {{ json.dumps(value) }} + {% endfor %} + }, + "locations": { + "customer_loc": { + "latitude": { "get_param": "customer_lat" }, + "longitude": { "get_param": "customer_long" } + } + }, + "demands": {{ json.dumps(demand_list) }}, + {% set comma_main = joiner(",") %} + "constraints": { + {% set comma=joiner(",") %} + {% for elem in policy_groups %} {{ comma() }} + {% for key, value in elem.items() %} + "{{key}}": {{ json.dumps(value) }} + {% endfor %} + {% endfor %} + }, + "optimization": { + {% set comma=joiner(",") %} + {% for elem in optimization_policies %} {{ comma() }} + {% for key, value in elem.items() %} + "{{key}}": {{ json.dumps(value) }} + {% endfor %} + {% endfor %} + } + } +} |