junos-conf-applications

Junos applications configuration module

  • Version: 2019-01-01

    junos-conf-applications@2019-01-01


    
      module junos-conf-applications {
    
        yang-version 1;
    
        namespace
          "http://yang.juniper.net/junos/conf/applications";
    
        prefix jc-applications;
    
        import junos-common-ddl-extensions {
          prefix junos;
          revision-date "2019-01-01";
        }
        import junos-common-types {
          prefix jt;
          revision-date "2019-01-01";
        }
        import junos-conf-root {
          prefix jc;
          revision-date "2019-01-01";
        }
    
        organization "Juniper Networks, Inc.";
    
        contact "yang-support@juniper.net";
    
        description
          "Junos applications configuration module";
    
        revision "2019-01-01" {
          description "Junos: 21.3R1.9";
        }
    
    
        augment /jc:configuration {
          uses applications-group;
        }
    
        augment /jc:configuration/jc:groups {
          uses applications-group;
        }
    
        grouping applications-group {
          container applications {
            description
              "Define applications by protocol characteristics";
            uses apply-advanced;
    
            list application {
              key "name";
              ordered-by user;
              description
                "Define an application";
              uses application_object;
            }  // list application
    
            list application-set {
              key "name";
              ordered-by user;
              description
                "Define an application set";
              uses application_set_object;
            }  // list application-set
          }  // container applications
        }  // grouping applications-group
    
        grouping application_object {
          leaf name {
            type string {
              junos:posix-pattern "^[[:alnum:]][[:alnum:]_-]*$";
              junos:pattern-message "Must be a string beginning with a number or letter and consisting of letters, numbers, dashes and underscores.";
              length "1 .. 63";
            }
            description "Application name";
          }
    
          uses apply-advanced;
    
          leaf application-protocol {
            type enumeration {
              enum "bootp" {
                value 0;
                description "Bootstrap protocol";
              }
              enum "dce-rpc" {
                value 1;
                description "DCE RPC";
              }
              enum "dce-rpc-portmap" {
                value 2;
                description "DCE RPC portmap";
              }
              enum "dns" {
                value 3;
                description
                  "Domain Name Service";
              }
              enum "exec" {
                value 4;
                description
                  "Remote Execution Protocol";
              }
              enum "ftp" {
                value 5;
                description
                  "File Transfer Protocol";
              }
              enum "ftp-data" {
                value 6;
                description
                  "File Transfer Protocol Data Session";
              }
              enum "gprs-gtp-c" {
                value 7;
                description
                  "GPRS Tunneling Control Plane";
              }
              enum "gprs-gtp-u" {
                value 8;
                description
                  "GPRS Tunneling User Plane";
              }
              enum "gprs-gtp-v0" {
                value 9;
                description
                  "GPRS Tunneling Version 0";
              }
              enum "gprs-sctp" {
                value 10;
                description
                  "GPRS Stream Control Protocol";
              }
              enum "h323" {
                value 11;
                description "H.323";
              }
              enum "icmp" {
                value 12;
                description "ICMP";
              }
              enum "icmpv6" {
                value 13;
                description "ICMPv6";
              }
              enum "ignore" {
                value 14;
                description
                  "Ignore application type";
              }
              enum "iiop" {
                value 15;
                description
                  "Internet Inter-ORB Protocol";
              }
              enum "ike-esp-nat" {
                value 16;
                description "IKE/ESP with NAT";
              }
              enum "ip" {
                value 17;
                description "IP";
              }
              enum "login" {
                value 18;
                description "Login";
              }
              enum "mgcp-ca" {
                value 19;
                description "MGCP-CA";
              }
              enum "mgcp-ua" {
                value 20;
                description "MGCP-UA";
              }
              enum "ms-rpc" {
                value 21;
                description "Microsoft RPC";
              }
              enum "netbios" {
                value 22;
                description "NetBIOS";
              }
              enum "netshow" {
                value 23;
                description "NetShow";
              }
              enum "none" {
                value 24;
                description "None";
              }
              enum "pptp" {
                value 25;
                description
                  "Point-to-Point Tunneling Protocol";
              }
              enum "q931" {
                value 26;
                description "Q.931";
              }
              enum "ras" {
                value 27;
                description "RAS";
              }
              enum "realaudio" {
                value 28;
                description "RealAudio";
              }
              enum "rpc" {
                value 29;
                description "RPC";
              }
              enum "rpc-portmap" {
                value 30;
                description "RPC portmap";
              }
              enum "rsh" {
                value 31;
                description "Remote Shell";
              }
              enum "rtsp" {
                value 32;
                description
                  "Real Time Streaming Protocol";
              }
              enum "sccp" {
                value 33;
                description
                  "Skinny Client Control Protocol";
              }
              enum "sip" {
                value 34;
                description
                  "Session Initiation Protocol";
              }
              enum "shell" {
                value 35;
                description "Shell";
              }
              enum "snmp" {
                value 36;
                description "SNMP";
              }
              enum "sqlnet" {
                value 37;
                description "SQLNet";
              }
              enum "sqlnet-v2" {
                value 38;
                description
                  "Oracle SQL*Net Version 2";
              }
              enum "sun-rpc" {
                value 39;
                description
                  "Sun Microsystems RPC";
              }
              enum "talk" {
                value 40;
                description "Talk Program";
              }
              enum "tftp" {
                value 41;
                description
                  "Trivial File Transfer Protocol";
              }
              enum "traceroute" {
                value 42;
                description "Traceroute";
              }
              enum "http" {
                value 43;
                description
                  "Hypertext Transfer Protocol";
              }
              enum "winframe" {
                value 44;
                description "WinFrame";
              }
              enum "https" {
                value 45;
                description
                  "Hypertext Transfer Protocol";
              }
              enum "imap" {
                value 46;
                description
                  "Internet Mail Access Protocol";
              }
              enum "smtp" {
                value 47;
                description
                  "Simple Mail Transfer Protocol";
              }
              enum "ssh" {
                value 48;
                description
                  "Secure Shell Protocol";
              }
              enum "telnet" {
                value 49;
                description "Telnet Protocol";
              }
              enum "twamp" {
                value 50;
                description
                  "Two Way Active Meaurement Protocol";
              }
              enum "pop3" {
                value 51;
                description
                  "Post Office Protocol 3 Protocol";
              }
              enum "smtps" {
                value 52;
                description
                  "Simple Mail Transfer Protocol Over TLS";
              }
              enum "imaps" {
                value 53;
                description
                  "Internet Mail Access Protocol Over TLS";
              }
              enum "pop3s" {
                value 54;
                description
                  "Post Office Protocol 3 Protocol Over TLS";
              }
            }
            description
              "Application protocol type";
          }
    
          leaf protocol {
            type string;
            description "Match IP protocol type";
          }
    
          leaf source-port {
            type string;
            description
              "Match TCP/UDP source port";
          }
    
          leaf destination-port {
            type string;
            description
              "Match TCP/UDP destination port";
          }
    
          leaf ether-type {
            type string {
              junos:posix-pattern "^(0[Xx][0-9A-Fa-f]{4})$|^([0-9A-Fa-f]{4})$";
              junos:pattern-message "Ether-type should be in hex - (example: 0x8906)";
            }
            description "Match ether type";
          }
    
          leaf snmp-command {
            type enumeration {
              enum "get" {
                value 0;
                description "Get request";
              }
              enum "get-next" {
                value 1;
                description "Get-next request";
              }
              enum "get-response" {
                value 2;
                description "Get response";
              }
              enum "set" {
                value 3;
                description "Set request";
              }
              enum "trap" {
                value 4;
                description "Trap";
              }
            }
            description "Match SNMP command";
          }
    
          leaf icmp-type {
            type string;
            description
              "Match ICMP message type";
          }
    
          leaf icmp6-type {
            type string;
            description
              "Match ICMP6 message type";
          }
    
          leaf icmp-code {
            type string;
            description
              "Match ICMP message code";
          }
    
          leaf icmp6-code {
            type string;
            description
              "Match ICMP6 message code";
          }
    
          leaf ttl-threshold {
            type union {
              type uint8;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Traceroute TTL threshold";
          }
    
          leaf rpc-program-number {
            type string {
              junos:posix-pattern "^(0|[1-9][0-9]{0,9})(-(0|[1-9][0-9]{0,9}))?$";
              junos:pattern-message "Value must be an integer or a range of integers";
            }
            description
              "Match range of RPC program numbers";
          }
    
          leaf uuid {
            type string {
              junos:posix-pattern "^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$";
              junos:pattern-message "Value must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
            }
            description
              "Match universal unique identifier for DCE RPC objects";
          }
    
          leaf inactivity-timeout {
            type string;
            units "seconds";
            description
              "Application-specific inactivity timeout";
          }
    
          leaf gate-timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "5 .. 21600";
              }
            }
            units "seconds";
            description
              "Application-specific gate timeout";
          }
    
          leaf child-inactivity-timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "4 .. 86400";
              }
            }
            units "seconds";
            description
              "Application-specific child session inactivity timeout";
          }
    
          choice dns-choice {
            leaf do-not-translate-AAAA-query-to-A-query {
              junos:must "(".. application-protocol dns")";
              junos:must-message "Application protocol must be DNS";
              type empty;
              description
                "Knob to control the translation of AAAA query to A query";
            }
            leaf do-not-translate-A-query-to-AAAA-query {
              junos:must "(".. application-protocol dns")";
              junos:must-message "Application protocol must be DNS";
              type empty;
              description
                "Knob to control the translation of A query to AAAA query";
            }
          }  // choice dns-choice
        }  // grouping application_object
    
        grouping application_set_object {
          leaf name {
            type string {
              junos:posix-pattern "^[[:alnum:]][[:alnum:]_-]*$";
              junos:pattern-message "Must be a string beginning with a number or letter and consisting of letters, numbers, dashes and underscores.";
              length "1 .. 63";
            }
            description "Application set name";
          }
    
          uses apply-advanced;
    
          leaf description {
            type string {
              junos:posix-pattern "^[^&<>
    ]+$";
              junos:pattern-message "Must be a string excluding '&', '<', '>' and '
    '";
              length "1 .. 900";
            }
            description
              "Text description of application set";
          }
    
          list application {
            key "name";
            ordered-by user;
            description
              "Application to be included in the set";
            leaf name {
              type string {
                junos:posix-pattern "^[[:alnum:]][[:alnum:]_-]*$";
                junos:pattern-message "Must be a string beginning with a number or letter and consisting of letters, numbers, dashes and underscores.";
                length "1 .. 63";
              }
              description "Application name";
            }
    
            uses apply-advanced;
          }  // list application
    
          list application-set {
            key "name";
            ordered-by user;
            description
              "Define an application-set";
            leaf name {
              type string {
                junos:posix-pattern "^[[:alnum:]][[:alnum:]_-]*$";
                junos:pattern-message "Must be a string beginning with a number or letter and consisting of letters, numbers, dashes and underscores.";
                length "1 .. 63";
              }
              description
                "Define an application-set name";
            }
    
            uses apply-advanced;
          }  // list application-set
        }  // grouping application_set_object
    
        grouping apply-advanced {
          description
            "Apply advanced configuration logic";
          leaf-list apply-groups {
            type string;
            ordered-by user;
            description
              "Groups from which to inherit configuration data";
          }
    
          leaf-list apply-groups-except {
            type string;
            ordered-by user;
            description
              "Don't inherit configuration data from these groups";
          }
    
          list apply-macro {
            key "name";
            ordered-by user;
            description
              "Macro and parameters for commit script expansion";
            uses apply-macro-type;
          }  // list apply-macro
        }  // grouping apply-advanced
    
        grouping apply-macro-type {
          description
            "Macro data for commit-script expansion";
          leaf name {
            type string;
            description
              "Name of the macro to be expanded";
          }
    
          list data {
            key "name";
            uses macro-data-type;
          }  // list data
        }  // grouping apply-macro-type
    
        grouping macro-data-type {
          leaf name {
            type string;
            description
              "Keyword part of the keyword-value pair";
          }
    
          leaf value {
            type string;
            description
              "Value part of the keyword-value pair";
          }
        }  // grouping macro-data-type
      }  // module junos-conf-applications
    

© 2023 YumaWorks, Inc. All rights reserved.