Commit 5b8cee3f authored by Mahesh Jethanandani's avatar Mahesh Jethanandani
Browse files

Fix for bug#94

parent 7b611165
Loading
Loading
Loading
Loading
+145 −18
Original line number Diff line number Diff line
@@ -370,30 +370,23 @@ submodule etsi-nfv-common {
    }
  }

  // The following grouping is Cpd information element as defined in
  // IFA014. IFA011 defines its own Cpd information element, which
  // is defined in etsi-nfv-vnf.yang file. Do not use this grouping
  // for inclusion in a Vnf.
  grouping cpd {
    description
      "The Cpd information element specifies the characteristics of
       connection points attached to NFs and NSs. This is an
       abstract class used as parent for the various Cpd classes.
       It has an attribute 'trunkMode' which enables the NFVO to
       identify whether the Cp instantiated from the Cpd is in trunk
       mode or not.";
      "A Cpd information element describes network
       connectivity to a compute resource or a VL.";
    reference
      "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
      "GS NFV IFA011: Section 7.1.6.3 Cpd information element";

    leaf id {
      type string;
      description
        "Identifier of this Cpd information element.";
      reference
        "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    }
    leaf layer-protocol {
      mandatory true;

    leaf-list layer-protocol {
      default Ethernet;
      type identityref {
        base layer-protocol;
      }
@@ -402,8 +395,9 @@ submodule etsi-nfv-common {
         corresponding to the CPD support for connectivity purposes
         (e.g. Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire, etc.).";
      reference
        "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    }

    leaf role {
      type identityref {
        base cp-role;
@@ -415,8 +409,9 @@ submodule etsi-nfv-common {
         a tree flow pattern within the NS will have legal cpRoles
         of ROOT and LEAF.";
      reference
        "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    }

    leaf description {
      type string;
      description
@@ -424,8 +419,140 @@ submodule etsi-nfv-common {
         connection point (e.g. connection point for control plane
         traffic).";
      reference
        "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    }

    list protocol {
      key "associated-layer-protocol";

      leaf associated-layer-protocol {
        type identityref {
          base layer-protocol;
        }
        description
          "One of the values of the attribute layerProtocol of the Cpd
           IE.";
        reference
          "GS NFV IFA011: Section 7.1.6.8 CpProtocolData information
           element";
      }

      list address-data {
        key "type";

        leaf type {
          type identityref {
            base address-type;
          }
          description
            "Describes the type of the address to be assigned to the
             CP instantiated from the parent CPD.
             Value:
               • MAC address.
               • IP address.
               • Etc.
             The content type shall be aligned with the address type
             supported by the layerProtocol attribute of the parent
             CPD.";
          reference
            "GS NFV IFA011: Section 7.1.3.3 AddressData information
             element";
        }

        container l2-address-data {
          when "../type='mac-address'";
          leaf mac-address-assignment {
            type boolean;
            default true;
            description
              "Specify if the MAC address assignment is the
               responsibility of management and orchestration function
               or not. If it is set to True, it is the management and
               orchestration function responsibility. If it is set to
               False, it will be provided by an external entity,
               e.g. OSS/BSS.";
            reference
              "GS NFV IFA011: Section 7.1.3.5 L2AddressData
               information element";
          }

          description
            "Provides the information on the MAC addresses to be
             assigned to the CP(s) instantiated from the parent CPD.
             Shall be present when the addressType is MAC address.";
          reference
            "GS NFV IFA011: Section 7.1.3.3 AddressData information
             element";
        }

        container l3-address-data {
          when "../type='ip-address'";
          leaf ip-address-assignment {
            type boolean;
            default "true";
            description
              "Specify if the address assignment is the responsibility
               of management and orchestration function or not. If it
               is set to True, it is the management and orchestration
               function responsibility. ";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }

          leaf floating-ip-activated {
            type boolean;
            default "true";
            description
              "Specify if the floating IP scheme is activated on the CP
               or not.";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }

          leaf ip-address-type {
            type enumeration {
              enum "ipv4";
              enum "ipv6";
            }
            description
              "Define address type. The address type should be aligned
               with the address type supported by the layerProtocol
               attribute of the parent VnfExtCpd.";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }

          leaf number-of-ip-addresses {
            type uint32;
            description
              "Minimum number of IP addresses to be assigned based on
               this L3AddressData information element.";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }
        }
        description
          "Provides information on the addresses to be assigned to the
           CP(s) instantiated from the CPD.";
        reference
          "GS NFV IFA011: Section 7.1.6.8 CpProtocolData information
           element";
      }
      description
        "Identifies the protocol layering information the CP uses for
         connectivity purposes and associated information. There shall
         be one cpProtocol for each layer protocol as indicated by the
         attribute layerProtocol. When a PnfExtCpd as defined in ETSI
         GS NFV-IFA 014 [i.8] is inherited from this Cpd, the
         cardinality is set to 0.";
      reference
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    }

    leaf trunk-mode {
      type boolean;
      description
@@ -436,7 +563,7 @@ submodule etsi-nfv-common {
         is not configured for the Cp i.e. It is equivalent to
         Boolean value 'false'.";
      reference
        "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    }
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ submodule etsi-nfv-ns {
          description
            "Identifier of this Cpd information element.";
          reference
            "GS NFC IFA014: Section 6.6.3.1 Cpd information element";
            "GS NFV IFA014: Section 6.6.3.1 Cpd information element";
        }

        leaf address-assignment {
+120 −157
Original line number Diff line number Diff line
@@ -99,161 +99,6 @@ submodule etsi-nfv-vnf {
    }
  }

  // This grouping definition is for use within Vnfd as defined in
  // IFA011. A similar definition of Cpd exists in IFA014, but
  // that is for use with Sapd and Pnfd. Do not use this grouping
  // for that.
  grouping vnf-cpd {
    description
      "A Cpd information element describes network
       connectivity to a compute resource or a VL.";
    reference
      "GS NFC IFA011: Section 7.1.6.3 Cpd Information
       Element";
    leaf id {
      type string;
      description
        "Identifier of this Cpd information element.";
      reference
        "GS NFV IFA011: Section 7.1.6.3, Cpd information element.";
    }
    leaf layer-protocol {
      mandatory true;
      type identityref {
        base layer-protocol;
      }
      description
        "Identifies which protocol the CP uses for connectivity
         purposes (Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire,
         etc.).";
      reference
        "GS NFV IFA011: Section 7.1.6.3, Cpd information element.";
    }
    leaf role {
      type identityref {
	base cp-role;
      }
      description
        "Identifies the role of the port in the context of the
         traffic flow patterns in the VNF or parent NS. For example a
         VNF with a tree flow pattern within the VNF will have legal
         cpRoles of ROOT and LEAF.";
      reference
        "GS NFV IFA011: Section 7.1.6.3, Cpd information element.";
    }
    leaf description {
      type string;
      description
        "Human readable description of the connection point";
      reference
        "GS NFV IFA011: Section 7.1.6.3, Cpd information element.";
    }
    container protocol {
      description
	"Identifies the protocol layering information the CP uses for
         connectivity purposes and associated information. There shall
         be one cpProtocol for each layer protocol as indicated by the
         attribute layerProtocol.";
      reference
	"GS NFV IFA011: Section 7.1.6.3, Cpd information element.";
      leaf associated-layer-protocol {
        type identityref {
          base layer-protocol;
        }
        description
          "One of the values of the attribute layerProtocol of the Cpd
           IE.";
        reference
          "GS NFV IFA011: Section 7.1.6.8, CpProtocolData information
           element.";
      }

      list address-data {
	key "address-type";
	leaf address-type {
	  type identityref {
	    base address-type;
	  }
	  description
	    "Describes the type of the address to be assigned to the CP
             instantiated from the parent CPD.
             Value:
             • MAC address.
             • IP address.
             • …
             The content type shall be aligned with the address type
             supported by the layerProtocol attribute of the parent CPD.";
          reference
            "GS NFV IFA011: Section 7.1.3.3, AddressData information
             element.";
        }
        container l2-address-data {
          when "../address-type='mac-address'";
        }
        container l3-address-data {
          when "../address-type='ip-address'";
	  leaf ip-address-assignment {
            type boolean;
            description
              "Specify if the address assignment is the responsibility
               of management and orchestration function or not. If it
               is set to True, it is the management and orchestration
               function responsibility. ";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }
          leaf floating-ip-activated {
            type boolean;
            description
              "Specify if the floating IP scheme is activated on the CP
               or not.";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
	  }
          leaf ip-address-type {
            type enumeration {
              enum "ipv4";
              enum "ipv6";
            }
            description
              "Define address type. The address type should be aligned
               with the address type supported by the layerProtocol
               attribute of the parent VnfExtCpd.";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }
          leaf number-of-ip-addresses {
            type uint32;
            description
              "Minimum number of IP addresses to be assigned based on
               this L3AddressData information element.";
            reference
              "GS NFV IFA011: Section 7.1.3.4, L3AddressData
               information element.";
          }
        }
        description
          "The AddressData information element supports providing
           information about the addressing scheme and parameters
           applicable to a CP.";
        reference
          "GS NFV IFA011: Section 7.1.3.3, AddressData information
           element.";
      }
    }
    leaf trunk-mode {
      type boolean;
      description
        "Information about whether the CP instantiated from this CPD
         is in Trunk mode (802.1Q or other).";
      reference
        "GS NFV IFA011: Section 7.1.6.3, Cpd information element.";
    }
  }

  grouping vnfd {
    list vnfd {
      key "id";
@@ -437,7 +282,17 @@ submodule etsi-nfv-vnf {
               element.";
          }

          uses vnf-cpd;
          uses cpd;
          leaf security-group-rule-id {
            type leafref {
              path "../../../security-group-rule/id";
            }
            description
              "Reference of the security group rules bound to this
               CPD.";
            reference
              "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
          }
        }
        leaf virtual-compute-desc {
          type leafref {
@@ -1247,6 +1102,103 @@ submodule etsi-nfv-vnf {
        }
      }

      list security-group-rule {
        key "id";

        leaf id {
          type string;
          description
            "Identifier of this SecurityGroupRule information
             element.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        leaf description {
          type string;
          description
            "Human readable description of the security group rule.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        leaf direction {
          type enumeration {
            enum ingress;
            enum egress;
          }
          default "ingress";
          description
            "The direction in which the security group rule is applied.
             Permitted values: INGRESS, EGRESS. Defaults to INGRESS.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        leaf ether-type {
          type enumeration {
            enum ipv4;
            enum ipv6;
          }
          default "ipv4";
          description
            "Indicates the protocol carried over the Ethernet layer.
             Permitted values: IPV4, IPV6. Defaults to IPV4.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        leaf protocol {
          type enumeration {
            enum tcp;
            enum udp;
            enum icmp;
          }
          default "tcp";
          description
            "Indicates the protocol carried over the IP layer.
             Permitted values: any protocol defined in the IANA
             protocol registry, e.g. TCP, UDP, ICMP, etc. Defaults
             to TCP.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        leaf port-range-min {
          must ". <= ../port-range-max";
          type uint16;
          default "0";
          description
            "Indicates minimum port number in the range that is
             matched by the security group rule. Defaults to 0.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        leaf port-range-max {
          must ". >= ../port-range-min";
          type uint16;
          default "65535";
          description
            "Indicates maximum port number in the range that is
             matched by the security group rule. Defaults to 65535.";
          reference
            "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule
             information element.";
        }

        description
          "Defines security group rules to be used by the VNF.";
        reference
          "GS NFV IFA011: Section 7.1.2, VNFD information element.";
      }

      list ext-cpd {
        key "id";
        min-elements 1;
@@ -1280,7 +1232,18 @@ submodule etsi-nfv-vnf {
          }
        }
        uses virtual-network-interface-requirements;
        uses vnf-cpd;
        uses cpd;

        leaf security-group-rule-id {
          type leafref {
            path "../../security-group-rule/id";
          }
          description
            "Reference of the security group rules bound to this
             CPD.";
          reference
            "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
	}
      }

      list df {