sonata-nfv / son-cli

SONATA SDK command line interface tools
http://www.sonata-nfv.eu/
Apache License 2.0
3 stars 11 forks source link

son-validate: uniformize connection point IDs #222

Closed lconceicao closed 7 years ago

lconceicao commented 7 years ago

The connection points of NSDs and VNFDs must be declared using the nomenclature 'cp_name'. They should NOT take the form id:cp_name. The latter is reserved for the Virtual Links section referencing connection points declared elsewhere.

For example, in a NSD we typically have:

connection_points:
  - id: "mgmt"
    interface: "ipv4"
    type: "management"
  - id: "input"
    interface: "ipv4"
    type: "external"
  - id: "output"
    interface: "ipv4"
    type: "external"

virtual_links:
  - id: "mgmt"
    connectivity_type: "E-LAN"
    connection_points_reference:
      - "mgmt"
      - "vnf_iperf:mgmt"
  - id: "input-2-iperf"
    connectivity_type: "E-Line"
    connection_points_reference:
      - "input"
      - "vnf_iperf:input"
  - id: "iperf-2-output"
    connectivity_type: "E-Line"
    connection_points_reference:
      - "vnf_iperf:output"
      - "output"

and the corresponding iperf VNFD should be:

connection_points:
  - id: "mgmt"
    interface: "ipv4"
    type: "management"
  - id: "input"
    interface: "ipv4"
    type: "external"
  - id: "output"
    interface: "ipv4"
    type: "external"

virtual_links:
  - id: "mgmt"
    connectivity_type: "E-LAN"
    connection_points_reference:
      - "vdu01:eth0"
      - "mgmt"
    dhcp: True
  - id: "input-2-vdu01"
    connectivity_type: "E-Line"
    connection_points_reference:
      - "input"
      - "vdu01:eth1"
    dhcp: True
  - id: "vdu01-2-output"
    connectivity_type: "E-Line"
    connection_points_reference:
      - "vdu01:eth2"
      - "output"
    dhcp: True

virtual_deployment_units:
    - id: "vdu01"
    (....)
    connection_points:
      - id: "eth0"
        interface: "ipv4"
        type: "internal"
      - id: "eth1"
        interface: "ipv4"
        type  "internal"
      - id: "eth2"
        interface: "ipv4"
        type: "internal"

To be noted that the connection_points section only declared the name of the connection points in the form cp_name without the separator char : The references to the connection points (in Virtual Links) make take the form id:cp_name if the referenced connection point is external, i.e. in the NSD it belongs to a VNF; in a VNFD it belongs to a VDU

lconceicao commented 7 years ago

done