...
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
from org.onap.ccsdk.cds.blueprintsprocessor.services.execution import AbstractScriptComponentFunction
class someArtifact(AbstractScriptComponentFunction): |
- Kotlin sample
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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:
...