Re: New VL distribution fails


Aniello Paolo Malinconico
 

Hi all,
I want to design a new node type derived from the tosca.nodes.network.Network, adding some custom properties. Such node type is a Virtual Link (VL) resource type.
I onboarded such resource carrying out the steps below described but during distribution phase I got an error. I'd appreciate your help to understand if the procedure I followed is correct or not because I didn't find any documentation on that.

The attached files are:
- cord-evc.yml:  describing the new node type
- dataTypes.yml:   describing the new datatypes used in the new node type
- cord-evc.json:  node type metadata
  
To import the new dataTypes and the new node type, I have executed the following steps:
 
-  Download SDC code from gerrit (git clone https://gerrit.onap.org/r/sdc).
-  Put cord-evc.yml  and cord-evc.json  to {gerrit sdc code}/catalog-be/src/main/resources/import/tosca/normative-types/cord-evc/
-  Put dataTypes.yml file to {gerrit sdc code}/catalog-be/src/main/resources/import/tosca/data-types/
-  Add the new node type name to the script "importNormativeTypes.py" ({gerrit sdc code}/catalog-be/src/main/resources/scripts/import/tosca ) into the array normativeTypes
(E.g. - normativeTypes = [ "root", "compute", "softwareComponent", "webServer", "webApplication", "DBMS", "database", "objectStorage", "blockStorage", "containerRuntime", "containerApplication", "loadBalancer", "port", "network","cord-evc"]).
- Run: python importDataTypes.py -i {sdc-be docker IP} -p 8080
- Run: python importNormativeTypes.py -i {sdc-be docker IP} -p 8080
 
All 2 scripts return 201 OK. In fact, in the SDC GUI I have now the ECORD NET item as VL.
 
- Create a service composed by node type before imported (cord-evc) by SDC
- Distribute it
 
Distributution fails with errors from SDNC.AAI and SO. The error is captured into sdnc-ueb container :

ERROR 2019-03-12 11:34:02.445 +0000 SdcToscaParserFactory - ####################################################################################################
ERROR 2019-03-12 11:34:02.445 +0000 SdcToscaParserFactory - ToscaTemplate - verifyTemplate - 1 Parsing Critical occurred...
ERROR 2019-03-12 11:34:02.445 +0000 SdcToscaParserFactory - JTosca Exception [JE136]: InvalidTypeError: "org.onap.datatypes.ecord.evc.type" is not a valid type. CSAR name - /opt/onap/sdnc/ueb-listener/spool/incoming/svc_20190312_evc_test_3/service-Svc20190312EvcTest3-csar.csar
ERROR 2019-03-12 11:34:02.446 +0000 SdncUebCallback - Could not create SDC TOSCA Parser 
org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException: Error: CSAR file bad format. Check the log for details.
at org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory.throwSdcToscaParserException(SdcToscaParserFactory.java:196)
at org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory.init(SdcToscaParserFactory.java:89)
at org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory.getSdcCsarHelper(SdcToscaParserFactory.java:60)
at org.onap.ccsdk.sli.northbound.uebclient.SdncUebCallback.processToscaCsar(SdncUebCallback.java:682)
at org.onap.ccsdk.sli.northbound.uebclient.SdncUebCallback.handleToscaArtifact(SdncUebCallback.java:629)
at org.onap.ccsdk.sli.northbound.uebclient.SdncUebCallback.handleSuccessfulDownload(SdncUebCallback.java:548)
at org.onap.ccsdk.sli.northbound.uebclient.SdncUebCallback.handleArtifact(SdncUebCallback.java:506)
at org.onap.ccsdk.sli.northbound.uebclient.SdncUebCallback.activateCallback(SdncUebCallback.java:306)
at org.onap.sdc.impl.NotificationConsumer.run(NotificationConsumer.java:71)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
ERROR 2019-03-12 11:34:03.449 +0000 NotificationConsumer - Error exception occured when fetching with Cambria Client:null
 


By a GET request from https://xx.xx.xx.xx:30204/sdc2/rest/v1/catalog/dataTypes/I retrieve the list of datatypes and the org.onap.datatypes.ecord.evc.type exists in the list:

   "org.onap.datatypes.ecord.evc.type": {
        "derivedFrom": {
            "name": "tosca.datatypes.Root",
            "uniqueId": "tosca.datatypes.Root.datatype",
            "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
            "creationTime": 1550597979107,
            "modificationTime": 1550597979107,
            "toscaPresentation": {}
        },
        "properties": [
            {
                "constraints": [
                    {
                        "validValues": [
                            "POINT_TO_POINT",
                            "ROOT_MULTIPOINT",
                            "MULTIPOINT_TO_MULTIPOINT"
                        ]
                    }
                ],
                "uniqueId": "org.onap.datatypes.ecord.evc.type.datatype.EVC_type",
                "type": "string",
                "required": false,
                "definition": false,
                "defaultValue": "POINT_TO_POINT",
                "description": "E-Line, E-Tree or E-LAN (POINT_TO_POINT, ROOT_MULTIPOINT, MULTIPOINT_TO_MULTIPOINT)",
                "password": false,
                "name": "EVC_type",
                "hidden": false,
                "immutable": false,
                "toscaPresentation": {}
            }
        ],
        "name": "org.onap.datatypes.ecord.evc.type",
        "uniqueId": "org.onap.datatypes.ecord.evc.type.datatype",
        "derivedFromName": "tosca.datatypes.Root",
        "description": "ECORD EVC type",
        "creationTime": 1552222556099,
        "modificationTime": 1552222556105,
        "toscaPresentation": {}
    }

I have noted that by unzipping my service.csar (downloaded by sdc GUI) , there is no file containing my custom datatypes ( data.yml file contains only  default datatypes ).
Any suggestion how to fix this issue?


Aniello Paolo Malinconico

Join onap-discuss@lists.onap.org to automatically receive all group messages.