diff options
Diffstat (limited to 'catalog-be/src/main/resources')
37 files changed, 746 insertions, 63 deletions
diff --git a/catalog-be/src/main/resources/application-context.xml b/catalog-be/src/main/resources/application-context.xml index 6c44b270c2..2b3603ce3b 100644 --- a/catalog-be/src/main/resources/application-context.xml +++ b/catalog-be/src/main/resources/application-context.xml @@ -22,6 +22,7 @@ org.openecomp.sdc.be.impl, org.openecomp.sdc.be.auditing.impl, org.openecomp.sdc.be.components.impl, + org.openecomp.sdc.be.components.merge, org.openecomp.sdc.be.components.distribution.engine, org.openecomp.sdc.be.distribution, org.openecomp.sdc.be.components.clean, diff --git a/catalog-be/src/main/resources/config/configuration.yaml b/catalog-be/src/main/resources/config/configuration.yaml index 2ae2cccb77..190153cb0a 100644 --- a/catalog-be/src/main/resources/config/configuration.yaml +++ b/catalog-be/src/main/resources/config/configuration.yaml @@ -21,9 +21,9 @@ beProtocol: http # catalog backend ssl port beSslPort: 8443 -version: 1.0 +version: 1.1.0 released: 2012-11-30 -toscaConformanceLevel: 4.0 +toscaConformanceLevel: 5.0 minToscaConformanceLevel: 3.0 titanCfgFile: /home/vagrant/catalog-be/config/catalog-be/titan.properties @@ -575,6 +575,12 @@ onboarding: downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages" healthCheckUri: "/onboarding-api/v1.0/healthcheck" +dcae: + protocol: http + host: 127.0.0.1 + port: 8080 + healthCheckUri: "/dcae/healthCheck" + switchoverDetector: gBeFqdn: AIO-BE.ecomp.idns.cip.com gFeFqdn: AIO-FE.ecomp.idns.cip.com @@ -637,3 +643,22 @@ genericAssetNodeTypes: VF : org.openecomp.resource.abstract.nodes.VF PNF: org.openecomp.resource.abstract.nodes.PNF Service: org.openecomp.resource.abstract.nodes.service + +workloadContext: Production +environmentContext: + defaultValue: General_Revenue-Bearing + validValues: + - Critical_Revenue-Bearing + - Vital_Revenue-Bearing + - Essential_Revenue-Bearing + - Important_Revenue-Bearing + - Needed_Revenue-Bearing + - Useful_Revenue-Bearing + - General_Revenue-Bearing + - Critical_Non-Revenue + - Vital_Non-Revenue + - Essential_Non-Revenue + - Important_Non-Revenue + - Needed_Non-Revenue + - Useful_Non-Revenue + - General_Non-Revenue diff --git a/catalog-be/src/main/resources/config/error-configuration.yaml b/catalog-be/src/main/resources/config/error-configuration.yaml index fbf397a999..9dc0355212 100644 --- a/catalog-be/src/main/resources/config/error-configuration.yaml +++ b/catalog-be/src/main/resources/config/error-configuration.yaml @@ -1851,4 +1851,30 @@ errors: code: 400, message: 'Error: VSP %1 cannot be imported. The VSP contains internal loop in VFC %2', messageId: "SVC4671" + } +#---------SVC4672------------------------------ +# %1 - capability uniqueId +# %2 - instance uniqueId +# %3 - container uniqueId + CAPABILITY_OF_INSTANCE_NOT_FOUND_ON_CONTAINER: { + code: 404, + message: "Error: Requested capability %1 of instance %2 was not found on the container %3.", + messageId: "SVC4672" + } +#---------SVC4673------------------------------ +# %1 - requirement uniqueId +# %2 - instance uniqueId +# %3 - container uniqueId + REQUIREMENT_OF_INSTANCE_NOT_FOUND_ON_CONTAINER: { + code: 404, + message: "Error: Requested requirement %1 of instance %2 was not found on the container %3.", + messageId: "SVC4673" + } +#---------SVC4674----------------------------- +# %1 - relation Id +# %2 - container uniqueId + RELATION_NOT_FOUND: { + code: 404, + message: "Error: Requested relation %1 was not found on the container %2.", + messageId: "SVC4674" }
\ No newline at end of file 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 45c2b812cf..4e25d735d0 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 @@ -27,6 +27,11 @@ tosca.capabilities.Container: required: false constraints: - greater_or_equal: 0 MB +org.openecomp.capabilities.PortMirroring: + derived_from: tosca.capabilities.Root + properties: + connection_point: + type: org.openecomp.datatypes.PortMirroringConnectionPointDescription tosca.capabilities.Endpoint: derived_from: tosca.capabilities.Root properties: 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 Binary files differindex 268287a39d..84871d6a07 100644 --- a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip +++ b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip diff --git a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml index 5a0c7a4dc1..519d1ee695 100644 --- a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml +++ b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml @@ -99,6 +99,12 @@ resources: VirtualLinks: name: "Virtual Links" icons: ['vl'] + Configuration: + name: "Configuration" + subcategories: + Configuraion: + name: "Configuration" + icons: ['pmc'] DcaeComponent: name: "DCAE Component" subcategories: @@ -123,6 +129,9 @@ resources: Policy: name: "Policy" icons: ['dcae_policy'] + MachineLearning: + name: "Machine Learning" + icons: ['dcae_machineLearning'] Template: name: "Template" subcategories: diff --git a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip Binary files differindex 314a12ea55..de33b5bf89 100644 --- a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip +++ b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip 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 43debe6291..449842c2f4 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 @@ -55,6 +55,18 @@ tosca.datatypes.Credential: type: string required: false +org.openecomp.datatypes.PortMirroringConnectionPointDescription: + derived_from: tosca.datatypes.Root + properties: + nf_type: + type: string + nfc_type: + type: string + network_role: + type: string + pps_capacity: + type: string + tosca.datatypes.TimeInterval: derived_from: tosca.datatypes.Root properties: @@ -348,6 +360,11 @@ org.openecomp.datatypes.heat.neutron.port.FixedIps: description: IP address desired in the subnet for this port required: false status: SUPPORTED + subnet_id: + type: string + description: Subnet in which to allocate the IP address for this port + required: false + status: SUPPORTED org.openecomp.datatypes.heat.FileInfo: derived_from: tosca.datatypes.Root diff --git a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip Binary files differindex 506a58f4b1..1f79bf2c2d 100644 --- a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip +++ b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml index 6618650ef3..667ed7484b 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml @@ -23,5 +23,6 @@ node_types: type: integer max_instances: type: integer - -
\ No newline at end of file + multi_stage_design: + type: boolean + default: false
\ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip Binary files differindex d564813e2f..85adfbc2a1 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip +++ b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json new file mode 100644 index 0000000000..dd7b9769ee --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extContrailCP.yml", + "contactId": "DS200P", + "name": "extContrailCP", + "description": "The AT&T Connection Point base type all other CP derive from", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } +], + "tags": [ + "extContrailCP" + ] +} diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml new file mode 100644 index 0000000000..e97c7ae674 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml @@ -0,0 +1,59 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extContrailCP: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + # copied from the org.openecomp.resource.cp.nodes.heat.network.contrail.Port type + static_routes: + type: list + description: An ordered list of static routes to be added to this interface + required: false + status: SUPPORTED + entry_schema: + type: org.openecomp.datatypes.heat.network.contrail.port.StaticRoute + virtual_network: + type: string + description: Virtual Network for this interface + required: true + status: SUPPORTED + static_route: + type: boolean + description: Static route enabled + required: false + default: false + status: SUPPORTED + allowed_address_pairs: + type: list + description: List of allowed address pair for this interface + required: false + status: SUPPORTED + entry_schema: + type: org.openecomp.datatypes.heat.network.contrail.AddressPair + shared_ip: + type: boolean + description: Shared ip enabled + required: false + default: false + status: SUPPORTED + ip_address: + type: string + description: IP for this interface + required: false + status: SUPPORTED + interface_type: + type: string + description: Interface type + required: true + status: SUPPORTED + constraints: + - valid_values: + - management + - left + - right + - other + attributes: + # copied from the org.openecomp.resource.cp.nodes.heat.network.contrail.Port type + fq_name: + type: string + description: fq_name + status: SUPPORTED diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip Binary files differnew file mode 100644 index 0000000000..dddadde1ad --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json new file mode 100644 index 0000000000..ff55d80135 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extCP.yml", + "contactId": "DS200P", + "name": "ExtCP2", + "description": "The AT&T Connection Point base type all other CP derive from", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } +], + "tags": [ + "ExtCP2" + ] +} diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml new file mode 100644 index 0000000000..beae41d5ca --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml @@ -0,0 +1,8 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extCP: + derived_from: org.openecomp.resource.cp.nodes.network.Port + description: The SDC External Connection Point base type + capabilities: + port_mirroring: + type: org.openecomp.capabilities.PortMirroring
\ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip Binary files differnew file mode 100644 index 0000000000..81a9259e6d --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json new file mode 100644 index 0000000000..84cc8779c7 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extNeutronCP.yml", + "contactId": "DS200P", + "name": "extNeutronCP", + "description": "The AT&T Connection Point base type all other CP derive from", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } +], + "tags": [ + "extNeutronCP" + ] +} 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 new file mode 100644 index 0000000000..35306f5b49 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml @@ -0,0 +1,140 @@ + +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extNeutronCP: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + # copied from the org.openecomp.resource.cp.nodes.heat.network.neutron.Port type + port_security_enabled: + type: boolean + description: Flag to enable/disable port security on the network + required: false + status: SUPPORTED + device_id: + type: string + description: Device ID of this port + required: false + status: SUPPORTED + qos_policy: + type: string + description: The name or ID of QoS policy to attach to this network + 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 + device_owner: + type: string + description: Name of the network owning the port + required: false + status: SUPPORTED + network: + type: string + description: Network this port belongs to + required: false + status: SUPPORTED + replacement_policy: + type: string + description: Policy on how to respond to a stack-update for this resource + required: false + default: AUTO + status: SUPPORTED + constraints: + - valid_values: + - REPLACE_ALWAYS + - AUTO + security_groups: + type: list + description: List of security group names or IDs + required: false + status: SUPPORTED + entry_schema: + type: string + fixed_ips: + type: list + description: Desired IPs for this port + required: false + status: SUPPORTED + entry_schema: + type: org.openecomp.datatypes.heat.neutron.port.FixedIps + mac_address: + type: string + description: MAC address to give to this port + required: false + status: SUPPORTED + admin_state_up: + type: boolean + description: A boolean value specifying the administrative status of the network + required: false + default: true + status: SUPPORTED + name: + type: string + description: A symbolic name for this port + required: false + status: SUPPORTED + attributes: + # copied from the org.openecomp.resource.cp.nodes.heat.network.neutron.Port type + tenant_id: + type: string + description: Tenant owning the port + status: SUPPORTED + network_id: + type: string + description: Unique identifier for the network owning the port + status: SUPPORTED + qos_policy_id: + type: string + description: The QoS policy ID attached to this network + status: SUPPORTED + show: + type: string + description: Detailed information about resource + status: SUPPORTED + subnets: + type: list + description: Subnets of this network + status: SUPPORTED + entry_schema: + type: string + status: + type: string + description: The status of the network + status: SUPPORTED + capabilities: + # copied from the org.openecomp.resource.cp.nodes.heat.network.neutron.Port type + attachment: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + binding: + type: tosca.capabilities.network.Bindable + valid_source_types: + - org.openecomp.resource.cp.nodes.heat.network.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 Binary files differnew file mode 100644 index 0000000000..02b62a69da --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml index 3973598acd..53b453c67d 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml @@ -10,7 +10,7 @@ node_types: description: ECOMP supported network types. network_role: type: string - required: ture + required: true description: > Unique label that defines the role that this network performs. example: vce oam network, vnat sr-iov1 network diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip Binary files differindex 80b1e1a1dd..f69e5b40fb 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json new file mode 100644 index 0000000000..8d809ba354 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json @@ -0,0 +1,21 @@ +{ + "payloadName": "portMirroring.yml", + "contactId": "jh0003", + "name": "Port Mirroring Configuration", + "description": "A port mirroring configuration object", + "resourceIconPath": "pmc", + "resourceType": "Configuration", + "categories": [ + { + "name": "Configuration", + "subcategories": [ + { + "name": "Configuration" + } + ] + } +], + "tags": [ + "Port Mirroring Configuration" + ] +}
\ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml new file mode 100644 index 0000000000..125bccce06 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml @@ -0,0 +1,11 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.PortMirroringConfiguration: + derived_from: tosca.nodes.Root + requirements: + - source: + capability: org.openecomp.capabilities.PortMirroring + occurrences: [1,UNBOUNDED] + - collector: + capability: org.openecomp.capabilities.PortMirroring + occurrences: [1,1]
\ No newline at end of file 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 Binary files differnew file mode 100644 index 0000000000..cbed61fcf5 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json new file mode 100644 index 0000000000..a27717fe5b --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json @@ -0,0 +1,21 @@ +{ + "payloadName": "portMirroringByPolicy.yml", + "contactId": "jh0003", + "name": "Port Mirroring Configuration By Policy", + "description": "A port mirroring configuration by policy object", + "resourceIconPath": "pmc", + "resourceType": "Configuration", + "categories": [ + { + "name": "Configuration", + "subcategories": [ + { + "name": "Configuration" + } + ] + } +], + "tags": [ + "Port Mirroring Configuration By Policy" + ] +}
\ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml new file mode 100644 index 0000000000..0da5f689b4 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml @@ -0,0 +1,26 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.PortMirroringConfigurationByPolicy: + derived_from: tosca.nodes.Root + properties: + collector_node: + type: string + description: The name of the Collector Proxy + required: true + policy_name: + type: string + description: The name of the policy for selection of the collector interfaces + required: true + equip_model: + type: string + description: The name of the equipment type of the collector, i.e. Cisco 4500x + required: true + equip_vendor: + type: string + description: The name of the equipment vendor of the collector, i.e. Cisco + required: true + requirements: + - source: + capability: org.openecomp.capabilities.PortMirroring + occurrences: [1,UNBOUNDED] + 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 Binary files differnew file mode 100644 index 0000000000..a11e4f7842 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json new file mode 100644 index 0000000000..c34625a3c9 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json @@ -0,0 +1,21 @@ +{ + "payloadName": "serviceProxy.yml", + "contactId": "jh0003", + "name": "serviceProxy", + "description": "Represents a proxy to a service VFC.", + "resourceIconPath": "defaulticon", + "resourceType": "ServiceProxy", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Abstract" + } + ] + } +], + "tags": [ + "serviceProxy" + ] +}
\ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml new file mode 100644 index 0000000000..cf7ec5af10 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml @@ -0,0 +1,4 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.ServiceProxy: + derived_from: tosca.nodes.Root
\ No newline at end of file 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 Binary files differnew file mode 100644 index 0000000000..9f0b60d1df --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip 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 c72c2c394f..8b16a72ab3 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py @@ -42,6 +42,8 @@ def importHeatTypes(beHost, bePort, adminUser, fileDir, updateversion): "Generic_Service", "contrailNetworkRules", "contrailPort", + "portMirroring", + "serviceProxy", "contrailV2NetworkRules", "contrailV2VirtualNetwork", "securityRules", @@ -52,9 +54,10 @@ def importHeatTypes(beHost, bePort, adminUser, fileDir, updateversion): "contrailV2VLANSubInterface", "multiFlavorVFC", "vnfConfiguration", - "underlayVpn", - "overlayTunnel", - "genericNeutronNet" + "extCp2", + "extNeutronCP", + "extContrailCP", + "portMirroringByPolicy" ] responseCodes = [200, 201] 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 3d7d9a9bbf..b6e390992e 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py @@ -122,11 +122,7 @@ def main(argv): fileLocation = baseFileLocation + "heat-types/" resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion) handleResults(resultsHeat, updateversion) - - fileLocation = baseFileLocation + "onap-types/" - resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) - handleResults(resultsHeat, updateversion) - + fileLocation = baseFileLocation + "group-types/" importGroupTypes(beHost, bePort, adminUser, False, fileLocation) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py new file mode 100644 index 0000000000..3d7d9a9bbf --- /dev/null +++ b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py @@ -0,0 +1,140 @@ +import pycurl +import sys, getopt, os +from StringIO import StringIO +import json +import copy +import time +#from importNormativeElements import createNormativeElement +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 importCommon import * +import importCommon + +################################################################################################################################################################################################# +# # +# Import all users from a given file # +# # +# activation : # +# python importNormativeAll.py [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] # +# [-v <true|false> | --updateversion=<true|false>] # +# # +# shortest activation (be host = localhost, be port = 8080, user = jh0003): # # # +# python importNormativeAll.py # +# # +################################################################################################################################################################################################# + +def usage(): + print sys.argv[0], '[-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] [-v <true|false> | --updateversion=<true|false>]' + +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) + +def main(argv): + print 'Number of arguments:', len(sys.argv), 'arguments.' + + beHost = 'localhost' + bePort = '8080' + adminUser = 'jh0003' + debugf = None + updateversion = 'true' + importCommon.debugFlag = False + + try: + opts, args = getopt.getopt(argv,"i:p:u:d:v:h",["ip=","port=","user=","debug=","updateversion="]) + 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 ("-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 '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(beHost, bePort, adminUser, False, fileLocation) + + print 'sleep until data type cache is updated' + time.sleep( 70 ) + + fileLocation = baseFileLocation + "capability-types/" + importNormativeCapabilities(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "interface-lifecycle-types/" + importNormativeInterfaceLifecycleType(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "categories/" + importCategories(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "normative-types/" + results = importNormativeTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(results, updateversion) + + fileLocation = baseFileLocation + "heat-types/" + resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + fileLocation = baseFileLocation + "onap-types/" + resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + fileLocation = baseFileLocation + "group-types/" + importGroupTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "policy-types/" + importPolicyTypes(beHost, bePort, adminUser, False, fileLocation) + + errorAndExit(0, None) + +if __name__ == "__main__": + main(sys.argv[1:]) + 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 c518855860..d239a15c72 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json +++ b/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json @@ -1,54 +1,20 @@ { "heat": [ - "globalNetwork", - "globalPort", - "globalCompute", - "volume", - "cinderVolume", - "contrailVirtualNetwork", - "neutronNet", - "neutronPort", - "novaServer", - "extVl", - "internalVl", - "extCp", - "vl", - "eline", - "abstractSubstitute", - "Generic_VFC", - "Generic_VF", - "Generic_PNF", - "Generic_Service", - "contrailNetworkRules", "contrailPort", - "contrailV2NetworkRules", - "contrailV2VirtualNetwork", - "securityRules", - "contrailAbstractSubstitute", - "contrailCompute", + "extCp", "contrailV2VirtualMachineInterface", - "subInterface", - "contrailV2VLANSubInterface", - "multiFlavorVFC", - "vnfConfiguration", - "underlayVpn", - "overlayTunnel", - "genericNeutronNet" + "neutronPort", + "Generic_PNF", + "portMirroring", + "Generic_VF", + "serviceProxy", + "extCp2", + "extContrailCP", + "vnfConfiguration", + "extVl", + "multiFlavorVFC", + "portMirroringByPolicy" ], "normative": [ - "root", - "compute", - "softwareComponent", - "webServer", - "webApplication", - "DBMS", - "database", - "objectStorage", - "blockStorage", - "containerRuntime", - "containerApplication", - "loadBalancer", - "port", - "network" ] }
\ No newline at end of file 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 4d0ec291f5..69a51f41f1 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py @@ -114,10 +114,6 @@ def main(argv): resultsHeat = upgradeTypesPerConfigFile(beHost, bePort, adminUser, baseFileLocation, updateversion) handleResults(resultsHeat, 'false') - fileLocation = baseFileLocation + "onap-types/" - resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) - handleResults(resultsHeat, updateversion) - errorAndExit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py new file mode 100644 index 0000000000..4d0ec291f5 --- /dev/null +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py @@ -0,0 +1,124 @@ +import pycurl +import sys, getopt, os +from StringIO import StringIO +import json +import copy +import time +from importCategoryTypes import importCategories +from upgradeHeatAndNormativeTypes import upgradeTypesPerConfigFile +from importDataTypes import importDataTypes +from importPolicyTypes import importPolicyTypes +from importGroupTypes import importGroupTypes +from importNormativeCapabilities import importNormativeCapabilities +from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType +from importOnapTypes import importOnapTypes + + +from importCommon import * +import importCommon + +################################################################################################################################################################################################# +# # +# Upgrades the normative types # +# # +# activation : # +# python upgradeNormative.py [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] # +# # +# # +# shortest activation (be host = localhost, be port = 8080, user = jh0003): # # # +# python upgradeNormative.py # +# # +################################################################################################################################################################################################# + +def usage(): + print sys.argv[0], '[-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]' + +def handleResults(results, updateversion): + printFrameLine() + for result in results: + printNameAndReturnCode(result[0], result[1]) + printFrameLine() + + failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) + if (len(failedResults) > 0): + errorAndExit(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 + + try: + opts, args = getopt.getopt(argv,"i:p:u:d:h",["ip=","port=","user=","debug="]) + 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 ("-d", "--debug"): + print arg + debugf = bool(arg.lower() == "true" or arg.lower() == "yes") + + print '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(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "data-types/" + importDataTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "policy-types/" + importPolicyTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "group-types/" + importGroupTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "capability-types/" + importNormativeCapabilities(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "interface-lifecycle-types/" + importNormativeInterfaceLifecycleType(beHost, bePort, adminUser, False, fileLocation) + + print 'sleep until data type cache is updated' + time.sleep( 70 ) + + resultsHeat = upgradeTypesPerConfigFile(beHost, bePort, adminUser, baseFileLocation, updateversion) + handleResults(resultsHeat, 'false') + + fileLocation = baseFileLocation + "onap-types/" + resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + errorAndExit(0, None) + +if __name__ == "__main__": + main(sys.argv[1:]) |