I think this can be solved by defining a TOSCA data type, in 
https://wiki.onap.org/display/DW/TOSCA+data+types, it has a lot of examples of 
how to define a new data type which contains different elements with different 
types.

tosca.datatypes.nfv.VirtualMemory:
    derived_from: tosca.datatypes.Root
    description: supports the specification of requirements related to virtual 
memory of a virtual compute resource
    properties:
      virtual_mem_size:
        type: scalar-unit.size
        description: Amount of virtual memory.
        required: true
      virtual_mem_oversubscription_policy:
        type: string
        description: The memory core oversubscription policy in terms of 
virtual memory to physical memory on the platform.
        required: false
      vdu_mem_requirements:
        type: map
        description: The hardware platform specific VDU memory requirements. A 
map of strings that contains a set of key-value pairs that describes hardware 
platform specific VDU memory requirements.
        required: false
        entry_schema:
          type: string
      numa_enabled:
        type: boolean
        description: It specifies the memory allocation to be cognisant of the 
relevant process/core allocation.
        required: false
                                                                                
                                                                    default: 
false

so in your example, you can have

tosca.datatypes.ingressBwp
   derived_from: tosca.datatypes.Root
 properties:
   CIR:
    type: integer
   CBS:
    type: integer
   EIR:
    type: integer
   Coupling Flag:
    type: Boolean

regards
shitao
发件人: [email protected] [mailto:[email protected]] 代表 
[email protected]
发送时间: 2019年7月9日 3:26
收件人: [email protected]
主题: [onap-discuss] ONAP SDC TOSCA object node type #sdc

In the resource template (YAML file), how can we represent some node that 
requires object type definition?
For example, when we need to represents the template like below

ingressBwp{
"CIR":"<integar>",
"CBS": "<integar>",
"EIR": "<integar>",
"Coupling Flag":"<boolean>"
...
}

What kind of type we can use for 'ingressBwp' in YAML file? Map is not the 
solution because the entries have different type definition, some have integer 
but others have boolean or string type.
There is no need to support object type node in the TOSCA template file?


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#17917): https://lists.onap.org/g/onap-discuss/message/17917
Mute This Topic: https://lists.onap.org/mt/32398316/21656
Mute #sdc: https://lists.onap.org/mk?hashtag=sdc&subid=2740164
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to