etsi-nfv-common.yang 27.8 KB
Newer Older
submodule etsi-nfv-common {
  yang-version 1.1;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  belongs-to etsi-nfv-descriptors {
    prefix nfv;
  }

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 6991: Common YANG Data Types.";
  }

  organization
    "European Telecommunications Standards Institute (ETSI)";

  description
    "Common data types for ETSI data models.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  revision 2019-10-01 {
    description
      "Version 2.7.1.

       Common data structures to support VNFD and NSD according to:
       ETSI GS NFV-IFA 014 Ed271v264
       ETSI GS NFV-IFA 011 Ed271v264";
  }
  revision 2019-04-25 {
    description
      "Initial revision

       Common data structures to support VNFD and NSD according to:
       ETSI GS NFV-IFA 014 Ed261v252
       ETSI GS NFV-IFA 011 Ed261v254";
  }

  /*
   * Identities.
   */
  identity layer-protocol {
  }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity ethernet {
    base layer-protocol;
  }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity mpls {
    base layer-protocol;
  }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity odu2 {
    base layer-protocol;
  }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity ipv4 {
    base layer-protocol;
  }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity ipv6 {
    base layer-protocol;
  }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity pseudo-wire {
    base layer-protocol;
  }

  identity 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.";
  }
  identity mac-address {
    base address-type;
  }
  identity ip-address {
    base address-type;
  }

  identity supported-operation {
    description
      "Indicates which operations are available for this DF via the
       VNF LCM interface. Instantiate VNF, Query VNF and Terminate
       VNF are supported in all DF and therefore need not be
       included in this list.";
    reference
      "GS NFV IFA011: Section 7.1.8.2 VnfDf information element";
  }
  identity instantiate-vnf {
    base supported-operation;
    description
      "This operation instantiates a particular DF of a VNF based on
       the definition in the VNFD.";
    reference
      "GS NFV IFA007: Section 7.2.3 Instantiate VNF Operation";
  }
  identity scale-vnf {
    base supported-operation;
    description
      "This operation provides methods to request scaling a VNF in
       multiple ways:
       • horizontal scaling:
         - scale out: adding additional VNFC instances to the VNF to
           increase capacity
         - scale in: removing VNFC instances from the VNF, in order to
           release unused capacity";
    reference
      "GS NFV IFA007: Section 7.2.4 Scale VNF Operation";
  }
  identity scale-vnf-to-level {
    base supported-operation;
    description
      "This operation scales an instantiated VNF of a particular DF to
       a target size. The target size is either expressed as an
       instantiation level of that DF as defined in the VNFD, or given
       as a list of scale levels, one per scaling aspect of that DF.
       Instantiation levels and scaling aspects are declared in the
       VNFD. Typically, the result of this operation is adding and/or
       removing Network Functions Virtualization Infrastructure (NFVI)
       resources to/from the VNF.";
    reference
      "GS NFV IFA007: Section 7.2.5 Scale VNF To Level Operation";
  }
  identity change-vnf-flavour {
    base supported-operation;
    description
      "This operation changes the DF of a VNF instance.";
    reference
      "GS NFV IFA007: Section 7.2.6 Change VNF Flavour Operation";
  }
  identity terminate-vnf {
    base supported-operation;
    description
      "This operation terminates a VNF.

       A VNF can be terminated gracefully or forcefully. Graceful
       termination means that the VNFM arranges to take the
       VNF out of service, e.g. by asking the VNF's EM to take the
       VNF out of service, and only after that shuts down the
       VNF and releases the resources. Forceful termination means that
       the VNFM immediately shuts down the VNF and releases the
       resources. A time interval can be specified for taking the VNF
       out of service, after which the VNF is shut down if taking it
       out of service has not completed.";
    reference
      "GS NFV IFA007: Section 7.2.7 Terminate VNF Operation";
  }
  identity query-vnf {
    base supported-operation;
    description
      "This operation provides information about VNF instances. The
       applicable VNF instances can be chosen based on
       filtering criteria, and the information can be restricted to
       selected attributes.";
    reference
      "GS NFV IFA007: Section 7.2.9 Query VNF Operation";
  }
  identity heal-vnf {
    base supported-operation;
    description
      "This operation enables the NFVO to request a VNFM to perform a
       VNF healing procedure.";
    reference
      "GS NFV IFA007: Section 7.2.10 Heal VNF Operation";
  }
  identity operate-vnf {
    base supported-operation;
    description
      "This operation enables requesting to change the state of a VNF
       instance, including starting and stopping the VNF instance.";
    reference
      "GS NFV IFA007: Section 7.2.11 Operate VNF Operation";
  }
  identity modify-vnf-information {
    base supported-operation;
    description
      "This operation allows updating information about a VNF
       instance.";
    reference
      "GS NFV IFA007: Section 7.2.12 Modify VNF Operation";
  }

  identity cp-role {
    description
      "Identifies the role of the port in the context of the traffic
       flow patterns in the VNF or parent NS.";
    reference
      "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
  }
  identity root {
    base cp-role;
  }
  identity leaf {
    base cp-role;
  identity checksum-algorithm {
    description
      "Identifies the algorithms supported for the purpose of
       calculating the checksum.";
    reference
      "GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
  }

  identity sha-224 {
    base checksum-algorithm;
    description
      "SHA-224.";
    reference
      "GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
  }

  identity sha-256 {
    base checksum-algorithm;
    description
      "SHA-256.";
    reference
      "GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
  }

  identity sha-384 {
    base checksum-algorithm;
    description
      "SHA-384.";
    reference
      "GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
  }

  identity sha-512 {
    base checksum-algorithm;
    description
      "SHA-512.";
    reference
      "GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed

  identity storage-type {
    description
      "Base type of storage that identities can derive from.";
  }

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity block {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
    base storage-type;
    description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      "Block type of storage.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity object {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
    base storage-type;
    description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      "Object type of storage.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  identity file {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
    base storage-type;
    description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      "File type of storage.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  }
  identity forwarding-behaviour {
    description
      "Base identity for forwarding behaviour.";
  }

  identity all {
    base forwarding-behaviour;
    description
      "Traffic flows shall be forwarded simultaneously to all CP
       or SAP instances created from the referenced CP profile(s).";
  }

  identity lb {
    base forwarding-behaviour;
    description
      "Traffic flows shall be forwarded to one CP or SAP instance
       created from the referenced CP profile(s) selected based on
       a load-balancing algorithm.";
  }

  identity vip-function {
    description
      "Indicates the function the virtual IP address is used for.";
  }

  identity high-availability {
    base vip-function;
    description
      "High availability function.";
  }

  identity load-balancing {
    base vip-function;
    description
      "Load balancing function.";
  }

  identity vnic-type {
    description
      "Describes the type of the virtual network interface realizing
       the CPs instantiated from this CPD. This is used to determine
       which mechanism driver(s) to be used to bind the port. Value:
       • NORMAL
       • VIRTIO
       • DIRECT
       • BAREMETAL
       • VIRTIO-FORWARDER
       • DIRECT-PHYSICAL
       • SMART-NIC";
  }

  identity normal {
    base vnic-type;
    description
      "Normal NIC.";
  }

  identity virtio {
    base vnic-type;
    description
      "VirtIO NIC.";
  }

  identity direct {
    base vnic-type;
    description
      "Direct NIC type.";
  }

  identity bare-metal {
    base vnic-type;
    description
      "Bare metal NIC type.";
  }

  identity virtio-forwarder {
    base vnic-type;
    description
      "VirtIO Forwarder NIC type.";
  }

  identity direct-physical {
    base vnic-type;
    description
      "Direct physical NIC type.";
  }

  identity smart-nic {
    base vnic-type;
    description
      "SmartNIC or Smart NIC type.";
  }

  typedef flow-pattern {
    type enumeration {
      enum line;
      enum tree;
      enum mesh;
    }
  }

  typedef affinity-type {
    type enumeration {
      enum "affinity";
      enum "anti-affinity";
    }
  }

  typedef affinity-scope {
    type enumeration {
      enum "nfvi-node";
      enum "zone-group";
      enum "zone";
      enum "nfvi-pop";
    }
  }

  typedef internal-lifecycle-management-script-event {
    type enumeration {
      enum "start-instantiation";
      enum "end-instantiation";
      enum "start-scaling";
      enum "end-scaling";
      enum "start-healing";
      enum "end-healing";
      enum "start-termination";
      enum "end-termination";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      enum "start-vnf-flavour-change";
      enum "end-vnf-flavour-change";
      enum "start-vnf-operation-change";
      enum "end-vnf-operation-change";
      enum "start-vnf-ext-conn-change";
      enum "end-vnf-ext-conn-change";
      enum "start-vnfinfo-modification";
      enum "end-vnfinfo-modification";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      enum "start-vnf-snapshot-creation";
      enum "end-vnf-snapshot-creation";
      enum "start-vnf-snapshot-reverting-to";
      enum "end-vnf-snapshot-reverting-to";
      enum "start-change-current-vnf-package";
      enum "end-change-current-vnf-package";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
  typedef external-lifecycle-management-script-event {
    type enumeration {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      enum "instantiation";
      enum "scaling";
      enum "healing";
      enum "termination";
      enum "vnf-flavour-change";
      enum "vnf-operation-change";
      enum "vnf-ext-conn-change";
      enum "vnfinfo-modification";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      enum "vnf-snapshot-creation";
      enum "vnf-snapshot-reverting-to";
      enum "change-current-vnf-package";
    }
  }

  grouping nfvi-maintenance-info {
    container nfvi-maintenance-info {

      leaf impact-notification-lead-time {
        type yang:timeticks;
	mandatory true;
        description
          "The value specifies the minimum notification lead time
           requested for upcoming impact of the virtualised resource
           or their group (i.e. between the notification and the
           action causing the impact).";
        reference
          "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
           information element";
      }

      leaf is-impact-mitigation-requested {
        type boolean;
        description
          "When set to True, it is requested that at the time of the
           notification of an upcoming change that is expected to have
           an impact on the VNF, virtualised resource(s) of the same
           characteristics as the impacted ones is/are provided to
           compensate for the impact. Cardinality 0 corresponds to the
           value False.";
        reference
          "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
           information element";
      }

      leaf-list supported-migration-type {
        type enumeration {
          enum "no-migration";
          enum "offline-migration";
          enum "live-migration";
        }
        description
          "Applicable to VirtualComputeDesc and VirtualStorageDesc.
           When present, specifies the allowed migration types in the
           order of preference in case of an impact starting with the
           most preferred type. Possible values: NO_MIGRATION,
           OFFLINE_MIGRATION, LIVE_MIGRATION.";
        reference
          "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
           information element";
      }

      leaf max-undetectable-interruption-time {
        type yang:timeticks;
        description
          "Applicable to VirtualComputeDesc and VirtualStorageDesc.
           When present, it specifies the maximum interruption time
           that can go undetected at the VNF level and therefore
           which will not trigger VNFinternal recovery during live
           migration.";
        reference
          "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
           information element";
      }

      leaf min-recovery-time-between-impacts {
        type yang:timeticks;
        description
          "When present, it specifies the time required by the group
           to recover from an impact, thus, the minimum time
           requested between consecutive impacts of the group.";
        reference
          "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
           information element";
      }

      list max-number-of-impacted-instances {
        key "group-size";
        ordered-by user;
        must "./max-number-of-impacted-instances <= ./group-size";

        leaf group-size {
          type uint32;
          description
            "When present, it determines the size of the group for
             which the maxNumberOfImpactedInstances is specified.
             Otherwise the size is not limited.

             Each groupSize value specified for a group of virtual
             resources shall be unique, and it shall be possible
             to form an ascending ordered list of groupSizes.

             The number of instances in the group for which the
             maxNumberOfImpactedInstances is specified may be equal
             to groupSize or less. When the number of instances is
             less than the groupSize, it shall be at least 1 if this
             is the first groupSize in the ordered list of groupSizes,
             or it shall be greater by at least 1 than the previous
             groupSize in the ordered list of groupSizes.";

          reference
            "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
             information element";
        }

        leaf max-number-of-impacted-instances {
          type uint32 {
            range "1 .. max";
          }
          description
            "The maximum number of instances that can be impacted
             simultaneously within the group of the specified size.";
          reference
            "GS NFV-IFA011: Section 7.1.8.17, NfviMaintenanceInfo
             information element";
        }
      }
    }
  }

  grouping connectivity-type {
    container connectivity-type {
      leaf-list layer-protocol {
        type identityref {
          base layer-protocol;
        }
        description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
          "Identifies the protocols that the VL uses (Ethernet,
           MPLS, ODU2, IPV4, IPV6, Pseudo-Wire). The top layer
           protocol of the VL protocol stack shall always be provided.
           The lower layer protocols may be included when there are
           specific requirements on these layers.";
        reference
          "GS NFV IFA011: Section 7.1.7.3, ConnectivityType
           information element.";
      }

      leaf flow-pattern {
        type flow-pattern;
        description
          "Identifies the flow pattern of the connectivity (Line,
           Tree, Mesh).";
        reference
          "GS NFV IFA011: Section 7.1.7.3, ConnectivityType
           information element.";
      }
    }
  }

  grouping link-bitrate-requirements {
    leaf root {
      type uint64;
      units "Mbps";
      mandatory true;
      description
        "Specifies the throughput requirement of
         the link (e.g. bitrate of E-Line, root bitrate
         of E-Tree, aggregate capacity of E-LAN).";
      reference
        "GS NFV IFA011: Section 7.1.8.6, LinkBitrateRequirements
         information element.";
    }

    leaf leaf {
      type uint64;
      units "Mbps";
      description
        "Specifies the throughput requirement of
        leaf connections to the link when
        applicable to the connectivity type (e.g. for
        E-Tree and E-LAN branches).";
      reference
        "GS NFV IFA011: Section 7.1.8.6, LinkBitrateRequirements
         information element.";
    }
  }

  grouping monitoring-parameter {
    leaf name {
      type string;
      description
        "Human readable name of the monitoring parameter.";
      reference
        "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter
         information element.";
    }
    leaf performance-metric {
      type string;
      description
        "Performance metric that is monitored. This attribute shall
         contain the related 'Measurement Name' value as defined in
         clause 7.2 of ETSI GS NFV-IFA 027";
      reference
        "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter
         information element and Section 7.2 of ETSI GS NFV-IFA 027.";
    }
    leaf collection-period {
      type uint64;
      units "ms";
      description
        "An attribute that describes the recommended periodicity at
         which to collect the performance information. VNFM determines
         if this parameter is considered.

         The vendor may provide this information as a guidance for
         creating PmJobs if needed.";
      reference
        "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter
         information element.";
    }
  }

  grouping security-parameters {
    leaf signature {
      type string;
      description
        "Provides the signature of the signed part of the
         descriptor.";
      reference
        "GS NFV IFA014: Section 6.2.5, SecurityParameters
         information element.";
    }
    leaf algorithm {
      type string;
      description
        "Identifies the algorithm used to compute the signature.";
      reference
        "GS NFV IFA014: Section 6.2.5, SecurityParameters
         information element.";
    }
    leaf certificate {
      type string;
      description
        "Provides a certificate or a reference to a certificate to
         validate the signature.";
      reference
        "GS NFV IFA014: Section 6.2.5, SecurityParameters
         information element.";
    }
  }
  grouping cpd {
    description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      "A Cpd information element describes network
       connectivity to a compute resource or a VL.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    leaf id {
      type string;
      description
        "Identifier of this Cpd information element.";
      reference
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed

    leaf-list layer-protocol {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
      default ethernet;
      type identityref {
        base layer-protocol;
        "Identifies a protocol that the connection points
         corresponding to the CPD support for connectivity purposes
         (e.g. Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire, etc.).";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    leaf role {
      type identityref {
        base cp-role;
        "Identifies the role of the connection points
         corresponding to the CPD in the context of the traffic
         flow patterns in the VNF, PNF or NS. For example an NS with
         a tree flow pattern within the NS will have legal cpRoles
         of ROOT and LEAF.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
    leaf description {
      type string;
      description
        "Provides human-readable information on the purpose of the
         connection point (e.g. connection point for control plane
         traffic).";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed

    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;
            mandatory true;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
            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;
            mandatory true;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
            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;
            mandatory true;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
            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
        "Information about whether the Cp instantiated from this CPD
         is in Trunk mode (802.1Q or other). When operating in
         'trunk mode', the Cp is capable of carrying traffic for
         several VLANs. A cardinality of 0 implies that trunkMode
         is not configured for the Cp i.e. It is equivalent to
         Boolean value 'false'.";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
        "GS NFV IFA011: Section 7.1.6.3 Cpd information element";
  }

  grouping security-group-rule {
    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.";
    }