netconfcentral logo

ietf-dc-fabric-types@2019-02-25



  module ietf-dc-fabric-types {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types";

    prefix fabrictypes;

    import ietf-network {
      prefix nw;
      reference
        "RFC 8345: A YANG Data Model for Network Topologies";


    }

    organization
      "IETF I2RS (Interface to the Routing System) Working Group";

    contact
      "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
WG List:   <mailto:i2rs@ietf.org>

Editor:    Yan Zhuang
	   <mailto:zhuangyan.zhuang@huawei.com>

Editor:    Danian Shi
	   <mailto:shidanian@huawei.com>";

    description
      "This module contains a collection of YANG definitions for
fabric.

Copyright (c) 2019 IETF Trust and the persons identified
as authors of the code.  All rights reserved.

Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).

This version of this YANG module is part of RFC 8542;
see the RFC itself for full legal notices.";

    revision "2019-02-25" {
      description "Initial revision.";
      reference
        "RFC 8542: A YANG Data Model for Fabric Topology
        in Data-Center Networks";

    }


    identity fabric-type {
      base 
      description
        "Base type for fabric networks";
    }

    identity vxlan-fabric {
      base fabric-type;
      description "VXLAN fabric";
    }

    identity vlan-fabric {
      base fabric-type;
      description "VLAN fabric";
    }

    identity trill-fabric {
      base fabric-type;
      description "TRILL fabric";
    }

    identity port-type {
      base 
      description
        "Base type for fabric port";
    }

    identity eth {
      base port-type;
      description "Ethernet";
    }

    identity serial {
      base port-type;
      description "Serial";
    }

    identity bandwidth {
      base 
      description "Base for bandwidth";
    }

    identity bw-1M {
      base bandwidth;
      description "1M";
    }

    identity bw-10M {
      base bandwidth;
      description "10Mbps";
    }

    identity bw-100M {
      base bandwidth;
      description "100Mbps";
    }

    identity bw-1G {
      base bandwidth;
      description "1Gbps";
    }

    identity bw-10G {
      base bandwidth;
      description "10Gbps";
    }

    identity bw-25G {
      base bandwidth;
      description "25Gbps";
    }

    identity bw-40G {
      base bandwidth;
      description "40Gbps";
    }

    identity bw-100G {
      base bandwidth;
      description "100Gbps";
    }

    identity bw-400G {
      base bandwidth;
      description "400Gbps";
    }

    identity device-role {
      base 
      description
        "Base for the device role in a fabric.";
    }

    identity spine {
      base device-role;
      description
        "This is a spine node in a fabric.";
    }

    identity leaf {
      base device-role;
      description
        "This is a leaf node in a fabric.";
    }

    identity border {
      base device-role;
      description
        "This is a border node to connect to other
fabric/network.";
    }

    identity fabric-port-role {
      base 
      description
        "Base for the port's role in a fabric.";
    }

    identity internal {
      base fabric-port-role;
      description
        "The port is used for devices to access each
other within a fabric.";
    }

    identity external {
      base fabric-port-role;
      description
        "The port is used for a fabric to connect to
outside network.";
    }

    identity access {
      base fabric-port-role;
      description
        "The port is used for an endpoint to connect
to a fabric.";
    }

    identity service-capability {
      base 
      description
        "Base for the service of the fabric ";
    }

    identity ip-mapping {
      base service-capability;
      description "NAT.";
    }

    identity acl-redirect {
      base service-capability;
      description
        "ACL redirect, which can provide a Service Function Chain (SFC).";
    }

    identity dynamic-route-exchange {
      base service-capability;
      description "Dynamic route exchange.";
    }

    typedef fabric-id {
      type nw:node-id;
      description
        "An identifier for a fabric in a topology.
This identifier can be generated when composing a fabric.
The composition of a fabric can be achieved by defining an
RPC, which is left for vendor specific implementation
and not provided in this model.";
    }

    typedef service-capabilities {
      type identityref {
        base service-capability;
      }
      description
        "Service capability of the fabric";
    }

    typedef port-type {
      type identityref {
        base port-type;
      }
      description
        "Port type: ethernet or serial or others.";
    }

    typedef bandwidth {
      type identityref {
        base bandwidth;
      }
      description "Bandwidth of the port.";
    }

    typedef node-ref {
      type instance-identifier;
      description
        "A reference to a node in topology";
    }

    typedef tp-ref {
      type instance-identifier;
      description
        "A reference to a termination point in topology";
    }

    typedef link-ref {
      type instance-identifier;
      description
        "A reference to a link in topology";
    }

    typedef underlay-network-type {
      type identityref {
        base fabric-type;
      }
      description
        "The type of physical network that implements
this fabric.  Examples are VLAN and TRILL.";
    }

    typedef device-role {
      type identityref {
        base device-role;
      }
      description "Role of the device node.";
    }

    typedef fabric-port-role {
      type identityref {
        base fabric-port-role;
      }
      description
        "Role of the port in a fabric.";
    }

    typedef fabric-port-type {
      type enumeration {
        enum "layer2interface" {
          value 0;
          description "L2 interface";
        }
        enum "layer3interface" {
          value 1;
          description "L3 interface";
        }
        enum "layer2Tunnel" {
          value 2;
          description "L2 tunnel";
        }
        enum "layer3Tunnel" {
          value 3;
          description "L3 tunnel";
        }
      }
      description "Fabric port type";
    }

    grouping fabric-port {
      description
        "Attributes of a fabric port.";
      leaf name {
        type string;
        description "Name of the port.";
      }

      leaf role {
        type fabric-port-role;
        description
          "Role of the port in a fabric.";
      }

      leaf type {
        type fabric-port-type;
        description "Type of the port";
      }

      leaf device-port {
        type tp-ref;
        description
          "The device port it mapped to.";
      }

      choice tunnel-option {
        description
          "Tunnel options to connect two fabrics.
It could be L2 Tunnel or L3 Tunnel.";
      }  // choice tunnel-option
    }  // grouping fabric-port
  }  // module ietf-dc-fabric-types