Cisco-IOS-XR-um-object-group-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR object-group package configuration. This YANG module aug...

  • Version: 2020-10-07

    Cisco-IOS-XR-um-object-group-cfg@2020-10-07


    
      module Cisco-IOS-XR-um-object-group-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-object-group-cfg";
    
        prefix um-object-group-cfg;
    
        import cisco-semver {
          prefix semver;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import ietf-inet-types {
          prefix inet;
        }
    
        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 object-group package configuration.
         
         This YANG module augments the
         modules with configuration data.
         
         Copyright (c) 2019-2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-10-07" {
          description
            "Changed type of starting-port and ending-port to allow port number range";
        }
    
        revision "2019-06-10" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2019-04-02" {
          description "Initial version";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        feature object-group-udf-supported {
          description
            "UDF configuration supported within this model";
        }
    
        typedef port-numbers {
          type enumeration {
            enum "echo" {
              value 7;
              description "Echo (7)";
            }
            enum "discard" {
              value 9;
              description "Discard (9)";
            }
            enum "daytime" {
              value 13;
              description "Daytime (13)";
            }
            enum "chargen" {
              value 19;
              description
                "Character generator (19)";
            }
            enum "ftp-data" {
              value 20;
              description
                "FTP data connections (used infrequently, 20)";
            }
            enum "ftp" {
              value 21;
              description
                "File Transfer Protocol (21)";
            }
            enum "ssh" {
              value 22;
              description "Secure Shell (22)";
            }
            enum "telnet" {
              value 23;
              description "Telnet (23)";
            }
            enum "smtp" {
              value 25;
              description
                "Simple Mail Transport Protocol (25)";
            }
            enum "time" {
              value 37;
              description "Time (37)";
            }
            enum "whois" {
              value 43;
              description "Nicname (43)";
            }
            enum "tacacs" {
              value 49;
              description
                "TAC Access Control System (49)";
            }
            enum "domain" {
              value 53;
              description
                "Domain Name Service (53)";
            }
            enum "gopher" {
              value 70;
              description "Gopher (70)";
            }
            enum "finger" {
              value 79;
              description "Finger (79)";
            }
            enum "www" {
              value 80;
              description
                "World Wide Web (HTTP, 80)";
            }
            enum "hostname" {
              value 101;
              description
                "NIC hostname server (101)";
            }
            enum "pop2" {
              value 109;
              description
                "Post Office Protocol v2 (109)";
            }
            enum "pop3" {
              value 110;
              description
                "Post Office Protocol v3 (110)";
            }
            enum "sunrpc" {
              value 111;
              description
                "Sun Remote Procedure Call (111)";
            }
            enum "ident" {
              value 113;
              description "Ident Protocol (113)";
            }
            enum "nntp" {
              value 119;
              description
                "Network News Transport Protocol (119)";
            }
            enum "bgp" {
              value 179;
              description
                "Border Gateway Protocol (179)";
            }
            enum "irc" {
              value 194;
              description
                "Internet Relay Chat (194)";
            }
            enum "pim-auto-rp" {
              value 496;
              description "PIM Auto-RP (496)";
            }
            enum "exec" {
              value 512;
              description "Exec (rsh, 512)";
            }
            enum "login" {
              value 513;
              description "Login (rlogin, 513)";
            }
            enum "cmd" {
              value 514;
              description
                "Remote commands (rcmd, 514)";
            }
            enum "lpd" {
              value 515;
              description
                "Printer service (515)";
            }
            enum "talk" {
              value 517;
              description "Talk (517)";
            }
            enum "uucp" {
              value 540;
              description
                "Unix-to-Unix Copy Program (540)";
            }
            enum "klogin" {
              value 543;
              description "Kerberos login (543)";
            }
            enum "kshell" {
              value 544;
              description "Kerberos shell (544)";
            }
            enum "ldp" {
              value 646;
              description
                "LDP session connection attempts (MPLS, 646)";
            }
          }
        }
    
        typedef Port-operator {
          type enumeration {
            enum "eq" {
              value 0;
              description
                "Match packets on ports equal to entered port
               number";
            }
            enum "neq" {
              value 1;
              description
                "Match packets on ports not equal to entered
               port number";
            }
            enum "gt" {
              value 2;
              description
                "Match packets on ports greater than entered
               port number";
            }
            enum "lt" {
              value 3;
              description
                "Match packets on ports less than entered port
               number";
            }
          }
          description "Port operator";
        }
    
        typedef Port {
          type union {
            type port-numbers;
            type uint32 {
              range "0..65535";
            }
          }
          description "Port";
        }
    
        container object-group {
          description
            "Object-group configuration";
          container network {
            description "Network object group";
            container ipv4s {
              description "IPv4 object group";
              list ipv4 {
                key "ipv4-object-group-name";
                description "IPv4 object group";
                leaf ipv4-object-group-name {
                  type string {
                    length "1..64";
                    pattern
                      "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
                  }
                  description
                    "IPv4 object group";
                }
    
                leaf description {
                  type string {
                    length "1..100";
                  }
                  description
                    "Description for the object group";
                }
    
                container hosts {
                  description
                    "A single host address";
                  list host {
                    key "host-address";
                    description
                      "A single host address";
                    leaf host-address {
                      type inet:ipv4-address-no-zone;
                      description
                        "A single host address";
                    }
                  }  // list host
                }  // container hosts
    
                container object-groups {
                  description
                    "Nested object group";
                  list object-group {
                    key "object-group-name";
                    description
                      "Nested object group";
                    leaf object-group-name {
                      type string {
                        length "1..64";
                        pattern
                          "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
                      }
                      description
                        "Nested object group";
                    }
                  }  // list object-group
                }  // container object-groups
    
                container ranges {
                  description
                    "Range of host addresses";
                  list range {
                    key "starting-address ending-address";
                    description
                      "Range of host addresses";
                    leaf starting-address {
                      type inet:ipv4-address-no-zone;
                      description
                        "Range of host addresses - start address";
                    }
    
                    leaf ending-address {
                      type inet:ipv4-address-no-zone;
                      description
                        "Range of host addresses - end address";
                    }
                  }  // list range
                }  // container ranges
    
                container ip-addresses {
                  description
                    "IPv4 address/prefix";
                  list ip-address {
                    key "address length";
                    description
                      "IPv4 address/prefix";
                    leaf address {
                      type inet:ip-address-no-zone;
                      description
                        "IPv4 address/prefix";
                    }
    
                    leaf length {
                      type xr:Ipv4-prefix-length;
                      description
                        "IPv4 address/prefix length";
                    }
                  }  // list ip-address
                }  // container ip-addresses
              }  // list ipv4
            }  // container ipv4s
    
            container ipv6s {
              description "IPv6 object group";
              list ipv6 {
                key "ipv6-object-group-name";
                description "IPv6 object group";
                leaf ipv6-object-group-name {
                  type string {
                    length "1..64";
                    pattern
                      "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
                  }
                  description
                    "IPv6 object group";
                }
    
                leaf description {
                  type string {
                    length "1..100";
                  }
                  description
                    "Description for the object group";
                }
    
                container hosts {
                  description
                    "A single host address";
                  list host {
                    key "host-address";
                    description
                      "A single host address";
                    leaf host-address {
                      type inet:ipv6-address-no-zone;
                      description
                        "A single host address";
                    }
                  }  // list host
                }  // container hosts
    
                container object-groups {
                  description
                    "nested object group";
                  list object-group {
                    key "object-group-name";
                    description
                      "nested object group";
                    leaf object-group-name {
                      type string {
                        length "1..64";
                        pattern
                          "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
                      }
                      description
                        "nested object group";
                    }
                  }  // list object-group
                }  // container object-groups
    
                container ranges {
                  description
                    "Range of host addresses";
                  list range {
                    key "starting-address ending-address";
                    description
                      "Range of host addresses";
                    leaf starting-address {
                      type inet:ipv6-address-no-zone;
                      description
                        "Range of host addresses - Starting Address";
                    }
    
                    leaf ending-address {
                      type inet:ipv6-address-no-zone;
                      description
                        "Range of host addresses - Ending Address";
                    }
                  }  // list range
                }  // container ranges
    
                container ip-addresses {
                  description
                    "IPv6 prefix x:x::x/y";
                  list ip-address {
                    key "address length";
                    description
                      "IPv6 prefix x:x::x/y";
                    leaf address {
                      type inet:ip-address-no-zone;
                      description
                        "IPv6 prefix x:x::x/y";
                    }
    
                    leaf length {
                      type xr:Ipv6-prefix-length;
                      description
                        "IPv6 prefix length";
                    }
                  }  // list ip-address
                }  // container ip-addresses
              }  // list ipv6
            }  // container ipv6s
          }  // container network
    
          container ports {
            description "Port object group";
            list port {
              key "port-object-group-name";
              description "Port object group";
              leaf port-object-group-name {
                type string {
                  length "1..64";
                  pattern
                    "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
                }
                description "Port object group";
              }
    
              leaf description {
                type string {
                  length "1..100";
                }
                description
                  "description for the object group";
              }
    
              container object-groups {
                description
                  "nested object group";
                list object-group {
                  key "object-group-name";
                  description
                    "nested object group";
                  leaf object-group-name {
                    type string {
                      length "1..64";
                      pattern
                        "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
                    }
                    description
                      "nested object group";
                  }
                }  // list object-group
              }  // container object-groups
    
              container ranges {
                description
                  "Match only packets on a given port range";
                list range {
                  key "starting-port ending-port";
                  description
                    "Match only packets on a given port range";
                  leaf starting-port {
                    type Port;
                    description
                      "Match only packets on a given port range";
                  }
    
                  leaf ending-port {
                    type Port;
                    description
                      "Match only packets on a given port range";
                  }
                }  // list range
              }  // container ranges
    
              container match-criterias {
                description
                  "Match packets on ports according to match criteria";
                list match-criteria {
                  key "match-criteria-type port";
                  description
                    "Match packets on ports according to match criteria";
                  leaf match-criteria-type {
                    type Port-operator;
                    description
                      "Match packets on ports according to match criteria";
                  }
    
                  leaf port {
                    type Port;
                    description
                      "port number for the match criteria";
                  }
                }  // list match-criteria
              }  // container match-criterias
            }  // list port
          }  // container ports
        }  // container object-group
    
        container udfs {
          if-feature object-group-udf-supported;
          description "UDF configuration";
          list udf {
            key "udf-name";
            description "UDF configuration";
            leaf udf-name {
              type string {
                length "1..16";
                pattern
                  "[a-z0-9A-Z][-_.:a-z0-9A-Z]*";
              }
              description "UDF configuration";
            }
    
            container header {
              presence
                "Indicates a header node is configured.";
              description "Header for UDF";
              leaf header-type {
                type enumeration {
                  enum "inner" {
                    value 0;
                    description
                      "Inner header for UDF";
                  }
                  enum "outer" {
                    value 1;
                    description
                      "Outer header for UDF";
                  }
                }
                mandatory true;
                description "Header for UDF";
              }
    
              container udf-layer {
                presence
                  "Indicates a udf-layer node is configured.";
                description
                  "configure the udf-layer";
                leaf udf-layer-type {
                  type enumeration {
                    enum "l2" {
                      value 0;
                      description
                        "L2 layer for UDF";
                    }
                    enum "l3" {
                      value 1;
                      description
                        "L3 layer for UDF";
                    }
                    enum "l4" {
                      value 2;
                      description
                        "L4 layer for UDF";
                    }
                  }
                  mandatory true;
                  description
                    "configure the udf-layer";
                }
    
                container offset {
                  presence
                    "Indicates a offset node is configured.";
                  description
                    "Configure the offset (bytes) in the header";
                  leaf offset-value {
                    type uint32 {
                      range "0..65535";
                    }
                    mandatory true;
                    description
                      "Configure the offset (bytes) in the header";
                  }
    
                  leaf length {
                    type uint32 {
                      range "0..65535";
                    }
                    mandatory true;
                    description
                      "Configure the length (bytes) in the header";
                  }
                }  // container offset
              }  // container udf-layer
            }  // container header
          }  // list udf
        }  // container udfs
      }  // module Cisco-IOS-XR-um-object-group-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.