diff options
author | jh245g <jh245g@att.com> | 2018-06-27 14:50:33 -0400 |
---|---|---|
committer | Jun (Nicolas) Hu <jh245g@att.com> | 2018-06-27 19:01:20 +0000 |
commit | d9b88cc5ee987f5fed1011583a172f3c76251814 (patch) | |
tree | 36668f1ced1b3de0f13a5d6b8a90c495e032c209 /helm/plugin/tests/blueprint | |
parent | cec8e7c0f90be290796d9a666edeea97e118a26f (diff) |
Update helm plugin source code
Change-Id: I1689d8d915c8f18a3e8230dcabb33413a2b9043e
Issue-ID: CCSDK-322
Signed-off-by: jh245g <jh245g@att.com>
Diffstat (limited to 'helm/plugin/tests/blueprint')
-rw-r--r-- | helm/plugin/tests/blueprint/blueprint.yaml | 42 | ||||
-rw-r--r-- | helm/plugin/tests/blueprint/plugin/test_plugin.yaml | 20 |
2 files changed, 62 insertions, 0 deletions
diff --git a/helm/plugin/tests/blueprint/blueprint.yaml b/helm/plugin/tests/blueprint/blueprint.yaml new file mode 100644 index 0000000..2588e8d --- /dev/null +++ b/helm/plugin/tests/blueprint/blueprint.yaml @@ -0,0 +1,42 @@ +# DSL version, should appear in the main blueprint.yaml +# and may appear in other imports. In such case, the versions must match +tosca_definitions_version: cloudify_dsl_1_3 + +imports: + # importing cloudify related types, plugins, workflow, etc... + # to speed things up, it is possible downloading this file, + # including it in the blueprint directory and importing it + # instead. + - http://www.getcloudify.org/spec/cloudify/4.1.1/types.yaml + # relative import of plugin.yaml that resides in the blueprint directory + - plugin/test_plugin.yaml + +inputs: + # example input that could be injected by test + test_input: + description: an input for the test + default: default_test_input + +node_templates: + # defining a single node template that will serve as our test node + test_node_template: + # using base cloudify type + type: cloudify.nodes.Root + interfaces: + cloudify.interfaces.lifecycle: + start: + # here we map the single plugin task to the start operation + # of the cloudify.interfaces.lifecycle interface + implementation: plugin_name.plugin.tasks.my_task + inputs: + # my_task accepts a single property named + # some property. Here we inject this property + # from the input provided by the test + # (or 'default_test_input' if no input was provided) + some_property: { get_input: test_input } + +outputs: + # example output the could be used to simplify assertions by test + test_output: + description: an output for the test + value: { get_attribute: [test_node_template, some_property] } diff --git a/helm/plugin/tests/blueprint/plugin/test_plugin.yaml b/helm/plugin/tests/blueprint/plugin/test_plugin.yaml new file mode 100644 index 0000000..9701318 --- /dev/null +++ b/helm/plugin/tests/blueprint/plugin/test_plugin.yaml @@ -0,0 +1,20 @@ +plugins: + # Name could be anything, this name is what appears on the beginning of operation + # mappings. + plugin_name: + # Could be 'central_deployment_agent' or 'host_agent'. + # If 'central_deployment_agent', this plugin will be executed on the + # deployment dedicated agent, other wise it will be executed on the host agent. + # We set it the 'central_deployment_agent' here because 'host_agent' plugins should + # be contained in a host and this is not required for testing purposes + executor: central_deployment_agent + + # Setting install to false in testing environment. In the non-test plugin definition + # this property could be omitted usually (its default is true), in which case + # the source property should be set + install: false + + # source: URL to archive containing the plugin or name of directory containing + # the plugin if it is included in the the blueprint directory under the + # "plugins" directory. Not required in testing environments as the plugin + # need not be installed on any agent |