Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 b) Library for Component executions

To design an artifact as a component executor, we should define a Class that inherit AbstractScriptComponentFunction and override function to run actions.

  • Python sample:
Code Block
languagepy
titleDefine a Python Artifact
linenumberstrue
from org.onap.ccsdk.cds.blueprintsprocessor.services.execution import AbstractScriptComponentFunction 

class someArtifact(AbstractScriptComponentFunction):


  • Kotlin sample
Code Block
languagejava
titleDefine a Kotlin Artifact
linenumberstrue
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction

open class SampleScriptArtifact : AbstractScriptComponentFunction() {

}


The main library available while running a Component in CDS is the BlueprintRuntimeService. This provides to the user the Blueprint running context and run-time execution functions.The following shows functions available for all the different Components execution from a python script:

...