module ietf-fabric-types { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-fabric-types"; prefix fabrictypes; import ietf-inet-types { prefix "inet"; revision-date "2013-07-15"; } import ietf-network-topology { prefix nt;} organization "IETF I2RS (Interface to the Routing System) Working Group"; contact "WG Web: WG List: WG Chair: Susan Hares WG Chair: Russ White Editor: Yan Zhuang Editor: Danian Shi "; description "This module contains a collection of YANG definitions for Fabric. Copyright (c) 2016 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(http://trustee.ietf.org/license-info). This version of this YANG module is part of draft-zhuang-i2rs-yang-dc-fabric-network-topology; see the RFC itself for full legal notices."; revision "2017-11-29"{ description "add identities for bandwidth and port-type"; reference "draft-ietf-i2rs-yang-dc-fabric-network-topology-02"; } revision "2016-09-29" { description "Initial revision of faas."; reference "draft-zhuang-i2rs-yang-dc-fabric-network-topology-02"; } identity fabric-type { 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 port-type { description "base type for fabric port"; } identity eth { base port-type; description "ETH"; } identity serial { base port-type; description "Serial"; } identity bandwidth { description "base for bandwidth"; } identity bw-1M { base bandwidth; description "1M"; } identity bw-10M { base bandwidth; description "10M"; } identity bw-100M { base bandwidth; description "100M"; } identity bw-1G { base bandwidth; description "1G"; } identity bw-10G { base bandwidth; description "10G"; } identity bw-40G { base bandwidth; description "40G"; } identity bw-100G{ base bandwidth; description "100G"; } typedef service-capabilities { type enumeration { enum ip-mapping { description "NAT"; } enum acl-redirect{ description "acl redirect, which can provide SFC function"; } enum dynamic-route-exchange{ description "dynamic route exchange"; } } description "capability of the device"; } /* * Typedefs */ 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 device-role { type enumeration { enum SPINE { description "a spine node"; } enum LEAF { description "a leaf node"; } enum BORDER { description "a border node"; } } default "LEAF"; description "device role type"; } typedef fabric-port-role { type enumeration { enum internal { description "the port used for devices to access each other."; } enum external { description "the port used for fabric to access outside network."; } enum access { description "the port used for Endpoint to access fabric."; } enum reserved { description " not decided yet. "; } } description "the role of the physical port "; } typedef fabric-port-type { type enumeration { enum layer2interface { description "l2 if"; } enum layer3interface { description "l3 if"; } enum layer2Tunnel { description "l2 tunnel"; } enum layer3Tunnel { description "l3 tunnel"; } } description "fabric port type"; } typedef underlay-network-type { type enumeration { enum VXLAN { description "vxlan"; } enum TRILL { description "trill"; } enum VLAN { description "vlan"; } } description "underlay network 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"; case gre { leaf src-ip { type inet:ip-prefix; description "source address"; } leaf dest-ip { type inet:ip-address; description "destination address"; } } } } grouping route-group { description "route attributes"; list route { key "destination-prefix"; description "route list"; leaf description { type string; description "Textual description of the route."; } leaf destination-prefix { type inet:ipv4-prefix; mandatory true; description "IPv4 destination prefix."; } choice next-hop-options { description "choice of next hop options"; case simple-next-hop { leaf next-hop { type inet:ipv4-address; description "IPv4 address of the next hop."; } leaf outgoing-interface { type nt:tp-id; description "Name of the outgoing interface."; } } } } } grouping port-functions { description "port functions"; container port-function { description "port functions"; choice function-type { description "type of functions"; case ip-mapping { list ip-mapping-entry { key "external-ip"; description "list of NAT entry"; leaf external-ip { type inet:ipv4-address; description "external address"; } leaf internal-ip { type inet:ipv4-address; description "internal address"; } } } } } } grouping acl-list { description "acl list"; list fabric-acl { key fabric-acl-name; description "fabric acl list"; leaf fabric-acl-name { type string; description "acl name"; } } } }