From 3ab9e0902161b984b7b0b85868537b3025d5733c Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Thu, 19 Jul 2018 18:25:12 +0300 Subject: [PATCH] Align normatives and scripts Change-Id: I5e15e3c5adaf13a5b785613d20411f5d0e42e264 Issue-ID: SDC-1544 Signed-off-by: Tal Gitelman --- .../tosca/annotation-types/annotationTypes.yml | 13 ++ .../tosca/annotation-types/annotationTypes.zip | Bin 0 -> 333 bytes .../tosca/capability-types/capabilityTypes.yml | 7 +- .../tosca/capability-types/capabilityTypes.zip | Bin 1822 -> 1797 bytes .../import/tosca/data-types/dataTypes.yml | 37 ++-- .../import/tosca/group-types/groupTypes.json | 22 +++ .../heat-types/Generic_Service/Generic_Service.yml | 1 - .../heat-types/Generic_Service/Generic_Service.zip | Bin 289 -> 252 bytes .../VLANNetworkReceptor/VLANNetworkReceptor.json | 21 +++ .../VLANNetworkReceptor/VLANNetworkReceptor.yml | 14 ++ .../VLANNetworkReceptor/VLANNetworkReceptor.zip | Bin 0 -> 429 bytes .../import/tosca/heat-types/VRFEntry/VRFEntry.json | 21 +++ .../import/tosca/heat-types/VRFEntry/VRFEntry.yml | 17 ++ .../import/tosca/heat-types/VRFEntry/VRFEntry.zip | Bin 0 -> 381 bytes .../tosca/heat-types/VRFObject/VRFObject.json | 21 +++ .../tosca/heat-types/VRFObject/VRFObject.yml | 8 + .../tosca/heat-types/VRFObject/VRFObject.zip | Bin 0 -> 369 bytes .../abstractSubstitute/abstractSubstitute.yml | 7 + .../tosca/heat-types/cinderVolume/cinderVolume.yml | 3 + .../heat-types/configuration/configuration.json | 20 ++ .../heat-types/configuration/configuration.yml | 18 ++ .../heat-types/configuration/configuration.zip | Bin 0 -> 428 bytes .../contrailAbstractSubstitute.yml | 7 + .../heat-types/contrailCompute/contrailCompute.yml | 9 + .../contrailNetworkRules/contrailNetworkRules.yml | 7 + .../tosca/heat-types/contrailPort/contrailPort.yml | 9 + .../contrailV2NetworkRules.yml | 7 + .../contrailV2VLANSubInterfaceV2.json | 15 ++ .../contrailV2VLANSubInterfaceV2.yml | 70 +++++++ .../contrailV2VLANSubInterfaceV2.zip | Bin 0 -> 756 bytes .../contrailV2VirtualMachineInterface.yml | 3 +- .../contrailV2VirtualMachineInterface.zip | Bin 740 -> 712 bytes .../contrailV2VirtualNetwork.yml | 72 +++++++ .../contrailVirtualNetwork.yml | 9 + .../import/tosca/heat-types/eline/eline.yml | 1 + .../import/tosca/heat-types/eline/eline.zip | Bin 683 -> 321 bytes .../tosca/heat-types/extNeutronCP/extNeutronCP.yml | 1 + .../tosca/heat-types/extNeutronCP/extNeutronCP.zip | Bin 1193 -> 1155 bytes .../extVirtualMachineInterfaceCP.json | 21 +++ .../extVirtualMachineInterfaceCP.yml | 67 +++++++ .../extVirtualMachineInterfaceCP.zip | Bin 0 -> 737 bytes .../fabricConfiguration/fabricConfiguration.json | 21 +++ .../fabricConfiguration/fabricConfiguration.yml | 10 + .../fabricConfiguration/fabricConfiguration.zip | Bin 0 -> 359 bytes .../heat-types/globalCompute/globalCompute.yml | 7 + .../heat-types/globalCompute/globalCompute.zip | Bin 3932 -> 1999 bytes .../tosca/heat-types/globalPort/globalPort.yml | 5 + .../tosca/heat-types/globalPort/globalPort.zip | Bin 1183 -> 1220 bytes .../heat-types/multiFlavorVFC/multiFlavorVFC.zip | Bin 714 -> 358 bytes .../tosca/heat-types/neutronNet/neutronNet.yml | 9 + .../tosca/heat-types/neutronPort/neutronPort.yml | 25 +++ .../tosca/heat-types/neutronPort/neutronPort.zip | Bin 1320 -> 1288 bytes .../tosca/heat-types/novaServer/novaServer.yml | 70 +++++++ .../heat-types/portMirroring/portMirroring.zip | Bin 711 -> 366 bytes .../portMirroringByPolicy.zip | Bin 909 -> 532 bytes .../heat-types/securityRules/securityRules.yml | 7 + .../tosca/heat-types/serviceProxy/serviceProxy.zip | Bin 557 -> 239 bytes .../tosca/heat-types/subInterface/subInterface.yml | 7 + .../heat-types/subInterfaceV2/subInterfaceV2.json | 15 ++ .../heat-types/subInterfaceV2/subInterfaceV2.yml | 45 +++++ .../heat-types/subInterfaceV2/subInterfaceV2.zip | Bin 0 -> 1010 bytes .../vnfConfiguration/vnfConfiguration.zip | Bin 759 -> 404 bytes .../interfaceLifecycleTypes.zip | Bin 619 -> 575 bytes .../normative-types/loadBalancer/loadBalancer.zip | Bin 428 -> 458 bytes .../import/tosca/policy-types/policyTypes.json | 51 +++++ .../tosca/relationship-types/relationshipTypes.yml | 202 ++++++++++---------- .../tosca/relationship-types/relationshipTypes.zip | Bin 1460 -> 1474 bytes .../scripts/import/tosca/importAnnotationTypes.py | 35 ++++ .../scripts/import/tosca/importCategoryTypes.py | 12 +- .../resources/scripts/import/tosca/importCommon.py | 84 +++++++-- .../scripts/import/tosca/importDataTypes.py | 12 +- .../scripts/import/tosca/importGroupTypes.py | 107 +++++------ .../scripts/import/tosca/importHeatTypes.py | 16 +- .../scripts/import/tosca/importNfvTypes.py | 6 +- .../scripts/import/tosca/importNodeType.py | 6 +- .../scripts/import/tosca/importNormativeAll.py | 210 +++++++++++---------- .../import/tosca/importNormativeCapabilities.py | 12 +- .../import/tosca/importNormativeElements.py | 110 +++++++---- .../importNormativeInterfaceLifecycleTypes.py | 12 +- .../importNormativeNoHeatAndNormativeTypes.py | 12 +- .../scripts/import/tosca/importNormativeTypes.py | 6 +- .../scripts/import/tosca/importONAPNormativeAll.py | 31 +-- .../scripts/import/tosca/importOnapTypes.py | 6 +- .../scripts/import/tosca/importPolicyTypes.py | 108 +++++------ .../scripts/import/tosca/importSolTypes.py | 6 +- .../scripts/import/tosca/importUsersFromYaml.py | 8 +- .../scripts/import/tosca/typesToUpgrade.json | 3 +- .../import/tosca/upgradeHeatAndNormativeTypes.py | 6 +- .../scripts/import/tosca/upgradeHeatTypes1707.py | 6 +- .../scripts/import/tosca/upgradeNfvTypes.py | 6 +- .../scripts/import/tosca/upgradeNormative.py | 168 +++++++++-------- .../import/tosca/upgradeNormativeVersion.py | 12 +- .../import/tosca/upgradeNormativeVersionAll.py | 12 +- .../tosca/upgradeNormativeVersionProd1702_3537.py | 12 +- .../scripts/import/tosca/upgradeONAPNormative.py | 12 +- .../scripts/import/tosca/upgradeONAPTypes.py | 6 +- .../scripts/import/tosca/upgradeSolTypes.py | 6 +- 97 files changed, 1475 insertions(+), 575 deletions(-) create mode 100644 catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.yml create mode 100644 catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.zip create mode 100644 catalog-be/src/main/resources/import/tosca/group-types/groupTypes.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VLANNetworkReceptor/VLANNetworkReceptor.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VLANNetworkReceptor/VLANNetworkReceptor.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VLANNetworkReceptor/VLANNetworkReceptor.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VRFEntry/VRFEntry.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VRFEntry/VRFEntry.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VRFEntry/VRFEntry.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/configuration/configuration.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/configuration/configuration.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/configuration/configuration.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/fabricConfiguration/fabricConfiguration.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/fabricConfiguration/fabricConfiguration.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/fabricConfiguration/fabricConfiguration.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.zip create mode 100644 catalog-be/src/main/resources/import/tosca/policy-types/policyTypes.json create mode 100644 catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py diff --git a/catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.yml b/catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.yml new file mode 100644 index 0000000000..edd20e73e6 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.yml @@ -0,0 +1,13 @@ +org.openecomp.annotations.Source: + description: Indicates the origin source of an input + properties: + source_type: + type: string + vf_module_label: + type: list + description: List of VF Modules this input was originated from + entry_schema: + type: string + param_name: + type: string + description: Source parameter name diff --git a/catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.zip b/catalog-be/src/main/resources/import/tosca/annotation-types/annotationTypes.zip new file mode 100644 index 0000000000000000000000000000000000000000..5783c9794a5fe54be2302eb874d44167e40205ce GIT binary patch literal 333 zcmWIWW@h1HU|`^2csOICPu1VTZ%2W=6^slF!azDPFE76&u_QA;FQl>{wOFq*H>Y=k zW7c5@9@p=UcO2C}Fcvj9EsPZ1W%??jj72VU!jrZ;`{eu;_;MFU)p_R6bIX0TWkSHE z7%P#B2NFcz-z(kdvivdQHK`Mm3s=q+-gD{zXS2*Brv=A^xqq1PSut^Kn4)?sZKG)Z z!6)S*Yt8N)Uwc81^#;=igJ~}(*7w$4OPslK{>RDB;?2^&-B|9wD?fX4RqdVwm4`#} zzo~JCfBDV%+LgIyS*5=c=kBlb^rn1#`EY*v|`2MhtdJw jj7%a7xcv?EIuIx*fGKRD5a7+q29jh1LPsF|4XhFXp5%iU literal 0 HcmV?d00001 diff --git a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml index 56da214e88..9a6bc093e4 100644 --- a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml +++ b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml @@ -219,6 +219,11 @@ org.openecomp.capabilities.VLANAssignment: type: string description: Ability to recognize capability per vfc instance group on vnf instance required: true +org.openecomp.capabilities.RoutingConfiguration: + derived_from: tosca.capabilities.Root +org.openecomp.capabilities.FabricConfiguration: + derived_from: tosca.capabilities.Root + #ONAP types tosca.capabilities.nfv.VirtualStorage: derived_from: tosca.capabilities.Root @@ -247,7 +252,7 @@ tosca.capabilities.nfv.VirtualBindable: tosca.capabilities.nfv.VirtualLinkable: derived_from: tosca.capabilities.Root tosca.capabilities.nfv.ExtVirtualLinkable: - derived_from: tosca.capabilities.Root + derived_from: tosca.capabilities.Root tosca.capabilities.nfv.Forwarder: derived_from: tosca.capabilities.Root tosca.capabilities.nfv.ext.GuestOs: diff --git a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip index dce4bf75655a0be1ca6eb9c4fc1af0428a77f7ed..83045534839039ca6c3ff5ab947b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FJwkHx~%aHLI()LzBhu+pw8C>4q|HeMD92brd&*0{`HAr9qC+871 zeEbB{pCkQw0f0Ml006><>x>xp|K;`f8xSD)UzHh?6aPK_qssXIr!s^M&$qV#0M|Ec Kzjfz-w!Z-QZ(aQW diff --git a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml index c5555a5838..b3635dc09f 100644 --- a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml +++ b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml @@ -57,14 +57,20 @@ tosca.datatypes.Credential: org.openecomp.datatypes.PortMirroringConnectionPointDescription: derived_from: tosca.datatypes.Root properties: - nf_type: - type: string - nfc_type: - type: string + nf_naming_code: + type: string + nfc_naming_code: + type: string network_role: - type: string - pps_capacity: - type: string + type: string + pps_capacity: + type: string + nf_type: + type: string + description: deprecated + nfc_type: + type: string + description: deprecated tosca.datatypes.TimeInterval: derived_from: tosca.datatypes.Root @@ -1391,8 +1397,7 @@ tosca.datatypes.nfv.injectFile: #used for vCPE usecase type: string required: true tosca.datatypes.nfv.L2AddressData: - derived_from: tosca.datatypes.Root - properties: + properties: mac_address_assignment: type: boolean required: true @@ -1452,7 +1457,7 @@ tosca.datatypes.nfv.VlFlavour: flavourId: type: string tosca.datatypes.nfv.ext.AddressPairs: - properties: + properties: ip: type: string required: false @@ -1460,7 +1465,7 @@ tosca.datatypes.nfv.ext.AddressPairs: type: string required: false tosca.datatypes.nfv.ext.FloatingIP: - properties: + properties: external_network: type: string required: false @@ -1468,7 +1473,7 @@ tosca.datatypes.nfv.ext.FloatingIP: type: string required: false tosca.datatypes.nfv.ext.LocationInfo: - properties: + properties: availability_zone: type: string required: false @@ -1479,7 +1484,7 @@ tosca.datatypes.nfv.ext.LocationInfo: type: string required: false tosca.datatypes.nfv.ext.HostRouteInfo: - properties: + properties: destination: type: string required: false @@ -1487,7 +1492,7 @@ tosca.datatypes.nfv.ext.HostRouteInfo: type: string required: false tosca.datatypes.nfv.ext.InjectData: - properties: + properties: file_name: type: string required: false @@ -1495,7 +1500,7 @@ tosca.datatypes.nfv.ext.InjectData: type: string required: false tosca.datatypes.nfv.ext.zte.WatchDog: - properties: + properties: enable_delay: type: integer required: false @@ -1503,7 +1508,7 @@ tosca.datatypes.nfv.ext.zte.WatchDog: type: string required: false tosca.datatypes.nfv.ext.LocalAffinityOrAntiAffinityRule: - properties: + properties: scope: type: string required: false diff --git a/catalog-be/src/main/resources/import/tosca/group-types/groupTypes.json b/catalog-be/src/main/resources/import/tosca/group-types/groupTypes.json new file mode 100644 index 0000000000..caea6a8063 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/group-types/groupTypes.json @@ -0,0 +1,22 @@ +{ + "tosca.groups.Root": { + "displayName": "Root", + "icon": "group-root" + }, + "org.openecomp.groups.heat.HeatStack": { + "displayName": "Heat Stack", + "icon": "group-heat-stack" + }, + "org.openecomp.groups.VfModule": { + "displayName": "VF Module", + "icon": "group-vf-module" + }, + "org.openecomp.groups.NetworkCollection": { + "displayName": "Network Collection", + "icon": "group-network-collection" + }, + "org.openecomp.groups.VfcInstanceGroup": { + "displayName": "Vfc Instance", + "icon": "group-vfc-instance" + } +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_Service/Generic_Service.yml b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_Service/Generic_Service.yml index 902cf0c0c8..3652ae4e12 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_Service/Generic_Service.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_Service/Generic_Service.yml @@ -2,4 +2,3 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 node_types: org.openecomp.resource.abstract.nodes.service: derived_from: tosca.nodes.Root - \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_Service/Generic_Service.zip b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_Service/Generic_Service.zip index 060dec1aa1f7ea9c065a28c13a55cd4049fa72d7..f1e3fdd17372141f486eb3f0b630fd550bec3970 100644 GIT binary patch literal 252 zcmWIWW@h1HU|`^2SYG(iN2q-UYYC7y1Biuz*gZ8bwJ0+=J~*|gEHgP(uQE4Bx7U%2 zSy6!HeN+7h)=fKq_0%L7+>&m&I&o&_hW-9#Z`LkYt(mMlQ|p`AEK@lz?nU+<2mejp zX2*YF=5I&-TN$783RrJiEiJy#UN7JUJB&R2V!9$c2CVqEy_%e4^AyA%S=wytIW;O?G5BQ ztRUd>pLu7q`h+jnlfN)^U-cARq`f;@ar=73%6R6_ZHCuGG?Vq$Mm$_*qG07*P`-5O zH|COKRTsL=Ze3ei$aeGQ!o=7)$v>;!Wq8Ew7T5T%a`1TntRpG^E?w15nbPv$S;{2E zRE5iWG4ofu*BIX}$@>@J&B$cWfXkgKK$n7m0+__=YA&cGBZCA(GWW4{eFrZw!sv-r YVdC9Det$>*MzqqJ>(a{vYRRJrHb7f8aX7=ja8y%ta*{1jQOp;#Qd-++`Brow! z=?#ZWP3O*?us*tLJ$CvM6V=)2TFe{kT~9sF>xtqC2U3jd|2qvMj!C zUwrhIpXkkX%J7dkW({Bf+M>6eeC^=9u zzwGq6!U<(DxBiui{is^9IpltTHzSh>1FoP@0R{#G10#b1m_`j4E~qFYg9O8jXLjye m4qj$tm~;Kf(|wm2yM=4yo&o6qZ&o&l35*PJKn5oxhz9_~h?>~| literal 0 HcmV?d00001 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.json b/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.json new file mode 100644 index 0000000000..2d3f5412e1 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.json @@ -0,0 +1,21 @@ +{ + "payloadName": "VRFObject.yml", + "contactId": "jh0003", + "name": "VRF Object Configuration", + "description": "VRF Object configuration object", + "resourceIconPath": "pmc", + "resourceType": "Configuration", + "categories": [ + { + "name": "Configuration", + "subcategories": [ + { + "name": "Configuration" + } + ] + } +], + "tags": [ + "VRF Object Configuration" + ] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.yml b/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.yml new file mode 100644 index 0000000000..28f1d5287b --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.yml @@ -0,0 +1,8 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.VRFObject: + derived_from: tosca.nodes.Root + description: provides capability to connect WAN Transport Service Proxy to VRF Entry + capabilities: + routing_configuration_external: + type: org.openecomp.capabilities.RoutingConfiguration \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.zip b/catalog-be/src/main/resources/import/tosca/heat-types/VRFObject/VRFObject.zip new file mode 100644 index 0000000000000000000000000000000000000000..23287d625c11202c50fdc6620c45ccd3ade6a5c4 GIT binary patch literal 369 zcmWIWW@Zs#U|`^2Flj#KV=27!+C?BQf{}rN7f6Q%x%nq$r6!l?Rp#cz_8;^+?7-vl ze(Ep&e@&}mik&(78n~JkZ@p_VF)(TUp1do6YJ-{U&e?1@pUS(aOGK;2e&3(%v*_F8!Nv)(MM-x$z5ah;!9;)-p)TQiHVe{x$R8g}V& z{RRC1Z$>7223)>Z0s0>V6u=}}Sa3mw85txPmbBa6nfdoJBd0HfHrfBL~i6|A-8j=1G?O;v7H;*)a@U8BHS7(L0oowsz~ znWq8oPGnyGremD-Znl%+Y-O#5Gk0|+&#F-DDxUwm<;2Apk2>Yc=lDMhx12b(b^Fwo zTN^$WZVBH1=mysk#bq{=*BxK8a~jwCV^J0gJ=Tt_vm|_U9==>`Gk@Q={@o?_E*b3m z+7=kPU@31!Y|19?C(B-{7Co%_b;rzbt+i*|^V@b_%lQu1%e=T}I`c)HxIG8=T$}vt z6_L;0YrehD*LBrAz?+dtgaKEesQ`lw1Qfs|mLTMUN-;7>Fx2^fF}o~wg|S@gGnh8p cq`10A=n7+iH!B-RKO+z(18HMmoG>r|04YzTKL7v# literal 0 HcmV?d00001 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailAbstractSubstitute/contrailAbstractSubstitute.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailAbstractSubstitute/contrailAbstractSubstitute.yml index a1f40c5529..5bdee932a3 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailAbstractSubstitute/contrailAbstractSubstitute.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailAbstractSubstitute/contrailAbstractSubstitute.yml @@ -1,4 +1,11 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailAbstractSubstituteGlobalTypes + template_version: 1.0.0 +description: Contrail Abstract Substitute Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute: derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailCompute/contrailCompute.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailCompute/contrailCompute.yml index c2ba70e2d1..4ca0f04f6c 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailCompute/contrailCompute.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailCompute/contrailCompute.yml @@ -1,4 +1,13 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailComputeGlobalTypes + template_version: 1.0.0 +description: Contrail Compute TOSCA Global Types +imports: + ComputeGlobalTypes: + file: ComputeGlobalTypesServiceTemplate.yaml + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vfc.nodes.heat.contrail.Compute: derived_from: org.openecomp.resource.vfc.nodes.Compute diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailNetworkRules/contrailNetworkRules.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailNetworkRules/contrailNetworkRules.yml index 2f8228ac85..b9d61e7769 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailNetworkRules/contrailNetworkRules.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailNetworkRules/contrailNetworkRules.yml @@ -1,4 +1,11 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailNetworkRuleGlobalType + template_version: 1.0.0 +description: Contrail Network Rule Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules: derived_from: tosca.nodes.Root diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailPort/contrailPort.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailPort/contrailPort.yml index ce99511bbe..84717a40c3 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailPort/contrailPort.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailPort/contrailPort.yml @@ -1,4 +1,13 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailPortGlobalTypes + template_version: 1.0.0 +description: Contrail Port TOSCA Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml + PortGlobalTypes: + file: PortGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.cp.nodes.heat.network.contrail.Port: derived_from: org.openecomp.resource.cp.nodes.network.Port diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2NetworkRules/contrailV2NetworkRules.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2NetworkRules/contrailV2NetworkRules.yml index ad4369ce40..ccc6d3a2ab 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2NetworkRules/contrailV2NetworkRules.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2NetworkRules/contrailV2NetworkRules.yml @@ -1,4 +1,11 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailV2NetworkRuleGlobalType + template_version: 1.0.0 +description: Contrail V2 Network Rule Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules: derived_from: tosca.nodes.Root diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.json b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.json new file mode 100644 index 0000000000..d6139b3c8a --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.json @@ -0,0 +1,15 @@ +{ + "payloadName": "contrailV2VLANSubInterfaceV2.yml", + "contactId": "jh0003", + "name": "contrailV2VLANSubInterfaceV2", + "description": "VLAN sub-Interface is a logical port which must be binded to a port. Regular port may have 1…N VLAN Interfaces.It can connect to its own network (regardless of the network the parent port can connect)", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [{ + "name": "Generic", + "subcategories": [{ + "name": "Network Elements" + }] + }], + "tags": ["contrailV2VLANSubInterfaceV2"] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.yml new file mode 100644 index 0000000000..a9a89e84bc --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.yml @@ -0,0 +1,70 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface: + derived_from: org.openecomp.resource.cp.nodes.network.v2.SubInterface + properties: + virtual_machine_interface_refs: + description: List of virtual machine interface. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + name: + description: Virtual Machine Sub Interface VLAN name + type: string + status: SUPPORTED + required: false + virtual_network_refs: + description: List of virtual networks. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + virtual_machine_interface_properties: + description: virtual machine interface properties. + type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.Properties + status: SUPPORTED + required: false + virtual_machine_interface_allowed_address_pairs: + description: Virtual Machine Sub Interface allowed address pairs. + type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairs + status: SUPPORTED + required: false + virtual_machine_interface_mac_addresses: + description: List of mac addresses. + type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress + status: SUPPORTED + required: false + security_group_refs: + description: List of security groups. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + port_tuple_refs: + description: List of port tuples. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + attributes: + fq_name: + description: The FQ name of the Virtual Network. + type: string + status: SUPPORTED + show: + description: All attributes. + type: string + status: SUPPORTED + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: org.openecomp.resource.cp.nodes.network.Port + relationship: tosca.relationships.network.BindsTo + occurrences: + - 1 + - 1 \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.zip b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VLANSubInterfaceV2/contrailV2VLANSubInterfaceV2.zip new file mode 100644 index 0000000000000000000000000000000000000000..cc65bf9f53e586f680a13664a079c80ab653162b GIT binary patch literal 756 zcmWIWW@Zs#U|`^2c+*zxQ?B>yn;sJb!$eL71_hvKa(-S(QDSCJm{FLIqhD}ol4o8? zYEfEZa%z~7US)31(XhLDw-rS8t-n(KfVJ&b+%LV$W|=|PQ?sW3@X=`Nio3j1> zMqabCQ?8yBIU4@$Va@aBkF94U?0K-J#Vbp4$;EkZ4^-A@p4jjtHCc26bH2##^zt|F zzPZg7im-_Iz^eG@R$M{OIM*yERuCV~(m%_#vlP~A}c3mhs zDy5gTvhid~0^h19W>X%vPB#0}V&f&>u~KN3i;3jL5~i{*A})$an|>Z}?w(`&KT2=^ z|Cri;Cc2ED3KQb4T=+1huB+KY{cG7K>x#^!&6^ZN!{shDJ>#9DRVUm1PpsQ*-U$zp zmt_mv%U|p_KL6_BiWSN09?R|Re%SHxy4trbac+fkU%lKCrIsl7y8e)`(&s07B)?gEBdOr?HH?A)aqxlpXXY? zyt_WelK;ilOlP%auUh}U-VlG)Vc(w@{9o2hZkV6>Z{DNzpWZazyPj6B_1+976IuTVA^J2008(mR`~z` literal 0 HcmV?d00001 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualMachineInterface/contrailV2VirtualMachineInterface.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualMachineInterface/contrailV2VirtualMachineInterface.yml index a2179079b1..69e15ff488 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualMachineInterface/contrailV2VirtualMachineInterface.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualMachineInterface/contrailV2VirtualMachineInterface.yml @@ -62,4 +62,5 @@ node_types: - 0 - UNBOUNDED valid_source_types: - - org.openecomp.resources.cp.nodes.heat.network.contrailV2.VLANSubInterface \ No newline at end of file + - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface + - org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualMachineInterface/contrailV2VirtualMachineInterface.zip b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualMachineInterface/contrailV2VirtualMachineInterface.zip index 60950b65ccd71bb878b38b6891084f3c41233ba2..856457979ee053f029b6ef4debbce65182b660a7 100644 GIT binary patch delta 640 zcmV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4ee8ImyOuobIbLnT|68rdMmf=xXqE@ z(bp3voclEQ@7mt|d5tx{Z+?5Dc3M&IcXZ?u!NOAg@6o&Gf3m(_CGd8u9ZPx5+AUIB z=WaDJYU(yjmpc80L(=D9JIBLpTZ!nfBR3lpj=V^%QQG`4X=_DAoUUB^$(x01RkD}o z$~k;>KXN4E+vAz{+f8Tv_5XbI^n#p!3<2JZO!f>|QVa(JgDQgxFeQP20*II>tzpFl uVKOi>NHEw=ReC!0;3Y;FZGGvDl~U6s#sF_tHjsKoAS?&c;lKpQzyJUe(I}b# diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualNetwork/contrailV2VirtualNetwork.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualNetwork/contrailV2VirtualNetwork.yml index 0fa7c94a63..cfff898077 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualNetwork/contrailV2VirtualNetwork.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailV2VirtualNetwork/contrailV2VirtualNetwork.yml @@ -1,4 +1,76 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailV2VirtualNetworkGlobalType + template_version: 1.0.0 +description: Contrail V2 Virtual Network Global Types +imports: + NetworkGlobalTypes: + file: NetworkGlobalTypesServiceTemplate.yaml + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml +data_types: + org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefData: + derived_from: tosca.datatypes.Root + description: network policy refs data + properties: + network_policy_refs_data_sequence: + type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence + description: Network Policy ref data sequence + required: false + status: SUPPORTED + org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence: + derived_from: tosca.datatypes.Root + description: network policy refs data sequence + properties: + network_policy_refs_data_sequence_major: + type: integer + description: Network Policy ref data sequence Major + required: false + status: SUPPORTED + network_policy_refs_data_sequence_minor: + type: integer + description: Network Policy ref data sequence Minor + required: false + status: SUPPORTED + org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet: + derived_from: tosca.datatypes.Root + description: Network Ipam Ref Data Subnet + properties: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + type: string + description: Network ipam refs data ipam subnets ip prefix len + required: false + status: SUPPORTED + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + type: string + description: Network ipam refs data ipam subnets ip prefix + required: false + status: SUPPORTED + org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.IpamRefData: + derived_from: tosca.datatypes.Root + description: Network Ipam Ref Data + properties: + network_ipam_refs_data_ipam_subnets: + type: list + description: Network ipam refs data ipam subnets + required: false + status: SUPPORTED + entry_schema: + type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList + org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList: + derived_from: tosca.datatypes.Root + description: Network Ipam Ref Data Subnet List + properties: + network_ipam_refs_data_ipam_subnets_subnet: + type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet + description: Network ipam refs data ipam subnets + required: false + status: SUPPORTED + network_ipam_refs_data_ipam_subnets_addr_from_start: + type: string + description: Network ipam refs data ipam subnets addr from start + required: false + status: SUPPORTED node_types: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork: derived_from: org.openecomp.resource.vl.nodes.network.Network diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/contrailVirtualNetwork/contrailVirtualNetwork.yml b/catalog-be/src/main/resources/import/tosca/heat-types/contrailVirtualNetwork/contrailVirtualNetwork.yml index c0d1f3dab2..f1ebbea138 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/contrailVirtualNetwork/contrailVirtualNetwork.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/contrailVirtualNetwork/contrailVirtualNetwork.yml @@ -1,4 +1,13 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ContrailVirtualNetworkGlobalType + template_version: 1.0.0 +description: Contrail Virtual Network Global Types +imports: + NetworkGlobalTypes: + file: NetworkGlobalTypesServiceTemplate.yaml + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork: derived_from: org.openecomp.resource.vl.nodes.network.Network diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/eline/eline.yml b/catalog-be/src/main/resources/import/tosca/heat-types/eline/eline.yml index 79876881cd..21241369c7 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/eline/eline.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/eline/eline.yml @@ -1,4 +1,5 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 + node_types: org.openecomp.resource.vl.ELine: derived_from: org.openecomp.resource.vl.VL diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/eline/eline.zip b/catalog-be/src/main/resources/import/tosca/heat-types/eline/eline.zip index 8ba7cbceac2788b3341daa9cb08966a7c978715e..ea770f5042575612e8a451bf4aa836bdb2a81fdc 100644 GIT binary patch delta 36 qcmZ3@dXQ-{ALA89k;(Q<`a?yvd9V3|v4uH77GKRWGYJKQA@lVAf#+ zp1u6v_zyi_%Tji`^hp3mV*94kFC2?q9-B^WUR%;~ss85nH>cIq^?29nPy0G=-o4K+ zKQbQpVo@eHTZ%s=?qI<48DWnX8v6_PDCN&%U90kCw{CscBUR@)?si%lt4m{_l{sHz zyWahI&IMoZ`u%UDn;dEvc<2aDSXi^JL|7(v0;BbXts|u5T8|uu#)}x1zhWLhb0o*M5ms%e^=D z%oh%sr7(;8p^bR-UV)&!b89)@t*h#uf4O|oy#I_7u1MN5;0Tb3Z^d;%VZp_q01O)j z21W)6h97Ix&O9`|#0aC0*VZlFb^Ib@fHxzP{lu%POni(J|CsYJF)%S~2Wq(o3|IyR E0P3%xHvj+t diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml index 35306f5b49..ad946fc8bd 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml @@ -135,6 +135,7 @@ node_types: type: tosca.capabilities.network.Bindable valid_source_types: - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface + - org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface occurrences: - 0 - UNBOUNDED \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip index 02b62a69dadddd4d822c40f14f1bee7fbe819c70..944dfb71fc00f57a20116d127bddb63ee3a47662 100644 GIT binary patch literal 1155 zcmV-}1bq8YO9KQ70000806B5-ObBdmd;tUi0F)5`01yBG0A+Y|PGxm;a&K-!P%e3G zY{ghhZ`(K!z6Z#EAh74CX^y_BaS9m7I%*Slu_u8hM>bK4WJ$`2QS`reNJ+M|i8toP z?dA|We9V0F`evB(Gp`+^C5K8V;e}SN+<@5{^b^88F`4yE53 zaFg>hLbP3F+JFM4Ym-@Uy0Hv0X0pvy22Xwtjkj7|7x6S99IV&?FDt9-$*Z@oi}seW zc*=UwDGfh=5T=a)PJ$%j*YGdG0%n)3f%;5=f7JFXenwnbp{*yuoL;WMh0+0Qtnk|s z6kST-JFO(1osgy05~$iQqXK4y@zHr7C0(HhNqhSp7cP88(WDnmw2G)ZKzm6RzBR(4 zPEt|nV87u!^^Kd5`$bXQeSWx^_FEh_fm3dmc$1;XtmEQR72rO8GK7Hd2`jNxiL8!TS}7D}V|KG$Q>oxlMM$;w+QlpjXz zf^4W1yu{xPxRGNnNKM(sQ!`%VsF?Zjn$otWvR{j`N@svQ&yRX2ZsdxaCq##lx0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E#Umz~wo7T^;m^Fgvn@Q&LA=SK~!v%)U!(JCi>N6%E^fkN?O46O*Wq5igq}zkSY4HOOuhxpnQs?L0Gv^5fG=cJ7dTaL!)! z^7YkktoH6Xb@}!Cm;JY!_cHH}RgO*mX}nnLjcK0Z(qC?%)DOk(sG_F;6RJz43f-KJf_0Bo7Ys%+sQjdg+ zDpIn2J8w^29bmEO!_FHnwodwEiTchlbx1ZIutvwgnrhDB{3}iX3 zBiza$on*UaJ@1Te_rnKgX4Ol~^PQb2@#CX~4MY3kHsf=DL~KNbdO1T|HfpR9>T;f& zAAKov(nGhcP7@Y;J4+-Y&`Z{{FK+{qy+jr!}{B+}Q8NV|eS=2SL|E)C=fV3g7Kw@A305^>; A(*OVf diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.json b/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.json new file mode 100644 index 0000000000..1e4e15fbe9 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extVirtualMachineInterfaceCP.yml", + "contactId": "jh0003", + "name": "extVirtualMachineInterfaceCP", + "description": "External port for virtual machine interface", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } + ], + "tags": [ + "extVirtualMachineInterfaceCP" + ] +} diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.yml new file mode 100644 index 0000000000..6816e7b299 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.yml @@ -0,0 +1,67 @@ + +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extVirtualMachineInterfaceCP: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + name: + description: Virtual Machine Interface name + type: string + status: SUPPORTED + required: false + security_group_refs: + description: List of security groups. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + virtual_network_refs: + description: List of virtual networks. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + virtual_machine_interface_properties: + description: virtual machine interface properties. + type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.interface.Properties + status: SUPPORTED + required: false + port_tuple_refs: + description: List of port tuples. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + virtual_machine_interface_mac_addresses: + description: List of mac addresses. + type: list + status: SUPPORTED + entry_schema: + type: string + required: false + virtual_machine_interface_allowed_address_pairs: + description: Virtual Machine Interface allowed address pairs. + type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairs + status: SUPPORTED + required: false + attributes: + fq_name: + description: The FQ name of the Virtual Network. + type: string + status: SUPPORTED + show: + description: All attributes. + type: string + status: SUPPORTED + capabilities: + binding: + type: tosca.capabilities.network.Bindable + occurrences: + - 0 + - UNBOUNDED + valid_source_types: + - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface + - org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extVirtualMachineInterfaceCP/extVirtualMachineInterfaceCP.zip new file mode 100644 index 0000000000000000000000000000000000000000..4edd5b331482330344a1b7774c55e0bf6f619ef9 GIT binary patch literal 737 zcmWIWW@Zs#U|`^22x_hIu`_&fK$?kx;UEVCg91=AwW1^}v#6vrF~>JCIU_SK)ibXo zwJ0qyIn_BpuQE61Y}nbpTLuFAlt1#-HAYQI&U=%m9eQh1X8FS`$#kYL+1u7-PL;oB z9huQ^#Q&!4gkYKT-_O>}`{>igoImHmnuegPmrF19nKtO{Nm+8cXwxRH8*SlTwW-Qx zQhZx98-Dh(PUmHBk%$ROc5F77x|HMG6^#Zi@7ac}`|I>BUXS_vBuUlu&jq;+PnhIB z>sr~cF34GspgK!y_la*a$~C$Va_xQ7lp%jsyQ91BI_H#Y+mn(6RNNecBy_X*Z=E{T z@mb@mQ7v!wyX@%`uSd??|EKQvw=MUbD%PtyO`JGMd-@ES4ymR0H>l3KWz=$MF4x;g zD}SGv3QJlos$`~cm4&ym+($hG zCu5&QYAp<2HEC9dD(7zf{mHGzMPmxi-`?#Me!x~#?Zl&?v&T&)UH0%3wmd8RGgQ6Q zX@}{Hnd=X~-K$j`U3_WQ{nAT^#E*3=nXs{oo3bVg^}df54L`MJ;SJ5?Y2GFO@1IsW z>t}rPQcYaruBwSK7d@XV@ypo-EWOjdIr_@J>8C!;otyn6Ut8gR{nps(*@^Pgc7L8x zX4`)6&e^-C*7*ONt8umaTbO)P^u7sRawcxV!w;vgY|{l3 zs}wQ{3$*u52&^}pZMWylGXK9@Okz$pZ4EZ#{c8K@j0ImkRN`}XQ- z+PSovzHjmY-i%Bl47ie(3NUejfC88#oY1(SDj69h7}DV@nUR4(97v}nCKY8SJLl)6Wu})FC6;97=jm1E z=H&XH>Lg>+Riv{|?PwRC_tBa;XNE}yCZ{R#pKU=pXl txu6Od86+57uE$UJ;=RIXvH?PiblrRC3FHTOv$BCqVFbcVApHVtBmh@Qg|z?x literal 0 HcmV?d00001 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/globalCompute/globalCompute.yml b/catalog-be/src/main/resources/import/tosca/heat-types/globalCompute/globalCompute.yml index 4ac9950ee2..ee7ced6a44 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/globalCompute/globalCompute.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/globalCompute/globalCompute.yml @@ -1,4 +1,11 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ComputeGlobalTypes + template_version: 1.0.0 +description: Compute TOSCA Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vfc.nodes.Compute: derived_from: tosca.nodes.Compute diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/globalCompute/globalCompute.zip b/catalog-be/src/main/resources/import/tosca/heat-types/globalCompute/globalCompute.zip index 23a471f246ce9ee58fc5c705c8a7f4bcc37e0090..a04df59514389e75d26e5fe336c84edadc606f6d 100644 GIT binary patch delta 39 tcmca3cbaEAZ>_F)}bRBr`BDgs}q&1^~d(2QL5s delta 1983 zcmV;w2SE7G58NJqP)h>@6aWAK2msDZX-Q4j?L+wn000rY000sI003ufZ(?C=LvL+x zb#!Ged0}mA?VU|?(=ZT*@BJ0JFu+VPg=23eWjGZW+H%b(w$f;@EhEW+@atL0PVCSW zoItF4FMGP&k4yQ>or84+i>NZ4G% zt!67yHr%Cs(MJmBww>+zLX-Xb7%iHdsj>gy5K3Ku6lqC z$&m`rtosM=45oEUHaWrE*74VtKUAVpMyCNnfCNB85qMGnL zPD{82zAn>cnttS)CEklv%p%#h%aeVvn~kOZur{iMJL z_&zJM5;y^s{2X+rnx2ynw0vN2Q$m=Iqs|3qg1Z-$sgMssZjMnotHbUqeXKFAP<3we z{+#4Y{}2*BD6m`lZ>digZymF%S`o*klq`>b+Yot0-n2g7e|-1p{^Rv75YHjHJVtc( zkIp)4T?@}UfOgh59%{b-$(1(s1S0CL1ED!_Xl5(}fr!lBk$DqrYqK&LXLaL2e)i7KSd_VbtsD!_JBV&g$6erfIC`~z zW~OFZ4WyF>B<8q@*I)JUIPW zW(y`wEJg|Gti(sC?qWo;_CeOTD5Jy_43e~WlIHF;(KCqdtj1a3c%V7^d`~pb7-$Eh z0{t-q1A-TVC>1fY&xPQ*`|Hm~hF*7nDmuUMd77@gAz92d4u|$n(O^eI+lJ%gps2|W znwh~Ch{>w4R<}1IYVA)k*XrjdPO+cgD@)s*v&BX;?BpXz+sD$IerOAq7wNYShDKRTi!S;xK0c>OD87PAakZa0wMXv>PDdPu=Ie#Qvo?sNwamU;9z-+&7KQXyOl~Z z8n1ZnT3r#pW5@5Xt<`2ScDqUi2UQ26Zh&?&S|ahpr^=GhOjqf%~3>J^~k;sXel`HPK*!8gq?1qV~_+V3B*k ze%$FZ9`ye0$dt-z_c&}VQZd(hiJTofXNMhAt=lD%DW0%5Tq9q5=WFn7+S+#9H;@?* zTOFFUcDkx@jm0Ue!0>vSW-M;8IxuCYu!$A!t?DC8aS*mYqW%W3S_fr602BZK00;oi zOle6?*X=|31^@sNy8r+Z03-ka0000003ZMW000000B3A(Vqt7UZ*6dObY(7iVQp** z03ZMW0000102lxOve!afI?@5;0ui}ZM$!S~0ui}ZM$!RLO928ulUoNR0x1WRf(Jhi R0ssO4#{d8Te+~cu002Z(sZsy{ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/globalPort/globalPort.yml b/catalog-be/src/main/resources/import/tosca/heat-types/globalPort/globalPort.yml index 791a0b9a3b..c0fd672ee9 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/globalPort/globalPort.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/globalPort/globalPort.yml @@ -35,6 +35,11 @@ node_types: type: org.openecomp.datatypes.Naming subnetpoolid: type: string + subinterface_indicator: + description: identifies if Port is having Sub Interface + type: boolean + required: false + default: false capabilities: network.incoming.packets.rate: type: org.openecomp.capabilities.metric.Ceilometer diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/globalPort/globalPort.zip b/catalog-be/src/main/resources/import/tosca/heat-types/globalPort/globalPort.zip index efeafe824ec1802f9818f3e79fb09b1b3f7d9d7a..b0929ff6a0843e4a787dbb56158f2dc89c848d47 100644 GIT binary patch delta 1219 zcmV;!1U&nn3B(D1P)h>@3IG5A2mtGG@l5Z&@j^xf005FQ000gE003ufZ(?C=P;YW{ zE_rQi?ODN&+cpqAH$eVjjtStXNsqo18*kb!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VW|fr>+D57B6koD7UfAz%chiCY46>#a@~tkmzIo+ zS2lOLuV@$NSh*;_bqJH*`W~eu8xD9gqJ_I?|igC>%ER-^Idh z{%YULyp!EW*aFsm3BFwKo0H8geBi$L=9{<6KTltN_xcs19ntr4V`pudoA~m=+lf_% zk~XvAuPuIC)nsy2%KjeXQ-0|jmM?m<=7v4kQu{)DL;mL0PP2fy6YL%uHZeckWBTIN zqP~@xGynN@JX_bqyw{>}=_QBVEcS)!v(*fAFE#D!TT-UBg|G9e@Q=yjQ|!+x{aV7k z%{kGVUAbVFuZ;HITN~@MU)$ZA?U8-csL^BAYR}8H!dweX_Om{a7u{P{mVL&nqe;bI zt?JEZmU-p!dgtQz?6t7Zeamst{hi58iEp)6C2~LQ(#lzLXIu1|9DQE@7pcF>Jzwbe zHJ|*g`}K6tkIIR9tK{u?6(qP{gfD$}ZTa)}*3aKd-#((9wSL9>sqOqhf$KeQYG<84 zQGV=1W%=O>qqb`G$BP#}ic7!C_SOI7A?8ItDt=r){m6F0hhH)q{%m~e`tk34FPUyR zxfg2=TgTf?Q|4OV`rY&JyvB!il0PJVerHhmuyE2k@dNfpcWw|rP`&8>Vrv0A2gaI` z`o*7_D*Tyl$g`E})l1ZT|NpYg!wbl(7Wx;j@<%qnn~_PL0asC>0xT>*Kmkmm7aUwr maYhCSh6TEN1r|hKX1r6s8-)(=W@Q6uW(2|nAg##);sF3{%p$-5 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/multiFlavorVFC/multiFlavorVFC.zip b/catalog-be/src/main/resources/import/tosca/heat-types/multiFlavorVFC/multiFlavorVFC.zip index d73488d0c052d0529d102f0061f23171becb277a..9edb9f53c07b04097ef0634c1ef7a51292654a27 100644 GIT binary patch delta 36 qcmX@b`iyDf{|}5JlS7$QCyO!(Pwr*X=VN4GWJqCPV0Z(>3=9C;E(pp1 delta 364 zcmaFHbc(e;z?+#xgn@y9gW+Y|Rj*kg4uR)@yk15I24NtbTbfgn>6VjNmR}U+=B$@h zoS&CF!I1lqfk12d!vBgXVwyX4b}lFp6fB&`mtM7YqM7E&P>rSk@2cc(Trsn+{Qd6g zoqACQ$FeiLd2b48J&``PdYQ^j{fA4>mhO+<8hUd2!Fu&AN&-_-?tQH}Qn*LX`jx(w znemoGCuS`PyH|Yd)&f`8X^h$d3nwK zFIP6Hri@!bXUoKlxpkj|etgpTl<09_`r^FVzxAKQn~NG(RBunYvpAHv4wu^ zA}mL9u6&=m=T*Z$M&1b@B;^@!gurA@Mg?7vr@0sufT6*_z{nuMu=MX^>6}-W7}4nf fZ$>8hi62!N|4$ZYbmU`VU}884)bbh_lne|2Y*Uoc diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/neutronNet/neutronNet.yml b/catalog-be/src/main/resources/import/tosca/heat-types/neutronNet/neutronNet.yml index 539e33991f..f5cf4fc642 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/neutronNet/neutronNet.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/neutronNet/neutronNet.yml @@ -1,4 +1,13 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: NeutronNetGlobalTypes + template_version: 1.0.0 +description: Neutron Network TOSCA Global Types +imports: + NetworkGlobalTypes: + file: NetworkGlobalTypesServiceTemplate.yaml + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vl.nodes.heat.network.neutron.Net: derived_from: org.openecomp.resource.vl.nodes.network.Network diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/neutronPort/neutronPort.yml b/catalog-be/src/main/resources/import/tosca/heat-types/neutronPort/neutronPort.yml index 34a74eb4c4..9451698add 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/neutronPort/neutronPort.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/neutronPort/neutronPort.yml @@ -1,4 +1,28 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: NeutronPortGlobalTypes + template_version: 1.0.0 +description: Neutron Port TOSCA Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml + PortGlobalTypes: + file: PortGlobalTypesServiceTemplate.yaml +data_types: + org.openecomp.datatypes.heat.neutron.port.FixedIps: + derived_from: tosca.datatypes.Root + description: subnet/ip_address + properties: + subnet: + type: string + description: Subnet in which to allocate the IP address for this port + required: false + status: SUPPORTED + ip_address: + type: string + description: IP address desired in the subnet for this port + required: false + status: SUPPORTED node_types: org.openecomp.resource.cp.nodes.heat.network.neutron.Port: derived_from: org.openecomp.resource.cp.nodes.network.Port @@ -131,6 +155,7 @@ node_types: type: tosca.capabilities.network.Bindable valid_source_types: - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface + - org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface occurrences: - 0 - UNBOUNDED \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/neutronPort/neutronPort.zip b/catalog-be/src/main/resources/import/tosca/heat-types/neutronPort/neutronPort.zip index e33365a8ca7de94c2f7f81eb43a0e852e8bc135a..5f33401e6be9e2906556f663205f8c986827cecf 100644 GIT binary patch literal 1288 zcmV+j1^4<;O9KQ70000808Vo8Ok5CJI*0@S0HG5A01p5F0B&V_t zedd5FR=|i%p>js6nKtfgu2(Ey>`Sn{gROx3f8GVz;XFWCTdiHaH~UXA37{0U-GHX;QWxdlNpql?-Bo$D`JyXIWSWVTuiq@6kknl3`2V0lBoi^WF*ZY_{>hbr`8lYKA|A?2pZqx#=jC6Ynimh@~ z?X@9STIayj2}^#-+1k50-o6#m`o961G|)sx+t#Emakv1VR8+pD`M>@ihihaqCOW%L zVT&uljd!@&BW6BNBVHv$(;bz2=JUshO2I4bhX|DmtSgTf`R4Co?5bj zcZPHugq2hRy)@b?$wQV7ccZ@=&U(#PfQeEmaftQUo-Q{4$8O~elgf3yc0;x-mxAJF z1-56H8&WX7b*$_!3KYy;e@$squ)J9dSk#ul-^NGLh3lE(@h7rF&l`+thaKBnLn@wE z0-B=g)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kw5KxT82)RMwj zJd%zC(|U0h9%^YpOi00$gP!2fu-c)D`}zF#>*8wKl6q6dVePSm^Pm%P2b9V3b0E}4 zz`;>O>6ir&u#5BH5pq}T>R(B{WD#f^XPa_+dO^GR98rO#KU>vQC zl6*T3$pZZl8X!h6!TDnDNFynhjQ1=SPlS06mxUsH1d$2_Q8Q`x%SB1&4?xa^h&>Zq z>*xIP?Vxs|s8#`D#sfU{YisJ&I)wbiZYG#m-fpSmYbcvJvV;479kef}yumw1xUGbx z)B>Y4*=WgQm5vW%V2yW!$zw1=eJ*i}T z<5{(PC{Qu?yJy z_yH$0tCgRS-$S5(PIAyLsdZHL*62Au+HFE2Bm1bU`iu`KGS0YN4OF?Jzq5cb6^s z{o?inbDmX9U$5rZ`Q;VOufOL%?sjN9db>fo!uD5<>af>H!j$RH+`IhJ}!%G>PwAm8Is>4??fFLmbgg}~!h0+8;qv9%(Q!N(+86Gq7S}v*L(Pme@@OCH z4DRKOY)gyv(V9L0kF$y`rIN#^VTx#&`%hrBUp5T6vb?+9Up5?PnFY;ZchbHaez?E+ zaC?6WNy9v*LiYmil^%UN?>rrFVF>$z`u0BicAei~4$L%e zxdm=T$8Ej%r>%bhP)h*bS`;qYzhD%000000096P03NZ?1^@s6009620ATuB00028tYG&5 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/novaServer/novaServer.yml b/catalog-be/src/main/resources/import/tosca/heat-types/novaServer/novaServer.yml index 2271c9cd06..1cbf98b1cd 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/novaServer/novaServer.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/novaServer/novaServer.yml @@ -1,4 +1,74 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: NovaServerGlobalTypes + template_version: 1.0.0 +description: Nova Server TOSCA Global Types +imports: + ComputeGlobalTypes: + file: ComputeGlobalTypesServiceTemplate.yaml + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml +data_types: + org.openecomp.datatypes.heat.novaServer.network.PortExtraProperties: + derived_from: tosca.datatypes.Root + description: Nova server network expand properties for port + properties: + port_security_enabled: + type: boolean + description: Flag to enable/disable port security on the port + required: false + status: SUPPORTED + mac_address: + type: string + description: MAC address to give to this port + required: false + status: SUPPORTED + admin_state_up: + type: boolean + description: The administrative state of this port + required: false + default: true + status: SUPPORTED + qos_policy: + type: string + description: The name or ID of QoS policy to attach to this port + required: false + status: SUPPORTED + allowed_address_pairs: + type: list + description: Additional MAC/IP address pairs allowed to pass through the port + required: false + status: SUPPORTED + entry_schema: + type: org.openecomp.datatypes.heat.network.AddressPair + binding:vnic_type: + type: string + description: The vnic type to be bound on the neutron port + required: false + status: SUPPORTED + constraints: + - valid_values: + - macvtap + - direct + - normal + value_specs: + type: map + description: Extra parameters to include in the request + required: false + default: { + } + status: SUPPORTED + entry_schema: + type: string + org.openecomp.datatypes.heat.novaServer.network.AddressInfo: + derived_from: tosca.datatypes.network.NetworkInfo + description: Network addresses with corresponding port id + properties: + port_id: + type: string + description: Port id + required: false + status: SUPPORTED node_types: org.openecomp.resource.vfc.nodes.heat.nova.Server: derived_from: org.openecomp.resource.vfc.nodes.Compute diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip index cbed61fcf5e5a73458aef01c8786e77498f75eb2..ca5650b8c9e25a6291ea9ea80b703b824dfb62f5 100644 GIT binary patch delta 36 qcmX@k`i^Ph*Po0clY^O5CyOu%P3~gS=VN4GWJqRUVE78e3=9C;LI}?Q delta 389 zcmaFIbey$5z?+#xgn@y9gTcU`-`h80=BA@S-WEm%1|c9_kY7~dn^{zpUzC}bu9sDu zpVvCUmcPkBpsif^zw_Z7p3d2`3yUro?2v2=(wcIif6H+Pp8t2VH8YN6Opkki@Ai_M>6|r-NqH{5B+WH0~i>Yx}u4K-7m*nbdvG5O{j-JDtbsS5ib?JqX>@|7xrG z!PDCx_Asq4;45FT<7Y_3fiKOfqN~?wi)qZ0{C_b?h$nf%mfPey+#1q61H2iT>?i(GW&Ao> Vfzg4FiGhjXIMBdXz%XWD00748kx&2t diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip index a11e4f7842a8e313fbd7cf071c2d17bf5f5f57d3..7a4ce51cfb0e2e0af2453896dbfdffb3825330e5 100644 GIT binary patch delta 38 scmeBWpTe@4mvK5HqsU}IX4T23n4~5LFzfR%GB7e^GcYhrW&{!p0IRqM1ONa4 delta 360 zcmbQj(#tL#;LXe;!oa}5!7w`@&HIJ54d+!L?-nBigVf}GjFRqJ_POiZH8NgxNyRUpK_8B&tt{IXXkF-sNj6s z|K5FL*X`U=_clytl(c8S<@XJY>bfAmb1^6Y!-Ii=kwJpN?hA)RAu62oV=gWosWruiQzg>(*h=tRsid$k|h8D diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/securityRules/securityRules.yml b/catalog-be/src/main/resources/import/tosca/heat-types/securityRules/securityRules.yml index 876b2f1388..8fd19097ef 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/securityRules/securityRules.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/securityRules/securityRules.yml @@ -1,4 +1,11 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: NeutronSecurityRulesGlobalTypes + template_version: 1.0.0 +description: Neutron Security Rules TOSCA Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules: derived_from: tosca.nodes.Root diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip index 9f0b60d1dfd86df2a96d1fc2221ec161d91415c3..55ffe94d9962c98d39cb40daa637b4aa54508269 100644 GIT binary patch delta 31 gcmZ3>@}6 zlKZTS(}S!WVyiUj9yV1iD>+oLl`Z_@{a2o~nqPl7O1|f)=h5X(Jhxou^s>K4YB|0w zW}4h-HsPyZhiO{}r>rWg7RT}vo8L^%`ffb`i|4Z%QC_{DcSSFFK4O(ypmlQ7SEt<9 zA69IrT%XYJ;l<*kM-I%7=*?-q$6X?^_GQJl;HmrDQ%wC0IqIKxD*f-SJ9o?P&C`Uv z@1q1{*u($+*ZL@t|2|;i9Q$BKCJ_eQfdC8#21W)2AUPX|F@hw(o0SbH&cFnOwLp3n IFzgr@0LwUwHUIzs diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/subInterface/subInterface.yml b/catalog-be/src/main/resources/import/tosca/heat-types/subInterface/subInterface.yml index 2356f82995..6f2d26afb9 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/subInterface/subInterface.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/subInterface/subInterface.yml @@ -1,4 +1,11 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: SubInterfaceGlobalTypes + template_version: 1.0.0 +description: Sub Interafce TOSCA Global Types +imports: + common_definitions: + file: CommonGlobalTypesServiceTemplate.yaml node_types: org.openecomp.resource.cp.nodes.network.SubInterface: derived_from: tosca.nodes.network.Port \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.json b/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.json new file mode 100644 index 0000000000..2b7d98c171 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.json @@ -0,0 +1,15 @@ +{ + "payloadName": "subInterfaceV2.yml", + "contactId": "jh0003", + "name": "subInterfaceV2", + "description": "VLAN sub-Interface is a logical port which must be binded to a port. Regular port may have 1…N VLAN Interfaces.It can connect to its own network (regardless of the network the parent port can connect)", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [{ + "name": "Generic", + "subcategories": [{ + "name": "Network Elements" + }] + }], + "tags": ["subInterfaceV2"] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.yml b/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.yml new file mode 100644 index 0000000000..7c19089242 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.yml @@ -0,0 +1,45 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.nodes.network.v2.SubInterface: + derived_from: tosca.nodes.Root + properties: + ip_address: + description: Allow the user to set a fixed IP address. Note that this address is a request to the provider which they will attempt to fulfill but may not be able to dependent on the network the port is associated with. + type: string + required: false + order: + description: 'The order of the NIC on the compute instance (e.g. eth2). Note: + when binding more than one port to a single compute (aka multi vNICs) and + ordering is desired, it is *mandatory* that all ports will be set with an + order value and. The order values must represent a positive, arithmetic + progression that starts with 0 (e.g. 0, 1, 2, ..., n).' + type: integer + default: 0 + required: false + constraints: + - greater_or_equal: 0 + is_default: + description: Set is_default=true to apply a default gateway route on the running compute instance to the associated network gateway. Only one port that is associated to single compute node can set as default=true. + type: boolean + default: false + required: false + ip_range_start: + description: Defines the starting IP of a range to be allocated for the compute instances that are associated by this Port. Without setting this property the IP allocation is done from the entire CIDR block of the network. + type: string + required: false + ip_range_end: + description: Defines the ending IP of a range to be allocated for the compute instances that are associated by this Port. Without setting this property the IP allocation is done from the entire CIDR block of the network. + type: string + required: false + attributes: + ip_address: + description: The IP address would be assigned to the associated compute instance. + type: string + requirements: + - subinterface_link: + capability: tosca.capabilities.network.Linkable + relationship: tosca.relationships.network.LinksTo + - binding: + capability: tosca.capabilities.network.Bindable + relationship: tosca.relationships.network.BindsTo + diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.zip b/catalog-be/src/main/resources/import/tosca/heat-types/subInterfaceV2/subInterfaceV2.zip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3}$XY`!5~6%*b%e;LI^3I>4Ki4P*c#5T*d>3SiD= GU;qHFO13uu literal 0 HcmV?d00001 diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/vnfConfiguration/vnfConfiguration.zip b/catalog-be/src/main/resources/import/tosca/heat-types/vnfConfiguration/vnfConfiguration.zip index 03a7d535f2edbf2a2690484dd6830597be302ce8..eb763dadf476174a410e6cbdf260aec0751fa9fd 100644 GIT binary patch delta 46 zcmey)I)#}fz?+$6awC((VhKh@Mv=)4OsbRZm_#SGz7q3qOd6O6!7({_|SzelReqLH;dTCK&NoIbY zURH5_Ug-ow?n4Fwt>2seE2fBP?%3J6phT1JlB?C6ms@+cc*6}_YMCAJat?h6lU8vH7d7lTm8fA_aae|0%n?S_xJWau8_8R z#V>PJecA=>z~8`jl4y diff --git a/catalog-be/src/main/resources/import/tosca/interface-lifecycle-types/interfaceLifecycleTypes.zip b/catalog-be/src/main/resources/import/tosca/interface-lifecycle-types/interfaceLifecycleTypes.zip index 574a4844d36e3ce7e4607df38d0dfbeedde9599a..f9894d68bfbd94c7e1989b9b42a04cbdebb42a04 100644 GIT binary patch delta 535 zcmaFOvY$mZz?+$ci-CcGgF&VEqtC?E7uPRmWMI(ZWMGhHV3;T?Q$Kg=>Ab@V0K$QvDa!2^PG0xTE~O0CQXnOcpxU> zdF-Mtufp#e_B*e>m(sEhefDm0{l@Ym^A%1ybev&nI4V2G`+9-f?)-CH!oT)>Kd|Pw zLRYRKgRsRiM~`_c13pdCE;(oX{bdXL;W*oOtKYb}24uhNf4g1fdZ}S=c>_M69r}*yQ<~8YZ8!d1&pGj*DZrbNNrVAsWC9}@1QZm&6fkPV0=!w-KpaLO N^aRomfHBX&006Vj@gx8M literal 619 zcmWIWW@Zs#-~hss=U$q2@& z2CKGo6`U=LxGXO6CP>JLnduIb@=1$bOXX7Jf3J=HyU!u@_^CU!M&BBL2&+hPOzdRX zP|;BQQpzvm``O4ur}^LcW_)?!x>2_(f#tXf$4O&RuejpYbCu8R=6*=HvHE!J)Vm8f zvd;e9`1je9O?t~dF7lpZA*VQf*7XuY&#mTiU$<^Iw^?EH?btQh;9_5&v(_ zm<^VlbC}!kdI|e)p0}4}-11~Lem1+w*Ew^`+1;O=)N}Q%O^&1lPV7y`T*nM9cpDF9hcnt=zF9vqf5f|z*I0|z`k1bDNufs``>VJL{f1R?-2i}d*b diff --git a/catalog-be/src/main/resources/import/tosca/normative-types/loadBalancer/loadBalancer.zip b/catalog-be/src/main/resources/import/tosca/normative-types/loadBalancer/loadBalancer.zip index 3a847c6f564a87fa55395bf2bce4596ed4acb1fa..3ae6e5d07666653403f1796a7ba194acaccc9cfd 100644 GIT binary patch literal 458 zcmWIWW@h1HU|`^2*i!n@=kOBlP7g)~h6zjz3<5yWoczQTr^KAZyyVm(y~^C2+Q74Z zOojscCV$|YTyfEbGw!>`fg?v03=52wY2Ia2E3@7@*LCMlseSYOlghc@y=uH&w(sY& z-;ob9wrCYP_qE(`-FjT$vOD7?r-@qmfwCp3SJz6d{#fu}hl?tE|Hg)g44)pYn0f3X z^XsBTYs=W2FE%i!vfWBvY1X*<(fLopn;qglHQKT*EHUP1&`YqKIZy6Zp5=r$T0f3X zF8CDSFvTJ7wlDL(t0Eh85*Ftk;pq_g!j7I_JZ_C zZ!Xs9-@8{Y?tg!NJ;$4 SHjoS>5ZVFhGGL4`FaQAV<-9Ne delta 388 zcmX@byoOmiz?+#xgn@y9gTXOB)Z_9S#{w-z1_l=<1_pu23mJv$YXc4am<2R4mjY1x;;+x+goY>hjUZWnQ>sB4Pone>28U;DFXgB^CewBHK|vgJt7 z{5WyVy`>jc#Xos2z@nwOOrTzqbNbv;h62{vPyaq`%99s5y|7h&kHmByu1zZ6eizPq zvGuV_*g?M7Wr8P~E=@i2C2q|QRs9!QSq6`$$$tO0xUn$Cg6p5uHLhUa&ku5W-YktQ zk3OCjGG&%p;gnyC*qhwN1H9sP#I4OgCl)V1U$RO5gM|)*|0l6a-k#46vb;a(5%O_u z^?BCcOqD+6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JYV>`Bpu?}MyL`)nLva5)TMz$HUr0j|b zgPE~S7+JEpc3`+>ti>>>d0PiNaS*#Lf%C_oSp;fL~$ zLWYG#1|q{9W5fL-)nh|YPA3H0EVGBl{o{t0aw|S;X26hX zt(Ej68kO2725G;OKZR;a#A3o$Yj;Q%Hs=wZL-Ico?(PFZc*?P+b4LIL3dldfFJ38O_I1aZ-i zgxDGG1^I;x!dkT2Q7(UQ&G&iIXzZx7J=P&S*C5AY=_T#>!FP&~;(UhNI%#23h=2df z3P5gNFK^fdh-pjD=JF|zd+8OU<{`N!Xh2L!@qT!l&@V1Ey%>28H+}kY?#Xw9zp z*f%eHq4WxdgW0EeyFv@#23J>7v7lz=S~wV)^eAm_97D_iUk5qe)qm~poZalq!Md$8 zJX3-_#|dPg9%GOXl9L7to4$b-ru^4MVs_I76NdchwS`R2@;OB|Lrm$c<{3UhOfy+(XJ>;B)1D@ie)a3qGrOGE&S3DqbL`i`ZrmuF@ zx2nl+8c8oTw)U_ zicLzT0JjDKC38<=bjE?S>0i}GF$fOTi^{ChYv8xVPpTr2^HBwrq!>%YEh&li?-D*u1dT6aRrmXWG_i8bmE>++W9Oo3p|W))GsU9=H!ghs^A=;jaJ(#U z1}!~r9BwNxw>vgYjY0*gw$H{O{m11Fef>RO@$FmgJA~@B6F7_u+@kBm zeZ&p`=!*aVa2SwH6!afZf4_+Wc>lqx2_E}v{2#o6|HUgD#=-gP5%|-#Kiih$*Y-CR C0k$*% diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py new file mode 100644 index 0000000000..5f0d4ad421 --- /dev/null +++ b/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py @@ -0,0 +1,35 @@ +import sys + +from importCommon import parse_cmd_line_params +from importNormativeElements import import_element + +IMPORT_ANNOTATION_URL = "/sdc2/rest/v1/catalog/uploadType/annotationtypes" +ANNOTATION_FILE_PATH = "../../../import/tosca/annotation-types/" +ANNOTATION_ZIP_FILE = "annotationTypesZip" +ANNOTATION_ELEMENT_NAME = "annotationTypes" + +##################################################################################################################################################################################### +# # +# Import tosca data types # +# # +# activation : # +# python importAnnotaionTypes.py [-s | --scheme= ] [-i | --ip=] [-p | --port= ] [-f | --ifile= ] # +# # +# shortest activation (be host = localhost, be port = 8080): # +# python importAnnotaionTypes.py [-f | --ifile= ] # +# # +##################################################################################################################################################################################### + + +def import_annotation_types(scheme, be_host, be_port, admin_user, exit_on_success): + import_element(scheme, be_host, be_port, admin_user, exit_on_success, ANNOTATION_FILE_PATH, IMPORT_ANNOTATION_URL, + ANNOTATION_ELEMENT_NAME, ANNOTATION_ZIP_FILE) + + +def main(argv): + scheme, be_host, be_port, admin_user = parse_cmd_line_params(argv) + import_annotation_types(scheme, be_host, be_port, admin_user, True) + + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py index 2f3237173c..9ef8b4a200 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py @@ -25,15 +25,15 @@ def usage(): def importCategories(scheme, beHost, bePort, adminUser, exitOnSuccess, fileDir): result = createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, "/sdc2/rest/v1/catalog/uploadType/categories", "categoryTypes", "categoriesZip") - printFrameLine() - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() if ( result[1] == None or result[1] not in [200, 201, 409] ): - errorAndExit(1, None) + error_and_exit(1, None) else: if (exitOnSuccess == True): - errorAndExit(0, None) + error_and_exit(0, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -47,7 +47,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:h:s:",["ip=","port=","user=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py b/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py index acdb067849..ed92ca8b3d 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py @@ -11,33 +11,79 @@ import copy debugFlag = True + def join_strings(lst): concat = "" for string in lst: - if (string != None): - if (type(string) == int): - string = str(string) - concat += (string + " ") + if string is not None: + if type(string) == int: + string = str(string) + concat += (string + " ") return concat + def debug(desc, *args): - 'print only if debug enabled' - if (debugFlag == True): - print desc, join_strings(args) + if debugFlag: + print desc, join_strings(args) + def log(desc, arg=None): - 'print log info' - print desc, arg + print desc, arg + + +def error_and_exit(error_code, error_desc): + if error_code > 0: + print "status={0}. {1}".format(error_code, '' if error_desc is None else error_desc) + else: + print "status={0}".format(error_code) + sys.exit(error_code) + + +def print_name_and_return_code(name, code): + print "{0:30} | {1:6}".format(name, code) + + +def print_frame_line(): + print "----------------------------------------" + + +def parse_cmd_line_params(argv): + print 'Number of arguments:', len(sys.argv), 'arguments.' + + be_host = 'localhost' + be_port = '8080' + admin_user = 'jh0003' + scheme = 'http' + + try: + opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="]) + except getopt.GetoptError: + usage() + error_and_exit(2, 'Invalid input') + + for opt, arg in opts: + # print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + be_host = arg + elif opt in ("-p", "--port"): + be_port = arg + elif opt in ("-u", "--user"): + admin_user = arg + elif opt in ("-s", "--scheme"): + scheme = arg + + print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user -def errorAndExit(errorCode, errorDesc): - if ( errorCode > 0 ): - print "status={0}. {1}".format(errorCode, '' if errorDesc == None else errorDesc) - else: - print "status={0}".format(errorCode) - sys.exit(errorCode) + if be_host is None: + usage() + sys.exit(3) + return scheme, be_host, be_port, admin_user -def printNameAndReturnCode(name, code): - print "{0:30} | {1:6}".format(name, code) -def printFrameLine(): - print "----------------------------------------" +def usage(): + print sys.argv[ + 0], '[optional -s | --scheme=, default http ] [-i | --ip=] [-p ' \ + '| --port= ] [-u | --user= ] ' diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py index ef51a907d5..bc68297383 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py @@ -25,15 +25,15 @@ def usage(): def importDataTypes(scheme, beHost, bePort, adminUser, exitOnSuccess, fileDir): result = createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, "/sdc2/rest/v1/catalog/uploadType/datatypes", "dataTypes", "dataTypesZip") - printFrameLine() - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() if ( result[1] == None or result[1] not in [200, 201, 409] ): - errorAndExit(1, None) + error_and_exit(1, None) else: if (exitOnSuccess == True): - errorAndExit(0, None) + error_and_exit(0, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -47,7 +47,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:h:s:",["ip=","port=","user=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py index 9daa990fc5..0a94bbef95 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py @@ -1,11 +1,10 @@ -import pycurl -import sys, getopt -from StringIO import StringIO -import json -import copy -from importNormativeElements import createNormativeElement +import getopt +import sys from importCommon import * +from importNormativeElements import createNormativeElement + + ##################################################################################################################################################################################### # # # Import tosca data types # @@ -19,59 +18,61 @@ from importCommon import * ##################################################################################################################################################################################### def usage(): - print sys.argv[0], '[optional -s | --scheme=, default http ] [-i | --ip=] [-p | --port= ] [-u | --user= ]' + print sys.argv[ + 0], '[optional -s | --scheme=, default http ] [-i | --ip=] [-p | --port= ] [-u | --user= ]' + +def importGroupTypes(scheme, be_host, be_port, admin_user, exit_on_success, file_dir): + result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, + "/sdc2/rest/v1/catalog/uploadType/grouptypes", "groupTypes", "groupTypesZip", True) -def importGroupTypes(scheme, beHost, bePort, adminUser, exitOnSuccess, fileDir): - result = createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, "/sdc2/rest/v1/catalog/uploadType/grouptypes", "groupTypes", "groupTypesZip") + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() - printFrameLine() - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + if result[1] is None or result[1] not in [200, 201, 409]: + error_and_exit(1, None) + else: + if exit_on_success: + error_and_exit(0, None) - if ( result[1] == None or result[1] not in [200, 201, 409] ): - errorAndExit(1, None) - else: - if (exitOnSuccess == True): - errorAndExit(0, None) def main(argv): - print 'Number of arguments:', len(sys.argv), 'arguments.' - - beHost = 'localhost' - bePort = '8080' - adminUser = 'jh0003' - scheme = 'http' - - try: - opts, args = getopt.getopt(argv,"i:p:u:h:s:",["ip=","port=","user=","scheme="]) - except getopt.GetoptError: - usage() - errorAndExit(2, 'Invalid input') - - for opt, arg in opts: - #print opt, arg - if opt == '-h': - usage() - sys.exit(3) - elif opt in ("-i", "--ip"): - beHost = arg - elif opt in ("-p", "--port"): - bePort = arg - elif opt in ("-u", "--user"): - adminUser = arg - elif opt in ("-s", "--scheme"): - scheme = arg - - print 'scheme =',scheme,', be host =',beHost,', be port =', bePort,', user =', adminUser - - if ( beHost == None ): - usage() - sys.exit(3) - - importGroupTypes(scheme, beHost, bePort, adminUser, True, "../../../import/tosca/group-types/") + print 'Number of arguments:', len(sys.argv), 'arguments.' + be_host = 'localhost' + be_port = '8080' + admin_user = 'jh0003' + scheme = 'http' -if __name__ == "__main__": - main(sys.argv[1:]) + try: + opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="]) + except getopt.GetoptError: + usage() + error_and_exit(2, 'Invalid input') + for opt, arg in opts: + # print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + be_host = arg + elif opt in ("-p", "--port"): + be_port = arg + elif opt in ("-u", "--user"): + admin_user = arg + elif opt in ("-s", "--scheme"): + scheme = arg + + print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user + + if be_host is None: + usage() + sys.exit(3) + + importGroupTypes(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/group-types/") + + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py index 4490fec61a..74ecf71784 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py @@ -59,7 +59,15 @@ def importHeatTypes(scheme, beHost, bePort, adminUser, fileDir, updateversion): "extNeutronCP", "extContrailCP", "portMirroringByPolicy", - "forwardingPath" + "forwardingPath", + "VRFObject", + "extVirtualMachineInterfaceCP", + "VLANNetworkReceptor", + "VRFEntry", + "subInterfaceV2", + "contrailV2VLANSubInterfaceV2", + "configuration", + "fabricConfiguration" ] responseCodes = [200, 201] @@ -89,7 +97,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:v:h:s:",["ip=","port=","user=","updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -128,9 +136,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py index 8e63d86140..3de471935e 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py @@ -68,7 +68,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:v:h:",["ip=","port=","user=","updateversion="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -107,9 +107,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py b/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py index 7d0b7c526a..24218b6a73 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py @@ -95,7 +95,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:l:e:h:s:",["ip=","port=","user=","location=","element=", "debug=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -153,9 +153,9 @@ def main(argv): if ( result[1] == None or result[1] not in [200, 201] ) : print "Failed creating normative type " + element + ". " + str(result[1]) - errorAndExit(1, None) + error_and_exit(1, None) - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py index d57c3d6ce4..8a8329027f 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py @@ -4,20 +4,20 @@ from StringIO import StringIO import json import copy import time -#from importNormativeElements import createNormativeElement -from importNormativeElements import * +from importNormativeElements import * from importNormativeTypes import importNormativeTypes from importHeatTypes import importHeatTypes -from importOnapTypes import importOnapTypes from importNormativeCapabilities import importNormativeCapabilities from importCategoryTypes import importCategories from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType from importDataTypes import importDataTypes from importGroupTypes import importGroupTypes from importPolicyTypes import importPolicyTypes +from importAnnotationTypes import import_annotation_types from importCommon import * import importCommon + ################################################################################################################################################################################################################################# # # # Import all users from a given file # @@ -32,108 +32,114 @@ import importCommon ################################################################################################################################################################################################################################# def usage(): - print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] [-v | --updateversion=]' + print sys.argv[ + 0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] [-v | --updateversion=]' + def handleResults(results, updateversion): - printFrameLine() - for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() - - responseCodes = [200, 201] - - if(updateversion == 'false'): - responseCodes = [200, 201, 409] - - failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) - if (len(failedResults) > 0): - errorAndExit(1, None) + print_frame_line() + for result in results: + print_name_and_return_code(result[0], result[1]) + print_frame_line() + + responseCodes = [200, 201] + + if (updateversion == 'false'): + responseCodes = [200, 201, 409] + + failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) + if (len(failedResults) > 0): + error_and_exit(1, None) + def main(argv): - print 'Number of arguments:', len(sys.argv), 'arguments.' - - beHost = 'localhost' - bePort = '8080' - adminUser = 'jh0003' - debugf = None - updateversion = 'true' - importCommon.debugFlag = False - scheme = 'http' - - try: - opts, args = getopt.getopt(argv,"i:p:u:d:v:h:s:",["ip=","port=","user=","debug=","updateversion=","scheme="]) - except getopt.GetoptError: - usage() - errorAndExit(2, 'Invalid input') - - for opt, arg in opts: - #print opt, arg - if opt == '-h': - usage() - sys.exit(3) - elif opt in ("-i", "--ip"): - beHost = arg - elif opt in ("-p", "--port"): - bePort = arg - elif opt in ("-u", "--user"): - adminUser = arg - elif opt in ("-s", "--scheme"): - scheme = arg - elif opt in ("-d", "--debug"): - print arg - debugf = bool(arg.lower() == "true" or arg.lower() == "yes") - elif opt in ("-v", "--updateversion"): - print arg - if (arg.lower() == "false" or arg.lower() == "no"): - updateversion = 'false' - - print 'scheme =',scheme,', be host =',beHost,', be port =', bePort,', user =', adminUser, ', debug =', debugf, ', updateversion =', updateversion - - if (debugf != None): - print 'set debug mode to ' + str(debugf) - importCommon.debugFlag = debugf - - if ( beHost == None ): - usage() - sys.exit(3) - - print sys.argv[0] - pathdir = os.path.dirname(os.path.realpath(sys.argv[0])) - debug("path dir =" + pathdir) - - baseFileLocation = pathdir + "/../../../import/tosca/" - - fileLocation = baseFileLocation + "data-types/" - importDataTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - - print 'sleep until data type cache is updated' - time.sleep( 70 ) - - fileLocation = baseFileLocation + "capability-types/" - importNormativeCapabilities(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "interface-lifecycle-types/" - importNormativeInterfaceLifecycleType(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "categories/" - importCategories(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "normative-types/" - results = importNormativeTypes(scheme, beHost, bePort, adminUser, fileLocation, updateversion) - handleResults(results, updateversion) - - fileLocation = baseFileLocation + "heat-types/" - resultsHeat = importHeatTypes(scheme, beHost, bePort, adminUser, fileLocation, updateversion) - handleResults(resultsHeat, updateversion) - - fileLocation = baseFileLocation + "group-types/" - importGroupTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "policy-types/" - importPolicyTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - - errorAndExit(0, None) + print 'Number of arguments:', len(sys.argv), 'arguments.' + + beHost = 'localhost' + bePort = '8080' + adminUser = 'jh0003' + debugf = None + updateversion = 'true' + importCommon.debugFlag = False + scheme = 'http' + + try: + opts, args = getopt.getopt(argv, "i:p:u:d:v:h:s:", + ["ip=", "port=", "user=", "debug=", "updateversion=", "scheme="]) + except getopt.GetoptError: + usage() + error_and_exit(2, 'Invalid input') + + for opt, arg in opts: + # print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + beHost = arg + elif opt in ("-p", "--port"): + bePort = arg + elif opt in ("-u", "--user"): + adminUser = arg + elif opt in ("-s", "--scheme"): + scheme = arg + elif opt in ("-d", "--debug"): + print arg + debugf = bool(arg.lower() == "true" or arg.lower() == "yes") + elif opt in ("-v", "--updateversion"): + print arg + if (arg.lower() == "false" or arg.lower() == "no"): + updateversion = 'false' + + print 'scheme =', scheme, ', be host =', beHost, ', be port =', bePort, ', user =', adminUser, ', debug =', debugf, ', updateversion =', updateversion + + if (debugf != None): + print 'set debug mode to ' + str(debugf) + importCommon.debugFlag = debugf + + if (beHost == None): + usage() + sys.exit(3) + + print sys.argv[0] + pathdir = os.path.dirname(os.path.realpath(sys.argv[0])) + debug("path dir =" + pathdir) + + baseFileLocation = pathdir + "/../../../import/tosca/" + + fileLocation = baseFileLocation + "data-types/" + importDataTypes(scheme, beHost, bePort, adminUser, False, fileLocation) + + print 'sleep until data type cache is updated' + time.sleep(70) + + fileLocation = baseFileLocation + "capability-types/" + importNormativeCapabilities(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "interface-lifecycle-types/" + importNormativeInterfaceLifecycleType(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "categories/" + importCategories(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "normative-types/" + results = importNormativeTypes(scheme, beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(results, updateversion) + + fileLocation = baseFileLocation + "heat-types/" + resultsHeat = importHeatTypes(scheme, beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + fileLocation = baseFileLocation + "group-types/" + importGroupTypes(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "policy-types/" + importPolicyTypes(scheme, beHost, bePort, adminUser, False, fileLocation) + + import_annotation_types(scheme, beHost, bePort, adminUser, False) + + error_and_exit(0, None) -if __name__ == "__main__": - main(sys.argv[1:]) +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py index e4f92139c2..e0f5c40ac9 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py @@ -27,15 +27,15 @@ def usage(): def importNormativeCapabilities(scheme, beHost, bePort, adminUser, exitOnSuccess, fileDir): result = createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, "/sdc2/rest/v1/catalog/uploadType/capability", "capabilityTypes", "capabilityTypeZip") - printFrameLine() - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() if ( result[1] == None or result[1] not in [200, 201, 409] ): - importCommon.errorAndExit(1, None) + importCommon.error_and_exit(1, None) else: if (exitOnSuccess == True): - importCommon.errorAndExit(0, None) + importCommon.error_and_exit(0, None) def main(argv): @@ -50,7 +50,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:h:s:",["ip=","port=","user=","scheme="]) except getopt.GetoptError: usage() - importCommon.errorAndExit(2, 'Invalid input') + importCommon.error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py index c28bbfb143..f9f5cd5320 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py @@ -1,9 +1,10 @@ import pycurl -import sys, getopt from StringIO import StringIO import json import copy from importCommon import * + + ################################################################################################################################################################################# # # # Import all users from a given file # @@ -15,55 +16,86 @@ from importCommon import * # python importUsers.py [-f | --ifile= ] # # # ################################################################################################################################################################################# +def import_element(scheme, be_host, be_port, admin_user, exit_on_success, file_dir, url_suffix, element_name, element_form_name, + with_metadata=False): + result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, url_suffix, element_name, element_form_name, with_metadata) + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() + + if result[1] is None or result[1] not in [200, 201, 409]: + error_and_exit(1, None) + else: + if exit_on_success: + error_and_exit(0, None) + + +def createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, url_suffix, element_name, element_form_name, + with_metadata=False): + try: + log("in create normative element ", element_name) + buffer = StringIO() + c = pycurl.Curl() + + url = scheme + '://' + be_host + ':' + be_port + url_suffix + c.setopt(c.URL, url) + c.setopt(c.POST, 1) + + admin_header = 'USER_ID: ' + admin_user + c.setopt(pycurl.HTTPHEADER, [admin_header]) + + type_file_name = file_dir + "/" + element_name + + multi_part_form_data = create_multipart_form_data(element_form_name, type_file_name, with_metadata) + + c.setopt(pycurl.HTTPPOST, multi_part_form_data) + c.setopt(c.WRITEFUNCTION, buffer.write) -def createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, urlSuffix, ELEMENT_NAME, elementFormName): - - try: - log("in create normative element ", ELEMENT_NAME) + if scheme == 'https': + c.setopt(c.SSL_VERIFYPEER, 0) - buffer = StringIO() - c = pycurl.Curl() + c.perform() - url = scheme + '://' + beHost + ':' + bePort + urlSuffix - c.setopt(c.URL, url) - c.setopt(c.POST, 1) + http_res = c.getinfo(c.RESPONSE_CODE) + if http_res is not None: + debug("http response=", http_res) + debug("response buffer", buffer.getvalue()) + c.close() + return (element_name, http_res, buffer.getvalue()) - adminHeader = 'USER_ID: ' + adminUser - #c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json', adminHeader]) - c.setopt(pycurl.HTTPHEADER, [adminHeader]) + except Exception as inst: + print("ERROR=" + str(inst)) + return (element_name, None, None) - - path = fileDir + "/" + ELEMENT_NAME + ".zip" - debug(path) - send = [(elementFormName, (pycurl.FORM_FILE, path))] - debug(send) - c.setopt(pycurl.HTTPPOST, send) +def create_multipart_form_data(element_form_name, type_file_name, with_metadata): + tosca_type_zip_part = create_zip_file_multi_part(element_form_name, type_file_name) + multi_part_form_data = [tosca_type_zip_part] + if with_metadata: + metadata_type_part = create_metadata_multipart(type_file_name) + multi_part_form_data.append(metadata_type_part) + debug(multi_part_form_data) + return multi_part_form_data - #data = json.dumps(user) - #c.setopt(c.POSTFIELDS, data) - #c.setopt(c.WRITEFUNCTION, lambda x: None) - c.setopt(c.WRITEFUNCTION, buffer.write) +def create_metadata_multipart(type_file_name): + metadata = create_json_metadata_str(type_file_name) + return ("toscaTypeMetadata", metadata) - if scheme == 'https': - c.setopt(c.SSL_VERIFYPEER, 0) - #print("before perform") - res = c.perform() - - #print("Before get response code") - httpRes = c.getinfo(c.RESPONSE_CODE) - if (httpRes != None): - debug("http response=", httpRes) - #print('Status: ' + str(responseCode)) - debug("response buffer", buffer.getvalue()) - c.close() +def create_zip_file_multi_part(element_form_name, type_file_name): + tosca_type_zip_path = type_file_name + ".zip" + tosca_type_zip_part = (element_form_name, (pycurl.FORM_FILE, tosca_type_zip_path)) + return tosca_type_zip_part - return (ELEMENT_NAME, httpRes, buffer.getvalue()) - except Exception as inst: - print("ERROR=" + str(inst)) - return (ELEMENT_NAME, None, None) +def create_json_metadata_str(file_name): + type_metadata_json_file = file_name + ".json" + debug(type_metadata_json_file) + json_file = open(type_metadata_json_file) + debug("before load json") + json_data = json.load(json_file, strict=False) + debug(json_data) + return json.dumps(json_data) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py index a6ab5741e4..89862f7df6 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py @@ -25,15 +25,15 @@ def usage(): def importNormativeInterfaceLifecycleType(scheme, beHost, bePort, adminUser, exitOnSuccess, fileDir): result = createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, "/sdc2/rest/v1/catalog/uploadType/interfaceLifecycle", "interfaceLifecycleTypes", "interfaceLifecycleTypeZip") - printFrameLine() - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() if ( result[1] == None or result[1] not in [200, 201, 409] ): - errorAndExit(1, None) + error_and_exit(1, None) else: if (exitOnSuccess == True): - errorAndExit(0, None) + error_and_exit(0, None) def main(argv): @@ -48,7 +48,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:h:s:",["ip=","port=","user=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py index 1061df862c..c288d550f7 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py @@ -34,10 +34,10 @@ def usage(): print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] [-v | --updateversion=]' def handleResults(results, updateversion): - printFrameLine() + print_frame_line() for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_name_and_return_code(result[0], result[1]) + print_frame_line() responseCodes = [200, 201] @@ -46,7 +46,7 @@ def handleResults(results, updateversion): failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedResults) > 0): - errorAndExit(1, None) + error_and_exit(1, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -63,7 +63,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:v:h:s:",["ip=","port=","user=","debug=","updateversion=", "scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -131,7 +131,7 @@ def main(argv): fileLocation = baseFileLocation + "policy-types/" importPolicyTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py index 5b7b52d0a1..51d36586bc 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py @@ -116,7 +116,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:v:h:s:",["ip=","port=","user=","updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -155,9 +155,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py index 6144d69104..ef1fe4d3b9 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py @@ -37,19 +37,20 @@ def usage(): print sys.argv[0], '[-s | --scheme= ] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] [-v | --updateversion=]' def handleResults(results, updateversion): - printFrameLine() - for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() - - responseCodes = [200, 201] - - if(updateversion == 'false'): - responseCodes = [200, 201, 409] - - failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) - if (len(failedResults) > 0): - errorAndExit(1, None) + if results is not None: + print_frame_line() + for result in results: + print_name_and_return_code(result[0], result[1]) + print_frame_line() + + responseCodes = [200, 201] + + if(updateversion == 'false'): + responseCodes = [200, 201, 409] + + failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) + if (len(failedResults) > 0): + error_and_exit(1, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -66,7 +67,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:v:h",["ip=","port=","user=","debug=","updateversion="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -146,7 +147,7 @@ def main(argv): fileLocation = baseFileLocation + "policy-types/" importPolicyTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py index f703b4b4ac..395b42d696 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py @@ -51,7 +51,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:v:h:",["ip=","port=","user=","updateversion="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -90,9 +90,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py index 103ad2d1da..1bd6befbf7 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py @@ -1,11 +1,10 @@ -import pycurl -import sys, getopt -from StringIO import StringIO -import json -import copy -from importNormativeElements import createNormativeElement +import getopt +import sys from importCommon import * +from importNormativeElements import createNormativeElement + + ##################################################################################################################################################################################### # # # Import tosca data types # @@ -19,59 +18,62 @@ from importCommon import * ##################################################################################################################################################################################### def usage(): - print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ]' + print sys.argv[ + 0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ]' + +def importPolicyTypes(scheme, be_host, be_port, admin_user, exit_on_success, file_dir): + result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, + "/sdc2/rest/v1/catalog/uploadType/policytypes", "policyTypes", "policyTypesZip", + True) -def importPolicyTypes(scheme, beHost, bePort, adminUser, exitOnSuccess, fileDir): - result = createNormativeElement(scheme, beHost, bePort, adminUser, fileDir, "/sdc2/rest/v1/catalog/uploadType/policytypes", "policyTypes", "policyTypesZip") + print_frame_line() + print_name_and_return_code(result[0], result[1]) + print_frame_line() - printFrameLine() - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + if result[1] is None or result[1] not in [200, 201, 409]: + error_and_exit(1, None) + else: + if exit_on_success: + error_and_exit(0, None) - if ( result[1] == None or result[1] not in [200, 201, 409] ): - errorAndExit(1, None) - else: - if (exitOnSuccess == True): - errorAndExit(0, None) def main(argv): - print 'Number of arguments:', len(sys.argv), 'arguments.' - - beHost = 'localhost' - bePort = '8080' - adminUser = 'jh0003' - scheme = 'http' - - try: - opts, args = getopt.getopt(argv,"i:p:u:h:s:",["ip=","port=","user=", "scheme="]) - except getopt.GetoptError: - usage() - errorAndExit(2, 'Invalid input') - - for opt, arg in opts: - #print opt, arg - if opt == '-h': - usage() - sys.exit(3) - elif opt in ("-i", "--ip"): - beHost = arg - elif opt in ("-p", "--port"): - bePort = arg - elif opt in ("-u", "--user"): - adminUser = arg - elif opt in ("-s", "--scheme"): - scheme = arg - - print 'scheme =',scheme,', be host =',beHost,', be port =', bePort,', user =', adminUser - - if ( beHost == None ): - usage() - sys.exit(3) - - importPolicyTypes(scheme, beHost, bePort, adminUser, True, "../../../import/tosca/policy-types/") + print 'Number of arguments:', len(sys.argv), 'arguments.' + be_host = 'localhost' + be_port = '8080' + admin_user = 'jh0003' + scheme = 'http' -if __name__ == "__main__": - main(sys.argv[1:]) + try: + opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="]) + except getopt.GetoptError: + usage() + error_and_exit(2, 'Invalid input') + for opt, arg in opts: + # print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + be_host = arg + elif opt in ("-p", "--port"): + be_port = arg + elif opt in ("-u", "--user"): + admin_user = arg + elif opt in ("-s", "--scheme"): + scheme = arg + + print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user + + if be_host is None: + usage() + sys.exit(3) + + importPolicyTypes(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/policy-types/") + + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py index 0015a26655..24479c4f6b 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py @@ -51,7 +51,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:v:h:",["ip=","port=","user=","updateversion="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -90,9 +90,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py b/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py index 8e69ffcf49..23e854bcb8 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py @@ -129,7 +129,7 @@ def createUser(scheme, beHost, bePort, user, adminUser): return (userId, None) -def errorAndExit(errorCode, errorDesc): +def error_and_exit(errorCode, errorDesc): if ( errorCode > 0 ): print("status=" + str(errorCode) + ". " + errorDesc) else: @@ -153,7 +153,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:f:h:s:",["ip=","port=","ifile=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -204,7 +204,7 @@ def main(argv): if ( len(result) > 0 ): #print("ERROR: Failed to load the users " + ', '.join(map(lambda x: x[0],result))) - errorAndExit(3, "Failed to load the users " + ', '.join(map(lambda x: x[0],result))) + error_and_exit(3, "Failed to load the users " + ', '.join(map(lambda x: x[0],result))) g = lambda x: x[1] == 409 result = filter(g, resultTable) @@ -222,7 +222,7 @@ def main(argv): print("Loaded users: " + ', '.join(map(lambda x: x[0],result))) print("-------------------------------------------") - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json b/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json index 7ea3dd4eda..1ea8f98925 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json +++ b/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json @@ -1,6 +1,7 @@ { "heat": [ - "Generic_CR" + "configuration", + "fabricConfiguration" ], "normative": [ ] diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py index 5a1d1046b9..265bf33f9a 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py @@ -65,7 +65,7 @@ def main(argv): opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: # print opt, arg @@ -104,9 +104,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py index 5cb0ca3b0c..4f254f26fe 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py @@ -69,7 +69,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:v:h:s:",["ip=","port=","user=","updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -108,9 +108,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py index 66d82f9e91..cb7628e974 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py @@ -55,7 +55,7 @@ def main(argv): opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: # print opt, arg @@ -94,9 +94,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py index 573e05b46a..bbeb3d6972 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py @@ -11,7 +11,7 @@ from importPolicyTypes import importPolicyTypes from importGroupTypes import importGroupTypes from importNormativeCapabilities import importNormativeCapabilities from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType -from importOnapTypes import importOnapTypes +from importAnnotationTypes import import_annotation_types from importCommon import * @@ -31,93 +31,95 @@ import importCommon ################################################################################################################################################################################################################################# def usage(): - print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=]' + print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=]' def handleResults(results, updateversion): - printFrameLine() - for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_frame_line() + for result in results: + print_name_and_return_code(result[0], result[1]) + print_frame_line() - failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) - if (len(failedResults) > 0): - errorAndExit(1, None) + failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) + if (len(failedResults) > 0): + error_and_exit(1, None) def main(argv): - print 'Number of arguments:', len(sys.argv), 'arguments.' - - beHost = 'localhost' - bePort = '8080' - adminUser = 'jh0003' - debugf = None - updateversion = 'true' - importCommon.debugFlag = False - scheme = 'http' - - try: - opts, args = getopt.getopt(argv,"i:p:u:d:h:s:",["ip=","port=","user=","debug=","scheme="]) - except getopt.GetoptError: - usage() - errorAndExit(2, 'Invalid input') - - for opt, arg in opts: - #print opt, arg - if opt == '-h': - usage() - sys.exit(3) - elif opt in ("-i", "--ip"): - beHost = arg - elif opt in ("-p", "--port"): - bePort = arg - elif opt in ("-u", "--user"): - adminUser = arg - elif opt in ("-s", "--scheme"): - scheme = arg - elif opt in ("-d", "--debug"): - print arg - debugf = bool(arg.lower() == "true" or arg.lower() == "yes") - - print 'scheme =',scheme,', be host =',beHost,', be port =', bePort,', user =', adminUser, ', debug =', debugf - - if (debugf != None): - print 'set debug mode to ' + str(debugf) - importCommon.debugFlag = debugf - - if ( beHost == None ): - usage() - sys.exit(3) - - print sys.argv[0] - pathdir = os.path.dirname(os.path.realpath(sys.argv[0])) - debug("path dir =" + pathdir) - - baseFileLocation = pathdir + "/../../../import/tosca/" - - fileLocation = baseFileLocation + "categories/" - importCategories(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "data-types/" - importDataTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "policy-types/" - importPolicyTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "capability-types/" - importNormativeCapabilities(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "group-types/" - importGroupTypes(scheme, beHost, bePort, adminUser, False, fileLocation) - - fileLocation = baseFileLocation + "interface-lifecycle-types/" - importNormativeInterfaceLifecycleType(scheme, beHost, bePort, adminUser, False, fileLocation) - - print 'sleep until data type cache is updated' - time.sleep( 70 ) - - resultsHeat = upgradeTypesPerConfigFile(scheme, beHost, bePort, adminUser, baseFileLocation, updateversion) - handleResults(resultsHeat, 'false') - - errorAndExit(0, None) + print 'Number of arguments:', len(sys.argv), 'arguments.' + + beHost = 'localhost' + bePort = '8080' + adminUser = 'jh0003' + debugf = None + updateversion = 'true' + importCommon.debugFlag = False + scheme = 'http' + + try: + opts, args = getopt.getopt(argv,"i:p:u:d:h:s:",["ip=","port=","user=","debug=","scheme="]) + except getopt.GetoptError: + usage() + error_and_exit(2, 'Invalid input') + + for opt, arg in opts: + #print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + beHost = arg + elif opt in ("-p", "--port"): + bePort = arg + elif opt in ("-u", "--user"): + adminUser = arg + elif opt in ("-s", "--scheme"): + scheme = arg + elif opt in ("-d", "--debug"): + print arg + debugf = bool(arg.lower() == "true" or arg.lower() == "yes") + + print 'scheme =',scheme,', be host =',beHost,', be port =', bePort,', user =', adminUser, ', debug =', debugf + + if (debugf != None): + print 'set debug mode to ' + str(debugf) + importCommon.debugFlag = debugf + + if ( beHost == None ): + usage() + sys.exit(3) + + print sys.argv[0] + pathdir = os.path.dirname(os.path.realpath(sys.argv[0])) + debug("path dir =" + pathdir) + + baseFileLocation = pathdir + "/../../../import/tosca/" + + fileLocation = baseFileLocation + "categories/" + importCategories(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "data-types/" + importDataTypes(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "policy-types/" + importPolicyTypes(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "capability-types/" + importNormativeCapabilities(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "group-types/" + importGroupTypes(scheme, beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "interface-lifecycle-types/" + importNormativeInterfaceLifecycleType(scheme, beHost, bePort, adminUser, False, fileLocation) + + import_annotation_types(scheme, beHost, bePort, adminUser, False) + + print 'sleep until data type cache is updated' + time.sleep( 70 ) + + resultsHeat = upgradeTypesPerConfigFile(scheme, beHost, bePort, adminUser, baseFileLocation, updateversion) + handleResults(resultsHeat, 'false') + + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py index 958416da33..c6fa1c9cab 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py @@ -24,14 +24,14 @@ def usage(): print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=]' def handleResults(results, updateversion): - printFrameLine() + print_frame_line() for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_name_and_return_code(result[0], result[1]) + print_frame_line() failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) if (len(failedResults) > 0): - errorAndExit(1, None) + error_and_exit(1, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -48,7 +48,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:h:s:",["ip=","port=","user=","debug=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -103,7 +103,7 @@ def main(argv): handleResults(results, 'false') - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py index 805d012298..32045513b8 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py @@ -13,10 +13,10 @@ def usage(): print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] [-v | --updateversion=]' def handleResults(results, updateversion): - printFrameLine() + print_frame_line() for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_name_and_return_code(result[0], result[1]) + print_frame_line() responseCodes = [200, 201] @@ -25,7 +25,7 @@ def handleResults(results, updateversion): failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedResults) > 0): - errorAndExit(1, None) + error_and_exit(1, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -42,7 +42,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:v:h:s:",["ip=","port=","user=","debug=","updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -93,7 +93,7 @@ def main(argv): resultsOnap = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) handleResults(resultsOnap, updateversion) - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py index c75966cfc9..972d792b20 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py @@ -24,14 +24,14 @@ def usage(): print sys.argv[0], '[optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=]' def handleResults(results, updateversion): - printFrameLine() + print_frame_line() for result in results: - printNameAndReturnCode(result[0], result[1]) - printFrameLine() + print_name_and_return_code(result[0], result[1]) + print_frame_line() failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) if (len(failedResults) > 0): - errorAndExit(1, None) + error_and_exit(1, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -48,7 +48,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:h:s:",["ip=","port=","user=","debug=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -125,7 +125,7 @@ def main(argv): handleResults(results, 'false') - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py index 289678b369..bebba6c2cb 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py @@ -37,15 +37,15 @@ def usage(): def handleResults(results): if results is not None: - printFrameLine() + print_frame_line() for result in results: - printNameAndReturnCode(result[0], result[1]) + print_name_and_return_code(result[0], result[1]) - printFrameLine() + print_frame_line() failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) if (len(failedResults) > 0): - errorAndExit(1, None) + error_and_exit(1, None) def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' @@ -63,7 +63,7 @@ def main(argv): opts, args = getopt.getopt(argv,"i:p:u:d:h",["ip=","port=","user=","debug="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: #print opt, arg @@ -131,7 +131,7 @@ def main(argv): resultsHeat = upgradeSolTypesPerConfigFile(scheme, beHost, bePort, adminUser, baseFileLocation, updateOnapVersion) handleResults(resultsHeat) - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": main(sys.argv[1:]) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py index edf5a194f6..24a7b0e5b3 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py @@ -55,7 +55,7 @@ def main(argv): opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: # print opt, arg @@ -94,9 +94,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py index 25d9b4d1fc..d3e5a4b2da 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py @@ -55,7 +55,7 @@ def main(argv): opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=","scheme="]) except getopt.GetoptError: usage() - errorAndExit(2, 'Invalid input') + error_and_exit(2, 'Invalid input') for opt, arg in opts: # print opt, arg @@ -94,9 +94,9 @@ def main(argv): failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): - errorAndExit(1, None) + error_and_exit(1, None) else: - errorAndExit(0, None) + error_and_exit(0, None) if __name__ == "__main__": -- 2.16.6