Current File : //lib/python2.7/site-packages/cloudinit/config/cc_landscape.pyo |
�
oB�]c @ s� d Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m
Z
e
Z d Z d Z
d
g Z i i d d 6d
d 6d d 6d d 6d 6Z d � Z d � Z d S( s*
Landscape
---------
**Summary:** install and configure landscape client
This module installs and configures ``landscape-client``. The landscape client
will only be installed if the key ``landscape`` is present in config. Landscape
client configuration is given under the ``client`` key under the main
``landscape`` config key. The config parameters are not interpreted by
cloud-init, but rather are converted into a ConfigObj formatted file and
written out to ``/etc/landscape/client.conf``.
The following default client config is provided, but can be overridden::
landscape:
client:
log_level: "info"
url: "https://landscape.canonical.com/message-system"
ping_url: "http://landscape.canoncial.com/ping"
data_path: "/var/lib/landscape/client"
.. note::
see landscape documentation for client config keys
.. note::
if ``tags`` is defined, its contents should be a string delimited with
``,`` rather than a list
**Internal name:** ``cc_landscape``
**Module frequency:** per instance
**Supported distros:** ubuntu
**Config keys**::
landscape:
client:
url: "https://landscape.canonical.com/message-system"
ping_url: "http://landscape.canonical.com/ping"
data_path: "/var/lib/landscape/client"
http_proxy: "http://my.proxy.com/foobar"
https_proxy: "https://my.proxy.com/foobar"
tags: "server,cloud"
computer_title: "footitle"
registration_key: "fookey"
account_name: "fooaccount"
i����N( t BytesIO( t ConfigObj( t
type_utils( t util( t PER_INSTANCEs /etc/landscape/client.confs /etc/default/landscape-clientt ubuntut infot log_levels. https://landscape.canonical.com/message-systemt urls# http://landscape.canonical.com/pingt ping_urls /var/lib/landscape/clientt data_patht clientc C s� | j d i � } t | t � sE t d j d t j | � � � � n | sO d S| j j d
� t t
| g } t | � } t � } | j
| � t j t j j t
� � t j t
| j � � | j d t
� t j t d � t j d d d g � d S( s�
Basically turn a top level 'landscape' entry with a 'client' dict
and render it to ConfigObj format under '[client]' section in
/etc/landscape/client.conf
t landscapesR 'landscape' key existed in config, but not a dictionary type, is a {_type} insteadt _typeNs landscape-clients! Wrote landscape config file to %ss RUN=1
t servicet restart( s landscape-client( t gett
isinstancet dictt RuntimeErrort formatR t obj_namet distrot install_packagest LSC_BUILTIN_CFGt LSC_CLIENT_CFG_FILEt merge_togetherR t writeR t
ensure_dirt ost patht dirnamet
write_filet getvaluet debugt LS_DEFAULT_FILEt subp( t _namet cfgt cloudt logt _argst ls_cloudcfgt
merge_datat mergedt contents( ( sA /usr/lib/python2.7/site-packages/cloudinit/config/cc_landscape.pyt handleW s&