summaryrefslogtreecommitdiffstats
path: root/examples/examples-grpc
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2022-07-22 09:13:05 +0000
committerGerrit Code Review <gerrit@onap.org>2022-07-22 09:13:05 +0000
commitcfa642373420fa2bc429c94f17e4f0c0798e5791 (patch)
tree1b7a28cbb9f2259ce22bf3865dc9aba2610e27fe /examples/examples-grpc
parentc354fba3fb87ebe21a7fbb2a15268ccc9d033fbd (diff)
parent093d515e4f5e018dc33048b4f0d31c7ead6717ed (diff)
Merge "Support MetadataSet generation in APEX CLI Editor"
Diffstat (limited to 'examples/examples-grpc')
-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>