Cisco-IOS-XR-um-if-service-policy-qos-cfg

This module contains a collection of IOS-XR YANG model derived from CLI. Copyright (c) 2013-2020 by Cisco Systems, Inc. All ri...

  • Version: 2020-10-01

    Cisco-IOS-XR-um-if-service-policy-qos-cfg@2020-10-01


    
      module Cisco-IOS-XR-um-if-service-policy-qos-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-if-service-policy-qos-cfg";
    
        prefix um-if-service-policy-qos-cfg;
    
        import cisco-semver {
          prefix semver;
        }
        import Cisco-IOS-XR-um-interface-cfg {
          prefix a1;
        }
        import tailf-common {
          prefix tailf;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "
         Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 W Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 1800 553-NETS
         
         E-mail: cs-yang@cisco.com
        ";
    
        description
          "
         This module contains a collection of IOS-XR YANG model derived from CLI.
         
         Copyright (c) 2013-2020 by Cisco Systems, Inc.
         All rights reserved.
        ";
    
        revision "2020-10-01" {
          description
            "Added augmentation to interface-preconfigure";
        }
    
        revision "2019-06-10" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2019-01-11" {
          description "Initial version";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        feature service-policy {
          description "Service policy";
        }
    
        feature account-user-def {
          description "User defined accounting";
        }
    
        feature shared-policy-instance {
          description
            "Configure a shared-policy-instance";
        }
    
        feature sub-parent-policy {
          description
            "Configure an svlan policy";
        }
    
        feature sub-group {
          description
            "Configure a subscriber-group";
        }
    
        feature sfrag-parent-policy {
          description
            "Apply service fragment policy";
        }
    
        feature ipsec-policy {
          description
            "service policy to be applied to encrypted traffic";
        }
    
        feature egress {
          description
            "Configure service policy for egress direction";
        }
    
        feature ingress {
          description
            "Configure service policy for ingress direction";
        }
    
        feature qfab {
          description "Configure switch fabric";
        }
    
        typedef service-policy-name-type {
          type string {
            pattern
              "[a-zA-Z0-9][a-zA-Z0-9._@$%+#:=<>\\\\-]{0,62}";
          }
        }
    
        typedef account-type {
          type enumeration {
            enum "layer1" {
              value 8;
              description
                "Turn on Layer 1 accounting";
            }
            enum "layer2" {
              value 1;
              description
                "Turn on Layer 2 accounting";
            }
            enum "nolayer2" {
              value 2;
              description
                "Turn off Layer 2 accounting";
            }
            enum "user-defined" {
              value 4;
              description
                "User defined accounting";
            }
          }
          description
            "This field is used to specify the type of Layer specific or user
           defined Qos accounting";
        }
    
        typedef l2-account-type {
          type enumeration {
            enum "layer2" {
              value 1;
              description
                "Turn on Layer 2 accounting";
            }
            enum "nolayer2" {
              value 2;
              description
                "Turn off Layer 2 accounting";
            }
            enum "user-defined" {
              value 4;
              description
                "User defined accounting";
            }
          }
          description
            "This field is used to specify the type of Layer specific or user
           defined Qos accounting";
        }
    
        grouping service-policy-account {
          leaf account {
            type account-type;
            description
              "Turn off layer specific accounting";
          }
    
          leaf account-user-defined {
            when "../account = 'user-defined'";
            if-feature account-user-def;
            type int8 {
              range "-63..63";
            }
            description
              "User defined accounting";
          }
        }  // grouping service-policy-account
    
        grouping service-policy-account-l2 {
          leaf account {
            type l2-account-type;
            description
              "Turn off layer specific accounting";
          }
    
          leaf account-user-defined {
            when "../account = 'user-defined'";
            if-feature account-user-def;
            type int8 {
              range "-63..63";
            }
            description
              "User defined accounting";
          }
        }  // grouping service-policy-account-l2
    
        grouping shared-policy-instance {
          leaf shared-policy-instance {
            if-feature shared-policy-instance;
            type service-policy-name-type {
              length "1..32";
            }
            must
              "not(../subscriber-parent) and not(../service-fragment-parent)";
            description
              "Configure a shared-policy-instance";
          }
        }  // grouping shared-policy-instance
    
        grouping shared-policy-instance-l2 {
          leaf shared-policy-instance {
            if-feature shared-policy-instance;
            type service-policy-name-type {
              length "1..32";
            }
            description
              "Configure a shared-policy-instance";
          }
        }  // grouping shared-policy-instance-l2
    
        grouping subscriber-parent {
          container subscriber-parent {
            if-feature sub-parent-policy;
            must
              "not(../shared-policy-instance) and not(../service-fragment-parent)";
            presence "Configure an svlan policy";
            description
              "Configure an svlan policy";
            leaf resource-id {
              type uint8 {
                range "0..3";
              }
              description
                "Configure a resource-id";
            }
          }  // container subscriber-parent
        }  // grouping subscriber-parent
    
        grouping service-fragment-parent {
          container service-fragment-parent {
            if-feature sfrag-parent-policy;
            must
              "not(../shared-policy-instance) and not(../subscriber-parent)";
            presence
              "Apply service fragment policy";
            description
              "Apply service fragment policy, do not use this node for non service fragment policy";
          }  // container service-fragment-parent
        }  // grouping service-fragment-parent
    
        grouping IF-BODY {
          container service-policy {
            tailf:dependency "../a1:interface-name";
            when
              "../a1:interface-name[not(starts-with(text(),'sub_atm'))] and ../a1:interface-name[not(starts-with(text(),'tunnel'))] and ../a1:interface-name[not(starts-with(text(),'tunnel-te'))] and ../a1:interface-name[not(starts-with(text(),'tunnel-gre'))] and ../a1:interface-name[not(starts-with(text(),'tunnel-mte'))] and ../a1:interface-name[not(starts-with(text(),'MgmtEth'))] and ../a1:interface-name[not(starts-with(text(),'Loopback'))] and ../a1:interface-name[not(starts-with(text(),'sbc'))] and ../a1:interface-name[not(starts-with(text(),'serviceinfra'))] and ../a1:interface-name[not(starts-with(text(),'serviceapp'))] and ../a1:interface-name[not(starts-with(text(),'Service-Engine'))] and ../a1:interface-name[not(starts-with(text(),'Service-Mgmt'))]";
            if-feature service-policy;
            description
              "Configure a service policy";
            list output {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[not(starts-with(text(),'tunnel-ip'))]";
              if-feature egress;
              key "service-policy-name";
              description
                "direction of service policy application";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy. Set 'output' for 'service-ipsec and 'service-gre' interfaces";
              }
    
              uses service-policy-account;
    
              uses shared-policy-instance;
    
              uses subscriber-parent;
    
              uses service-fragment-parent;
            }  // list output
    
            list output-subscriber-group {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[not(starts-with(text(),'tunnel-ip'))]";
              if-feature egress;
              must "subscriber-group";
              key "service-policy-name";
              description
                "direction of service policy application";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy. Set 'output' for 'service-ipsec and 'service-gre' interfaces";
              }
    
              list subscriber-group {
                if-feature sub-group;
                key "name";
                description
                  "Configure a subscriber-group";
                leaf name {
                  type string {
                    length "1..32";
                  }
                }
              }  // list subscriber-group
            }  // list output-subscriber-group
    
            list output-pre-encrypt {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[starts-with(text(),'service-ipsec')] or ../../a1:interface-name[starts-with(text(),'service-gre')]";
              if-feature egress;
              if-feature ipsec-policy;
              key "service-policy-name";
              description
                "service policy to be applied to pre encrypted traffic";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy";
              }
    
              uses service-policy-account;
            }  // list output-pre-encrypt
    
            list output-post-encrypt {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[starts-with(text(),'service-ipsec')] or ../../a1:interface-name[starts-with(text(),'service-gre')]";
              if-feature egress;
              if-feature ipsec-policy;
              key "service-policy-name";
              description
                "service policy to be applied to post encrypted traffic";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy";
              }
    
              uses service-policy-account;
            }  // list output-post-encrypt
    
            list input {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[not(starts-with(text(),'tunnel-ip'))]";
              if-feature ingress;
              key "service-policy-name";
              description
                "Configure a policy in the input direction";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy. Set 'input' for 'service-ipsec and 'service-gre' interfaces";
              }
    
              uses service-policy-account;
    
              uses shared-policy-instance;
    
              uses subscriber-parent;
    
              uses service-fragment-parent;
            }  // list input
    
            list input-pre-decrypt {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[starts-with(text(),'service-ipsec')] or ../../a1:interface-name[starts-with(text(),'service-gre')]";
              if-feature ingress;
              if-feature ipsec-policy;
              key "service-policy-name";
              description
                "service policy to be applied to pre decrypted traffic";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy";
              }
    
              uses service-policy-account;
            }  // list input-pre-decrypt
    
            list input-post-decrypt {
              tailf:dependency "../../a1:interface-name";
              when
                "../../a1:interface-name[starts-with(text(),'service-ipsec')] or ../../a1:interface-name[starts-with(text(),'service-gre')]";
              if-feature ingress;
              if-feature ipsec-policy;
              key "service-policy-name";
              description
                "service policy to be applied to post decrypt traffic";
              leaf service-policy-name {
                type service-policy-name-type;
                description
                  "Name of the service policy";
              }
    
              uses service-policy-account;
            }  // list input-post-decrypt
          }  // container service-policy
        }  // grouping IF-BODY
    
        augment /a1:interfaces/a1:interface {
          uses IF-BODY;
        }
    
        augment /a1:interfaces/a1:interface-preconfigure {
          uses IF-BODY;
        }
    
        container switch-fabric {
          if-feature qfab;
          description
            "switch fabric global command sub mode";
          container service-policy {
            description
              "Configure QFAB Service policy";
            leaf policy-name {
              type xr:Cisco-ios-xr-string {
                length "0..63";
              }
              description
                "Name of the QFAB service policy";
            }
          }  // container service-policy
        }  // container switch-fabric
      }  // module Cisco-IOS-XR-um-if-service-policy-qos-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.