Support costum datatype in capability 63/38963/1
authorshangxdy <shang.xiaodong@zte.com.cn>
Wed, 9 Aug 2017 08:36:33 +0000 (16:36 +0800)
committershangxdy <shang.xiaodong@zte.com.cn>
Wed, 9 Aug 2017 08:36:33 +0000 (16:36 +0800)
commitaf80965fcdd0f2efb9c54714c5a0fe642ad95cb1
treea6383a8225e910b7130b072886114cbc4525a3ad
parente22b58bdcd35465dc9f8144e9b0980e0f4366c90
Support costum datatype in capability

Support custom datatype definition in property for capability,
a scenario if following:

VDU:
   type: tosca.nodes.nfv.VDU.Compute
   capabilities:
      virtual_compute:
           properties:
              virtual_memory:
                  virtual_mem_size: 24G
              requested_additional_capabilities: {}
              virtual_cpu:
                  num_virtual_cpu: 4
node_types:
  tosca.nodes.nfv.VDU.Compute:
    derived_from: tosca.nodes.Root
    capabilities:
      virtual_compute:
        type: tosca.capabilities.nfv.VirtualCompute

capability_types:
  tosca.capabilities.nfv.VirtualCompute:
    derived_from: tosca.capabilities.Root
    properties:
      virtual_memory:
        type: tosca.datatypes.nfv.VirtualMemory
      requested_additional_capabilities:
        entry_schema:
          type: tosca.datatypes.nfv.RequestedAdditionalCapability
        required: false
        type: map
      virtual_cpu:
        type: tosca.datatypes.nfv.VirtualCpu

This patch will be submitted to Openstack.

JIAR: PARSER-135

Change-Id: I7b5e3e909e0950de26b37123938fe719004d5417
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
tosca2heat/tosca-parser/toscaparser/capabilities.py
tosca2heat/tosca-parser/toscaparser/entity_template.py