commit | 52b0f4c7badda6705e3812a80cc66f06db038818 | [log] [tgz] |
---|---|---|
author | ChrisC <christophe.closset@intl.att.com> | Tue Oct 27 12:09:45 2020 +0100 |
committer | ChrisC <christophe.closset@intl.att.com> | Tue Oct 27 12:09:45 2020 +0100 |
tree | 7158197eec75f9c086acddea274bd49df01d5fb5 | |
parent | 2856b0c51394be57090b7e6049e360d8c49904d9 [diff] |
Update INFO.yaml Add new SDC committers Issue-ID: SDC-3334 Signed-off-by: ChrisC <christophe.closset@intl.att.com> Change-Id: I8a11961c99b78c75ef038ab2db4c062dc82c2e45
ONAP SDC-Tosca is delivered as helper JAR that can be used by clients that work with SDC TOSCA CSAR files. It parses the CSAR and returns the model object which represents the CSAR contents, through designated function calls with SDC flavour. It uses the underlying generic JTOSCA parser.
ONAP SDC-Tosca can be compiled easily using maven command: mvn clean install
The result is JAR file under "target" folder
to run the parser locally you can use the MyTest Junit test to easily execute the parser on your own input.
to run it place your csar in sdc-tosca\src\test\resources\csars
Go to the test class located at sdc-tosca\src\test\java\org\onap\sdc\impl\MyTest.java
un comment the logic ther and update the csar name you plced in the step above:
SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); ISdcCsarHelper = getCsarHelper("csars/<your csar name example my.csar>"); //example of functions //get node type by name List<NodeTemplate> serviceNodeTemplatesByType = fdntCsarHelper.getServiceNodeTemplatesByType("org.openecomp.nodes.ForwardingPath"); //get node type property String target_range = fdntCsarHelper.getNodeTemplatePropertyLeafValue(serviceNodeTemplatesByType.get(0), "target_range");
the SDC tosca is avilalble as a maven depandency. to use add the folowing depandency to your POM file:
<dependency> <groupId>org.onap.sdc.sdc-tosca</groupId> <artifactId>sdc-tosca</artifactId> <version>1.4.6</version> </dependency>
list support for get input until know the get input was only supported in the following format get_input [ , index ] this way was the only option for using a list typed property and retrieving its value for a use in a property , from this release you can use get input < list> to retrieve the whole list.
example:
properties: # the property type is list related_networks: #this is now supoorted you can retrive the whole list get_input: port_vpg_private_0_port_related_networks # the property type is string network: # this will retrive a value from the list get_input: - port_vpg_private_0_port_network - index_value
List getEntity(EntityQuery entityQuery, TopologyTemplateQuery topologyTemplateQuery, boolean isRecursive)
It is designed to retrieve details of one or more entity templates from corresponding topology template according to provided query parameters
This version is intended for SDN-C team usage only.
getEntity API retrieves details of one or more entity templates according to provided query parameters from corresponding topology template.
entityQuery Object describing the searched entity parameters. Includes one of following parameters: entity type, SDC (node template) type, tosca type as well as optional customizationUUID and UUID If the parameter is null, the returned result will contain all entities that types are supported by SDC.
topologyTemplateQuery parameters of the topology template containing the above entity. Includes SDC type of the container and optional customizationUUID.
isRecursive indicates if the search is recursive starting from the required topology template.
Returns list of IEntityDetails objects containing information about the found entities. If either no entities found or the provided query is incorrect, an empty list is returned.
List<IEntityDetails> getEntity(EntityQuery entityQuery, TopologyTemplateQuery topologyTemplateQuery, boolean isRecursive);