diff options
Diffstat (limited to 'vid-app-common/src/main/resources')
19 files changed, 430 insertions, 14 deletions
diff --git a/vid-app-common/src/main/resources/2f80c596.zip b/vid-app-common/src/main/resources/2f80c596.zip Binary files differnew file mode 100644 index 000000000..30935c6b9 --- /dev/null +++ b/vid-app-common/src/main/resources/2f80c596.zip diff --git a/vid-app-common/src/main/resources/aai_config_instance_view_edit.json b/vid-app-common/src/main/resources/aai_config_instance_view_edit.json new file mode 100644 index 000000000..7920c6dfb --- /dev/null +++ b/vid-app-common/src/main/resources/aai_config_instance_view_edit.json @@ -0,0 +1,81 @@ +{ + "model-name":"Proxy-Config-Instance", + "configuration":{ + "configuration-id": "9533-config-LB1113", + "configuration-name": "configuration-name-9533", + "configuration-type": "configuration-type-9533", + "configuration-sub-type": "configuration-sub-type-9533", + "model-invariant-id": "model-invariant-id-9533", + "model-version-id": "model-version-id-9533", + "orchestration-status": "Active", + "operational-status": "", + "configuration-selflink": "", + "model-customization-id": "model-customization-id-9533", + "resource-version": "1504038855716" + }, + "extra-properties": { + }, + "inventory-response-items":{ + "inventory-response-item":[ + { + "model-name":"VidPcrf051517..pcrf_nimbus_pcm..module-4", + "l-interface": { + "interface-name": "9533lInterface-LB1113", + "interface-role": "8ni", + "v6-wan-link-ip": "Pnr", + "selflink": "Un56B", + "interface-id": "o74n", + "macaddr": "8an6", + "network-name": "kjOn", + "management-option": "0Rn7", + "interface-description": "XPnLr", + "is-port-mirrored": true, + "resource-version": "1504038598348", + "in-maint": false, + "is-ip-unnumbered": false, + "relationship-list": { + "relationship": [ + { + "related-to": "logical-link", + "related-link": "/aai/v11/network/logical-links/logical-link/logicallink-987654321-21-LB1113", + "relationship-data": [ + { + "relationship-key": "logical-link.link-name", + "relationship-value": "logicallink-987654321-21-LB1113" + } + ] + } + ] + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "112.121.144.16", + "l3-interface-ipv4-prefix-length": 59, + "vlan-id-inner": 917, + "vlan-id-outer": 519, + "is-floating": true, + "resource-version": "1504038598353", + "neutron-network-id": "HX6m54p1akX", + "neutron-subnet-id": "nbmX5okGg" + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "2001:232E:2333:2322:122C:CDD:2AE3:3E4", + "l3-interface-ipv6-prefix-length": 76, + "vlan-id-inner": 27, + "vlan-id-outer": 710, + "is-floating": true, + "resource-version": "1504038598364", + "neutron-network-id": "xBR0OOToQ", + "neutron-subnet-id": "4E0gZLH" + } + ] + }, + "extra-properties":{ + + } + } + ] + } +}
\ No newline at end of file diff --git a/vid-app-common/src/main/resources/aai_get_node_template_instances.json b/vid-app-common/src/main/resources/aai_get_node_template_instances.json new file mode 100644 index 000000000..97c452aa3 --- /dev/null +++ b/vid-app-common/src/main/resources/aai_get_node_template_instances.json @@ -0,0 +1,101 @@ +{"results": [ + { + "id": "1976357096", + "node-type": "generic-vnf", + "url": "/aai/v11/network/generic-vnfs/generic-vnf/VNF-1-9887-jc689q", + "properties": { + "vnf-id": "0846287b-65bf-45a6-88f6-6a1af4149fac", + "vnf-name": "vnf9887-1jc689q", + "vnf-name2": "notused", + "vnf-type": "VRR", + "service-id": "VRRaaS", + "regional-resource-zone": "notusedforMobility", + "prov-status": "PREPROV", + "operational-status": "", + "license-key": "novalue", + "equipment-role": "VRR", + "orchestration-status": "Created", + "heat-stack-id": "1234", + "mso-catalog-key": "msokey", + "ipv4-oam-address": "135.60.77.25", + "ipv4-loopback0-address": "12.60.77.25", + "nm-lan-v6-address": "2001:1890:1F8:2075::1:4", + "management-v6-address": "2001:1890:1F8:2075::1:5", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1505337418309", + "model-invariant-id": "96129eb9-f0de-4e05-8af2-73146473f766", + "model-version-id": "5761e0a7-c6df-4d8a-9ebd-b8f445054dec", + "widget-model-id": "78789", + "widget-model-version": "7", + "nf-function": "nf-function in ASDC", + "nf-role": "nf-role in ASDC", + "nf-naming-code": "code in ASDC", + "selflink": "pathToController" + }, + "related-to": [ + { + "id": "1689710648", + "node-type": "service-instance", + "url": "/aai/v11/business/customers/customer/customer-9887-jc689q/service-subscriptions/service-subscription/VRR/service-instances/service-instance/SI-9887-jc689q" + }, + { + "id": "1362120784", + "node-type": "vserver", + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-2-9887-jc689q" + }, + { + "id": "2017317104", + "node-type": "vserver", + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-1-9887-jc689q" + } + ] + }, + { + "id": "2362269792", + "node-type": "generic-vnf", + "url": "/aai/v11/network/generic-vnfs/generic-vnf/VNF-2-9887-jc689q", + "properties": { + "vnf-id": "c187e9fe-40c3-4862-b73e-84ff056205f6", + "vnf-name": "vnf9887-2jc689q", + "vnf-name2": "notused", + "vnf-type": "VRR", + "service-id": "VRRaaS", + "regional-resource-zone": "notusedforMobility", + "prov-status": "PREPROV", + "operational-status": "", + "license-key": "novalue", + "equipment-role": "VRR", + "orchestration-status": "Created", + "heat-stack-id": "1234", + "mso-catalog-key": "msokey", + "ipv4-oam-address": "135.60.77.25", + "ipv4-loopback0-address": "12.60.77.25", + "nm-lan-v6-address": "2001:1890:1F8:2075::1:4", + "management-v6-address": "2001:1890:1F8:2075::1:5", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1505337418754", + "model-invariant-id": "96129eb9-f0de-4e05-8af2-73146473f766", + "model-version-id": "5761e0a7-c6df-4d8a-9ebd-b8f445054dec", + "widget-model-id": "78789", + "widget-model-version": "7", + "nf-function": "nf-function in ASDC", + "nf-role": "nf-role in ASDC", + "nf-naming-code": "code in ASDC", + "selflink": "pathToController" + }, + "related-to": [ + { + "id": "1689710648", + "node-type": "service-instance", + "url": "/aai/v11/business/customers/customer/customer-9887-jc689q/service-subscriptions/service-subscription/VRR/service-instances/service-instance/SI-9887-jc689q" + }, + { + "id": "1689706552", + "node-type": "vserver", + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-3-9887-jc689q" + } + ] + } +]}
\ No newline at end of file diff --git a/vid-app-common/src/main/resources/adiod.zip b/vid-app-common/src/main/resources/adiod.zip Binary files differnew file mode 100644 index 000000000..415fa4833 --- /dev/null +++ b/vid-app-common/src/main/resources/adiod.zip diff --git a/vid-app-common/src/main/resources/csar317927061915233480.zip b/vid-app-common/src/main/resources/csar317927061915233480.zip Binary files differnew file mode 100644 index 000000000..36ac9f9bc --- /dev/null +++ b/vid-app-common/src/main/resources/csar317927061915233480.zip diff --git a/vid-app-common/src/main/resources/generateRoleScript.sh b/vid-app-common/src/main/resources/generateRoleScript.sh new file mode 100644 index 000000000..cf73b7412 --- /dev/null +++ b/vid-app-common/src/main/resources/generateRoleScript.sh @@ -0,0 +1,3 @@ +firstRun=${1-false} +url=http://127.0.0.1:8080/vid/generateRoleScript/$firstRun +wget -O roles.sql $url
\ No newline at end of file diff --git a/vid-app-common/src/main/resources/json/mso/modelInfo b/vid-app-common/src/main/resources/json/mso/modelInfo index dcb31128d..d368e3532 100755 --- a/vid-app-common/src/main/resources/json/mso/modelInfo +++ b/vid-app-common/src/main/resources/json/mso/modelInfo @@ -33,6 +33,7 @@ "description": "short description of the entity being operated on",
"type": "string",
"enum": [
+ "pnf",
"network",
"service",
"vfModule",
diff --git a/vid-app-common/src/main/resources/json/mso/requestStatus b/vid-app-common/src/main/resources/json/mso/requestStatus index 11b285636..75b72151b 100755 --- a/vid-app-common/src/main/resources/json/mso/requestStatus +++ b/vid-app-common/src/main/resources/json/mso/requestStatus @@ -8,15 +8,6 @@ },
"requestState": {
"description": "short description of the instantiation state",
- "enum": [
- "COMPLETE",
- "FAILED",
- "IN_PROGRESS",
- "PENDING",
- "UNLOCKED",
- "COMPLETED",
- ""
- ],
"type": "string"
},
"statusMessage": {
diff --git a/vid-app-common/src/main/resources/owning-entity-properties.JSON b/vid-app-common/src/main/resources/owning-entity-properties.JSON new file mode 100644 index 000000000..a86c28c6c --- /dev/null +++ b/vid-app-common/src/main/resources/owning-entity-properties.JSON @@ -0,0 +1,17 @@ +{ + "owningEntityProperties" : { + "platform": { + "Platform-name": "Platform-name" + }, + "project": { + "Project-name": "Project-name" + }, + "lineOfBusiness": { + "Line-of-business-name": "Line-of-business-name" + }, + "owningEntity": { + "Owning-entity-id": "Owning-entity-name" + } + } +} + diff --git a/vid-app-common/src/main/resources/pnf.csar b/vid-app-common/src/main/resources/pnf.zip Binary files differindex eb4248469..eb4248469 100644 --- a/vid-app-common/src/main/resources/pnf.csar +++ b/vid-app-common/src/main/resources/pnf.zip diff --git a/vid-app-common/src/main/resources/scripts/category_parameter.sh b/vid-app-common/src/main/resources/scripts/category_parameter.sh new file mode 100644 index 000000000..0ff1c73c3 --- /dev/null +++ b/vid-app-common/src/main/resources/scripts/category_parameter.sh @@ -0,0 +1,64 @@ +#!/bin/bash +usage() { echo -e "Usage: $0 [-o <ADD|GET>] [-p <FILE_PATH>] [-c category_name] [-f FAMILY]" 1>&2; exit 1; } +while getopts ":o:p:c:f:" opt; do + case ${opt} in + o) + OPERATION=${OPTARG} + ;; + p) + FILE=${OPTARG} + ;; + c) + CATEGORY=${OPTARG} + ;; + f) + FAMILY=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) +if [ -z "${FILE}" ] || [ -z "${OPERATION}" ]; then + usage +fi +if [ ${OPERATION} != 'ADD' ] && [ ${OPERATION} != 'GET' ]; then + usage +fi +if [ ${OPERATION} = 'ADD' ]; then + if [ -z "${CATEGORY}" ] ; then + usage + fi + OPERATION='POST' +fi +if [ ${OPERATION} = 'GET' ]; then + if [ -z "${FAMILY}" ] ; then + usage + fi +fi +URL="http://127.0.0.1:8080/vid/maintenance/category_parameter" +if [ ${OPERATION} = 'GET' ]; then + FULLURL="${URL}?familyName=${FAMILY}" + echo "Sending request: ${FULLURL}" + echo -e "------------------------\nwget output:" + wget -nv -O "${FILE}" "${FULLURL}" + RC=$? + echo "---------------------------" + if [ $RC -eq 0 ]; then + echo "Result saved to ${FILE}" + else + echo "Failed to get category parameters list" + fi +else + BODY=$(cat ${FILE} | awk ' BEGIN { ; print " {\"options\" : [ "} { gsub(/ /, "", $0) ; printf "%s\"%s\"",separator,$1 ;separator = ", ";} END { printf " ]} "}') + FULLURL="${URL}/${CATEGORY}" + echo "Sending request: ${FULLURL} ${OPERATION} ${BODY}" + echo -e "------------------------\nwget output:" + wget --method="${OPERATION}" --body-data="${BODY}" --header=Content-Type:application/json --content-on-error -nv -O - "${FULLURL}" + RC=$? + echo "---------------------------" + if [ $RC -ne 0 ]; then + echo "Failed to ADD options to category ${CATEGORY}" + fi +fi diff --git a/vid-app-common/src/main/resources/scripts/update_category_option_name.sh b/vid-app-common/src/main/resources/scripts/update_category_option_name.sh new file mode 100644 index 000000000..5ff505800 --- /dev/null +++ b/vid-app-common/src/main/resources/scripts/update_category_option_name.sh @@ -0,0 +1,34 @@ +#!/bin/bash +usage() { echo -e "Usage: $0 [-c category_name] [-i option_id] [-n option_updated_name]" 1>&2; exit 1; } +while getopts ":c:i:n:" opt; do + case ${opt} in + i) + ID=${OPTARG} + ;; + n) + NAME=${OPTARG} + ;; + c) + CATEGORY=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) +if [ -z "${ID}" ] || [ -z "${NAME}" ] || [ -z "${CATEGORY}" ]; then + usage +fi +URL="http://127.0.0.1:8080/vid/maintenance/category_parameter/" +OPERATION="PUT" +FULLURL="${URL}${CATEGORY}" +BODY="{\"id\":\"${ID}\",\"name\":\"${NAME}\"}" +echo "Sending request: ${FULLURL} ${OPERATION} ${BODY}" +echo -e "------------------------\nwget output:" +wget --method="${OPERATION}" --body-data="${BODY}" --header=Content-Type:application/json --content-on-error -nv -O - "${FULLURL}" +RC=$? +echo "---------------------------" +if [ $RC -ne 0 ]; then + echo "Failed to update option name ${NAME} for option id ${ID} of category ${CATEGORY}" +fi
\ No newline at end of file diff --git a/vid-app-common/src/main/resources/scripts/vnf_wf.sh b/vid-app-common/src/main/resources/scripts/vnf_wf.sh new file mode 100644 index 000000000..69cb595b5 --- /dev/null +++ b/vid-app-common/src/main/resources/scripts/vnf_wf.sh @@ -0,0 +1,49 @@ +#!/bin/bash +usage() { echo -e "Usage: $0 [-o <ADD|DELETE|GET>] [-p <FILE_PATH>]\nCSV File Format: VNF_UUID,VNF_invariantUUID,workflowName" 1>&2; exit 1; } +while getopts ":o:p:" opt; do + case ${opt} in + o) + OPERATION=${OPTARG} + ;; + p) + FILE=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) +if [ -z "${FILE}" ] || [ -z "${OPERATION}" ]; then + usage +fi +if [ ${OPERATION} != 'ADD' ] && [ ${OPERATION} != 'DELETE' ] && [ ${OPERATION} != 'GET' ]; then + usage +fi +if [ ${OPERATION} = 'ADD' ]; then + OPERATION='POST' +fi +URL="http://127.0.0.1:8080/vid/change-management/vnf_workflow_relation" +if [ ${OPERATION} = 'GET' ]; then + echo "Sending request for get all vnf_workflow_relation" + echo -e "------------------------\nwget output:" + wget -nv -O "${FILE}" "${URL}" + RC=$? + echo "---------------------------" + if [ $RC -eq 0 ]; then + echo "Result saved to ${FILE}" + else + echo "Failed to get vnf to workflows relations" + fi +else + BODY=$(cat ${FILE} | awk ' BEGIN { FS=","; print " {\"workflowsDetails\" : [ "} { gsub(/ /, "", $1) ; gsub(/ /, "", $2) ; gsub(/^[ \t]+/,"",$3); gsub(/[ \t]+$/,"",$3); printf "%s{\"vnfDetails\":{\"UUID\":\"%s\",\"invariantUUID\":\"%s\"},\"workflowName\":\"%s\"}",separator,$1,$2,$3 ;separator = ", ";} END { printf " ]} "}') + echo "Sending request: ${OPERATION} ${BODY}" + echo -e "------------------------\nwget output:" + wget --method="${OPERATION}" --body-data="${BODY}" --header=Content-Type:application/json --content-on-error -nv -O - "${URL}" + RC=$? + echo "---------------------------" + if [ $RC -ne 0 ]; then + echo "Failed to ADD/DELETE vnf to workflows relations" + fi +fi + diff --git a/vid-app-common/src/main/resources/sdcservices.json b/vid-app-common/src/main/resources/sdcservices.json index 81a08d931..1d936f630 100644 --- a/vid-app-common/src/main/resources/sdcservices.json +++ b/vid-app-common/src/main/resources/sdcservices.json @@ -4,7 +4,7 @@ "uuid": "48a52540-8772-4368-9cdb-1f124ea5c931", "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef", "name": "4-27_vMME_Service", - "version": "0.1", + "version": "1.0", "toscaModelURL": "./service-vf-csar.zip", "category": "Mobility", "lifecycleState": "CERTIFIED", @@ -15,10 +15,10 @@ "resources": null }, { - "uuid": "68101369-6f08-4e99-9a28-fa6327d344f3", + "uuid": "cb49608f-5a24-4789-b0f7-2595473cb997", "invariantUUID": "0311f998-9268-4fd6-bbba-afff15087b72", "name": "4-27_vMME_Service", - "version": "0.1", + "version": "1.0", "toscaModelURL": "./service-vl-csar.zip", "category": "Mobility", "lifecycleState": "CERTIFIED", @@ -32,8 +32,78 @@ "uuid": "73e1322a-8a9a-49dc-9558-b0c5c5770e4a", "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef", "name": "4-27_vMME_Service", - "version": "0.1", - "toscaModelURL": "./pnf.csar", + "version": "1.0", + "toscaModelURL": "./pnf.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "240376de-870e-48df-915a-31f140eedd2c", + "invariantUUID": "709d1be4-9a3f-4a29-8c4d-a20465e808a3", + "name": "Demo Service", + "version": "1.0", + "toscaModelURL": "./service-DemoService1-csar.csar", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "32671332-a7ee-4df6-9609-db50ce5eaee7", + "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9", + "name": "ADIOD vMX vPE_BV Service 488", + "version": "1.0", + "toscaModelURL": "./adiod.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "55a48870-d99e-41a8-a3b4-a8d748333139", + "invariantUUID": "3d89efc0-19ca-4df7-9818-028e1fc6f708", + "name": "AMP PH SVC", + "version": "1.0", + "toscaModelURL": "./service-AmpPhSvc-csar.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd", + "invariantUUID": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", + "name": "action-data", + "version": "1.0", + "toscaModelURL": "./2f80c596.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "ee6d61be-4841-4f98-8f23-5de9da846ca7", + "invariantUUID": "b7d923c9-6175-41f1-91ba-4565c4953408", + "name": "Multiple pProbes", + "version": "1.0", + "toscaModelURL": "./service-Servicecontainermultiplepprobes-csar.csar", "category": "Mobility", "lifecycleState": "CERTIFIED", "lastUpdaterUserId": "rg276b", diff --git a/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip b/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip Binary files differnew file mode 100644 index 000000000..6d5002c6c --- /dev/null +++ b/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip diff --git a/vid-app-common/src/main/resources/service-David-csar.csar b/vid-app-common/src/main/resources/service-David-csar.csar Binary files differnew file mode 100644 index 000000000..fcf1c647b --- /dev/null +++ b/vid-app-common/src/main/resources/service-David-csar.csar diff --git a/vid-app-common/src/main/resources/service-DemoService1-csar.csar b/vid-app-common/src/main/resources/service-DemoService1-csar.csar Binary files differnew file mode 100644 index 000000000..0e34dc5ce --- /dev/null +++ b/vid-app-common/src/main/resources/service-DemoService1-csar.csar diff --git a/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.csar b/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.csar Binary files differnew file mode 100644 index 000000000..81691fe1f --- /dev/null +++ b/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.csar diff --git a/vid-app-common/src/main/resources/test.csv b/vid-app-common/src/main/resources/test.csv new file mode 100644 index 000000000..a0b09b77c --- /dev/null +++ b/vid-app-common/src/main/resources/test.csv @@ -0,0 +1,5 @@ +ee6d61be-4841-4f98-8f23-5de9da846ca7,95c75a48-6f86-498f-b1a6-e9179a83d9c7,Update +ee6d61be-4841-4f98-8f23-5de9da846ca7,95c75a48-6f86-498f-b1a6-e9179a83d9c7, VNF In Place Software Update +418f32e5-484a-4073-8fa9-fab7d497459f,709d1be4-9a3f-4a29-8c4d-a20465e808a3, VNF In Place Software Update +fa06db34-f8e3-42d9-8e51-a76816eb0f0d,0ebfb706-a846-4715-b0d0-fe0be09458d7, VNF In Place Software Update +fa06db34-f8e3-42d9-8e51-a76816eb0f0d, 87447b67-29e3-4244-8038-990a8c70259a,Replace
\ No newline at end of file |