summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2022-07-08 12:29:25 +0100
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2022-07-18 11:03:46 +0100
commit093d515e4f5e018dc33048b4f0d31c7ead6717ed (patch)
tree41e643642e3c68ced3b05df1a7dee0dc343eef8b /examples
parent3b9e1d6eff05e0523c43f066a3e0a7e70025352f (diff)
Support MetadataSet generation in APEX CLI Editor
In addition to the existing capabilities of CLI editor, new arguments added for generating Tosca policy template excluding the policy model entity. Also generates independent json file for node template comprising the policy model data. Issue-ID: POLICY-4084 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I7c6a9570846e3ebfaa3f4ebc8d60faa94b533240
Diffstat (limited to 'examples')
-rw-r--r--examples/examples-grpc/pom.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/examples-grpc/pom.xml b/examples/examples-grpc/pom.xml
index b6b0a19a5..df4df5373 100644
--- a/examples/examples-grpc/pom.xml
+++ b/examples/examples-grpc/pom.xml
@@ -33,6 +33,8 @@
<properties>
<policymodel.name>APEXgRPCPolicy</policymodel.name>
<toscapolicy.name>APEXgRPCToscaPolicy</toscapolicy.name>
+ <!-- Update the required node type value for generating a node template -->
+ <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
</properties>
<dependencies>
<dependency>
@@ -128,6 +130,27 @@
</arguments>
</configuration>
</execution>
+ <!-- Generate Tosca policy with metadataSet reference and a node template json file with policy model -->
+ <execution>
+ <id>generate-tosca-policy-metadataSet</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
+ <classpathScope>compile</classpathScope>
+ <arguments>
+ <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
+ <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.metadataSet.json</argument>
+ <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
+ <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json</argument>
+ <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
+ <argument>--node-type=${nodeType.name}</argument>
+ <argument>--output-node-template-file=${project.build.directory}/classes/${toscapolicy.name}.nodeTemplate.json</argument>
+ </arguments>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>