Cisco-IOS-XR-um-event-manager-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR event-manager package configuration. This YANG module au...

  • Version: 2021-02-02

    Cisco-IOS-XR-um-event-manager-cfg@2021-02-02


    
      module Cisco-IOS-XR-um-event-manager-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-event-manager-cfg";
    
        prefix um-event-manager-cfg;
    
        import Cisco-IOS-XR-types {
          prefix xr;
        }
    
        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 event-manager package configuration.
    
    This YANG module augments the
    modules with configuration data.
    
    Copyright (c) 2021 by Cisco Systems, Inc.
    All rights reserved.";
    
        revision "2021-02-02" {
          description "Initial release";
        }
    
    
        container event {
          description "Event related commands";
          container manager {
            description
              "Event Manager configuration commands";
            leaf refresh-time {
              type uint32 {
                range "10..4294967295";
              }
              description
                "Set refresh time (in seconds) for policy username's AAA taskmap";
            }
    
            container directory {
              description
                "Set Embedded Event Manager directory information";
              container user {
                description
                  "Set Embedded Event Manager user directory information";
                leaf policy {
                  type string {
                    length "1..800";
                  }
                  description
                    "Set Embedded Event Manager user policy directory";
                }
    
                leaf library {
                  type string {
                    length "1..800";
                  }
                  description
                    "Set Embedded Event Manager user library directory";
                }
              }  // container user
            }  // container directory
    
            container scheduler {
              description
                "Set Embedded Event Manager scheduler options";
              container suspend {
                presence
                  "Indicates a suspend node is configured.";
                description
                  "Suspend Embedded Event Manager policy scheduling";
              }  // container suspend
    
              container script {
                description
                  "TCL script type internal data for EEM component";
                container thread {
                  description
                    "Internal thread data for EEM component";
                  container class {
                    description
                      "Internal class data for EEM component";
                    container default {
                      description
                        "default class type";
                      leaf number {
                        type uint32 {
                          range "1..5";
                        }
                        description
                          "Number of scheduler threads";
                      }
                    }  // container default
                  }  // container class
                }  // container thread
              }  // container script
            }  // container scheduler
    
            container environment {
              description
                "Set an Embedded Event Manager global variable for policies";
              list global-variable {
                key "global-variable-name";
                description
                  "Name of the global variable";
                leaf global-variable-name {
                  type xr:Cisco-ios-xr-string {
                    length "1..800";
                  }
                  description
                    "Name of the global variable";
                }
    
                leaf value {
                  type string {
                    length "1..800";
                  }
                  description
                    "Value of the global variable";
                }
              }  // list global-variable
            }  // container environment
    
            container policy {
              description
                "Register an Event Manager policy";
              list policy-file {
                key "policy-file-name";
                description
                  "Name of the policy file";
                leaf policy-file-name {
                  type xr:Cisco-ios-xr-string {
                    length "1..800";
                  }
                  description
                    "Name of the policy file";
                }
    
                leaf username {
                  type xr:Cisco-ios-xr-string {
                    length "1..800";
                  }
                  description
                    "Username under whom this policy will execute";
                }
    
                container persist-time {
                  description
                    "Time of validity (in seconds) for cached AAA taskmap of username (default is 3600)";
                  leaf value {
                    type uint32 {
                      range "0..4294967294";
                    }
                    must "not(../infinite)";
                    description
                      "Integer value for this policy's persist-time";
                  }
    
                  container infinite {
                    must "not(../value)";
                    presence
                      "Indicates a infinite node is configured.";
                    description
                      "Cached AAA taskmap of username is always treated valid";
                  }  // container infinite
                }  // container persist-time
    
                container type {
                  description
                    "The Event Manager type of this policy";
                  container system {
                    must "not(../user)";
                    presence
                      "Indicates a system node is configured.";
                    description
                      "Event Manager system policy";
                  }  // container system
    
                  container user {
                    must "not(../system)";
                    presence
                      "Indicates a user node is configured.";
                    description
                      "Event Manager user policy";
                  }  // container user
                }  // container type
    
                container checksum {
                  description
                    "Specify Embedded Event Manager policy checksum";
                  leaf md5 {
                    type xr:Cisco-ios-xr-string {
                      length "1..800";
                    }
                    must "not(../sha-1)";
                    description
                      "Use MD5 checksum";
                  }
    
                  leaf sha-1 {
                    type xr:Cisco-ios-xr-string {
                      length "1..800";
                    }
                    must "not(../md5)";
                    description
                      "Use SHA-1 checksum";
                  }
                }  // container checksum
    
                container secure-mode {
                  description
                    "Specify Embedded Event Manager policy security policy";
                  container trust {
                    presence
                      "Indicates a trust node is configured.";
                    description
                      "Requires Trust Signature";
                  }  // container trust
    
                  container cisco {
                    description
                      "Requires Cisco Digital Signature";
                    container rsa-2048 {
                      presence
                        "Indicates a rsa-2048 node is configured.";
                      description
                        "Requires Cisco Digital Signature";
                    }  // container rsa-2048
                  }  // container cisco
                }  // container secure-mode
              }  // list policy-file
            }  // container policy
    
            container event-trigger {
              description
                "Configure event-trigger";
              list event {
                key "event-name";
                description "Name of the event";
                leaf event-name {
                  type xr:Cisco-ios-xr-string {
                    length "1..31";
                  }
                  description
                    "Name of the event";
                }
    
                leaf occurrence {
                  type uint32 {
                    range "2..32";
                  }
                  description
                    "No of occurrences before the event is raised";
                }
    
                container period {
                  description
                    "Time interval during which configured occurrence should take place";
                  leaf seconds {
                    type uint32 {
                      range "1..4294967295";
                    }
                    description
                      "Time interval in seconds";
                  }
                }  // container period
    
                container type {
                  description
                    "Configure the type of event";
                  container syslog {
                    presence
                      "Indicates a syslog node is configured.";
                    description
                      "Configure syslog event";
                    leaf pattern {
                      type string {
                        length "1..800";
                      }
                      mandatory true;
                      description
                        "Configure syslog pattern or regex";
                    }
    
                    container severity {
                      description
                        "Configure the syslog message severity to be screened (default: all)";
                      container emergency {
                        presence
                          "Indicates a emergency node is configured.";
                        description
                          "Syslog priority 0 (highest)";
                      }  // container emergency
    
                      container alert {
                        presence
                          "Indicates a alert node is configured.";
                        description
                          "Syslog priority 1";
                      }  // container alert
    
                      container critical {
                        presence
                          "Indicates a critical node is configured.";
                        description
                          "Syslog priority 2";
                      }  // container critical
    
                      container error {
                        presence
                          "Indicates a error node is configured.";
                        description
                          "Syslog priority 3";
                      }  // container error
    
                      container warning {
                        presence
                          "Indicates a warning node is configured.";
                        description
                          "Syslog priority 4";
                      }  // container warning
    
                      container notice {
                        presence
                          "Indicates a notice node is configured.";
                        description
                          "Syslog priority 5";
                      }  // container notice
    
                      container info {
                        presence
                          "Indicates a info node is configured.";
                        description
                          "Syslog priority 6";
                      }  // container info
    
                      container debug {
                        presence
                          "Indicates a debug node is configured.";
                        description
                          "Syslog priority 7 (lowest)";
                      }  // container debug
                    }  // container severity
                  }  // container syslog
                }  // container type
              }  // list event
            }  // container event-trigger
    
            container actions {
              description "Configure action";
              list action {
                key "action-name";
                description "Name of the action";
                leaf action-name {
                  type xr:Cisco-ios-xr-string {
                    length "1..31";
                  }
                  description
                    "Name of the action";
                }
    
                container type {
                  description "Type of action";
                  container script {
                    must
                      "../../username and checksum/sha256";
                    presence
                      "Indicates a script node is configured.";
                    description
                      "Configure a Python script as action";
                    leaf script-name {
                      type xr:Cisco-ios-xr-string {
                        length "1..800";
                      }
                      mandatory true;
                      description
                        "Name of Python script (must have .py extension)";
                    }
    
                    container maxrun {
                      description
                        "Configure the max run time of script (default: 20seconds)";
                      leaf seconds {
                        type uint32 {
                          range "10..4294967295";
                        }
                        description
                          "Maxrun in seconds";
                      }
                    }  // container maxrun
    
                    container checksum {
                      description
                        "Configure script checksum";
                      leaf sha256 {
                        type xr:Cisco-ios-xr-string {
                          length "64";
                        }
                        description
                          "Configure sha256 checksum";
                      }
                    }  // container checksum
                  }  // container script
                }  // container type
    
                leaf username {
                  type xr:Cisco-ios-xr-string {
                    length "1..253";
                  }
                  must "../type/script";
                  description
                    " Username under whom this policy will execute";
                }
              }  // list action
            }  // container actions
    
            container policy-maps {
              description
                "Configure eem policy map";
              list policy-map {
                key "policy-map-name";
                description
                  "Name of the policy-map";
                leaf policy-map-name {
                  type xr:Cisco-ios-xr-string {
                    length "1..31";
                  }
                  description
                    "Name of the policy-map";
                }
    
                container trigger {
                  description
                    "Configure trigger for this policy-map";
                  leaf event {
                    type xr:Cisco-ios-xr-string {
                      length "1..1024";
                    }
                    description
                      "Set an event as trigger for this policy-map";
                  }
                }  // container trigger
    
                container actions {
                  description
                    "Map action for policy-map (Maximum 5)";
                  list action {
                    key "action-name";
                    description "Name of action";
                    leaf action-name {
                      type xr:Cisco-ios-xr-string {
                        length "1..31";
                      }
                      description
                        "Name of action";
                    }
                  }  // list action
                }  // container actions
              }  // list policy-map
            }  // container policy-maps
          }  // container manager
        }  // container event
      }  // module Cisco-IOS-XR-um-event-manager-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.