Kanagarj and Sridhar, thanks for digging more into it. I totally agree and can't see TOSCA templates without custom types, and that's we have several template examples created and supported in the tosca-parser and HT. As I said above use of #3 requires an "import" statement in the TOSCA service template. For example, https://github.com/openstack/tacker/blob/master/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml is not importing any 'type definition'. In order to use custom type definition the tosca-parser requires to access it. i.e. 'imports' statement is required in the service template as I mentioned earlier.
I am all up to fix this, if it is in issue with TP or HT with the highest priority but if I can't recreate it and see that custom type support is working fine I am helpless :(.
@Bob, you know tosca-parser and Tacker well. If you can jump on here that would be great.
Kanagarj and Sridhar, thanks for digging more into it. I totally agree and can't see TOSCA templates without custom types, and that's we have several template examples created and supported in the tosca-parser and HT. As I said above use of #3 requires an "import" statement in the TOSCA service template. For example, https:/ /github. com/openstack/ tacker/ blob/master/ samples/ tosca-templates /vnfd/tosca- vnfd-scale. yaml is not importing any 'type definition'. In order to use custom type definition the tosca-parser requires to access it. i.e. 'imports' statement is required in the service template as I mentioned earlier.
I am all up to fix this, if it is in issue with TP or HT with the highest priority but if I can't recreate it and see that custom type support is working fine I am helpless :(.
@Bob, you know tosca-parser and Tacker well. If you can jump on here that would be great.
Here is an example of how the custom type works:
Custom type definition as scalingcustom_ nfv.yaml:
tosca_definitio ns_version: tosca_simple_ profile_ for_nfv_ 1_0_0
description: >
Template for deploying servers based on policies.
policy_types: policies. tacker. Scaling: Scaling
tosca.
derived_from: tosca.policies.
Service Template (note the imports statement):
tosca_definitio ns_version: tosca_simple_ profile_ for_nfv_ 1_0_0
description: >
Template for deploying servers based on policies.
imports: nfv.yaml
- scalingcustom_
topology_template:
properties:
num_ cpus: 2
disk_ size: 10 GB
mem_ size: 512 MB
properties:
architectu re: x86_64
distributi on: RHEL
version: 6.5 tacker. Scaling
description: Simple node autoscaling
resize_ compute:
descriptio n: trigger
condition:
constraint: utilization greater_than 50%
period: 60
evaluations: 1
method: average
min_ instances: 2
max_ instances: 10
default_ instances: 3
increment: 1
node_templates:
my_server_1:
type: tosca.nodes.Compute
capabilities:
host:
os:
# host Operating System image properties
type: Linux
policies:
- asg:
type: tosca.policies.
targets: [my_server_1]
triggers:
properties: