yorc icon indicating copy to clipboard operation
yorc copied to clipboard

Support TOSCA 1.3 to separate capability Compute from capability Container

Open trihoangvo opened this issue 5 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Prior to TOSCA 1.2, the tosca.capabilities.Container has the properties num_cpus, mem_size, disk_size, etc. For all node types having the Container capability (e.g., a security group, or a tosca.capabilities.Container.Docker), it have all properties above. This leads to misunderstanding for the app designer.

Describe the solution you'd like

TOSCA 1.3 introduces the new capability tosca.capabilities.Compute:

tosca.capabilities.Compute:
  derived_from: tosca.capabilities.Container
  properties:
    name:
      type: string
      required: false
    num_cpus:
      type: integer
      required: false
      constraints:
        - greater_or_equal: 1
    cpu_frequency:
      type: scalar-unit.frequency
      required: false
      constraints:
        - greater_or_equal: 0.1 GHz
    disk_size:
      type: scalar-unit.size
      required: false
      constraints:
        - greater_or_equal: 0 MB
    mem_size:
      type: scalar-unit.size
      required: false
      constraints:
        - greater_or_equal: 0 MB

It separates tosca.capabilities.Compute (for a Compute node to provide the compute capability) from tosca.capabilities.Container (for a software component to host other ones). With this, we can define a node "Security Group" to host multiple "Security Rules" and the "Security Group" does not have the confused properties (e.g., num_cpus).

Describe alternatives you've considered

no alternatives

Additional context

Add any other context or screenshots about the feature request here.

trihoangvo avatar Jan 28 '20 11:01 trihoangvo