diff options
author | Michael Lando <ml636r@att.com> | 2017-02-19 10:28:42 +0200 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-02-19 10:51:01 +0200 |
commit | 451a3400b76511393c62a444f588a4ed15f4a549 (patch) | |
tree | e4f5873a863d1d3e55618eab48b83262f874719d /asdc-tests/src/test/resources/CI/demoResourcesWanLan | |
parent | 5abfe4e1fb5fae4bbd5fbc340519f52075aff3ff (diff) |
Initial OpenECOMP SDC commit
Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'asdc-tests/src/test/resources/CI/demoResourcesWanLan')
25 files changed, 266 insertions, 0 deletions
diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.json new file mode 100644 index 0000000000..1bf593852b --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.json @@ -0,0 +1,11 @@ +{ + "payloadName": "LAN_Connector.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.Connector.LAN_Connector", + "description": "Represents a LAN_Connector Node Type.", + "resourceIconPath": "defaulticon", + "category": "Infrastructure", + "tags": [ + "org.openecomp.asdc.nodes.Connector.LAN_Connector" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.yml new file mode 100644 index 0000000000..4fff368cdc --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.yml @@ -0,0 +1,23 @@ +org.openecomp.asdc.nodes.Connector.LAN_Connector: + #The LAN_Connector node connects Router and VNF_Container + derived_from: org.openecomp.asdc.nodes.Connector + properties: + network_id: + #or called: vlan_id + type: string + required: true + network_type: + #The technology types used by LAN connector + type: string + attributes: + network_ip_address: + #ip address is generated only after the node is instantiated at run-time + type: string + requirements: + - connectToRouter : + capability: tosca.capabilities.Root + node: org.openecomp.asdc.nodes.Router + - connectToVNF : + capability: tosca.capabilities.Root + node: org.openecomp.asdc.nodes.VNF_Container + #These two explicit requirements specify the LAN_Connector has two "connectTo" to connect to the node of Router type and VNF_Container type respectively diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.zip Binary files differnew file mode 100644 index 0000000000..1b02f06386 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/LAN_Connector/LAN_Connector.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.json new file mode 100644 index 0000000000..35b426c831 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.json @@ -0,0 +1,11 @@ +{ + "payloadName": "VNF.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.VNF", + "description": "Represents a VNF Node Type.", + "resourceIconPath": "defaulticon", + "category": "Infrastructure", + "tags": [ + "org.openecomp.asdc.nodes.VNF" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.yml new file mode 100644 index 0000000000..22be623303 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.yml @@ -0,0 +1,16 @@ +org.openecomp.asdc.nodes.VNF: + #The VNF node is required to be hosted by a VNF_Container + derived_from: org.openecomp.asdc.nodes.Root + properties: + service_name: + type: string + attributes: + #attribute means the value is fulfilled at run-time. + service_id: + #In this case, we consider the VNF node only has the service_id value when the node is instantiated + type: string + requirements: + #the "host" requirement can establish the relationship with a VNF_Container node + - host : + capability: org.openecomp.asdc.capabilities.Container + node: org.openecomp.asdc.nodes.VNF_Container
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.zip Binary files differnew file mode 100644 index 0000000000..c01081f0ab --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF/VNF.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.json new file mode 100644 index 0000000000..c1347780e3 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.json @@ -0,0 +1,11 @@ +{ + "payloadName": "VNF_Container.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.VNF_Container", + "description": "Represents a VNF_Container Node Type.", + "resourceIconPath": "defaulticon", + "category": "Infrastructure", + "tags": [ + "org.openecomp.asdc.nodes.VNF_Container" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.yml new file mode 100644 index 0000000000..b8dd8355fa --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.yml @@ -0,0 +1,10 @@ +org.openecomp.asdc.nodes.VNF_Container: + #The VNF_Container node provides the capability to host VNFs. + derived_from: org.openecomp.asdc.nodes.Root + capabilities: + host: + #The "host" capability allows other TOSCA nodes (VNF) that requires such a capability to connect to this node + type: org.openecomp.asdc.capabilities.Container + connectTo: + #The "connectTo" capability allows other TOSCA nodes (connectors) that requires such a capability to connect to this node. + type: org.openecomp.asdc.capabilities.Endpoint
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.zip Binary files differnew file mode 100644 index 0000000000..a8e006e728 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/VNF_Container/VNF_Container.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.json new file mode 100644 index 0000000000..4cb0880297 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.json @@ -0,0 +1,11 @@ +{ + "payloadName": "WAN_Connector.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.Connector.WAN_Connector", + "description": "Represents a WAN_Connector Node Type.", + "resourceIconPath": "defaulticon", + "category": "Infrastructure", + "tags": [ + "org.openecomp.asdc.nodes.Connector.WAN_Connector" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.yml new file mode 100644 index 0000000000..741d585488 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.yml @@ -0,0 +1,25 @@ +org.openecomp.asdc.nodes.Connector.WAN_Connector: + #The WAN_Connector node only connects to Router + derived_from: org.openecomp.asdc.nodes.Connector + properties: + customer_id: + type: string + required: true + vpn_id: + type: string + required: true + vpn_name: + type: string + required: true + network_type: + #The technology types used by WAN connector + type: string + attributes: + network_ip_address: + #ip address is generated only after the node is instantiated at run-time + type: string + requirements: + - connectTo : + capability: org.openecomp.asdc.capabilities.Endpoint + node: org.openecomp.asdc.nodes.Router + #This explicit requirement specifies WAN_Connector has only one "connectTo" to connect to the node of Router type
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.zip Binary files differnew file mode 100644 index 0000000000..e193820659 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/WAN_Connector/WAN_Connector.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/capabilityTypesWanLan.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/capabilityTypesWanLan.yml new file mode 100644 index 0000000000..32989237d2 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/capabilityTypesWanLan.yml @@ -0,0 +1,4 @@ +org.openecomp.asdc.capabilities.Endpoint: + derived_from: tosca.capabilities.Endpoint +org.openecomp.asdc.capabilities.Container: + derived_from: tosca.capabilities.Container
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/capabilityTypesWanLan.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/capabilityTypesWanLan.zip Binary files differnew file mode 100644 index 0000000000..869be32b53 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/capabilityTypesWanLan.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.json new file mode 100644 index 0000000000..99be86c707 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.json @@ -0,0 +1,11 @@ +{ + "payloadName": "connector.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.Connector", + "description": "Represents a connector Node Type.", + "resourceIconPath": "defaulticon", + "category": "Abstract", + "tags": [ + "org.openecomp.asdc.nodes.Connector" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.yml new file mode 100644 index 0000000000..d9c9361daa --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.yml @@ -0,0 +1,10 @@ +org.openecomp.asdc.nodes.Connector: + #Connector is the parent node of both WAN and LAN connectors. + derived_from: org.openecomp.asdc.nodes.Root + requirements: + - connectTo: + capability: org.openecomp.asdc.capabilities.Endpoint + #the requirement can establish the relationship with a node providing such capability + relationship: org.openecomp.asdc.relationships.ConnectsTo + #occurrences means how many times this requirement can appear in one node. + occurrences: [1, UNBOUNDED]
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.zip Binary files differnew file mode 100644 index 0000000000..3c37303a3a --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/connector/connector.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/deleteResourcesLanWanDemo.sh b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/deleteResourcesLanWanDemo.sh new file mode 100644 index 0000000000..9f992d56dd --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/deleteResourcesLanWanDemo.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +function usage { + echo "Usage: $0 <hostIp> <hostPort>" +} + +function deleteResource() { + + ELEMENT_NAME=$1 + echo "###################### Removing Element ${ELEMENT_NAME} Start ######################" + curl -X "DELETE" -H "USER_ID: jh0003" ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/resources/res_${ELEMENT_NAME}".1.0" + echo "" + echo "###################### Removing Element ${ELEMENT_NAME} End ########################" + echo "" + echo "" + echo "" +} +if [ $# -lt 2 ] +then + usage + exit 2 +fi + +HOST_IP=$1 +HOST_PORT=$2 + + +deleteResource "org.openecomp.asdc.nodes.Connector.LAN_Connector" +deleteResource "org.openecomp.asdc.nodes.Connector.WAN_Connector" +deleteResource "org.openecomp.asdc.nodes.Connector" +deleteResource "org.openecomp.asdc.nodes.VNF" +deleteResource "org.openecomp.asdc.nodes.VNF_Container" +deleteResource "org.openecomp.asdc.nodes.Router" +deleteResource "org.openecomp.asdc.nodes.Root" + + diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/importResourcesLanWanDemo.sh b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/importResourcesLanWanDemo.sh new file mode 100644 index 0000000000..90a06d53b5 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/importResourcesLanWanDemo.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +function usage { + echo "Usage: $0 <hostIp> <hostPort>" +} + +function addResource() { + + ELEMENT_NAME=$1 + echo -e "###################### Adding Element ${ELEMENT_NAME} Start ######################" + CURRENT_ZIP_FILE=./${ELEMENT_NAME}/${ELEMENT_NAME}.zip + CURRENT_JSON_FILE=./${ELEMENT_NAME}/${ELEMENT_NAME}.json + JSON_CONTENT=`paste -s ${CURRENT_JSON_FILE}` + curl -v -F resourceMetadata="${JSON_CONTENT}" -F resourceZip=@${CURRENT_ZIP_FILE} -H "USER_ID: jh0003" ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/upload/multipart + echo "" + echo -e "###################### Adding Element ${ELEMENT_NAME} End ########################" + +} +if [ $# -lt 2 ] +then + usage + exit 2 +fi + +HOST_IP=$1 +HOST_PORT=$2 + +#Add The CapabilityTypes +http_code=$(curl -s -o /dev/null -w "%{http_code}" -v -F capabilityTypeZip=@capabilityTypesWanLan.zip -H "USER_ID: jh0003" ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/uploadType/capability) +if [ ${http_code} -eq 201 ]; then + echo -e "\n###################### Adding The CapabilityTypes status code:${http_code} End ########################\n\n\n" +elif [ ${http_code} -eq 500 ]; then + echo -e "\n###################### Failed to add CapabilityTypes status code:${http_code} End ########################\n\n\n" + exit 1 +else + echo -e "\n###################### Failed to add CapabilityTypes status code:${http_code} End ########################\n\n\n" + exit 1 +fi + +addResource "root" +addResource "router" +addResource "VNF_Container" +addResource "VNF" +addResource "connector" +addResource "WAN_Connector" +addResource "LAN_Connector" + + + diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.json new file mode 100644 index 0000000000..54cbb798a2 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.json @@ -0,0 +1,11 @@ +{ + "payloadName": "root.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.Root", + "description": "Represents a generic software component that can be managed and run by a Compute Node Type.", + "resourceIconPath": "defaulticon", + "category": "Abstract", + "tags": [ + "org.openecomp.asdc.nodes.Root" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.yml new file mode 100644 index 0000000000..34e7d0fb62 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.yml @@ -0,0 +1,3 @@ +org.openecomp.asdc.nodes.Root: + #Define the root node for ASDC modeling + derived_from: tosca.nodes.Root
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.zip Binary files differnew file mode 100644 index 0000000000..ff604d55a7 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/root/root.zip diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.json b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.json new file mode 100644 index 0000000000..19e4669a38 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.json @@ -0,0 +1,11 @@ +{ + "payloadName": "router.yml", + "contactId": "jh0003", + "resourceName": "org.openecomp.asdc.nodes.Router", + "description": "Represents a Router Node Type.", + "resourceIconPath": "defaulticon", + "category": "Infrastructure", + "tags": [ + "org.openecomp.asdc.nodes.Router" + ] +}
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.yml b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.yml new file mode 100644 index 0000000000..0598663c64 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.yml @@ -0,0 +1,13 @@ +org.openecomp.asdc.nodes.Router: + #The Router node has a property "routing_table" which is a list. The entry of the routing_table is the customized data type "RoutingTableEntry" + derived_from: org.openecomp.asdc.nodes.Root + properties: + routing_table: + type: list + entry_schema: + #"entry_schema" is the TOSCA spec to describe the type of the list item + type: RoutingTableEntry + capabilities: + connectTo: + #The "connectTo" capability allows other TOSCA nodes (connectors) that requires such a capability to connect to this node. + type: org.openecomp.asdc.capabilities.Endpoint
\ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.zip b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.zip Binary files differnew file mode 100644 index 0000000000..57ff8e0e2a --- /dev/null +++ b/asdc-tests/src/test/resources/CI/demoResourcesWanLan/router/router.zip |