netconfcentral logo

ietf-pseudowires

HTML

ietf-pseudowires@2017-06-26



  module ietf-pseudowires {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-pseudowires";

    prefix pw;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-routing-types {
      prefix rt-types;
    }

    organization "ietf";

    contact "ietf";

    description "Pseudowire YANG model";

    revision "2017-06-26" {
      description
        "Initial revision "
          + "  - Created a new model for pseudowires, which used "
          + "    to be defined within the L2VPN model "
          + "";
      reference
        "";

    }


    typedef pseudowire-ref {
      type leafref {
        path "/pw:pseudowires/pw:pseudowire/pw:name";
      }
      description
        "A type that is a reference to a pseudowire";
    }

    typedef pw-template-ref {
      type leafref {
        path "/pw:pseudowires/pw:pw-templates/pw:pw-template/pw:name";
      }
      description
        "A type that is a reference to a pw-template";
    }

    typedef cw-negotiation-type {
      type enumeration {
        enum "non-preferred" {
          value 0;
          description
            "No preference for control-word";
        }
        enum "preferred" {
          value 1;
          description
            "Prefer to have control-word negotiation";
        }
      }
      description
        "control-word negotiation preference type";
    }

    typedef pseudowire-status-type {
      type bits {
        bit pseudowire-forwarding {
          position 0;
          description
            "Pseudowire is forwarding";
        }
        bit pseudowire-not-forwarding {
          position 1;
          description
            "Pseudowire is not forwarding";
        }
        bit
          local-attachment-circuit-receive-fault {
          position 2;
          description
            "Local attachment circuit (ingress) receive "
              + "fault";
        }
        bit
          local-attachment-circuit-transmit-fault {
          position 3;
          description
            "Local attachment circuit (egress) transmit "
              + "fault";
        }
        bit
          local-PSN-facing-PW-receive-fault {
          position 4;
          description
            "Local PSN-facing PW (ingress) receive fault";
        }
        bit
          local-PSN-facing-PW-transmit-fault {
          position 5;
          description
            "Local PSN-facing PW (egress) transmit fault";
        }
        bit
          PW-preferential-forwarding-status {
          position 6;
          description
            "Pseudowire preferential forwarding status";
        }
        bit PW-request-switchover-status {
          position 7;
          description
            "Pseudowire request switchover status";
        }
      }
      description
        "Pseudowire status type, as registered in the IANA "
          + "Pseudowire Status Code Registry";
    }

    grouping pw-type-grp {
      description "pseudowire type grouping";
      choice pw-type {
        description
          "A choice of pseudowire type";
        case ldp-or-static-pw {
          leaf peer-ip {
            type inet:ip-address;
            description "peer IP address";
          }

          leaf pw-id {
            type uint32;
            description "pseudowire id";
          }

          leaf icb {
            type boolean;
            description
              "inter-chassis backup";
          }

          leaf transmit-label {
            type rt-types:mpls-label;
            description "transmit lable";
          }

          leaf receive-label {
            type rt-types:mpls-label;
            description "receive label";
          }
        }  // case ldp-or-static-pw
        leaf remote-pe-id {
          type inet:ip-address;
          description "remote pe id";
        }
        leaf remote-ve-id {
          type uint16;
          description "remote ve id";
        }
      }  // choice pw-type
    }  // grouping pw-type-grp

    container pseudowires {
      description
        "Configuration management of pseudowires";
      list pseudowire {
        key "name";
        description "A pseudowire";
        leaf name {
          type string;
          description "pseudowire name";
        }

        leaf state {
          type pseudowire-status-type;
          config false;
          description
            "pseudowire operation status";
          reference
            "RFC 4446 and IANA Pseudowire Status Codes Registery";

        }

        leaf template {
          type pw-template-ref;
          description "pseudowire template";
        }

        leaf mtu {
          type uint16;
          description "PW MTU";
        }

        leaf mac-withdraw {
          type boolean;
          default 'false';
          description
            "Enable (true) or disable (false) MAC withdraw";
        }

        leaf cw-negotiation {
          type cw-negotiation-type;
          description "cw-negotiation";
        }

        leaf tunnel-policy {
          type string;
          description "tunnel policy name";
        }

        choice pw-type {
          description
            "A choice of pseudowire type";
          container configured-pw {
            description
              "LDP or static pseudowire that requires "
                + "manual configuration";
            leaf peer-ip {
              type inet:ip-address;
              description "peer IP address";
            }

            leaf pw-id {
              type uint32;
              description "pseudowire id";
            }

            leaf icb {
              type boolean;
              description
                "inter-chassis backup";
            }

            leaf transmit-label {
              type rt-types:mpls-label;
              description "transmit lable";
            }

            leaf receive-label {
              type rt-types:mpls-label;
              description "receive label";
            }
          }  // container configured-pw
        }  // choice pw-type
      }  // list pseudowire

      container pw-templates {
        description "pw-templates";
        list pw-template {
          key "name";
          description "pw-template";
          leaf name {
            type string;
            description "name";
          }

          leaf mtu {
            type uint16;
            description "pseudowire mtu";
          }

          leaf cw-negotiation {
            type cw-negotiation-type;
            default "preferred";
            description
              "control-word negotiation preference";
          }

          leaf tunnel-policy {
            type string;
            description "tunnel policy name";
          }
        }  // list pw-template
      }  // container pw-templates
    }  // container pseudowires
  }  // module ietf-pseudowires

Summary

  
  
Organization ietf
  
Module ietf-pseudowires
Version 2017-06-26
File ietf-pseudowires@2017-06-26.yang
  
Prefix pw
Namespace urn:ietf:params:xml:ns:yang:ietf-pseudowires
  
Cooked /cookedmodules/ietf-pseudowires/2017-06-26
YANG /src/ietf-pseudowires@2017-06-26.yang
XSD /xsd/ietf-pseudowires@2017-06-26.xsd
  
Abstract Pseudowire YANG model
  
Contact
ietf

Description

 
Pseudowire YANG model

Typedefs

Typedef Base type Abstract
cw-negotiation-type enumeration control-word negotiation preference type
pseudowire-ref leafref A type that is a reference to a pseudowire
pseudowire-status-type bits Pseudowire status type, as registered in the IANA Pseudowire Status Code Registry
pw-template-ref leafref A type that is a reference to a pw-template

Groupings

Grouping Objects Abstract
pw-type-grp pw-type pseudowire type grouping

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
pseudowires container Configuration management of pseudowires
   pseudowire list A pseudowire
      cw-negotiation leaf cw-negotiation
      mac-withdraw leaf Enable (true) or disable (false) MAC withdraw
      mtu leaf PW MTU
      name leaf pseudowire name
      pw-type choice A choice of pseudowire type
         configured-pw case configured-pw
            configured-pw container LDP or static pseudowire that requires manual configuration
               icb leaf inter-chassis backup
               peer-ip leaf peer IP address
               pw-id leaf pseudowire id
               receive-label leaf receive label
               transmit-label leaf transmit lable
      state leaf pseudowire operation status
      template leaf pseudowire template
      tunnel-policy leaf tunnel policy name
   pw-templates container pw-templates
      pw-template list pw-template
         cw-negotiation leaf control-word negotiation preference
         mtu leaf pseudowire mtu
         name leaf name
         tunnel-policy leaf tunnel policy name