SourceForge: config-model/config-model: config-model-approx/lib/Config/Model/models/Approx.pl@9d02faeac218
config-model-approx/lib/Config/Model/models/Approx.pl
author Dominique Dumont <domi@komarr.gre.hp.com>
Tue Jan 31 13:25:39 2012 +0100 (3 months ago)
changeset 2513 9d02faeac218
parent 1962 c4d50c2937ca
permissions -rw-r--r--
call notify_change and tinker data_mode when needed
     1 [
     2   {
     3     'class_description' => 'Configuration model to edit C</etc/approc/approx.conf>. This file can be edited with the following command:
     4 
     5  config-edit -application approx
     6 
     7 ',
     8     'read_config' => [
     9       {
    10         'file' => 'approx.conf',
    11         'backend' => 'custom',
    12         'class' => 'Config::Model::Approx',
    13         'config_dir' => '/etc/approx'
    14       }
    15     ],
    16     'name' => 'Approx',
    17     'copyright' => [
    18       '2011, Dominique Dumont'
    19     ],
    20     'author' => [
    21       'Dominique Dumont'
    22     ],
    23     'license' => 'LGPL-2.1+',
    24     'element' => [
    25       'cache',
    26       {
    27         'value_type' => 'uniline',
    28         'summary' => 'approx cache directory',
    29         'upstream_default' => '/var/cache/approx',
    30         'experience' => 'advanced',
    31         'type' => 'leaf',
    32         'description' => 'Specifies the location of the approx cache directory (default: /var/cache/approx). It and all its subdirectories must be owned by the approx server (see also the $user and $group parameters, below.)'
    33       },
    34       'interval',
    35       {
    36         'value_type' => 'integer',
    37         'summary' => 'file cache expiration in minutes',
    38         'upstream_default' => '720',
    39         'experience' => 'advanced',
    40         'type' => 'leaf',
    41         'description' => 'Specifies the time in minutes after which a cached file will be considered too old to deliver without first checking with the remote repository for a newer version'
    42       },
    43       'max_rate',
    44       {
    45         'value_type' => 'uniline',
    46         'summary' => 'maximum download rate from remote repositories',
    47         'type' => 'leaf',
    48         'description' => "Specifies the maximum download rate from remote repositories, in bytes per second (default: unlimited). The value may be suf\x{2010} fixed with \"K\", \"M\", or \"G\" to indicate kilobytes, megabytes, or gigabytes per second, respectively."
    49       },
    50       'max_redirects',
    51       {
    52         'value_type' => 'integer',
    53         'summary' => 'maximum number of HTTP redirections',
    54         'upstream_default' => '5',
    55         'type' => 'leaf',
    56         'description' => 'Specifies the maximum number of HTTP redirections that will be followed when downloading a remote file'
    57       },
    58       'user',
    59       {
    60         'value_type' => 'uniline',
    61         'summary' => 'user that owns the files in the approx cache',
    62         'upstream_default' => 'approx',
    63         'type' => 'leaf'
    64       },
    65       'group',
    66       {
    67         'value_type' => 'uniline',
    68         'summary' => 'group that owns the files in the approx cache',
    69         'upstream_default' => 'approx',
    70         'type' => 'leaf'
    71       },
    72       'syslog',
    73       {
    74         'value_type' => 'uniline',
    75         'summary' => 'syslog(3) facility to use when logging',
    76         'upstream_default' => 'daemon',
    77         'type' => 'leaf'
    78       },
    79       'pdiffs',
    80       {
    81         'value_type' => 'boolean',
    82         'summary' => 'support IndexFile diffs',
    83         'upstream_default' => '1',
    84         'type' => 'leaf'
    85       },
    86       'offline',
    87       {
    88         'value_type' => 'boolean',
    89         'summary' => 'use cached files when offline',
    90         'upstream_default' => '0',
    91         'type' => 'leaf',
    92         'description' => 'Specifies whether to deliver (possibly out-of-date) cached files when they cannot be downloaded from remote repositories'
    93       },
    94       'max_wait',
    95       {
    96         'value_type' => 'integer',
    97         'summary' => 'max wait for concurrent file download',
    98         'upstream_default' => '10',
    99         'type' => 'leaf',
   100         'description' => 'Specifies how many seconds an approx(8) process will wait for a concurrent download of a file to complete, before attempting to download the file itself'
   101       },
   102       'verbose',
   103       {
   104         'value_type' => 'boolean',
   105         'upstream_default' => '0',
   106         'type' => 'leaf',
   107         'description' => 'Specifies whether informational messages should be printed in the log'
   108       },
   109       'debug',
   110       {
   111         'value_type' => 'boolean',
   112         'upstream_default' => '0',
   113         'type' => 'leaf',
   114         'description' => 'Specifies whether debug messages should be printed in the log'
   115       },
   116       'distributions',
   117       {
   118         'level' => 'important',
   119         'cargo' => {
   120           'value_type' => 'uniline',
   121           'type' => 'leaf'
   122         },
   123         'summary' => 'remote repositories',
   124         'type' => 'hash',
   125         'description' => 'The other name/value pairs are used to map distribution names to remote repositories. For example,
   126 
   127   debian     =>   http://ftp.debian.org/debian
   128   security   =>   http://security.debian.org/debian-security
   129 
   130 Use the distribution name as the key of the hash element and the URL as the value
   131 ',
   132         'index_type' => 'string'
   133       }
   134     ]
   135   }
   136 ]
   137 ;
   138