...
The ACM TOSCA definition includes key data types and node types such as ToscaConceptIdentifier
, Participant
, AutomationCompositionElement
, AutomationComposition
, and K8SMicroserviceAutomationCompositionElement
. These definitions represent building blocks for ACM topologies, specifically for Kubernetes deployments.
ToscaConceptIdentifier:
- Properties:
name
andversion
.
- Properties:
Participant:
- Properties:
provider
(optional).
- Properties:
AutomationCompositionElement:
- Properties:
provider
(optional),participantType
(referencingToscaConceptIdentifier
), and additional timing-related properties.
- Properties:
AutomationComposition:
- Properties:
provider
(optional),elements
(list ofToscaConceptIdentifier
).
- Properties:
K8SMicroserviceAutomationCompositionElement:
- Derived from
AutomationCompositionElement
. - Properties:
chart
,configs
,requirements
,templates
, andvalues
.
- Derived from
Topology Template:
- Node Templates for relevant ACM entities.
Reference Flow
Participant Definition:
- Ensure that
Participant
definitions are referenced correctly in node templates.
- Ensure that
Automation Composition Element:
- Use
AutomationCompositionElement
in the node templates and ensure correct referencing of theToscaConceptIdentifier
forparticipantType
.
- Use
Automation Composition:
- Reference the correct
AutomationCompositionElement
in theAutomationComposition
definition.
- Reference the correct
K8S Microservice Automation Composition Element:
- Ensure that the
K8SMicroserviceAutomationCompositionElement
is used for Kubernetes-specific compositions.
- Ensure that the
Top-Level Node Templates:
- Node templates like
K8SAutomationCompositionParticipant
and others should reference the appropriate definitions.
- Node templates like
Errors and Debugging
When utilizing the provided ACM TOSCA definition for Kubernetes (k8s), it is essential to include all key elements to define the ACM topology accurately. Failure to incorporate required definitions may lead to errors during the deployment process. Common indicators of missing components include repeated YAML separator lines (---
) and unexpected empty sections. To illustrate, if the definitions for org.onap.policy.clamp.acm.AutomationCompositionElement
or org.onap.policy.clamp.acm.Participant
are absent, errors such as NullPointerException
or unexpected behavior during deployment might occur. Therefore, it is crucial to thoroughly review and complete the TOSCA definition, ensuring all necessary components are correctly specified to avoid potential issues.
- If errors occur, check the console logs for NullPointerExceptions or missing property issues.
- The error may indicate missing references or incorrect properties in the TOSCA definitions.
- Ensure that all referenced elements (e.g.,
ToscaConceptIdentifier
,Participant
, etc.) are correctly defined and referenced.
For instance, if the definitions for org.onap.policy.clamp.acm.AutomationCompositionElement
or org.onap.policy.clamp.acm.Participant
are absent, errors such as NullPointerException
or unexpected behavior during deployment might occur.
Code Block | ||
---|---|---|
| ||
java.lang.NullPointerException: Cannot invoke "org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate.getProperties()" because the return value of "java.util.Map.get(Object)" is null at com.oransc.rappmanager.models.AcmInterceptor.injectToscaServiceTemplate(AcmInterceptor.java:57) ~[rapp-manager-models-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT] at com.oransc.rappmanager.dme.service.DmeAcmInterceptor.injectToscaServiceTemplate(DmeAcmInterceptor.java:68) ~[rapp-manager-dme-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT] at com.oransc.rappmanager.acm.service.AcmDeployer.createComposition(AcmDeployer.java:85) ~[rapp-manager-acm-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT] at com.oransc.rappmanager.acm.service.AcmDeployer.primeRapp(AcmDeployer.java:187) ~[rapp-manager-acm-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT] at com.oransc.rappmanager.service.RappService.lambda$primeRapp$0(RappService.java:53) ~[!/:0.1.0-SNAPSHOT] at java.base/java.util.stream.MatchOps$1MatchSink.accept(Unknown Source) ~[na:na] at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source) ~[na:na] at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:na] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:na] at java.base/java.util.stream.MatchOps$MatchTask.doLeaf(Unknown Source) ~[na:na] at java.base/java.util.stream.MatchOps$MatchTask.doLeaf(Unknown Source) ~[na:na] at java.base/java.util.stream.AbstractShortCircuitTask.compute(Unknown Source) ~[na:na] at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source) ~[na:na] at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) ~[na:na] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) ~[na:na] at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) ~[na:na] at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) ~[na:na] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) ~[na:na] |
Code Block | ||
---|---|---|
| ||
java.lang.NullPointerException: Cannot invoke "org.onap.policy.clamp.models.acm.concepts.AutomationComposition.getElements()" because "automationComposition" is null at com.oransc.rappmanager.models.AcmInterceptor.injectAutomationComposition(AcmInterceptor.java:84) ~[rapp-manager-models-0.0.1.jar!/:0.0.1] at com.oransc.rappmanager.acm.service.AcmDeployer.deployRappInstance(AcmDeployer.java:141) ~[rapp-manager-acm-0.0.1.jar!/:0.0.1] at com.oransc.rappmanager.service.RappService.deployRappInstance(RappService.java:106) ~[!/:0.0.1] at com.oransc.rappmanager.rest.RappInstanceController.lambda$deployRappInstance$10(RappInstanceController.java:95) ~[!/:0.0.1] at java.base/java.util.Optional.map(Unknown Source) ~[na:na] at com.oransc.rappmanager.rest.RappInstanceController.lambda$deployRappInstance$12(RappInstanceController.java:95) ~[!/:0.0.1] at java.base/java.util.Optional.map(Unknown Source) ~[na:na] at com.oransc.rappmanager.rest.RappInstanceController.deployRappInstance(RappInstanceController.java:93) ~[!/:0.0.1] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na] |
...