module yumaworks-app-common { yang-version 1; namespace "http://yumaworks.com/ns/yumaworks-app-common"; prefix "ywapp"; import yuma-ncx { prefix "ncx"; } import yumaworks-types { prefix "ywt"; } import yuma-types { prefix "yt"; } organization "YumaWorks, Inc."; contact "Support "; description "Common CLI parameters used in all yumapro applications. Copyright (c) 2012 - 2014 YumaWorks, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the BSD 3-Clause License http://opensource.org/licenses/BSD-3-Clause"; revision 2014-02-14 { description "Add UseSesssionVars CLI variable grouping. Add SaveSesssionVars CLI variable grouping. Add DataTemplateParms grouping."; } revision 2013-08-13 { description "Split log-vendor and log-vendor-level parameters into their own grouping."; } revision 2013-05-25 { description "Add log-console param as user friendly synonym for log-mirroring."; } revision 2013-02-11 { description "Move common yangcli-pro grouping to this module"; } revision 2012-11-30 { description "Add message-indent parameter."; } revision 2012-10-23 { description 'Remove log-custom and log-localtime empty leafs and convert to "bits" entity: log-header="custom localtime".'; } revision 2012-10-10 { description "Change log-backtrace-level to and add log-backtrace-stream parameters as 'bits' type entities. Eliminate log-backtrace-xxx 'type empty' leafs."; } revision 2012-08-16 { description "Split from yuma-app-common; Add new logging parameters."; } grouping LoggingCommonParms { leaf log-backtrace { description "If present, log output will include traceback detail for each log message, subject to further filtering by --log-backtrace-level and/or log-backtrace-stream qualifiers"; type uint32 { range "0 .. 100"; } } leaf log-backtrace-detail { description "If present in conjunction with --log-backtrace log messages will include 'detailed' backtrace information (if supported by the compiler)."; type empty; } leaf log-backtrace-level { description 'Indicates for which debug level(s) backtrace info will be generated. Param string is an XSD list: a double quoted series of whitespace separated (level) strings like "error warn debug"'; type bits { bit write { description "Include backtrace info in write messages."; } bit dev0 { description "Include backtrace info in developer level 0 messages."; } bit error { description "Include backtrace info in error messages."; } bit warn { description "Include backtrace info in warning messages."; } bit info { description "Include backtrace info in info messages."; } bit dev1 { description "Include backtrace info in developer level 1 messages."; } bit debug { description "Include backtrace info in debug messages."; } bit debug2 { description "Include backtrace info in debug2 messages."; } bit debug3 { description "Include backtrace info in debug3 messages."; } bit debug4 { description "Include backtrace info in debug4 messages."; } } } leaf log-backtrace-stream { description 'Indicates in which log stream(s) backtrace info will be included. Param string is an XSD list: a double quoted series of whitespace separated (log stream) strings like "logfile syslog"'; type bits { bit logfile { description "Include backtrace in logfile stream."; } bit stderr { description "Include backtrace in stderr stream."; } bit stdout { description "Include backtrace in stdout stream."; } bit syslog { description "Include backtrace in syslog stream."; } bit vendor { description "Include backtrace in vendor stream."; } } } leaf log-header { description 'Indicates what header elements to include in header output. Param string is an XSD list: a double quoted series of whitespace separated (element) strings like "custom localtime"'; type bits { bit custom { description "Include date, time, and level."; } bit localtime { description "Include localtime instead of Yang canonical format."; } } } leaf log-mirroring { description "If present in conjunction with --log, --log-syslog, and/or --log-vendor, log output will be directed to the normal stdout/stderr/logfile as well as to the syslog or vendor log stream"; type empty; } leaf log-console { description "User friendly synonym for --log-mirroring."; type empty; } leaf log-stderr { description "If present, error level output be directed to stderr instead of stdout (as well as log file, if specified)"; type empty; } leaf log-suppress-ctrl { ncx:hidden; description "If present, strip certain control characters from output in order to modify log formatting."; type empty; } leaf log-syslog { description "If present, log output will be directed to the standard syslog interface. Yuma log priorities will be translated into the appropriate syslog equivalents."; type empty; } leaf log-syslog-level { description "Sets the syslog debug logging level filter for output to the syslog file for the program."; type yt:NcDebugType; } } grouping LoggingVendorParms { leaf log-vendor { description "If present, log messages will be directed to a customer-written and registered callback function. This functionality is defined by an API specified in the YumaWorks API Reference Manual. In the absence of a registered callback, this parameter will direct logging messages to syslog in order to facilitate standalone testing."; type empty; } leaf log-vendor-level { description "Sets the vendor debug logging level filter for output to the vendor-specific log output file stream for the program."; type yt:NcDebugType; } } grouping MessageIndentParm { leaf message-indent { type int8 { range "-1 .. 9"; } default -1; description "The number of spaces to indent for each level of output in a protocol message, e.g. NETCONF request. The value zero means no indent, just line feeds. The value -1 means no indent and no line feeds either."; } } grouping YumaproHomeParm { leaf yumapro-home { description "Directory for the yumapro project root to use. If present, this directory location will override the 'YUMAPRO_HOME' environment variable, if it is present. If a zero-length string is entered, then the YUMPROA_HOME environment variable will be ignored."; type string; } } grouping MatchParms { leaf match-names { type ywt:NameMatchMode; description "Match mode to use for UrlPath name searches."; } leaf alt-names { type ywt:AltNameMode; description "Match mode to use for UrlPath name searches."; } leaf wildcard-keys { type boolean; description "Set to 'true' if UrlPath targets for GET operations are allowed to replace key values with the dash '-' character to indicate that all instances of that key are requested. Set to false to treat the '-' character as a plain character if entered as a key value in a UrlPath string."; } } grouping UseSessionVarsParm { leaf use-session-vars { description "Specifies how global variables will be handled when set from the context of a named session. If 'true', then an assignment (e.g., $$foo = 'bar') will only affect the session-specific instance of the variable, and only be visible within the scope of the named session. If 'false', then assignment statements for global variables will affect the global instance of the variable, and be visible to all sessions. If the current session is the default session, and not a named session, then the value of this variable is ignored, and all global variable assignments will affect the global instance of the variable, and be visible to all sessions."; type boolean; default true; } } grouping SaveSessionVarsParm { leaf save-session-vars { description "Specifies if session variables will be saved when the program exits. If use-session-vars is 'false' then this variable is ignored. If 'false', then session variables will not be saved when the program exits. If 'true', then session variables will be saved when the program exits, but only if user variables are being saved."; type boolean; default true; } } grouping DataTemplateParms { leaf use-data-templates { description "Specifies if variable expressions are enabled for data in XML, JSON or .conf instance documents. If 'false', then text matching the pattern for variable expressions in these instance documents will be treated as plain strings. If 'true', then text matching the pattern for variable expressions in these instance documents will be processed as variable expressions."; type boolean; default true; } leaf ignore-missing-vars { description "Specifies how missing variable errors in data templates are handled. This parameter has no affect unless the 'use-data-templates' parameter is 'true'. If 'false', then variable expressions that contain references to missing variables will cause a parsing error. If 'true', then variable expressions that contain references to missing variables will not cause a parsing error. Instead, an empty string will be used for the value of a missing variable."; type boolean; default false; } } }