From 412039b3d6c7c5a871397beb5655a78550e85074 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Sun, 22 Oct 2017 13:29:52 +0300 Subject: VoltE fix Change-Id: Ib1bd2c578f897ff1f7d239d41e3d359e2cbb5c89 Issue-ID: SDC-410 Signed-off-by: Tal Gitelman --- .../openecomp/sdc/be/servlets/ProductServlet.java | 5 ++--- .../resources/import/tosca/onap-types/VDU/VDU.json | 15 ++++++++++++++ .../resources/import/tosca/onap-types/VDU/VDU.yml | 22 +++++++++++++++++++++ .../resources/import/tosca/onap-types/VDU/VDU.zip | Bin 0 -> 457 bytes .../import/tosca/onap-types/vduCpd/vduCpd.yml | 1 + .../scripts/import/tosca/importOnapTypes.py | 3 ++- 6 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.json create mode 100644 catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.yml create mode 100644 catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.zip (limited to 'catalog-be/src') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java index 681195643e..209f38d8a4 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java @@ -39,7 +39,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.openecomp.sdc.be.components.impl.ProductBusinessLogic; -import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.model.Product; @@ -51,14 +50,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Product Catalog", description = "Product Servlet") diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.json b/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.json new file mode 100644 index 0000000000..5d721d4abc --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.json @@ -0,0 +1,15 @@ +{ + "payloadName": "VDU.yml", + "contactId": "jh0003", + "name": "VDU", + "description": "VDU", + "resourceIconPath": "compute", + "resourceType": "VFC", + "categories": [{ + "name": "Generic", + "subcategories": [{ + "name": "Infrastructure" + }] + }], + "tags": ["VDU"] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.yml b/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.yml new file mode 100644 index 0000000000..541126f7e3 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.yml @@ -0,0 +1,22 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + tosca.nodes.nfv.VDU: + derived_from: tosca.nodes.SoftwareComponent + capabilities: +#Not found in any spec +# high_availability: +# type: nfv.capabilities.HA + Virtualbinding: + type: tosca.capabilities.nfv.VirtualBindable +# monitoring_parameter: +# type: nfv.capabilities.Metric + requirements: +#Not found in any spec +# - high_availability: +# capability: nfv.capabilities.HA +# relationship: nfv.relationships.HA +# occurrences: [ 0, 1 ] + - host: + capability: tosca.capabilities.Container + node: tosca.nodes.Compute + relationship: tosca.relationships.HostedOn diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.zip b/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.zip new file mode 100644 index 0000000000..9010bf0544 Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/onap-types/VDU/VDU.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml index e5d79fcacf..673e923182 100644 --- a/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml +++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml @@ -1,3 +1,4 @@ +#NOT SPEC COMPLAINT!!!!!!!!!!!!!!!!!!!!!! tosca_definitions_version: tosca_simple_yaml_1_0_0 node_types: tosca.nodes.nfv.VduCpd: 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 31c11c74bc..664c5cc64a 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py @@ -30,7 +30,8 @@ def importOnapTypes(beHost, bePort, adminUser, fileDir, updateversion): "vduCpd", "vduVirtualStorage", "vnfVirtualLinkDesc", - "NSD" + "NSD", + "VDU" ] responseCodes = [200, 201] -- cgit 1.2.3-korg