huawei-clocksync-cesacr

Clock ces-acr data model define.

  • Version: 2020-03-04

    huawei-clocksync-cesacr@2020-03-04


    
      module huawei-clocksync-cesacr {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-clocksync-cesacr";
    
        prefix clocksync-cesacr;
    
        import huawei-extension {
          prefix ext;
        }
        import huawei-ifm {
          prefix ifm;
        }
    
        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
          "Clock ces-acr data model define.";
    
        revision "2020-03-04" {
          description
            "Modify the node decsription.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-11-04" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "clksync";
    
        typedef master-pw-state {
          type enumeration {
            enum "none" {
              value 0;
              description
                "The master PW status is null.";
            }
            enum "wait" {
              value 1;
              description
                "The master PW is in the wait state.";
            }
            enum "lock" {
              value 2;
              description
                "The master PW works in lock state.";
            }
          }
          description
            "Master PW status of the CES service.";
        }
    
        typedef recovery-mode {
          type enumeration {
            enum "ces-acr" {
              value 1;
              description
                "The clock recovery mode of the CES service is CES ACR.";
            }
            enum "ces-dcr" {
              value 2;
              description
                "The clock recovery mode of the CES service is CES DCR.";
            }
          }
          description
            "CES ACR clock recovery mode.";
        }
    
        container clocksync-cesacr {
          description "CES ACR clock.";
          container master-domain-infos {
            config false;
            description
              "List of statistics of master domain information.";
            list master-domain-info {
              key "slot-id card-id domain-value";
              description
                "Statistics of master domain information.";
              leaf slot-id {
                type uint32;
                description "Slot ID.";
              }
    
              leaf card-id {
                type uint32;
                description
                  "Slot ID of the subcard.";
              }
    
              leaf domain-value {
                type uint32;
                description "Master domain.";
              }
    
              leaf e1-port {
                type string {
                  length "1..50";
                }
                description
                  "Key master domain port.";
              }
    
              leaf e1-channel-number {
                type uint32;
                description
                  "E1 channel number of the master clock domain.";
              }
    
              container e1-master-infos {
                description
                  "List of statistics of information about the E1 interface that joins the master domain.";
                list e1-master-info {
                  key "port-name e1-number";
                  description
                    "Statistics of information about the E1 interface that joins the master domain.";
                  leaf port-name {
                    type string {
                      length "1..50";
                    }
                    description "E1 port name.";
                  }
    
                  leaf e1-number {
                    type uint32;
                    description
                      "E1 port number.";
                  }
                }  // list e1-master-info
              }  // container e1-master-infos
            }  // list master-domain-info
          }  // container master-domain-infos
    
          container cesacr-sources {
            description
              "List of configure CES ACR clock source.";
            list cesacr-source {
              key "slot-id card-id recovery-domain-value";
              description
                "Configure CES ACR clock source.";
              leaf slot-id {
                type uint32 {
                  range "0..255";
                }
                description
                  "Slot ID of the interface board.";
              }
    
              leaf card-id {
                type uint32 {
                  range "0..255";
                }
                description
                  "Slot ID of the subcard.";
              }
    
              leaf recovery-domain-value {
                type uint32 {
                  range "1..8";
                }
                description
                  "Clock recovery domain.";
              }
            }  // list cesacr-source
          }  // container cesacr-sources
    
          container recovery-domain-infos {
            config false;
            description
              "List of statistics of details about the clock recovery domain.";
            list recovery-domain-info {
              key "slot-id card-id recovery-domain-value";
              description
                "Statistics of details about the clock recovery domain.";
              leaf slot-id {
                type uint32;
                description
                  "Slot ID of the interface board.";
              }
    
              leaf card-id {
                type uint32;
                description
                  "Slot ID of the subcard.";
              }
    
              leaf recovery-domain-value {
                type uint32;
                description
                  "Clock recovery domain.";
              }
    
              leaf pw-port-name {
                type string {
                  length "1..51";
                }
                description
                  "Port name of the master PW.";
              }
    
              leaf pw-channel-id {
                type uint32;
                description
                  "Channel ID of the master PW of the CES service.";
              }
    
              leaf pw-status {
                type master-pw-state;
                description
                  "Master PW status of the CES service.";
              }
    
              container e1-infos {
                description
                  "List of statistics of E1 port information.";
                list e1-info {
                  key "e1-number port-name";
                  description
                    "Statistics of E1 port information.";
                  leaf e1-number {
                    type uint32;
                    description
                      "E1 port number of the clock domain.";
                  }
    
                  leaf port-name {
                    type string {
                      length "1..50";
                    }
                    description
                      "E1 port name of the clock domain.";
                  }
    
                  leaf channel-direction {
                    type uint32;
                    description
                      "E1 channel direction, including upstream, downstream, and both upstream and downstream.";
                  }
    
                  container pw-infos {
                    description
                      "List of statistics of PW information of the CES service.";
                    list pw-info {
                      key "serial-port-name";
                      description
                        "Statistics of PW information of the CES service.";
                      leaf serial-port-name {
                        type string {
                          length "1..51";
                        }
                        description
                          "PW port name of clock domain services.";
                      }
    
                      leaf channel-id {
                        type uint32;
                        description
                          "PW channel ID of clock domain services.";
                      }
                    }  // list pw-info
                  }  // container pw-infos
                }  // list e1-info
              }  // container e1-infos
            }  // list recovery-domain-info
          }  // container recovery-domain-infos
        }  // container clocksync-cesacr
    
        augment /ifm:ifm/ifm:interfaces/ifm:interface {
          description "Interface.";
          container clock-cesacr {
            description
              "Configure CES ACR clock domain.";
            container master-domains {
              when "../../ifm:type='Cpos'";
              description
                "List of the CES ACR clock master domain configurations.";
              list master-domain {
                ext:generated-by "system";
                key "e1-number";
                description
                  "Configure CES ACR clock master domain.";
                leaf e1-number {
                  type uint32 {
                    range "1..63";
                  }
                  description
                    "E1 port number<1-63>.";
                }
    
                leaf domain-value {
                  type uint32 {
                    range "1..32";
                  }
                  description
                    "Master domain value, Cpos port <0-3> can config domain <1-16>, Cpos port <4-7> can config domain <17-32>.";
                }
              }  // list master-domain
            }  // container master-domains
    
            container recovery-domains {
              when
                "(../../ifm:type='E1') or (../../ifm:type='Cpos')";
              description
                "List of the CES ACR clock recovery domain configurations.";
              list recovery-domain {
                ext:generated-by "system";
                key "e1-number";
                description
                  "Configure CES ACR clock recovery domain.";
                leaf e1-number {
                  type uint32 {
                    range "0..63";
                  }
                  must
                    "((../../../../ifm:type='E1') and (../e1-number='0')) or ((../../../../ifm:type='Cpos') and (../e1-number!='0'))";
                  description
                    "E1 port number<1-63>.";
                }
    
                leaf domain-value {
                  type uint32 {
                    range "1..8";
                  }
                  description
                    "Clock recovery domain value of the CES service.";
                }
              }  // list recovery-domain
            }  // container recovery-domains
    
            container recovery-modes {
              when
                "(../../ifm:link-protocol='tdm') and (../../ifm:type='Serial')";
              description
                "Configure CES clock recovery mode.";
              leaf service-mode {
                type recovery-mode;
                description
                  "Clock recovery mode of the CES service.";
              }
            }  // container recovery-modes
          }  // container clock-cesacr
        }
      }  // module huawei-clocksync-cesacr
    

© 2023 YumaWorks, Inc. All rights reserved.