diff options
author | vrvarma <vv8305@att.com> | 2019-12-13 10:24:55 -0500 |
---|---|---|
committer | vrvarma <vv8305@att.com> | 2019-12-13 10:29:45 -0500 |
commit | 430153e1a9489a86cf0ff7942eceb0bf5f1c170c (patch) | |
tree | b22090b80d11761a24d9cbeaa6348704cce2de83 /osdf/templates | |
parent | 34ba229b31758c38a299a163de0007848b5921be (diff) |
osdf rearchitecture into apps and libs
Change-Id: I2db2f8e252bd5e60807b2ffabf5a5b193a789f7a
Signed-off-by: vrvarma <vv8305@att.com>
Issue-ID: OPTFRA-637
Diffstat (limited to 'osdf/templates')
-rwxr-xr-x | osdf/templates/cms_opt_request.jsont | 35 | ||||
-rwxr-xr-x | osdf/templates/cms_opt_request.jsont_1707_v1 | 67 | ||||
-rwxr-xr-x | osdf/templates/cms_opt_request_1702.jsont | 63 | ||||
-rw-r--r-- | osdf/templates/cms_opt_response.jsont | 8 | ||||
-rwxr-xr-x | osdf/templates/conductor_interface.json | 39 | ||||
-rw-r--r-- | osdf/templates/license_opt_request.jsont | 6 | ||||
-rwxr-xr-x | osdf/templates/plc_opt_request.jsont | 142 | ||||
-rwxr-xr-x | osdf/templates/plc_opt_response.jsont | 10 | ||||
-rwxr-xr-x | osdf/templates/policy_request.jsont | 3 | ||||
-rwxr-xr-x | osdf/templates/test_cms_nb_req_from_client.jsont | 19 | ||||
-rwxr-xr-x | osdf/templates/test_plc_nb_req_from_client.jsont | 52 |
11 files changed, 0 insertions, 444 deletions
diff --git a/osdf/templates/cms_opt_request.jsont b/osdf/templates/cms_opt_request.jsont deleted file mode 100755 index 006562b..0000000 --- a/osdf/templates/cms_opt_request.jsont +++ /dev/null @@ -1,35 +0,0 @@ -{ - "transaction_id": "{{ transaction_id }}", - "request_id": "{{ request_id }}", - "start_date" : "{{ start_time }}", - "end_date" : "{{ end_time }}", - "change_elements" : {{ json.dumps(change_elements) }}, - "constraints" : [ - { - "type" : "general_concurrency_limit", - "parameters": [{{ concurrency_limit }}] - }, - - { - "type" : "allowed_forbidden_periods", - "parameters" : {{ json.dumps(allowed_periods) }} - } - - {% if spatial_conflicts is defined and spatial_conflicts|length > 0 %} - , - { - "type" : "spatial_conflict", - "parameters": {{ json.dumps(spatial_conflicts) }} - } - {% endif %} - - - {% if critical_periods is defined and spatial_conflicts|length > 0 %} - , - { - "type" : "critical_periods", - "parameters": {{ json.dumps(critical_periods) }} - } - {% endif %} - ] -} diff --git a/osdf/templates/cms_opt_request.jsont_1707_v1 b/osdf/templates/cms_opt_request.jsont_1707_v1 deleted file mode 100755 index 75ecbe5..0000000 --- a/osdf/templates/cms_opt_request.jsont_1707_v1 +++ /dev/null @@ -1,67 +0,0 @@ -{ - "transaction_id": "{{ transaction_id }}", - "request_id": "{{ request_id }}", - "start_date" : "{{ start_time }}", - "end_date" : "{{ end_time }}", - - "change_elements" : [ - {% set comma = joiner(",") -%} - {% for element in all_upgrades -%} {{ comma() }} - { - "id" : "{{ element.id }}", - "failback_duration": {{ element.failback_duration }}, - {% if element.group_id -%} - "group_id": "{{ element.group_id }}", - {% endif %} - {% if element.scheduled_on -%} - "scheduled_on": "{{ element.scheduled_on }}", - {% endif %} - "duration": {{ element.duration }} - } - {% endfor -%} - ], - - "constraints" : [ - { - "type" : "general_concurrency_limit", - "parameters": [{{ concurrency_limit }}] - }, - - { - "type" : "allowed_forbidden_periods", - "parameters" : [ - {% set comma = joiner(",") -%} - {% for idx in all_pending -%} {{ comma() }} - { "id" : "{{ idx.id }}", - "allowed_periods": [ {{ allowed_periods }}] - } - {% endfor -%} - ] - }, - { - "type" : "spatial_conflict", - "parameters": [ - {% set comma = joiner(",") -%} - {% for pserver, vce_list in vce_pserver_mapping.items() -%} {{ comma() }} - { - "spatial_entity": "{{ pserver }}", - "affected_entities": {{ vce_list }} - } - {% endfor -%} - ] - }, - - { - "type" : "critical_periods", - "parameters": [ - {% set comma = joiner(",") -%} - {% for element, conflict_period in conflict_interval.items() -%} {{ comma() }} - { - "id" : "{{ element }}", - "periods": [{{ conflict_period }}] - } - {% endfor -%} - ] - } - ] -} diff --git a/osdf/templates/cms_opt_request_1702.jsont b/osdf/templates/cms_opt_request_1702.jsont deleted file mode 100755 index bcafa45..0000000 --- a/osdf/templates/cms_opt_request_1702.jsont +++ /dev/null @@ -1,63 +0,0 @@ -{ - "request_id": "{{ request_id }}", - "startdate" : "{{ start_time }}", - "enddate" : "{{ end_time }}", - - "change_elements" : [ -{% set comma = joiner(",") -%} -{% for element in all_upgrades -%} {{ comma() }} - { "id" : "{{ element.id }}", - {% if element.scheduled -%} "scheduled_on": "{{ element.scheduled }}", {% endif -%} - "duration": {{ element.duration }}, {# duration in seconds #} - "failback_duration": {{ element.failback_duration }}, {# duration in seconds #} - "group_id": {{ element.group_id }}, {# duration in seconds #} - }{% endfor -%} - ], - - "constraints" : [ - { - "type" : "general_concurrency_limit", - "parameters" : [ {{ general_concurrency_limit }} ] - }, - - { - "type" : "allowed_forbidden_periods", - "parameters" : [ -{% set comma = joiner(",") -%} -{% for idx in all_pending -%} {{ comma() }} - { "id" : "{{ idx.id }}", - "allowed_periods": [ {% set comma2 = joiner(",") -%} - {% for period in allowed_periods -%} {{ comma2() }} [{{ json.dumps(period[0]) }}, {{ json.dumps(period[1]) }}] - {% endfor -%} ] }{% endfor -%} - ] - } - -{% if p_v_conflict is defined and p_v_conflict|length > 0 %} - , - { - "type" : "critical_periods", - "description" : "Simultaneous upgrades", - "parameters" : [ -{% set comma2 = joiner(",") -%} -{% for element in p_v_conflict -%} {{ comma2() }} - { - "id" : "{{ element[0] }}", - "periods" : [{{ json.dumps(element[0]) }}, {{ json.dumps(element[1]) }}] - } -{% endfor -%} -{% endif %} - -{% for pserver, vce_group in grouped_vces.items() -%} {{ comma() }} - , - { - "id" : "{{ pserver }}", - "name" : "VCE's on pserver {{ pserver }}", - "description": "Only some VCEs on a pserver can be upgraded at a time", - "max_num_upgrades" : {{ max_num_upgrades(vce_group) }}, - "upgrades" : {{ json.dumps(vce_group) }} - } -{% endfor -%} - ] - } - ] -} diff --git a/osdf/templates/cms_opt_response.jsont b/osdf/templates/cms_opt_response.jsont deleted file mode 100644 index a8817df..0000000 --- a/osdf/templates/cms_opt_response.jsont +++ /dev/null @@ -1,8 +0,0 @@ -{ - "transactionId": "{{transaction_id}}", - "scheduleId":"{{schedule_id}}", - "requestState": "{{request_state}}", - "status": "{{status}}", - "description": "{{description}}", - "schedule": {{schedule}} -}
\ No newline at end of file diff --git a/osdf/templates/conductor_interface.json b/osdf/templates/conductor_interface.json deleted file mode 100755 index 030d6a0..0000000 --- a/osdf/templates/conductor_interface.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "{{ name }}", - "files": {}, - "timeout": {{ timeout }}, - "num_solution": "{{ 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 %} - } - } -} diff --git a/osdf/templates/license_opt_request.jsont b/osdf/templates/license_opt_request.jsont deleted file mode 100644 index 7baa759..0000000 --- a/osdf/templates/license_opt_request.jsont +++ /dev/null @@ -1,6 +0,0 @@ -{ - "transactionId": "{{transaction_id}}", - "requestId": "{{request_id}}", - "partNumber": "{{part_number}}", - "licenseModel" : "{{artifact}}" -}
\ No newline at end of file diff --git a/osdf/templates/plc_opt_request.jsont b/osdf/templates/plc_opt_request.jsont deleted file mode 100755 index a218b8a..0000000 --- a/osdf/templates/plc_opt_request.jsont +++ /dev/null @@ -1,142 +0,0 @@ -{
- "name": "{{ name }}",
- "files": "{{ files }}",
- "timeout": "{{ timeout }}",
- "num_solution": "{{ limit }}",
- "template": {
- "CUST_ID": "{{ cust_id }}",
- "E2EVPNKEY": "{{ e2evpnkey }}",
- "UCPEHOST": "{{ ucpehost }}",
- "WAN_PORT1_UP": "{{ wan_port1_up }}",
- "WAN_PORT1_DOWN": "{{ wan_port1_down }}",
- "EFFECTIVE_BANDWIDTH": "{{ effective_bandwidth }}",
- "SERVICE_INST": "{{ service_inst }}",
- "locations": {
- "customer_loc": {
- "host_name": "{{ ucpehost }}"
- }
- },
- "demands": [
- {% set comma=joiner(",") %}
- {% for demand in demand_list %} {{ comma() }}
- {
- "{{ demand.vnf_name }}": [
- {% set comma2=joiner(",") %}
- {% for property in demand.property %}
- "inventory_provider": {{ property.inventory_provider }},
- "inventory_type": {{ property.inventory_type }},
- "service_type": {{ property.service_type }},
- "customer_id": {{ property.customer_id }},
- "candidate_id": {{ property.candidate_id }}
- {% endfor %}
- ]
- }
- {% endfor %}
- ],
- "constraints": {
- {% set comma_main=joiner(",") %}
-
- {% if attribute_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for attribute in attribute_policy_list %} {{ comma() }}
- attribute['identity'] : {
- "type": {{ attribute['type'] }},
- "demands": {{ attribute['demands'] }},
- "properties": {
- "evaluate": {
- "hypervisor": {{ attribute['property']['hypervisor'] }},
- "aic_version": {{ attribute['property']['aicVersion'] }},
- "aic_type": {{ attribute['property']['aicType'] }},
- "dataplane": {{ attribute['property']['datatype'] }},
- "network_roles": {{ attribute['property']['networkRoles'] }},
- "complex": {{ attribute['property']['complex'] }}
- }
- }
- }
- {% endfor %}
-
- {% if distance_to_location_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for distance_location in distance_to_location_policy_list %} {{ comma() }}
- distance_location['identity'] : {
- "type": {{ distance_location['type'] }},
- "demands": {{ distance_location['demands'] }},
- "properties": {
- "distance": {{ distance_location['property']['distance'] }},
- "location": {{ distance_location['property']['location'] }}
- }
- }
- {% endfor %}
-
- {% if inventory_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for inventory in inventory_policy_list %} {{ comma() }}
- inventory['identity'] : {
- "type": {{ inventory['type'] }},
- "demands": {{ inventory['demands'] }}
- }
- {% endfor %}
-
- {% if resource_instance_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for resource_instance in resource_instance_policy_list %} {{ comma() }}
- resource_instance['identity'] : {
- "type": {{ resource_instance['type'] }},
- "demands": {{ resource_instance['demands'] }},
- "properties": {
- "controller": {{ resource_instance['property']['controller'] }},
- "request": {{ resource_instance['property']['request'] }}
- }
- }
- {% endfor %}
-
- {% if resource_region_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for resource_region in resource_region_policy_list %} {{ comma() }}
- resource_region['identity'] : {
- "type": {{ resource_region['type'] }},
- "demands": {{ resource_region['demands'] }},
- "properties": {
- "controller": {{ resource_region['property']['controller'] }},
- "request": {{ resource_region['property']['request'] }}
- }
- }
- {% endfor %}
-
- {% if zone_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for zone in zone_policy_list %} {{ comma() }}
- zone['identity'] : {
- "type": {{ zone['type'] }},
- "demands": {{ zone['demands'] }},
- "properties": {
- "qualifier": {{ resource_region['property']['qualifier'] }},
- "category": {{ resource_region['property']['category'] }}
- }
- }
- {% endfor %}
-
- {% if optmization_policy_list %} {{ comma_main() }} {% endif %}
- {% set comma=joiner(",") %}
- {% for optimization in optimization_policy_list %} {{ comma() }}
- "optimization" : {
- {{ optimization['objective'] }}: {
- "sum": [
- {% set comma2=joiner(",") %}
- {% for parameter in optimization['parameter'] %} {{ comma() }}
- {
- "product": [
- {{ parameter['weight'] }},
- {
- "distance_between": [{{ parameter['customerLocation'] }},{{ parameter['demand'] }}]
- }
- ]
- }
- {% endfor %}
- ]
- }
- }
- {% endfor %}
- }
- }
-}
diff --git a/osdf/templates/plc_opt_response.jsont b/osdf/templates/plc_opt_response.jsont deleted file mode 100755 index e5709e7..0000000 --- a/osdf/templates/plc_opt_response.jsont +++ /dev/null @@ -1,10 +0,0 @@ -{ - "requestId": "{{requestId}}", - "transactionId": "{{transacationId}}", - "requestStatus": "{{requestStatus}}", - "statusMessage": "{{statusMessage}}" - "solutions": { - "placementSolutions": {{ json.dumps(composite_solutions) }}, - "licenseSolutions":{{ json.dumps(license_solutions) }} - } -} diff --git a/osdf/templates/policy_request.jsont b/osdf/templates/policy_request.jsont deleted file mode 100755 index 3a9e201..0000000 --- a/osdf/templates/policy_request.jsont +++ /dev/null @@ -1,3 +0,0 @@ -{ - "policyName": "{{policy_name}}" {# we currently only support query by policy name only -- policyName #} -} diff --git a/osdf/templates/test_cms_nb_req_from_client.jsont b/osdf/templates/test_cms_nb_req_from_client.jsont deleted file mode 100755 index a60c8ff..0000000 --- a/osdf/templates/test_cms_nb_req_from_client.jsont +++ /dev/null @@ -1,19 +0,0 @@ -{ - "schedulingInfo": { - "change_management_id": "{{ change_management_id }}", - "start_time": "{{ start_time }}", - "end_time": "{{ end_time }}", - "policy_id": {{ json.dumps(policy_id) }}, {# a list of policy Ids #} - "service_type": "{{ service_type }}", - "workflow_type": "{{ workflow_type }}", - "upgrades": {{ json.dumps(upgrades) }} {# a list of node Ids #} - }, - "requestInfo": { - "requestId": "{{ requestId }}", - "sourceId": "{{ sourceId }}", - "optimizer": "{{ optimizer }}", - "numSolutions": "{{ numSolutions }}", - "callbackUrl" : "{{ callbackUrl }}" - } -} - diff --git a/osdf/templates/test_plc_nb_req_from_client.jsont b/osdf/templates/test_plc_nb_req_from_client.jsont deleted file mode 100755 index 998ffb3..0000000 --- a/osdf/templates/test_plc_nb_req_from_client.jsont +++ /dev/null @@ -1,52 +0,0 @@ -{
- "requestInfo": {
- "requestId": "{{requestId}}",
- "sourceId": "{{sourceId}}",
- "optimizer": "{{optimizer}}",
- "numSolutions": {{numSolutions}},
- "timeout": {{timeout}},
- "callbackUrl" : "{{callbackUrl}}"
- },
- "placementInfo": {
- "modelInfo": {
- "modelType": "{{modelType}}",
- "modelInvariant": "{{modelInvariantId}}",
- "modelVersionId": "{{modelVersionId}}",
- "modelName": "{{modelName}}",
- "modelVersion": "{{modelVersion}}",
- "modelCustomizationId": "{{modelCustomizationId}}"
- },
- "subscriberInfo": {
- "globalSubscriberId": "{{globalSubscriberId}}",
- "subscriberName": "{{subscriberName}}",
- "subscriberCommonSiteId": "{{subscriberCommonSiteId}}",
- "ucpeHostName": "{{ucpeHostName}}"
- },
- "policyId": {{json.dumps(policyId)}},
- "vnfInfo": {
- "vnfType": "{{vnfType}}",
- "vnfPartNumber": "{{vnfPartNumber}}",
- "nominalThroughput": "{{nominalThroughput}}",
- "vnfSoftwareVersion": "{{vnfSoftwareVersion}}",
- "vnfManagementOption": "{{vnfManagementOption}}"
- },
- "vpnInfo": {
- "vpnId": "{{vpnId}}",
- "pvcId": "{{pvcId}}"
- },
- "serviceInfo": {
- "dhvServiceInfo": {
- "serviceInstanceId": "{{serviceInstanceId}}",
- "serviceType": "{{serviceType}}",
- "e2evpnkey": "{{e2evpnkey}}",
- "dhvSiteEffectiveTransportBandwidth": {{dhvSiteEffectiveTransportBandwidth}},
- "dhvIPSecTransportBandwidthUp": {{dhvIPSecTransportBandwidthUp}},
- "dhvIPSecTransportBandwidthDown": {{dhvIPSecTransportBandwidthDown}},
- "dhvIPSec2TransportBandwidthUp": {{dhvIPSec2TransportBandwidthUp}},
- "dhvIPSec2TransportBandwidthDown": {{dhvIPSec2TransportBandwidthDown}},
- "dhvVendorName": "{{dhvVendorName}}"
- }
- },
- "demandInfo": {{json.dumps(demandInfo)}}
- }
-}
|