Cisco-IOS-XR-sysadmin-sdr-mgr

This module contains a collection of YANG definitions for Cisco IOS-XR SysAdmin configuration. This module defines the SDR-SM s...

  • Version: 2021-05-04

    Cisco-IOS-XR-sysadmin-sdr-mgr@2021-05-04


    
      module Cisco-IOS-XR-sysadmin-sdr-mgr {
    
        yang-version 1;
    
        namespace
          "http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-sdr-mgr";
    
        prefix calvados_sdr;
    
        import tailf-common {
          prefix tailf;
        }
        import ietf-inet-types {
          prefix inet;
        }
        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 defines the SDR-SM support config for SDR
         
         Copyright (c) 2011-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2021-05-04" {
          description
            "Added suppport to hide vm resources from config
           2020-08-20
             Supporting 48 LCs or DCP
           2020-04-29
             Fixed sdr config error for B0 and D0";
        }
    
        revision "2019-06-12" {
          description
            "Fixed canonical order error for keywords key/type/mandantory";
        }
    
        revision "2019-04-15" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2019-04-12" {
          description
            "Added tailf:cli-full-command for issu and pairing-mode config";
        }
    
        revision "2018-10-22" {
          description
            "Removed choice for action re_pair";
        }
    
        revision "2018-10-15" {
          description
            "Removed confirm txt for reload/shut/start actions";
        }
    
        revision "2018-05-15" {
          description
            "Added node-type leaf in sdr-operation container";
        }
    
        revision "2018-04-09" {
          description
            "Required changes for ConfD 6.4.5";
        }
    
        revision "2018-03-05" {
          description
            "Added slice option in sdr-config";
        }
    
        revision "2018-02-20" {
          description
            "Added sdr-operation container to display SDR operation progress";
        }
    
        revision "2018-02-02" {
          description
            "Added cli-suppress-table for container detail and corrected alignment for container reboot-hist";
        }
    
        revision "2017-07-22" {
          description
            "Updated location pattern to include Compute Cards";
        }
    
        revision "2017-06-20" {
          description
            "Changed the type of rp leaves in container pairing2 to string";
        }
    
        revision "2017-06-16" {
          description
            "Added leaf issu to provide an option to disable SDR ISSU";
        }
    
        revision "2017-06-09" {
          description
            "SDR config will now take a list of initial images";
        }
    
        revision "2017-04-12" {
          description
            "Changed the namespace and module name";
        }
    
        revision "2016-10-12" {
          description
            "Unhide commands and configs. Moved to advanced-grp";
        }
    
        revision "2016-05-12" {
          description "Initial Version";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        typedef Location {
          type string {
            pattern
              "((0?[0-9]|[1-3][0-9]|4[0-7]|([bB]|[dD])\\d)/(([rR][pP]|[lL][cC]|[cC][bB])?\\d{1,2}))(/[cC][pP][uU]0)?|all";
          }
          description
            "A system location in Rack/Slot/Instance";
        }
    
        typedef RPLocation {
          type string {
            pattern
              "((0?[0-9]|1[1-5]|([bB]|[dD])\\d)/(([rR][pP]|[cC][bB])\\d{1,2}))(/[cC][pP][uU]0)?";
          }
          description
            "A system location in Rack/Slot/Instance";
        }
    
        typedef VMLocation {
          type string {
            pattern
              "((0?[0-9]|[1-3][0-9]|4[0-7]|([bB]|[dD])\\d)/((([rR]([sS]){0,1}[pP])|[cC][bB])?\\d{1,2})/[V][M](0?[0-9]|1[1-5]))?";
          }
          description
            "A system location in Rack/Slot/Instance";
        }
    
        typedef VMLocationall {
          type string {
            pattern
              "((0?[0-9]|[1-3][0-9]|4[0-7]|([bB]|[dD])\\d)/((([rR]([sS]){0,1}[pP])|[cC][bB])?\\d{1,2})/[V][M](0?[0-9]|1[1-5]))?|all";
          }
          description
            "A system location in Rack/Slot/Instance";
        }
    
        typedef CardType {
          type enumeration {
            enum "RP" {
              value 0;
            }
            enum "LC" {
              value 1;
            }
            enum "CC" {
              value 2;
            }
          }
          description
            "The List of supported Card Types";
        }
    
        typedef vm_reload_reason {
          type enumeration {
            enum "CARD_OFFLINE" {
              value 0;
            }
            enum "CARD_SHUTDOWN" {
              value 1;
            }
            enum "ALL_VM_RELOAD" {
              value 2;
            }
            enum "VM_REQUESTED_GRACEFUL_RELOAD" {
              value 3;
            }
            enum
              "VM_REQUESTED_UNGRACEFUL_RELOAD" {
              value 4;
            }
            enum "SDR_CLI_REQUESTED" {
              value 5;
            }
            enum "SDR_VCPU_VMEM_CHANGED" {
              value 6;
            }
            enum "SDR_HEARTBEAT_FAILURE" {
              value 7;
            }
            enum "FIRST_BOOT" {
              value 8;
            }
            enum "SMU" {
              value 9;
            }
            enum "REASON_UNKNOWN" {
              value 10;
            }
          }
          description
            "The List of vm reload reasons";
        }
    
        container sdr-config {
          leaf hide-resources {
            type boolean;
            default "false";
          }
    
          list sdr {
            key "name";
            description
              "Add/Edit a Secure Domain Router by name";
            leaf name {
              type string {
                pattern "[a-zA-Z0-9_-]{1,30}";
              }
              description
                "Name of the Secure Domain Router , 30 max characters";
            }
    
            leaf initial-image {
              type string;
              description
                "List of the initial image and packages for the Secure Domain Router.";
            }
    
            leaf lead_down_delta {
              type uint32;
              description
                "Amount of time between lead down to declare SDR down";
            }
    
            leaf pairing-mode {
              type enumeration {
                enum "intra-rack" {
                  value 0;
                }
                enum "inter-rack" {
                  value 1;
                }
              }
              description
                "Setting for pairing mode";
            }
    
            leaf issu {
              type enumeration {
                enum "disable" {
                  value 0;
                }
              }
              description
                "ISSU flag. Once disabled, ISSU won't be performed for this SDR.";
            }
    
            container resources {
              description
                "Edit resources for a Secure Domain Router";
              leaf fgid {
                type uint32 {
                  range "25000..524288";
                }
                description
                  "Fgids for a Secure Domain Router";
              }
    
              leaf mgmt_ext_vlan {
                type uint32 {
                  range "2..4094";
                }
                description
                  "Management External VLAN for Secure Domain Router";
              }
    
              list card-type {
                when
                  "/sdr-config/hide-resources = 'false'";
                key "type";
                leaf type {
                  type CardType;
                  description "Card Type";
                }
    
                leaf vm-memory {
                  type uint32 {
                    range "1..128";
                  }
                  description
                    "VM Memory Size in units of [GB]";
                }
    
                leaf vm-cpu {
                  type uint32 {
                    range "1..128";
                  }
                  description
                    "VM Number of CPUs";
                }
              }  // list card-type
            }  // container resources
    
            list location {
              key "node-location";
              min-elements 1;
              max-elements 64;
              description
                "Enter list of nodes' location to add to this LR";
              leaf node-location {
                type Location;
                description
                  "Enter location or all";
              }
    
              leaf-list slice {
                type uint8 {
                  range "0 .. 4";
                }
                max-elements 4;
                description
                  "Enter list of slices to add to this SDR";
              }
            }  // list location
    
            container Action {
              tailf:action "re_pair" {
                input;
                output {
                  leaf "result" {
                    type "string";
                    mandatory "true";
                  }
                }
              }
              config false;
              list location {
                tailf:action "reload" {
                  input {
                    choice "what_act" {
                      case "act_force" {
                        leaf "force" {
                          type "empty";
                          mandatory "false";
                        }
                      }
                      case "act_coredump" {
                        leaf "coredump" {
                          type "empty";
                          mandatory "false";
                        }
                      }
                    }
                  }
                  output {
                    leaf "result" {
                      type "string";
                      mandatory "true";
                    }
                  }
                }
                tailf:action "shut" {
                  input;
                  output {
                    leaf "result" {
                      type "string";
                      mandatory "true";
                    }
                  }
                }
                tailf:action "start" {
                  input;
                  output {
                    leaf "result" {
                      type "string";
                      mandatory "true";
                    }
                  }
                }
                key "node-location";
                min-elements 1;
                max-elements 64;
                leaf node-location {
                  type VMLocationall;
                  description
                    "Enter location or all";
                }
              }  // list location
            }  // container Action
    
            container detail {
              config false;
              list location {
                key "node-location";
                min-elements 1;
                max-elements 64;
                leaf node-location {
                  type VMLocation;
                }
    
                leaf sdr-id {
                  type uint32;
                }
    
                leaf ip-addr {
                  type inet:ip-address;
                  description "IP address of VM";
                }
    
                leaf mac-address {
                  type string;
                  description
                    "MAC address of VM";
                }
    
                leaf boot_part {
                  type string;
                }
    
                leaf data_part {
                  type string;
                }
    
                leaf big_disk {
                  type string;
                }
    
                leaf vm_id {
                  type uint32;
                }
    
                leaf vmcpu {
                  type uint32;
                }
    
                leaf vmmemory {
                  type uint32;
                }
    
                leaf card-type {
                  type string;
                }
    
                leaf card_serial {
                  type string;
                }
    
                leaf rack-type {
                  type string;
                }
    
                leaf-list slice {
                  type union {
                    type uint8;
                    type string;
                  }
                  description
                    "Slice numbers if configured";
                }
    
                leaf chassis_serial {
                  type string;
                }
    
                leaf hw_version {
                  type string;
                }
    
                leaf mgmt_ext_vlan {
                  type string;
                }
    
                leaf state {
                  type string;
                  description "State of VM";
                }
    
                leaf start-time {
                  type string;
                }
    
                leaf reboot_count {
                  type uint32;
                  description
                    "Number of times rebooted since first boot";
                }
    
                leaf rh_count {
                  type uint32;
                  description
                    "Number of times rebooted since lasr card reload";
                }
    
                list reboot_hist1 {
                  key "count";
                  leaf count {
                    type uint32;
                  }
    
                  leaf Time {
                    type string;
                  }
    
                  leaf Reason {
                    type string;
                    description
                      "Reason for reload";
                  }
                }  // list reboot_hist1
              }  // list location
            }  // container detail
    
            container reboot-history {
              config false;
              grouping rebhist {
                list location {
                  key "node-location";
                  min-elements 1;
                  max-elements 64;
                  leaf node-location {
                    type VMLocation;
                  }
    
                  leaf reboot_count {
                    type uint32;
                    description
                      "Number of times rebooted since first boot";
                  }
    
                  leaf rh_count {
                    type uint32;
                    description
                      "Number of times rebooted since last card reload";
                  }
    
                  list reboot_hist2 {
                    key "count";
                    leaf count {
                      type uint32;
                    }
    
                    leaf Time {
                      type string;
                    }
    
                    leaf Reason {
                      type string;
                      description
                        "Reason for reload";
                    }
                  }  // list reboot_hist2
                }  // list location
              }  // grouping rebhist
              container reverse {
                uses rebhist;
              }  // container reverse
    
              container default-disp {
                uses rebhist;
              }  // container default-disp
            }  // container reboot-history
    
            container nodes {
              config false;
              list location {
                key "node-location";
                min-elements 1;
                max-elements 64;
                leaf node-location {
                  type VMLocation;
                }
    
                leaf sdr-id {
                  type uint32;
                }
    
                leaf ip-addr {
                  type inet:ip-address;
                  description "IP address of VM";
                }
    
                leaf mac-address {
                  type string;
                  description
                    "MAC address of VM";
                }
    
                leaf state {
                  type string;
                  description "State of VM";
                }
    
                leaf start-time {
                  type string;
                }
    
                leaf reload_reason {
                  type string;
                  description
                    "Reason for last reload";
                }
    
                leaf reboot_count {
                  type uint32;
                  description
                    "Number of times rebooted since first boot";
                }
    
                leaf rh_count {
                  type uint32;
                  description
                    "Number of times rebooted since first boot";
                }
              }  // list location
            }  // container nodes
    
            container pairing2 {
              config false;
              leaf pairing-mode {
                type string;
                description "Mode of Pairing";
              }
    
              container sdrlead {
                leaf rp1 {
                  type string;
                }
    
                leaf rp2 {
                  type string;
                }
              }  // container sdrlead
    
              list pairing {
                key "name";
                min-elements 1;
                max-elements 64;
                leaf name {
                  type string;
                }
    
                leaf rp1 {
                  type string;
                }
    
                leaf rp2 {
                  type string;
                }
              }  // list pairing
            }  // container pairing2
    
            list pairing {
              key "name";
              description
                "Add/Edit a RP Pairing by name";
              leaf name {
                type string {
                  pattern "[a-zA-Z0-9_-]{1,64}";
                }
              }
    
              leaf rp1 {
                type RPLocation;
                mandatory true;
                description
                  "Enter RP Node location";
              }
    
              leaf rp2 {
                type RPLocation;
                mandatory true;
                description
                  "Enter RP Node location";
              }
            }  // list pairing
          }  // list sdr
        }  // container sdr-config
    
        container sdr-manager {
          config false;
          container sdr_mgr {
            uses show_trace:traceable;
          }  // container sdr_mgr
        }  // container sdr-manager
    
        container sdr-operation {
          config false;
          list sdr {
            key "name";
            description "SDR";
            leaf name {
              type string {
                pattern "[a-zA-Z0-9_-]{1,30}";
              }
              description
                "Name of the Secure Domain Router, 30 max characters";
            }
    
            container nodes {
              config false;
              list location {
                key "node-location node-type";
                min-elements 1;
                max-elements 64;
                leaf node-location {
                  type string;
                }
    
                leaf node-type {
                  type uint32;
                }
    
                leaf progress {
                  type string;
                  description
                    "Progress of Operation";
                }
    
                leaf state {
                  type string;
                  description
                    "State of Operation";
                }
              }  // list location
            }  // container nodes
          }  // list sdr
        }  // container sdr-operation
    
        container private-sdr {
          list sdr-name {
            key "name";
            min-elements 0;
            max-elements 64;
            leaf name {
              type string;
            }
    
            leaf id {
              type uint32;
            }
    
            leaf lead_rack0 {
              type uint32;
            }
    
            leaf lead_rack1 {
              type uint32;
            }
    
            list pairing {
              key "num";
              min-elements 0;
              max-elements 64;
              leaf num {
                type uint32;
              }
    
              leaf second_exist {
                type boolean;
              }
    
              leaf rp1_rack {
                type uint32;
              }
    
              leaf rp1_slot {
                type uint32;
              }
    
              leaf rp2_rack {
                type uint32;
              }
    
              leaf rp2_slot {
                type uint32;
              }
            }  // list pairing
          }  // list sdr-name
        }  // container private-sdr
      }  // module Cisco-IOS-XR-sysadmin-sdr-mgr
    

© 2023 YumaWorks, Inc. All rights reserved.