config-model-edit.1p

Langue: en

Autres versions - même langue

Version: 2010-05-14 (ubuntu - 24/10/10)

Section: 1 (Commandes utilisateur)

NAME

config-model-edit - Graphical model editor for Config::Model

SYNOPSIS

   config-model-edit [options] -model Sshd [ class:Sshd element:Foo ... ]
 
 

DESCRIPTION

config-model-edit will provides a Perl/Tk graphical interface to edit configuration models that will be used by Config::Model.

Config::Model is a general purpose configuration framework based on configuration models (See Config::Model for details).

This configuration model is also expressed as structured data. This structure data is structured and follow a set of rules which are described for humans in Config::Model.

The structure and rules documented in Config::Model are also expressed in a model in the files provided with Config::Model::Itself.

Hence the possibity to verify, modify configuration data provided by Config::Model can also be applied on configuration models using the same user interface as config-edit.

The model editor program is config-model-edit.

USAGE

By default, "config-model-edit" will try to load a model file from "lib/Config/Model/models". If no model is found, "config-model-edit" will try to load installed models (i.e. located in "/usr/share/perl/...").

Modified models will be saved (by default) in "$PWD/lib/Config/Model/models/".

You can override this behavior with option "-dir".

When you specify a "-model" options, only configuration models matching this options will be loaded. I.e.

   config-model-edit -model Xorg
 
 

will load models "Xorg" (file "Xorg.pl") and all other "Xorg::*" like "Xorg::Screen" (file "Xorg/Screen.pl").

Options

-model
Mandatory option that specifies the configuration model to be edited.
-verbose
Be (very) verbose
-debug
Provide debug infos.
-trace
Provides a full stack trace when exiting on error.
-force_load
Load file even if error are found in data. Bad data are discarded
-dot_diagram
Returns a dot file that represent the stucture of the configuration model. "include" are represented by solid lines. Class usage (i.e. "config_class_name" parameter) is represented by dashed lines. The name of the element is attached to the dashed line.
-dump [ file ]
Dump configuration content on STDOUT or in the specified with Config::Model syntax.

By default, dump only custom values, i.e. different from application built-in values or model default values. See -dumptype option for other types of dump

-dumptype [ full | preset | custom ]
Choose to dump every values (full), only preset values or only customized values (default)
-load <cds_file_to_load> | -
Load model from cds file (using Config::Model serialisation format, typically done with -dump option). This option can be used with "-save" to directly save a model loaded from the cds file or from STDIN.
-load_yaml <yaml_file_to_load> | -
Load configuration data in model from cds file (using Config::Model serialisation format, typically done with -dump_yaml option). This option can be used with "-save" to directly save a model loaded from the YAML file or from STDIN.
-save
Force a save of the model even if no edition was done. This option is useful to migrate a model when Config::Model model feature changes.
-model_dir
Directory where to read and write model

LOGGING

All Config::Model logging is (slowly) moved from klunky debug and verbose prints to Log::Log4perl. Logging can be configured in the following files:
  ~/.log4config-model
 
 
  /etc/log4config-model.conf
 
 

Without these files, the following Log4perl config is used:

  log4perl.logger=WARN, Screen
  log4perl.appender.Screen        = Log::Log4perl::Appender::Screen
  log4perl.appender.Screen.stderr = 0
  log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
  log4perl.appender.Screen.layout.ConversionPattern = %d %m %n
 
 

Log4Perl categories are shown in ``LOGGING'' in config-edit

AUTHOR

Dominique Dumont, ddumont at cpan dot org

SEE ALSO

Config::Model, Config::Model::Node, Config::Model::Instance, Config::Model::HashId, Config::Model::ListId, Config::Model::WarpedNode, Config::Model::Value