huawei-ifm-cpos-trunk

Defines the Cpos-Trunk bundling technology, which bundles multiple physical interfaces into a logical interface.

  • Version: 2020-02-14

    huawei-ifm-cpos-trunk@2020-02-14


    
      module huawei-ifm-cpos-trunk {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-ifm-cpos-trunk";
    
        prefix ifm-cpos-trunk;
    
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-extension {
          prefix ext;
        }
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
         Bantian, Longgang
         Shenzhen 518129
         People's Republic of China
         Website: http://www.huawei.com
         Email: support@huawei.com";
    
        description
          "Defines the Cpos-Trunk bundling technology, which bundles multiple physical interfaces into a logical interface.";
    
        revision "2020-02-14" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "trunk";
    
        typedef channel-mode-type {
          type enumeration {
            enum "vc12" {
              value 0;
              description "VC12.";
            }
            enum "vc4" {
              value 1;
              description "VC4.";
            }
          }
          description "Cpos Trunk Channel Mode.";
        }
    
        typedef active-status-type {
          type enumeration {
            enum "invalid" {
              value 0;
              description "Invalid.";
            }
            enum "active" {
              value 1;
              description
                "The interface is in Active state.";
            }
            enum "inactive" {
              value 2;
              description
                "The interface is in InActive state.";
            }
          }
          description
            "Cpos trunk member active state.";
        }
    
        typedef e1t1-work-mode-type {
          type enumeration {
            enum "framed" {
              value 0;
              description "Framed.";
            }
            enum "unframed" {
              value 1;
              description "Unframed.";
            }
          }
          description "E1T1 work mode type.";
        }
    
        augment /ifm:ifm/ifm:interfaces/ifm:interface {
          when "ifm:type='Cpos-Trunk'";
          description
            "Active when the interface is set to type Cpos-Trunk.";
          container cpos-trunk {
            description
              "Configure the Cpos-Trunk interface, which is a logical interface with multiple physical interfaces being bundled.";
            leaf channel-mode {
              type channel-mode-type;
              default "vc12";
              description "Channel mode.";
            }
    
            leaf up-member-num {
              type uint32 {
                range "0..2";
              }
              config false;
              description
                "Specifies the number of member interfaces in the Up state.";
            }
    
            container members {
              description
                "List of cpos-trunk member interfaces.";
              list member {
                key "name";
                max-elements 2;
                description
                  "Configure cpos-trunk member interfaces.";
                leaf name {
                  type leafref {
                    path
                      "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  must
                    "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='Cpos'";
                  description
                    "Configures a name for a cpos-trunk member interface.";
                }
    
                leaf port-status {
                  type ifm:port-status;
                  config false;
                  description
                    "Displays the status of a cpos-trunk member interface.";
                }
    
                leaf active-status {
                  type active-status-type;
                  config false;
                  description
                    "Displays the active status of a cpos-trunk member interface.";
                }
              }  // list member
            }  // container members
    
            container e1t1s {
              when "not(../channel-mode='vc4')";
              description
                "List of E1T1 port attributes.";
              list e1t1 {
                ext:operation-exclude "create";
                ext:generated-by "system" {
                  when "not(../../channel-mode='vc4')";
                  description "The all instances are generated automatically when channel-mode is not vc4.";
                }
                key "number";
                max-elements 63;
                description
                  "Configure E1T1 port attribute.";
                leaf number {
                  type uint32 {
                    range "1..63";
                  }
                  description "E1T1 number.";
                }
    
                leaf work-mode {
                  type e1t1-work-mode-type;
                  default "framed";
                  description "Work mode.";
                }
    
                container channel-sets {
                  when
                    "not(../work-mode='unframed')";
                  description
                    "List of channel-sets.";
                  list channel-set {
                    key "number";
                    max-elements 31;
                    description
                      "Configure channel-set.";
                    leaf number {
                      type uint32 {
                        range "0..30";
                      }
                      description
                        "Channel-set number.";
                    }
    
                    leaf timeslot-list {
                      type string {
                        length "1..83";
                      }
                      mandatory true;
                      description
                        "Timeslot list. Please enter a number from 0 to 31 with ',' or '-' in the middle, like '1-10,11'.";
                    }
                  }  // list channel-set
                }  // container channel-sets
              }  // list e1t1
            }  // container e1t1s
          }  // container cpos-trunk
        }
      }  // module huawei-ifm-cpos-trunk
    

© 2023 YumaWorks, Inc. All rights reserved.