junos-rpc-firewall

Junos RPC YANG module for firewall command(s)

  • Version: 2019-01-01

    junos-rpc-firewall@2019-01-01


    
      module junos-rpc-firewall {
    
        yang-version 1;
    
        namespace
          "http://yang.juniper.net/junos/rpc/firewall";
    
        prefix firewall;
    
        import junos-common-types {
          prefix jt;
          revision-date "2019-01-01";
        }
    
        organization "Juniper Networks, Inc.";
    
        contact "yang-support@juniper.net";
    
        description
          "Junos RPC YANG module for firewall command(s)";
    
        revision "2019-01-01" {
          description "Junos: 21.3R1.9";
        }
    
    
        rpc get-firewall-information {
          description
            "Show firewall information";
          input {
            choice chassis-selector {
              leaf all-chassis {
                type empty;
                description "All chassis";
              }
              leaf all-lcc {
                type empty;
                description "All LCC chassis";
              }
              leaf scc {
                type empty;
                description "SCC";
              }
              leaf sfc {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "SFC";
              }
              leaf lcc {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "Specific LCC";
              }
              leaf node {
                type string;
                description "Specific node";
              }
              leaf bsys {
                type empty;
                description "Base system";
              }
              leaf gnf {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 10";
                  }
                }
                description
                  "Specific guest network function";
              }
              leaf all-gnfs {
                type empty;
                description
                  "All guest network functions";
              }
              leaf all-system {
                type empty;
                description
                  "All system (BSYS and GNFs)";
              }
              leaf server {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 1";
                  }
                }
                description
                  "Specific server slot";
              }
              leaf all-servers {
                type empty;
                description "All servers";
              }
              leaf vnf {
                type string;
                description
                  "Specific virtual-network-function";
              }
              leaf all-vnfs {
                type empty;
                description
                  "All virtual-network-functions";
              }
            }  // choice chassis-selector
    
            choice re-selector {
              leaf re0 {
                type empty;
                description "RE0";
              }
              leaf re1 {
                type empty;
                description "RE1";
              }
              leaf routing-engine {
                type enumeration {
                  enum "local" {
                    value 0;
                    description
                      "Local routing engine";
                  }
                  enum "other" {
                    value 1;
                    description
                      "Other routing engine";
                  }
                  enum "master" {
                    value 2;
                    description
                      "Master routing engine";
                  }
                  enum "backup" {
                    value 3;
                    description
                      "Backup routing engine";
                  }
                  enum "both" {
                    value 4;
                    description
                      "Both routing engines";
                  }
                }
                description
                  "Specific routing engine";
              }
            }  // choice re-selector
    
            choice lr-selector {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice lr-selector
    
            choice tenant-selector {
              leaf tenant {
                type string;
                description
                  "Name of tenant, or 'all'";
              }
            }  // choice tenant-selector
    
            choice vc-selector {
              leaf local {
                type empty;
                description
                  "Local virtual chassis member";
              }
              leaf all-members {
                type empty;
                description
                  "All virtual chassis members";
              }
              leaf member {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description
                  "Specific virtual chassis member";
              }
            }  // choice vc-selector
    
            leaf application {
              type enumeration {
                enum "cfm" {
                  value 0;
                  description
                    "Statistics for implicit filters for CFM";
                }
                enum "rmps" {
                  value 1;
                  description
                    "Statistics for implicit filters for RMPS";
                }
                enum "eswd" {
                  value 2;
                  description
                    "Statistics for implicit filters for eswd";
                }
                enum "lsp" {
                  value 3;
                  description
                    "Statistics for implicit filters for lsp";
                }
                enum "routing" {
                  value 4;
                  description
                    "Statistics for implicit bgp flowspec filters for routing";
                }
                enum "ecmp-tracer" {
                  value 5;
                  description
                    "Statistics for implicit filters for ecmp-tracer debug tool";
                }
                enum "ecmp-tracer-server" {
                  value 6;
                  description
                    "Statistics for implicit filters for ecmp-tracer JET clients";
                }
              }
              description "Owner application";
            }
    
            choice daemon-select {
              case logical-system {
              }  // case logical-system
            }  // choice daemon-select
    
            leaf user-plane {
              type string;
              description "User plane name";
            }
    
            leaf terse {
              type empty;
              description
                "Show filter names only";
            }
    
            leaf detail {
              type empty;
              description
                "Show filter statistics with enhanced policer statistics";
            }
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-information
    
        rpc get-firewall-counter-information {
          description "Counter name";
          input {
            choice chassis-selector {
              leaf all-chassis {
                type empty;
                description "All chassis";
              }
              leaf all-lcc {
                type empty;
                description "All LCC chassis";
              }
              leaf scc {
                type empty;
                description "SCC";
              }
              leaf sfc {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "SFC";
              }
              leaf lcc {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "Specific LCC";
              }
              leaf node {
                type string;
                description "Specific node";
              }
              leaf bsys {
                type empty;
                description "Base system";
              }
              leaf gnf {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 10";
                  }
                }
                description
                  "Specific guest network function";
              }
              leaf all-gnfs {
                type empty;
                description
                  "All guest network functions";
              }
              leaf all-system {
                type empty;
                description
                  "All system (BSYS and GNFs)";
              }
              leaf server {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 1";
                  }
                }
                description
                  "Specific server slot";
              }
              leaf all-servers {
                type empty;
                description "All servers";
              }
              leaf vnf {
                type string;
                description
                  "Specific virtual-network-function";
              }
              leaf all-vnfs {
                type empty;
                description
                  "All virtual-network-functions";
              }
            }  // choice chassis-selector
    
            choice re-selector {
              leaf re0 {
                type empty;
                description "RE0";
              }
              leaf re1 {
                type empty;
                description "RE1";
              }
              leaf routing-engine {
                type enumeration {
                  enum "local" {
                    value 0;
                    description
                      "Local routing engine";
                  }
                  enum "other" {
                    value 1;
                    description
                      "Other routing engine";
                  }
                  enum "master" {
                    value 2;
                    description
                      "Master routing engine";
                  }
                  enum "backup" {
                    value 3;
                    description
                      "Backup routing engine";
                  }
                  enum "both" {
                    value 4;
                    description
                      "Both routing engines";
                  }
                }
                description
                  "Specific routing engine";
              }
            }  // choice re-selector
    
            choice lr-selector {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice lr-selector
    
            choice tenant-selector {
              leaf tenant {
                type string;
                description
                  "Name of tenant, or 'all'";
              }
            }  // choice tenant-selector
    
            choice vc-selector {
              leaf local {
                type empty;
                description
                  "Local virtual chassis member";
              }
              leaf all-members {
                type empty;
                description
                  "All virtual chassis members";
              }
              leaf member {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description
                  "Specific virtual chassis member";
              }
            }  // choice vc-selector
    
            leaf countername {
              type string;
              mandatory true;
              description "Counter name";
            }
    
            leaf filter {
              type string;
              mandatory true;
              description "Filter name";
            }
    
            leaf detail {
              type empty;
              description
                "Show filter statistics with enhanced policer statistics";
            }
    
            leaf application {
              type enumeration {
                enum "cfm" {
                  value 0;
                  description
                    "Statistics for implicit filters for CFM";
                }
                enum "rmps" {
                  value 1;
                  description
                    "Statistics for implicit filters for RMPS";
                }
                enum "eswd" {
                  value 2;
                  description
                    "Statistics for implicit filters for eswd";
                }
                enum "lsp" {
                  value 3;
                  description
                    "Statistics for implicit filters for lsp";
                }
                enum "routing" {
                  value 4;
                  description
                    "Statistics for implicit bgp flowspec filters for routing";
                }
                enum "ecmp-tracer" {
                  value 5;
                  description
                    "Statistics for implicit filters for ecmp-tracer debug tool";
                }
                enum "ecmp-tracer-server" {
                  value 6;
                  description
                    "Statistics for implicit filters for ecmp-tracer JET clients";
                }
              }
              description "Owner application";
            }
    
            choice daemon-select {
              case logical-system {
              }  // case logical-system
            }  // choice daemon-select
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-counter-information
    
        rpc get-firewall-filter-information {
          description "Filter name";
          input {
            choice chassis-selector {
              leaf all-chassis {
                type empty;
                description "All chassis";
              }
              leaf all-lcc {
                type empty;
                description "All LCC chassis";
              }
              leaf scc {
                type empty;
                description "SCC";
              }
              leaf sfc {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "SFC";
              }
              leaf lcc {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "Specific LCC";
              }
              leaf node {
                type string;
                description "Specific node";
              }
              leaf bsys {
                type empty;
                description "Base system";
              }
              leaf gnf {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 10";
                  }
                }
                description
                  "Specific guest network function";
              }
              leaf all-gnfs {
                type empty;
                description
                  "All guest network functions";
              }
              leaf all-system {
                type empty;
                description
                  "All system (BSYS and GNFs)";
              }
              leaf server {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 1";
                  }
                }
                description
                  "Specific server slot";
              }
              leaf all-servers {
                type empty;
                description "All servers";
              }
              leaf vnf {
                type string;
                description
                  "Specific virtual-network-function";
              }
              leaf all-vnfs {
                type empty;
                description
                  "All virtual-network-functions";
              }
            }  // choice chassis-selector
    
            choice re-selector {
              leaf re0 {
                type empty;
                description "RE0";
              }
              leaf re1 {
                type empty;
                description "RE1";
              }
              leaf routing-engine {
                type enumeration {
                  enum "local" {
                    value 0;
                    description
                      "Local routing engine";
                  }
                  enum "other" {
                    value 1;
                    description
                      "Other routing engine";
                  }
                  enum "master" {
                    value 2;
                    description
                      "Master routing engine";
                  }
                  enum "backup" {
                    value 3;
                    description
                      "Backup routing engine";
                  }
                  enum "both" {
                    value 4;
                    description
                      "Both routing engines";
                  }
                }
                description
                  "Specific routing engine";
              }
            }  // choice re-selector
    
            choice lr-selector {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice lr-selector
    
            choice tenant-selector {
              leaf tenant {
                type string;
                description
                  "Name of tenant, or 'all'";
              }
            }  // choice tenant-selector
    
            choice vc-selector {
              leaf local {
                type empty;
                description
                  "Local virtual chassis member";
              }
              leaf all-members {
                type empty;
                description
                  "All virtual chassis members";
              }
              leaf member {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description
                  "Specific virtual chassis member";
              }
            }  // choice vc-selector
    
            leaf filtername {
              type string;
              mandatory true;
              description "Filter name";
            }
    
            leaf counter {
              type string;
              description "Counter name";
            }
    
            leaf detail {
              type empty;
              description
                "Show filter statistics with enhanced policer statistics";
            }
    
            leaf application {
              type enumeration {
                enum "cfm" {
                  value 0;
                  description
                    "Statistics for implicit filters for CFM";
                }
                enum "rmps" {
                  value 1;
                  description
                    "Statistics for implicit filters for RMPS";
                }
                enum "eswd" {
                  value 2;
                  description
                    "Statistics for implicit filters for eswd";
                }
                enum "lsp" {
                  value 3;
                  description
                    "Statistics for implicit filters for lsp";
                }
                enum "routing" {
                  value 4;
                  description
                    "Statistics for implicit bgp flowspec filters for routing";
                }
                enum "ecmp-tracer" {
                  value 5;
                  description
                    "Statistics for implicit filters for ecmp-tracer debug tool";
                }
                enum "ecmp-tracer-server" {
                  value 6;
                  description
                    "Statistics for implicit filters for ecmp-tracer JET clients";
                }
              }
              description "Owner application";
            }
    
            choice daemon-select {
              case logical-system {
              }  // case logical-system
            }  // choice daemon-select
    
            leaf user-plane {
              type string;
              description "User plane name";
            }
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-filter-information
    
        rpc get-filter-version {
          description
            "Show filter version installed";
          input {
            leaf filtername {
              type string;
              description "Filter name";
            }
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-filter-version
    
        rpc get-firewall-filter-regex-information {
          description
            "Show filter using regular expression";
          input {
            leaf filtername {
              type jt:regular-expression;
              description
                "Regular expression of filter names";
            }
    
            choice daemon-select {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice daemon-select
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-filter-regex-information
    
        rpc get-firewall-log-information {
          description
            "Show log entries for firewall activity";
          input {
            leaf get-firewall-log-detailed-information {
              type empty;
              description
                "Display detailed output";
            }
    
            leaf interface {
              type string;
              description "Interface name";
            }
    
            choice daemon-select {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice daemon-select
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-log-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-log-information
    
        rpc get-firewall-prefix-action-information {
          description
            "Show prefix-action statistics for a filter";
          input {
            leaf filter {
              type string;
              mandatory true;
              description "Filter name";
            }
    
            leaf prefix-action {
              type string;
              mandatory true;
              description "Prefix-action name";
            }
    
            leaf from {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "0 .. 65535";
                }
              }
              default "0";
              description
                "Starting counter or policer";
            }
    
            leaf to {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "0 .. 65535";
                }
              }
              default "65535";
              description
                "Ending counter or policer";
            }
    
            choice daemon-select {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice daemon-select
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-prefix-action-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-prefix-action-information
    
        rpc get-firewall-policer-counter-information {
          description
            "Display policer counter statistics in short form";
          input {
            choice daemon-select {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice daemon-select
    
            leaf detail {
              type empty;
              description
                "Display policer counter statistics in detail";
            }
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-policer-counter-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-policer-counter-information
    
        rpc get-firewall-policer-per-counter-information {
          description
            "Display particular policer counter statistics";
          input {
            choice daemon-select {
              leaf logical-system {
                type string;
                description
                  "Name of logical system, or 'all'";
              }
            }  // choice daemon-select
    
            leaf counter-id {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "0 .. 2";
                }
              }
              mandatory true;
              description "Counter Index";
            }
    
            leaf detail {
              type empty;
              description
                "Display particular policer counter statistics in detail";
            }
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-policer-per-counter-information {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-policer-per-counter-information
    
        rpc get-firewall-templates-reference-counts {
          description
            "Show filter templates reference count for subscribers";
          input {
            leaf user-plane {
              type string;
              description "User plane name";
            }
          }
    
          output {
            choice output_c {
              leaf output {
                type string;
              }
              anyxml firewall-templates-in-use {
              }
              anyxml multi-routing-engine-results {
              }
            }  // choice output_c
          }
        }  // rpc get-firewall-templates-reference-counts
      }  // module junos-rpc-firewall
    

© 2023 YumaWorks, Inc. All rights reserved.