netconfcentral logo

yuma-app-common

HTML

yuma-app-common.yang



   module yuma-app-common {

      yang-version 1;

      namespace
         "http://netconfcentral.org/ns/yuma-app-common";

      prefix "appcmn";

      import yuma-types {
         prefix "yt";
      }

      organization "Netconf Central";

      contact
         "Andy Bierman <andy at netconfcentral.com>";

      description
         "Common CLI parameters used in all yuma applications.";

      revision "2010-01-25" {
         description
            "Allow revision date in module parm for 0.10 release.";
      }

      revision "2010-01-14" {
         description "Initial version for 0.9.9 release.";
      }


      typedef CliWithDefaultsType {
         type enumeration {
            enum "none" {
               value 0;
            }
            enum "report-all" {
               value 1;
            }
            enum "trim" {
               value 2;
            }
            enum "explicit" {
               value 3;
            }
         }
         description "Add 'none' to standard enumerations";
      }

      grouping CliWithDefaultsParm {
         leaf with-defaults {
            type CliWithDefaultsType;
         }
      }  // grouping CliWithDefaultsParm

      grouping HelpMode {
         choice help-mode {
            default "normal";
            leaf brief {
               type empty;
               description "Show brief help text";
            }
            leaf normal {
               type empty;
               description "Show normal help text";
            }
            leaf full {
               type empty;
               description "Show full help text";
            }
         }  // choice help-mode
      }  // grouping HelpMode

      grouping IndentParm {
         leaf indent {
            type yt:IndentType;
            description
               "Number of spaces to indent (0..9) in formatted output.";
         }
      }  // grouping IndentParm

      grouping DatapathParm {
         leaf datapath {
            type yt:NcPathList;
            description
               "Internal file search path for config files.
               Overrides the YUMA_DATAPATH environment variable.";
         }
      }  // grouping DatapathParm

      grouping RunpathParm {
         leaf runpath {
            type yt:NcPathList;
            description
               "Internal file search path for executable modules.
               Overrides the YUMA_RUNPATH environment variable.";
         }
      }  // grouping RunpathParm

      grouping NcxAppCommon {
         leaf config {
            type string;
            description
               "The name of the configuration file to use.
               Any parameter except this one can be set in the config file.
               The default config file will be not be checked if this
               parameter is present.";
         }

         leaf feature-enable-default {
            type boolean;
            default "true";
            description
               "If true, then features will be enabled by default.
               If false, then features will be disabled by default.";
         }

         leaf-list feature-enable {
            type yt:FeatureSpec;
            description
               "Identifies a feature which should be considered
               enabled.";
         }

         leaf-list feature-disable {
            type yt:FeatureSpec;
            description
               "Identifies a feature which should be considered
               disabled.";
         }

         leaf help {
            type empty;
            description "Print program help file and exit.";
         }

         uses HelpMode;

         uses IndentParm;

         leaf log {
            type string;
            description
               "Filespec for the log file to use instead of STDOUT.";
         }

         leaf log-append {
            type empty;
            description
               "If present, the log will be appended not over-written.
               If not, the log will be over-written.
               Only meaningful if the 'log' parameter is
               also present.";
         }

         leaf log-level {
            type yt:NcDebugType;
            description
               "Sets the debug logging level for the program.";
         }

         leaf modpath {
            type yt:NcPathList;
            description
               "Directory search path for YANG or YIN modules.
               Overrides the YUMA_MODPATH environment variable.";
         }

         leaf version {
            type empty;
            description "Print program version string and exit.";
         }

         leaf warn-idlen {
            type uint32 {
               range "0 | 8 .. 1023";
            }
            default "64";
            description
               "Control whether identifier length warnings will be
               generated.  The value zero disables all identifier
               length checking.  If non-zero, then a warning will
               be generated if an identifier is defined which 
               has a length is greater than this amount.";
         }

         leaf warn-linelen {
            type uint32 {
               range "0 | 40 .. 4095";
            }
            default "72";
            description
               "Control whether line length warnings will be
               generated.  The value zero disables all line length
               checking.  If non-zero, then a warning will
               be generated if the line length is greater than
               this amount.  Tab characters are counted as 8 spaces.";
         }

         leaf-list warn-off {
            type uint32 {
               range "400 .. 899";
            }
            description
               "Control whether the specified warning number will be
               generated and counted in the warning total for the
               module being parsed.";
         }

         leaf yuma-home {
            type string;
            description
               "Directory for the yuma project root to use.
               If present, this directory location will
               override the 'YUMA_HOME' environment variable,
               if it is present.  If a zero-length string is
               entered, then the YUMA_HOME environment variable
               will be ignored.";
         }
      }  // grouping NcxAppCommon

      grouping FeatureCodeParms {
         leaf feature-code-default {
            type enumeration {
               enum "static" {
                  value 0;
                  description
                     "The default behavior for feature behavior
                     is to use statically defined features at
                     compile-time.";
               }
               enum "dynamic" {
                  value 1;
                  description
                     "The default behavior for feature behavior
                     is to use dynamically defined features at
                     load-time.";
               }
            }
            default "dynamic";
            description
               "The default feature code generation type.";
         }

         leaf-list feature-static {
            type yt:FeatureSpec;
            description
               "Identifies a feature which is configured to be a
               static feature, and therefore set at compile time.";
         }

         leaf-list feature-dynamic {
            type yt:FeatureSpec;
            description
               "Identifies a feature which is configured to be a
               static feature, and therefore set at compile time.";
         }
      }  // grouping FeatureCodeParms

      grouping ModuleParm {
         leaf-list module {
            type yt:NcModuleSpec;
            description "YANG source module name to use.";
         }
      }  // grouping ModuleParm

      grouping SubtreeParm {
         leaf-list subtree {
            type yt:NcPathSpec;
            description
               "Path specification of the directory subtree to use.
               All of the YANG source modules contained in the
               specified directory sub-tree will be processed.
               
               Note that symbolic links are not followed
               during the directory traversal.  Only real directories
               will be searched and regular files will be checked as
               modules.  Processing will continue to the next file
               if a module contains errors.
               
               If this string begins with a '~' character,
               then a username is expected to follow or
               a directory separator character.  If it begins
               with a '$' character, then an environment variable
               name is expected to follow.
               
               ~/some/path ==> <my-home-dir>/some/path
               
               ~fred/some/path ==> <fred-home-dir>/some/path
               
               $workdir/some/path ==> <workdir-env-var>/some/path";
         }
      }  // grouping SubtreeParm

      grouping DeviationParm {
         leaf-list deviation {
            type yt:NcModuleSpec;
            description
               "YANG deviation file.  
                
               This parameter identifies a YANG module that
               should only be checked for deviation statements
               for external modules.  These will be collected
               and applied to the real module(s) being processed.
               
               Deviations are applied as patches to the target module.
               Since they are not identified in the target module at
               all (ala imports), they have to be specified
               explicitly, so they will be correctly processed.
               
               If this string represents a filespec, 
               ending with the '.yang' or '.yin' extension,
               then only that file location will be checked.
               
               If this string represents a module name, then
               the module search path will be checked for
               a file with the module name and the '.yang' 
               or '.yin' extension.
               
               If this string begins with a '~' character,
               then a username is expected to follow or
               a directory separator character.  If it begins
               with a '$' character, then an environment variable
               name is expected to follow.
               
               ~/some/path ==> <my-home-dir>/some/path
               
               ~fred/some/path ==> <fred-home-dir>/some/path
               
               $workdir/some/path ==> <workdir-env-var>/some/path
               ";
         }
      }  // grouping DeviationParm

      grouping SubdirsParm {
         leaf subdirs {
            type boolean;
            default "true";
            description
               "If false, the file search paths for modules, scripts, 
               and data files will not include sub-directories if they
               exist in the specified path.
               
               If true, then these file search paths will include
               sub-directories, if present.  Any directory name beginning
               with a dot '.' character, or named 'CVS', will be ignored.";
         }
      }  // grouping SubdirsParm

      grouping FeatureParms {
      }  // grouping FeatureParms
   }  // module yuma-app-common

Summary

  
  
Organization Netconf Central
  
Module yuma-app-common
Version 2010-01-25
File yuma-app-common.yang
  
Prefix appcmn
Namespace http://netconfcentral.org/ns/yuma-app-common
  
Cooked /cookedmodules/yuma-app-common/2010-01-25
YANG /src/yuma-app-common@2010-01-25.yang
XSD /xsd/yuma-app-common@2010-01-25.xsd
  
Abstract Common CLI parameters used in all yuma applications.
  
Contact
Andy Bierman <andy at netconfcentral.com>

Description

 
Common CLI parameters used in all yuma applications.

Typedefs

Typedef Base type Abstract
CliWithDefaultsType enumeration Add 'none' to standard enumerations

Groupings

Grouping Objects Abstract
CliWithDefaultsParm with-defaults
DatapathParm datapath
DeviationParm deviation
FeatureCodeParms feature-code-default feature-static feature-dynamic
FeatureParms
HelpMode help-mode
IndentParm indent
ModuleParm module
NcxAppCommon config feature-enable-default feature-enable feature-disable help help-modeindentlog log-append log-level modpath version warn-idlen warn-linelen warn-off yuma-home
RunpathParm runpath
SubdirsParm subdirs
SubtreeParm subtree