Cisco-IOS-XR-sysadmin-sm

This module contains a collection of YANG definitions for Cisco IOS-XR SysAdmin configuration. This module holds Shelf Manageme...

  • Version: 2020-09-01

    Cisco-IOS-XR-sysadmin-sm@2020-09-01


    
      module Cisco-IOS-XR-sysadmin-sm {
    
        yang-version 1;
    
        namespace
          "http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-sm";
    
        prefix shelf_sm;
    
        import tailf-common {
          prefix tailf;
        }
        import ietf-yang-types {
          prefix ietf;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-sysadmin-types {
          prefix calvados;
        }
        import Cisco-IOS-XR-sysadmin-show-trace {
          prefix show_trace;
        }
        import cisco-semver {
          prefix semver;
        }
    
        organization "Cisco Systems Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 West Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 800 553-NETS
         
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG
         definitions for Cisco IOS-XR SysAdmin configuration.
         
         This module holds Shelf Management configuration data.
         
         Copyright (c) 2011-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-09-01" {
          description
            "Moved cluster oper command to shared_pkg
           2020-07-07
             Added support for cluster oper command
           2019-12-15
             Added ESD rack config";
        }
    
        revision "2019-04-15" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2018-04-09" {
          description
            "Required changes for ConfD 6.4.5";
        }
    
        revision "2017-07-22" {
          description
            "Updated chassis rack number pattern to include Compute Racks";
        }
    
        revision "2017-04-12" {
          description
            "Changed namespace and module name";
        }
    
        revision "2016-10-12" {
          description
            "Unhide commands and configs. Moved to advanced-grp";
        }
    
        revision "2012-01-05" {
          description
            "show platform [detail] [location L] support";
        }
    
        revision "2011-11-08" {
          description "Initial revision";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        grouping sm-oper-group {
          container oper {
            config false;
            uses ctrace-oper-group;
    
            uses platform-oper-group;
    
            uses chassis-oper-group;
    
            uses reload-rack-oper-group;
    
            uses reboot-history-oper-group;
    
            uses mgmt-interfaces-oper-group;
    
            uses reload-vm-oper-group;
    
            uses mac-pool-oper-group;
    
            uses reboot-pending-oper-group;
          }  // container oper
        }  // grouping sm-oper-group
    
        grouping ctrace-oper-group {
          container shelf_mgr {
            uses show_trace:traceable;
          }  // container shelf_mgr
        }  // grouping ctrace-oper-group
    
        grouping platform-oper-group {
          container platform {
            config false;
            uses platform-summary-oper-group;
    
            uses platform-detail-oper-group;
    
            uses platform-slices-oper-group;
          }  // container platform
        }  // grouping platform-oper-group
    
        grouping chassis-oper-group {
          container chassis {
            config false;
            uses chassis-brief-oper-group;
          }  // container chassis
        }  // grouping chassis-oper-group
    
        grouping reload-rack-oper-group {
          container reload {
            config false;
            container rack {
              list racks {
                key "rack";
                leaf rack {
                  type string;
                }
              }  // list racks
            }  // container rack
          }  // container reload
        }  // grouping reload-rack-oper-group
    
        grouping reload-vm-oper-group {
          container reload_vm {
            config false;
            list location {
              key "location";
              leaf location {
                type string;
              }
            }  // list location
          }  // container reload_vm
        }  // grouping reload-vm-oper-group
    
        grouping reboot-history-events-oper-group {
          list events {
            key "event_idx";
            leaf event_idx {
              type uint32;
            }
    
            container event {
              leaf timestamp {
                type string;
              }
    
              leaf reason_code {
                type uint32;
              }
    
              leaf reason {
                type string;
              }
    
              leaf src_loc {
                type string;
              }
    
              leaf src_name {
                type string;
              }
            }  // container event
          }  // list events
        }  // grouping reboot-history-events-oper-group
    
        grouping reboot-pending-events-oper-group {
          list delay_events {
            key "delay_event_idx";
            leaf delay_event_idx {
              type uint32;
            }
    
            container delay_event {
              leaf active {
                type boolean;
              }
    
              leaf wait {
                type uint64;
              }
    
              leaf when {
                type uint64;
              }
    
              leaf reason {
                type string;
              }
    
              leaf count {
                type uint32;
              }
            }  // container delay_event
          }  // list delay_events
        }  // grouping reboot-pending-events-oper-group
    
        grouping reboot-history-card-oper-group {
          container card {
            list location {
              key "location";
              leaf location {
                type calvados:location-id;
              }
    
              uses reboot-history-events-oper-group;
            }  // list location
          }  // container card
        }  // grouping reboot-history-card-oper-group
    
        grouping reboot-history-admin-vm-oper-group {
          container admin-vm {
            list location {
              key "location";
              leaf location {
                type calvados:location-id;
              }
    
              uses reboot-history-events-oper-group;
            }  // list location
          }  // container admin-vm
        }  // grouping reboot-history-admin-vm-oper-group
    
        grouping reboot-history-reverse-oper-group {
          container reverse {
            uses reboot-history-card-oper-group;
    
            uses reboot-history-admin-vm-oper-group;
          }  // container reverse
        }  // grouping reboot-history-reverse-oper-group
    
        grouping reboot-pending-card-oper-group {
          container card {
            list location {
              key "location";
              leaf location {
                type calvados:location-id;
              }
    
              uses reboot-pending-events-oper-group;
            }  // list location
          }  // container card
        }  // grouping reboot-pending-card-oper-group
    
        grouping reboot-history-oper-group {
          container reboot-history {
            config false;
            uses reboot-history-card-oper-group;
    
            uses reboot-history-admin-vm-oper-group;
    
            uses reboot-history-reverse-oper-group;
          }  // container reboot-history
        }  // grouping reboot-history-oper-group
    
        grouping reboot-pending-oper-group {
          container reboot-pending {
            config false;
            uses reboot-pending-card-oper-group;
          }  // container reboot-pending
        }  // grouping reboot-pending-oper-group
    
        grouping mgmt-interfaces-oper-group {
          list interface {
            key "ifname";
            leaf ifname {
              type string;
            }
    
            container interface-data {
              leaf mac {
                type ietf:mac-address;
              }
    
              leaf ipv4 {
                type inet:ipv4-address;
              }
    
              leaf flagstr {
                type string;
              }
    
              leaf port_status {
                type string;
              }
    
              leaf mtu {
                type uint32;
              }
    
              leaf metric {
                type uint32;
              }
    
              leaf rx_pak {
                type uint32;
              }
    
              leaf rx_errors {
                type uint32;
              }
    
              leaf rx_dropped {
                type uint32;
              }
    
              leaf rx_overruns {
                type uint32;
              }
    
              leaf rx_frame {
                type uint32;
              }
    
              leaf tx_pak {
                type uint32;
              }
    
              leaf tx_errors {
                type uint32;
              }
    
              leaf tx_dropped {
                type uint32;
              }
    
              leaf tx_overruns {
                type uint32;
              }
    
              leaf tx_carrier {
                type uint32;
              }
    
              leaf collisions {
                type uint32;
              }
    
              leaf tx_queuelen {
                type uint32;
              }
    
              leaf rx_bytes {
                type uint64;
              }
    
              leaf tx_bytes {
                type uint64;
              }
    
              leaf intf_num {
                type uint32;
              }
            }  // container interface-data
          }  // list interface
        }  // grouping mgmt-interfaces-oper-group
    
        grouping mac-pool-oper-group {
          container macpool {
            config false;
            uses mac-pool-brief-oper-group;
          }  // container macpool
        }  // grouping mac-pool-oper-group
    
        grouping platform-summary-oper-group {
          container summary {
            list location {
              key "location";
              leaf location {
                type calvados:location-id;
              }
    
              container summary-data {
                leaf card_type {
                  type string;
                }
    
                leaf hw_state {
                  type string;
                }
    
                leaf sw_state {
                  type string;
                }
    
                leaf config_state {
                  type string;
                }
              }  // container summary-data
            }  // list location
          }  // container summary
        }  // grouping platform-summary-oper-group
    
        grouping platform-detail-oper-group {
          container detail {
            list location {
              key "location";
              leaf location {
                type calvados:location-id;
              }
    
              container detail-data {
                leaf pid {
                  type string;
                }
    
                leaf description {
                  type string;
                }
    
                leaf vid_sn {
                  type string;
                }
    
                leaf hw_state {
                  type string;
                }
    
                leaf sw_state {
                  type string;
                }
    
                leaf config_wordy {
                  type string;
                }
    
                leaf hw_ver {
                  type string;
                }
    
                leaf last_event {
                  type string;
                }
    
                leaf last_ev_reason_str {
                  type string;
                }
              }  // container detail-data
            }  // list location
          }  // container detail
        }  // grouping platform-detail-oper-group
    
        grouping platform-slices-oper-group {
          container slices {
            list location {
              key "location";
              leaf location {
                type calvados:location-id;
              }
    
              list slice_values {
                key "slice_idx";
                leaf slice_idx {
                  type uint32;
                }
    
                container slice {
                  leaf slice_num {
                    type uint32;
                  }
    
                  leaf admin_state {
                    type string;
                  }
    
                  leaf oper_state {
                    type string;
                  }
                }  // container slice
              }  // list slice_values
            }  // list location
          }  // container slices
        }  // grouping platform-slices-oper-group
    
        grouping chassis-brief-oper-group {
          container brief {
            list chassis_serial {
              key "serial_number";
              leaf serial_number {
                type string;
              }
    
              container brief-data {
                leaf racknum {
                  type string;
                }
    
                leaf rack_type {
                  type string;
                }
    
                leaf rack_state {
                  type string;
                }
    
                leaf data_plane {
                  type string;
                }
    
                leaf ctrl_plane {
                  type string;
                }
              }  // container brief-data
            }  // list chassis_serial
          }  // container brief
        }  // grouping chassis-brief-oper-group
    
        grouping mac-pool-brief-oper-group {
          container brief {
            list rack {
              key "serial_number";
              leaf serial_number {
                type string;
              }
    
              container brief-data {
                leaf racknum {
                  type string;
                }
    
                leaf mac_base {
                  type ietf:mac-address;
                }
    
                leaf mac_count {
                  type uint32;
                }
    
                leaf is_selected {
                  type boolean;
                }
    
                leaf allocated_count {
                  type uint32;
                }
              }  // container brief-data
            }  // list rack
          }  // container brief
        }  // grouping mac-pool-brief-oper-group
    
        grouping sm-config-group {
          container config {
            uses chassis-config-group;
    
            uses mgmt-interfaces-config-group;
    
            uses virtual-macaddr-config-group;
          }  // container config
        }  // grouping sm-config-group
    
        grouping chassis-config-group {
          container chassis {
            list serial {
              key "serial";
              unique "rack";
              leaf serial {
                type string;
                mandatory true;
              }
    
              leaf rack {
                type string {
                  pattern
                    "[eE][0-3]|[bB][0-9]|[dD][0-1]|[fF][0-7]|[0-9]|[1][0-9]|[2-5][0-9]|[6][0-3]|[2][4][0-7]";
                }
                mandatory true;
              }
            }  // list serial
          }  // container chassis
        }  // grouping chassis-config-group
    
        grouping mgmt-interfaces-config-group {
          container interface {
            container MgmtEth {
              list locport {
                key "rack slot intf port";
                leaf rack {
                  type string {
                    pattern
                      "[fF][0-7]|[0-9]|[1][0-5]|[bB][0-9]|[eE][0-3]";
                  }
                }
    
                leaf slot {
                  type string {
                    pattern
                      "[Rr][Pp][0-1]|[Rr][Ss][Pp][0-1]|[Ss][Cc][0-1]|[cC][bB][0-9]|[cC][eE][0-3]";
                  }
                }
    
                leaf intf {
                  type uint32 {
                    range "0";
                  }
                }
    
                leaf port {
                  type uint32 {
                    range "0";
                  }
                }
    
                container ipv4 {
                  leaf address {
                    type string {
                      pattern
                        "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(( (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))|(/([0-9]+)))";
                    }
                  }
                }  // container ipv4
    
                leaf shutdown {
                  type empty;
                }
    
                leaf mtu {
                  type uint32 {
                    range "48..9000";
                  }
                }
    
                leaf default-gw {
                  type inet:ipv4-address;
                }
    
                container arp {
                  list ip {
                    key "ip";
                    leaf ip {
                      type inet:ipv4-address;
                      mandatory true;
                    }
    
                    leaf mac {
                      type ietf:mac-address;
                      mandatory true;
                    }
                  }  // list ip
                }  // container arp
              }  // list locport
            }  // container MgmtEth
          }  // container interface
    
          container domain {
            list name {
              key "name";
              leaf name {
                type string;
              }
            }  // list name
    
            list name-server {
              key "name-server";
              leaf name-server {
                type inet:ipv4-address;
              }
            }  // list name-server
          }  // container domain
        }  // grouping mgmt-interfaces-config-group
    
        grouping virtual-macaddr-config-group {
          container virtual-macaddr-range {
            leaf base {
              type ietf:mac-address;
            }
    
            leaf count {
              type uint32 {
                range "1..65535";
              }
            }
          }  // container virtual-macaddr-range
        }  // grouping virtual-macaddr-config-group
    
        grouping sm-action-group {
          container actions {
            config false;
            uses reload-action-group;
          }  // container actions
        }  // grouping sm-action-group
    
        grouping reload-action-group {
          tailf:action "reload" {
            input {
              choice "reload_input" {
                mandatory "true";
                case "target_rack" {
                  leaf "rack" {
                    type "leafref" {
                      path "/oper/reload/rack/racks/rack";
                    }
                    mandatory "false";
                  }
                }
                case "target_vm" {
                  container "location_list" {
                    leaf "location" {
                      type "leafref" {
                        path "/oper/reload_vm/location/location";
                      }
                      mandatory "true";
                    }
                    choice "reload_target" {
                      mandatory "true";
                      case "target_admin" {
                        leaf "admin" {
                          type "empty";
                          mandatory "true";
                        }
                      }
                      case "target_all" {
                        leaf "all" {
                          type "empty";
                          mandatory "true";
                        }
                      }
                    }
                  }
                }
              }
            }
            output {
              leaf "result" {
                type "string";
                mandatory "true";
              }
            }
          }
        }  // grouping reload-action-group
    
        uses sm-oper-group;
    
        uses sm-config-group;
    
        uses sm-action-group;
      }  // module Cisco-IOS-XR-sysadmin-sm
    

© 2023 YumaWorks, Inc. All rights reserved.