[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: Query regarding get_artifact function used in implementation definitions with Tosca Yaml
Hi Dave, comments inline: ----- start message ----- Dear Tosca community Can you help us to clarify the usage of the
get_artifact function in a Tosca Yaml specified as a value for an
implementation definition, found in this document: Specifically this section:
3.6.16.2.1 Short notation for use with single artifact
The following single-line grammar may be used when only a primary implementation artifact name is needed:
This notation can be used when the primary artifact name uniquely identifies the artifact, either because it refers to a named artifact specified in the artifacts section
of a type or template, or because it represents the name of a script in the CSAR file that contains the definition.
This description is somewhat lacking in my opinion and as a result is open for interpretation. My implementation in the Ubicity Orchestrator
is based on the following interpretation:
When specifying the
implementation value (defined as “primary_artifact_name” above), is it valid to use the
get_artifact function, such as: == 1 == interfaces: Vnflcm: instantiate: implementation: {get_artifact: [SELF, CREATE_ROUTER_SCRIPT]} . . . artifacts: CREATE_ROUTER_SCRIPT: type: tosca.artifacts.Implementation.Python description: Generate chassis identifier file: ../Files/Scripts/create_router.py The text description does not seem to explicitly forbid the
get_artifact usage in this case, but I wanted confirmation as this is a point of slight confusion at the moment. With the explanation above, I think it makes little sense to use the “get_artifact” function for operation implementations:
OR, must a referenced artifact have only be referenced directly by name, such as: == 2 == interfaces: Vnflcm: instantiate: implementation: CREATE_ROUTER_SCRIPT . . . artifacts: CREATE_ROUTER_SCRIPT: type: tosca.artifacts.Implementation.Python description: Generate chassis identifier file: ../Files/Scripts/create_router.py OR, are both valid? In my opinion, only option ==2== is valid. I do realise that the actual script name “../Files/Scripts/create_router.py” can be specified for the implementation value such as: == 3 == interfaces: Vnflcm: instantiate: implementation: ../Files/Scripts/create_router.py In theory, this is an option as well. However, this brings up the question of how an orchestrator will determine the type
of the corresponding artifact (which is required to properly process the artifact). The specification states that an orchestrator can figure this out based on the file name extension, but this is error prone when multiple artifact types use the same extension
(e.g. .yaml) But unfortunately, this isn’t an option at the moment. Much thanks for any input. Cheers and have a good day! Dave Webster Software Engineer Cisco Systems Chris |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]