diff options
Diffstat (limited to 'app/data/shared_model/docker_host')
-rw-r--r-- | app/data/shared_model/docker_host/schema.yaml | 50 | ||||
-rw-r--r-- | app/data/shared_model/docker_host/template.yaml | 25 | ||||
-rw-r--r-- | app/data/shared_model/docker_host/translation.yaml | 27 |
3 files changed, 102 insertions, 0 deletions
diff --git a/app/data/shared_model/docker_host/schema.yaml b/app/data/shared_model/docker_host/schema.yaml new file mode 100644 index 0000000..389a1ec --- /dev/null +++ b/app/data/shared_model/docker_host/schema.yaml @@ -0,0 +1,50 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + + tosca.dcae.nodes.Root: + derived_from: tosca.nodes.Root + + cloudify.dcae.nodes.Root: + derived_from: tosca.nodes.Root + + tosca.dcae.nodes.dockerHost: + derived_from: tosca.dcae.nodes.Root + properties: + location_id: + type: string + required: true + docker_host_override: + type: string + + capabilities: + host: + type: dcae.capabilities.dockerHost + + requirements: + - composition: + capability: dcae.capabilities.composition.host + + dcae.nodes.SelectedDockerHost: + derived_from: cloudify.dcae.nodes.Root + properties: + location_id: + type: string + required: true + docker_host_override: + type: string + capabilities: + host: + type: dcae.capabilities.dockerHost + + +capability_types: + dcae.capabilities.dockerHost: + derived_from: tosca.capabilities.Root + + dcae.capabilities.composition.host: + derived_from: tosca.capabilities.Root + properties: + service_id: + type: string + location_id: + type: string diff --git a/app/data/shared_model/docker_host/template.yaml b/app/data/shared_model/docker_host/template.yaml new file mode 100644 index 0000000..54d41ea --- /dev/null +++ b/app/data/shared_model/docker_host/template.yaml @@ -0,0 +1,25 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 + +metadata: + template_name: docker_host + + +imports: + - schema: schema.yaml + +topology_template: + inputs: + docker_host_override: + type: string + default: "" + + node_templates: + docker_host: + type: tosca.dcae.nodes.dockerHost + properties: + location_id: {get_property: [SELF, composition, location_id]} + docker_host_override: {get_input: docker_host_override} + + + + diff --git a/app/data/shared_model/docker_host/translation.yaml b/app/data/shared_model/docker_host/translation.yaml new file mode 100644 index 0000000..e741fa2 --- /dev/null +++ b/app/data/shared_model/docker_host/translation.yaml @@ -0,0 +1,27 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: docker_host_translate + +imports: + - schema: schema.yaml + +topology_template: + + inputs: #for substitution mapping definition, these inputs are exactly the properties of dcae.nodes.dockerApp.asimovCollector + location_id: + type: string + docker_host_override: + type: string + + + substitution_mappings: + node_type: tosca.dcae.nodes.dockerHost + capabilities: + host: [host, host] + + node_templates: + host: + type: dcae.nodes.SelectedDockerHost + properties: + location_id: {get_input: location_id} + docker_host_override: {get_input: docker_host_override}
\ No newline at end of file |