Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TOSCA 1.3 to separate capability Compute from capability Container #589

Open
trihoangvo opened this issue Jan 28, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@trihoangvo
Copy link
Contributor

trihoangvo commented Jan 28, 2020

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 trihoangvo added the enhancement New feature or request label Jan 28, 2020
trihoangvo added a commit to opentelekomcloud/yorc that referenced this issue Feb 4, 2020
trihoangvo added a commit to opentelekomcloud/yorc that referenced this issue Feb 4, 2020
* Update all nodes hosting on a "tosca.nodes.Compute" and
  "tosca.nodes.WebServer" node to have a requirement from
  type "tosca.capabilities.Compute" as in TOSCA profile v1.3.
* For other nodes, they continue to have the requirement
  "tosca.capabilities.Container" as they are hosted on a
  SoftwareComponent.

ystiaGH-589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant