From 451a3400b76511393c62a444f588a4ed15f4a549 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 19 Feb 2017 10:28:42 +0200 Subject: Initial OpenECOMP SDC commit Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b Signed-off-by: Michael Lando --- .../CI/importResource-MMSC/asdc.capabilities.yaml | 13 ++++ .../asdc.nodes.Module/asdc.nodes.Module.json | 11 +++ .../asdc.nodes.Module/asdc.nodes.Module.yml | 2 + .../asdc.nodes.Module/asdc.nodes.Module.zip | Bin 0 -> 230 bytes .../asdc.nodes.Network/asdc.nodes.Network.json | 11 +++ .../asdc.nodes.Network/asdc.nodes.Network.yml | 2 + .../asdc.nodes.Network/asdc.nodes.Network.zip | Bin 0 -> 194 bytes .../asdc.nodes.Root/asdc.nodes.Root.json | 13 ++++ .../asdc.nodes.Root/asdc.nodes.Root.yml | 3 + .../asdc.nodes.Root/asdc.nodes.Root.zip | Bin 0 -> 180 bytes .../asdc.nodes.module.ECA_OAM.json | 12 +++ .../asdc.nodes.module.ECA_OAM.yml | 9 +++ .../asdc.nodes.module.ECA_OAM.zip | Bin 0 -> 336 bytes .../asdc.nodes.module.ECA_TRX.json | 12 +++ .../asdc.nodes.module.ECA_TRX.yml | 12 +++ .../asdc.nodes.module.ECA_TRX.zip | Bin 0 -> 350 bytes .../asdc.nodes.module.F5_LTM.json | 12 +++ .../asdc.nodes.module.F5_LTM.yml | 12 +++ .../asdc.nodes.module.F5_LTM.zip | Bin 0 -> 347 bytes .../asdc.nodes.module.MMSC.json | 12 +++ .../asdc.nodes.module.MMSC.yml | 12 +++ .../asdc.nodes.module.MMSC.zip | Bin 0 -> 340 bytes .../asdc.nodes.module.NEMS_BE.json | 12 +++ .../asdc.nodes.module.NEMS_BE.yml | 9 +++ .../asdc.nodes.module.NEMS_BE.zip | Bin 0 -> 337 bytes .../asdc.nodes.module.NEMS_FE.json | 11 +++ .../asdc.nodes.module.NEMS_FE.yml | 15 ++++ .../asdc.nodes.module.NEMS_FE.zip | Bin 0 -> 359 bytes .../asdc.nodes.network.Cinder.json | 12 +++ .../asdc.nodes.network.Cinder.yml | 5 ++ .../asdc.nodes.network.Cinder.zip | Bin 0 -> 262 bytes .../asdc.nodes.network.Core.json | 12 +++ .../asdc.nodes.network.Core.yml | 5 ++ .../asdc.nodes.network.Core.zip | Bin 0 -> 256 bytes .../asdc.nodes.network.DMZ.json | 12 +++ .../asdc.nodes.network.DMZ.yml | 5 ++ .../asdc.nodes.network.DMZ.zip | Bin 0 -> 255 bytes .../asdc.nodes.network.Internal.json | 11 +++ .../asdc.nodes.network.Internal.yml | 5 ++ .../asdc.nodes.network.Internal.zip | Bin 0 -> 302 bytes .../asdc.nodes.network.OAM.json | 12 +++ .../asdc.nodes.network.OAM.yml | 5 ++ .../asdc.nodes.network.OAM.zip | Bin 0 -> 254 bytes .../asdc.nodes.network.Traffic.json | 11 +++ .../asdc.nodes.network.Traffic.yml | 5 ++ .../asdc.nodes.network.Traffic.zip | Bin 0 -> 300 bytes .../CI/importResource-MMSC/capabilityTypes.zip | Bin 0 -> 320 bytes .../CI/importResource-MMSC/deleteNormative.sh | 35 +++++++++ .../CI/importResource-MMSC/importNormative.sh | 85 +++++++++++++++++++++ 49 files changed, 415 insertions(+) create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.capabilities.yaml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.json create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.yml create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/capabilityTypes.zip create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/deleteNormative.sh create mode 100644 asdc-tests/src/test/resources/CI/importResource-MMSC/importNormative.sh (limited to 'asdc-tests/src/test/resources/CI/importResource-MMSC') diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.capabilities.yaml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.capabilities.yaml new file mode 100644 index 0000000000..073eba5ee7 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.capabilities.yaml @@ -0,0 +1,13 @@ +asdc.capabilities.NetworkInterface: + derived_from: tosca.capabilities.Root + +asdc.capabilities.Container: + derived_from: tosca.capabilities.Container + +# binding a VDU to a CP +asdc.capabilities.nfv.VirtualBindable: + derived_from: tosca.capabilities.Root + +# linking a VL to a CP +asdc.capabilities.nfv.VirtualLinkable: + derived_from: tosca.capabilities.Root diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.json new file mode 100644 index 0000000000..e1727aca5c --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.json @@ -0,0 +1,11 @@ +{ + "payloadName": "asdc.nodes.Module.yml", + "contactId": "jh0003", + "name": "asdc.nodes.Module", + "description": "Node Type that represents a Module", + "resourceIconPath": "defaulticon", + "category": "Generic/Abstract", + "tags": [ + "asdc.nodes.Module", "module" + ] +} \ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.yml new file mode 100644 index 0000000000..b95156b5e1 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.yml @@ -0,0 +1,2 @@ +asdc.nodes.Module: + derived_from: tosca.nodes.Root diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.zip new file mode 100644 index 0000000000..08003f1af8 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Module/asdc.nodes.Module.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.json new file mode 100644 index 0000000000..c52bbeebc2 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.json @@ -0,0 +1,11 @@ +{ + "payloadName": "asdc.nodes.Network.yml", + "contactId": "jh0003", + "name": "asdc.nodes.Network", + "description": "This is the default AT&T TOSCA Network Node Type that all other AT&T Network TOSCA nodes should extends.", + "resourceIconPath": "defaulticon", + "category": "Generic/Abstract", + "tags": [ + "asdc.nodes.Network", "Network" + ] +} \ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.yml new file mode 100644 index 0000000000..0e56ef7bf2 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.yml @@ -0,0 +1,2 @@ +asdc.nodes.Network: + derived_from: tosca.nodes.Root diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.zip new file mode 100644 index 0000000000..9b7fa35c2e Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Network/asdc.nodes.Network.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.json new file mode 100644 index 0000000000..5e1dda7106 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.json @@ -0,0 +1,13 @@ +{ + "payloadName": "asdc.nodes.Root.yml", + "contactId": "jh0003", + "name": "asdc.nodes.Root", + "description": "This is the default (root) AT&T TOSCA Node Type that all other AT&T TOSCA nodes should extends. + This allows all AT&T TOSCA nodes to have a consistent set of features for modeling and management (e.g, consistent definitions for requirements, capabilities, and lifecycle interfaces).", + "resourceIconPath": "defaulticon", + "category": "Generic/Abstract", + "tags": [ + "asdc.nodes.Root" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.yml new file mode 100644 index 0000000000..ed8e1e46aa --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.yml @@ -0,0 +1,3 @@ +asdc.nodes.Root: + derived_from: tosca.nodes.Root + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.zip new file mode 100644 index 0000000000..8453bf3843 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.Root/asdc.nodes.Root.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.json new file mode 100644 index 0000000000..7a122a57cd --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.module.ECA_OAM.yml", + "contactId": "jh0003", + "name": "asdc.nodes.module.ECA_OAM", + "description": "Operation, Administration & Management of vMMSC ECA TRX", + "resourceIconPath": "applicationServer", + "category": "Application Layer 4+/Application Servers", + "tags": [ + "asdc.nodes.module.ECA_OAM", "MMSC OAM", "ECA", "MMSC", "vMMSC", "Mobility" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.yml new file mode 100644 index 0000000000..054c98439c --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.yml @@ -0,0 +1,9 @@ +asdc.nodes.module.ECA_OAM: + derived_from: asdc.nodes.Module + requirements: + - oam_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.OAM + - internal_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Internal diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.zip new file mode 100644 index 0000000000..389ef18bae Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_OAM/asdc.nodes.module.ECA_OAM.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.json new file mode 100644 index 0000000000..338099286f --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.module.ECA_TRX.yml", + "contactId": "jh0003", + "name": "asdc.nodes.module.ECA_TRX", + "description": "External Content Adaption Transcoder. Transcodes and adapts MMS content according to the capabilities of receiving MS or UE.", + "resourceIconPath": "applicationServer", + "category": "Application Layer 4+/Application Servers", + "tags": [ + "asdc.nodes.module.ECA_TRX", "Content Adaptation Transcoder", "MMSC", "vMMSC", "Mobility" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.yml new file mode 100644 index 0000000000..e2a520dc1d --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.yml @@ -0,0 +1,12 @@ +asdc.nodes.module.ECA_TRX: + derived_from: asdc.nodes.Module + requirements: + - oam_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.OAM + - traffic_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Traffic + - internal_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Internal diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.zip new file mode 100644 index 0000000000..f7911beb8f Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.ECA_TRX/asdc.nodes.module.ECA_TRX.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.json new file mode 100644 index 0000000000..8ce0b8a961 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.module.F5_LTM.yml", + "contactId": "jh0003", + "name": "asdc.nodes.module.F5_LTM", + "description": "vMMSC Local Traffic Manager serves as the load balancer for traffic coming into the vMMSC. Traffic from MMSC designated to external network passes via F5. Also, internal communication between ECA and MMSC is via F5", + "resourceIconPath": "loadBalancer", + "category": "Application Layer 4+/Load Balancer", + "tags": [ + "asdc.nodes.module.F5_LTM", "F5", "Load Balancer", "vMMSC", "Mobility" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.yml new file mode 100644 index 0000000000..c50cd0a481 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.yml @@ -0,0 +1,12 @@ +asdc.nodes.module.F5_LTM: + derived_from: asdc.nodes.Module + requirements: + - core_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Core + - dmz_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.DMZ + - traffic_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Traffic diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.zip new file mode 100644 index 0000000000..2bb9bbaa03 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.F5_LTM/asdc.nodes.module.F5_LTM.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.json new file mode 100644 index 0000000000..4103880abf --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.module.MMSC.yml", + "contactId": "jh0003", + "name": "asdc.nodes.module.MMSC", + "description": "Accepts MMS messages via F5 and distributes among MMSCs. Messages are from user mobile device or from another Message Service", + "resourceIconPath": "applicationServer", + "category": "Application Layer 4+/Application Servers", + "tags": [ + "asdc.nodes.module.MMSC", "MMSC", "vMMSC", "Mobility" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.yml new file mode 100644 index 0000000000..b65b20f5b2 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.yml @@ -0,0 +1,12 @@ +asdc.nodes.module.MMSC: + derived_from: asdc.nodes.Module + requirements: + - oam_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.OAM + - cinder_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Cinder + - traffic_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Traffic diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.zip new file mode 100644 index 0000000000..abf8dd8ced Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.MMSC/asdc.nodes.module.MMSC.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.json new file mode 100644 index 0000000000..a289e4dd1b --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.module.NEMS_BE.yml", + "contactId": "jh0003", + "name": "asdc.nodes.module.NEMS_BE", + "description": "The Back End of a Network Message Storage allows external multimedia content to use SMTP e-mail mechanism to submit MMS messages", + "resourceIconPath": "applicationServer", + "category": "Application Layer 4+/Application Servers", + "tags": [ + "asdc.nodes.module.NEMS_BE", "MMSC", "vMMSC", "Network Message Storage", "Back End", "Mobility" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.yml new file mode 100644 index 0000000000..b460bf57a5 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.yml @@ -0,0 +1,9 @@ +asdc.nodes.module.NEMS_BE: + derived_from: asdc.nodes.Module + requirements: + - oam_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.OAM + - internal_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Internal diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.zip new file mode 100644 index 0000000000..2ee35f5cde Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_BE/asdc.nodes.module.NEMS_BE.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.json new file mode 100644 index 0000000000..4d80b25712 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.json @@ -0,0 +1,11 @@ +{ + "payloadName": "asdc.nodes.module.NEMS_FE.yml", + "contactId": "jh0003", + "name": "asdc.nodes.module.NEMS_FE", + "description": "The Front End of a Network Message Storage allows external multimedia content to use SMTP e-mail mechanism to submit MMS messages", + "resourceIconPath": "objectStorage", + "category": "Application Layer 4+/Application Servers", + "tags": [ + "asdc.nodes.module.NEMS_FE", "MMSC", "vMMSC", "Network Message Storage", "Front End", "Mobility" + ] +} \ No newline at end of file diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.yml new file mode 100644 index 0000000000..256aa7e4a3 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.yml @@ -0,0 +1,15 @@ +asdc.nodes.module.NEMS_FE: + derived_from: asdc.nodes.Module + requirements: + - oam_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.OAM + - cinder_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Cinder + - traffic_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Traffic + - internal_connection: + capability: asdc.capabilities.NetworkInterface + node: asdc.nodes.network.Internal diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.zip new file mode 100644 index 0000000000..28eb1ccb60 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.module.NEMS_FE/asdc.nodes.module.NEMS_FE.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.json new file mode 100644 index 0000000000..4217cd4f07 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.network.Cinder.yml", + "contactId": "jh0003", + "name": "asdc.nodes.network.Cinder", + "description": "Represents access to cloud shared storae.", + "resourceIconPath": "network", + "category": "Generic/Network Elements", + "tags": [ + "asdc.nodes.network.Cinder", "Network", "Cinder", "Cloud" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.yml new file mode 100644 index 0000000000..54b34d23fe --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.yml @@ -0,0 +1,5 @@ +asdc.nodes.network.Cinder: + derived_from: asdc.nodes.Network + capabilities: + cinder_connection: + type: asdc.capabilities.NetworkInterface diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.zip new file mode 100644 index 0000000000..5210a39f29 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Cinder/asdc.nodes.network.Cinder.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.json new file mode 100644 index 0000000000..343a785b6f --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.network.Core.yml", + "contactId": "jh0003", + "name": "asdc.nodes.network.Core", + "description": "Represents Cloud Core network which provide interface to other services.", + "resourceIconPath": "network", + "category": "Generic/Network Elements", + "tags": [ + "asdc.nodes.network.Core", "Network", "Core", "Cloud" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.yml new file mode 100644 index 0000000000..ac4ceed23e --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.yml @@ -0,0 +1,5 @@ +asdc.nodes.network.Core: + derived_from: asdc.nodes.Network + capabilities: + core_connection: + type: asdc.capabilities.NetworkInterface diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.zip new file mode 100644 index 0000000000..7482fee585 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Core/asdc.nodes.network.Core.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.json new file mode 100644 index 0000000000..50041339b6 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.network.DMZ.yml", + "contactId": "jh0003", + "name": "asdc.nodes.network.DMZ", + "description": "Represents DMZ network.", + "resourceIconPath": "network", + "category": "Generic/Network Elements", + "tags": [ + "asdc.nodes.network.DMZ", "Network", "DMZ", "Cloud" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.yml new file mode 100644 index 0000000000..df41ae4072 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.yml @@ -0,0 +1,5 @@ +asdc.nodes.network.DMZ: + derived_from: asdc.nodes.Network + capabilities: + dmz_connection: + type: asdc.capabilities.NetworkInterface diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.zip new file mode 100644 index 0000000000..fab96c9a64 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.DMZ/asdc.nodes.network.DMZ.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.json new file mode 100644 index 0000000000..a2cf1c8026 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.json @@ -0,0 +1,11 @@ +{ + "payloadName": "asdc.nodes.network.Internal.yml", + "contactId": "jh0003", + "name": "asdc.nodes.network.Internal", + "description": "Represents Internal Network", + "resourceIconPath": "network", + "category": "Generic/Network Elements", + "tags": [ + "asdc.nodes.network.Internal", "Network", "Cloud" + ] +} diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.yml new file mode 100644 index 0000000000..01b6dece24 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.yml @@ -0,0 +1,5 @@ + asdc.nodes.network.Internal: + derived_from: asdc.nodes.Network + capabilities: + dmz_connection: + type: asdc.capabilities.NetworkInterface diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.zip new file mode 100644 index 0000000000..2317ce5ad0 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Internal/asdc.nodes.network.Internal.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.json new file mode 100644 index 0000000000..161897ac22 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.json @@ -0,0 +1,12 @@ +{ + "payloadName": "asdc.nodes.network.OAM.yml", + "contactId": "jh0003", + "name": "asdc.nodes.network.OAM", + "description": "Represents AT&T Operation, Administration and Management (OA&M) network.", + "resourceIconPath": "network", + "category": "Generic/Network Elements", + "tags": [ + "asdc.nodes.network.OAM", "Network", "OAM", "Cloud" + ] +} + diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.yml new file mode 100644 index 0000000000..0a0875ad07 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.yml @@ -0,0 +1,5 @@ +asdc.nodes.network.OAM: + derived_from: asdc.nodes.Network + capabilities: + oam_connection: + type: asdc.capabilities.NetworkInterface diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.zip new file mode 100644 index 0000000000..b2fbb78a7c Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.OAM/asdc.nodes.network.OAM.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.json b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.json new file mode 100644 index 0000000000..fb8269039c --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.json @@ -0,0 +1,11 @@ +{ + "payloadName": "asdc.nodes.network.Traffic.yml", + "contactId": "jh0003", + "name": "asdc.nodes.network.Traffic", + "description": "Represents Network Traffic", + "resourceIconPath": "network", + "category": "Generic/Network Elements", + "tags": [ + "asdc.nodes.network.Traffic", "Network", "Cloud" + ] +} diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.yml b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.yml new file mode 100644 index 0000000000..b50bc8e612 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.yml @@ -0,0 +1,5 @@ +asdc.nodes.network.Traffic: + derived_from: asdc.nodes.Network + capabilities: + dmz_connection: + type: asdc.capabilities.NetworkInterface diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.zip new file mode 100644 index 0000000000..3add4e6ade Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/asdc.nodes.network.Traffic/asdc.nodes.network.Traffic.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/capabilityTypes.zip b/asdc-tests/src/test/resources/CI/importResource-MMSC/capabilityTypes.zip new file mode 100644 index 0000000000..a1f0cdeee5 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/importResource-MMSC/capabilityTypes.zip differ diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/deleteNormative.sh b/asdc-tests/src/test/resources/CI/importResource-MMSC/deleteNormative.sh new file mode 100644 index 0000000000..fb46daa544 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/deleteNormative.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +function usage { + echo "Usage: $0 " +} + +function deleteResource() { + + ELEMENT_NAME=$1 + echo -e "############### Removing Element ${ELEMENT_NAME} Start ######################" + http_code=$(curl -s -o /dev/null -w "%{http_code}" -X "DELETE" -H "USER_ID: jh0003" ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/resources/res_${ELEMENT_NAME}".1.0") + if [ ${http_code} -eq 204 ]; then + echo -e "\n############### Removing Element ${ELEMENT_NAME} status code:${http_code} End #######\n\n\n" + elif [ ${http_code} -eq 500 ]; then + echo -e "\n############### Failed to remove Element ${ELEMENT_NAME} status code:${http_code} End #######\n\n\n" + exit 1 + elif [ ${http_code} -eq 404 ]; then + echo -e "\n############### Element ${ELEMENT_NAME} not found status code:${http_code} End #######\n\n\n" + else + echo -e "\n############### Failed to remove Element ${ELEMENT_NAME} status code:${http_code} End #######\n\n\n" + exit 1 + fi +} +if [ $# -lt 3 ] +then + usage + exit 2 +fi + +HOST_IP=$1 +HOST_PORT=$2 + +deleteResource $3 + +exit 0 diff --git a/asdc-tests/src/test/resources/CI/importResource-MMSC/importNormative.sh b/asdc-tests/src/test/resources/CI/importResource-MMSC/importNormative.sh new file mode 100644 index 0000000000..9e568dddc3 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/importResource-MMSC/importNormative.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +function usage { + echo "Usage: $0 " +} + +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 + sed -i 's/"userId": ".*",/"userId": "'${ATT_UID}'",/' ${CURRENT_JSON_FILE} + JSON_CONTENT=`paste -s ${CURRENT_JSON_FILE}` + http_code=$(curl -s -o /dev/null -w "%{http_code}" -v -F resourceMetadata="${JSON_CONTENT}" -F resourceZip=@${CURRENT_ZIP_FILE} -H USER_ID:${ATT_UID} ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/upload/multipart) + if [ ${http_code} -eq 201 ]; then + echo -e "\n###################### Adding Element ${ELEMENT_NAME} End ########################\n\n\n" + elif [ ${http_code} -eq 409 ]; then + echo -e "\n###################### Already exists Element ${ELEMENT_NAME} status code:${http_code} End ########################\n\n\n" + elif [ ${http_code} -eq 500 ]; then + echo -e "\n###################### Failed to add Element ${ELEMENT_NAME} status code:${http_code} End ########################\n\n\n" + exit 1 + fi +} +if [ $# -lt 3 ] +then + usage + exit 2 +fi + +HOST_IP=$1 +HOST_PORT=$2 +ATT_UID=$3 +NO_CAPS=$4 + +if [ "$NO_CAPS" = "nocaps" ]; then + echo "Skipping Caps import..." +else + #Add The CapabilityTypes + http_code=$(curl -s -o /dev/null -w "%{http_code}" -v -F capabilityTypeZip=@capabilityTypes.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 + #Add The InterfaceLifecycleTypes + #http_code=$(curl -s -o /dev/null -w "%{http_code}" -v -F interfaceLifecycleTypeZip=@interfaceLifecycleTypes.zip -H "USER_ID: jh0003" ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/uploadType/interfaceLifecycle) + #if [ ${http_code} -eq 201 ]; then + # echo -e "\n###################### Adding The InterfaceLifecycleTypes status code:${http_code} End ########################\n\n\n" + #elif [ ${http_code} -eq 409 ]; then + # echo -e "\n###################### Already exists InterfaceLifecycleTypes status code:${http_code} End ########################\n\n\n" + #elif [ ${http_code} -eq 500 ]; then + # echo -e "\n###################### Failed to add InterfaceLifecycleTypes status code:${http_code} End ########################\n\n\n" + # exit 1 + #else + # echo -e "\n###################### Failed to add InterfaceLifecycleTypes status code:${http_code} End ########################\n\n\n" + # exit 1 + #fi +fi + +addResource "asdc.nodes.Root" +addResource "asdc.nodes.Network" +addResource "asdc.nodes.network.Cinder" +addResource "asdc.nodes.network.Core" +addResource "asdc.nodes.network.DMZ" +addResource "asdc.nodes.network.OAM" +addResource "asdc.nodes.network.Traffic" +addResource "asdc.nodes.network.Internal" +addResource "asdc.nodes.Module" +addResource "asdc.nodes.module.ECA_OAM" +addResource "asdc.nodes.module.ECA_TRX" +addResource "asdc.nodes.module.F5_LTM" +addResource "asdc.nodes.module.MMSC" +addResource "asdc.nodes.module.NEMS_BE" +addResource "asdc.nodes.module.NEMS_FE" + + + + + +exit 0 -- cgit 1.2.3-korg