| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/landscape/ |
Upload File : |
ó
}9Rc @ sÞ d d l Z d d l Z d d l m Z m Z m Z m Z m Z d d l m Z m
Z
d d l m Z m Z d d l
m Z d d l m Z d d l m Z d „ Z d e f d
„ ƒ YZ d e f d „ ƒ YZ d
„ Z d S( iÿÿÿÿN( t getLevelNamet getLoggert FileHandlert
StreamHandlert Formatter( t OptionParsert
SUPPRESS_HELP( t ConfigParsert NoSectionError( t VERSION( t Persist( t UPGRADE_MANAGERSc C sÜ g } t j j | j ƒ s. t j | j ƒ n t j j | j | d ƒ } | j t | ƒ ƒ | j s | j t t
j ƒ ƒ n t ƒ j
t | j j ƒ ƒ ƒ x7 | D]/ } t ƒ j | ƒ d } | j t | ƒ ƒ q¥ Wd S( s, Given a basic configuration, set up logging.s .logs; %(asctime)s %(levelname)-8s [%(threadName)-10s] %(message)sN( t ost patht existst log_dirt makedirst joint appendR t quietR t syst stdoutR t setLevelR t log_levelt uppert
addHandlert setFormatterR ( t
configurationt program_namet handlerst log_filenamet handlert format( ( s8 /usr/lib/python2.7/dist-packages/landscape/deployment.pyt init_logging s
t BaseConfigurationc B s e Z d Z d Z d Z d g Z e j j e j j e
j d ƒ ƒ e j j d ƒ k rk e j d d ƒ n e
e ƒ Z d Z d „ Z d „ Z d „ Z d d „ Z d
„ Z d „ Z e d „ Z d
„ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( sV Base class for configuration implementations.
@cvar required_options: Optionally, a sequence of key names to require when
reading or writing a configuration.
@cvar unsaved_options: Optionally, a sequence of key names to never write
to the configuration file. This is useful when you want to provide
command-line options that should never end up in a configuration file.
@cvar default_config_filenames: A sequence of filenames to check when
reading or writing a configuration.
Default values for supported options are set as in L{make_parser}.
s /etc/landscape/client.confi t scriptss landscape-client.conft clientc C se i | _ g | _ i | _ d | _ i | _ | j ƒ | _ | j j j ƒ | _
| j j j ƒ d S( N( t _set_optionst _command_line_argst _command_line_optionst Nonet _config_filenamet _config_file_optionst make_parsert _parsert defaultst copyt _command_line_defaultst clear( t self( ( s8 /usr/lib/python2.7/dist-packages/landscape/deployment.pyt __init__8 s c C sÓ xw | j | j | j | j g D] } | | k r | | } Pq q W| j j d | j d d ƒ ƒ rn d } n t | ƒ ‚ t | t
ƒ rÏ | j j d | j d d ƒ ƒ } | d k rÏ | j d | ƒ } qÏ n | S( sø Find and return the value of the given configuration parameter.
The following sources will be searched:
- The attributes that were explicitly set on this object,
- The parameters specified on the command line,
- The parameters specified in the configuration file, and
- The defaults.
If no values are found and the parameter does exist as a possible
parameter, C{None} is returned.
Otherwise C{AttributeError} is raised.
s --t _t -N(
R% R' R* R/ R, t
has_optiont replaceR( t AttributeErrort
isinstancet
basestringt
get_optiont
convert_value( R1 t namet optionst valuet option( ( s8 /usr/lib/python2.7/dist-packages/landscape/deployment.pyt __getattr__D s
" "c C sR | j ƒ } | j j ƒ | _ | j j ƒ | _ | j | _ | j j ƒ | _ | S( sX
Return a new configuration object, with the same settings as this one.
( t __class__R% R. R' R) R* ( R1 t config( ( s8 /usr/lib/python2.7/dist-packages/landscape/deployment.pyt cloned s c C s* y | j | ƒ SWn t k
r% | SXd S( s5 Return the value of the C{name} option or C{default}.N( R@ R7 ( R1 R<