404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.221.97.20: ~ $
3

\�me9�	@sUdZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZdd	lmZmZdd
lmZdZdZd
ddddd�iZdZdgZdddeeed�ed�ed�gedgd�Zeee�Zeje�Zeee
edd�dd�Z d d!�Z!dS)"z&install and configure landscape client�N)�chain)�dedent)�	ConfigObj)�subp�
type_utils�util)�Cloud)�Config)�
MetaSchema�get_meta_doc)�PER_INSTANCEz/etc/landscape/client.confz/etc/default/landscape-client�client�infoz.https://landscape.canonical.com/message-systemz#http://landscape.canonical.com/pingz/var/lib/landscape/client)Z	log_levelZurlZping_urlZ	data_patha�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 the `[client]` section in ``/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
ZubuntuZcc_landscapeZ	Landscapez&Install and configure landscape clienta�            # To discover additional supported client keys, run
            # man landscape-config.
            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"
            z�            # Minimum viable config requires account_name and computer_title
            landscape:
                client:
                    computer_title: kiosk 1
                    account_name: Joe's Biz
            aW           # To install landscape-client from a PPA, specify apt.sources
           apt:
               sources:
                 trunk-testing-ppa:
                   source: ppa:landscape/self-hosted-beta
           landscape:
               client:
                 account_name: myaccount
                 computer_title: himom
           �	landscape)�id�name�title�description�distrosZexamplesZ	frequencyZactivate_by_schema_keys)r�cfg�cloud�args�returncCs�|jdi�}t|t�s,tdjtj|�d���|s4dS|jjdg�t	t
|g}ttdd�t
t|�dj��D���}tjd	d
g|�tjtd�dS)z�
    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
    rzR'landscape' key existed in config, but not a dictionary type, is a {_type} instead)Z_typeNzlandscape-clientcSs&g|]\}}d|jdd���|g�qS)z--�_�-)�replace)�.0�k�v�r�"/usr/lib/python3.6/cc_landscape.py�
<listcomp>�szhandle.<locals>.<listcomp>r
zlandscape-configz--silentzRUN=1
)�get�
isinstance�dict�RuntimeError�formatrZobj_nameZdistroZinstall_packages�LSC_BUILTIN_CFG�LSC_CLIENT_CFG_FILE�listr�sorted�merge_together�itemsrrZ
write_file�LS_DEFAULT_FILE)rrrrZls_cloudcfgZ
merge_dataZ
cmd_paramsrrr �handleus$
r.cCsDti�}x6|D].}|sqt|t�r.|j|�q|jt|��qW|S)zu
    merge together ConfigObj objects or things that ConfigObj() will take in
    later entries override earlier
    )rr#�merge)Zobjsr�objrrr r+�s

r+)"�__doc__Zlogging�	itertoolsr�textwraprZ	configobjrZ	cloudinitrrrZcloudinit.cloudrZcloudinit.configr	Zcloudinit.config.schemar
rZcloudinit.settingsrr(r-r'ZMODULE_DESCRIPTIONr�metaZ	getLogger�__name__ZLOG�strr)r.r+rrrr �<module>	sF

)

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 128 B 0644
__init__.cpython-36.pyc File 128 B 0644
cc_ansible.cpython-36.opt-1.pyc File 8.63 KB 0644
cc_ansible.cpython-36.pyc File 8.63 KB 0644
cc_apk_configure.cpython-36.opt-1.pyc File 4.51 KB 0644
cc_apk_configure.cpython-36.pyc File 4.51 KB 0644
cc_apt_configure.cpython-36.opt-1.pyc File 30.42 KB 0644
cc_apt_configure.cpython-36.pyc File 30.42 KB 0644
cc_apt_pipelining.cpython-36.opt-1.pyc File 2.44 KB 0644
cc_apt_pipelining.cpython-36.pyc File 2.44 KB 0644
cc_bootcmd.cpython-36.opt-1.pyc File 2.51 KB 0644
cc_bootcmd.cpython-36.pyc File 2.51 KB 0644
cc_byobu.cpython-36.opt-1.pyc File 3.04 KB 0644
cc_byobu.cpython-36.pyc File 3.04 KB 0644
cc_ca_certs.cpython-36.opt-1.pyc File 7.05 KB 0644
cc_ca_certs.cpython-36.pyc File 7.05 KB 0644
cc_chef.cpython-36.opt-1.pyc File 9.13 KB 0644
cc_chef.cpython-36.pyc File 9.13 KB 0644
cc_disable_ec2_metadata.cpython-36.opt-1.pyc File 1.72 KB 0644
cc_disable_ec2_metadata.cpython-36.pyc File 1.72 KB 0644
cc_disk_setup.cpython-36.opt-1.pyc File 23.1 KB 0644
cc_disk_setup.cpython-36.pyc File 23.1 KB 0644
cc_fan.cpython-36.opt-1.pyc File 2.74 KB 0644
cc_fan.cpython-36.pyc File 2.74 KB 0644
cc_final_message.cpython-36.opt-1.pyc File 3.07 KB 0644
cc_final_message.cpython-36.pyc File 3.07 KB 0644
cc_growpart.cpython-36.opt-1.pyc File 15.91 KB 0644
cc_growpart.cpython-36.pyc File 15.91 KB 0644
cc_grub_dpkg.cpython-36.opt-1.pyc File 4.92 KB 0644
cc_grub_dpkg.cpython-36.pyc File 4.92 KB 0644
cc_install_hotplug.cpython-36.opt-1.pyc File 3.25 KB 0644
cc_install_hotplug.cpython-36.pyc File 3.25 KB 0644
cc_keyboard.cpython-36.opt-1.pyc File 1.98 KB 0644
cc_keyboard.cpython-36.pyc File 1.98 KB 0644
cc_keys_to_console.cpython-36.opt-1.pyc File 3.11 KB 0644
cc_keys_to_console.cpython-36.pyc File 3.11 KB 0644
cc_landscape.cpython-36.opt-1.pyc File 4.71 KB 0644
cc_landscape.cpython-36.pyc File 4.71 KB 0644
cc_locale.cpython-36.opt-1.pyc File 1.58 KB 0644
cc_locale.cpython-36.pyc File 1.58 KB 0644
cc_lxd.cpython-36.opt-1.pyc File 13.04 KB 0644
cc_lxd.cpython-36.pyc File 13.04 KB 0644
cc_mcollective.cpython-36.opt-1.pyc File 4.24 KB 0644
cc_mcollective.cpython-36.pyc File 4.24 KB 0644
cc_migrator.cpython-36.opt-1.pyc File 2.92 KB 0644
cc_migrator.cpython-36.pyc File 2.92 KB 0644
cc_mounts.cpython-36.opt-1.pyc File 14.08 KB 0644
cc_mounts.cpython-36.pyc File 14.08 KB 0644
cc_ntp.cpython-36.opt-1.pyc File 13.15 KB 0644
cc_ntp.cpython-36.pyc File 13.15 KB 0644
cc_package_update_upgrade_install.cpython-36.opt-1.pyc File 3.78 KB 0644
cc_package_update_upgrade_install.cpython-36.pyc File 3.78 KB 0644
cc_phone_home.cpython-36.opt-1.pyc File 4.1 KB 0644
cc_phone_home.cpython-36.pyc File 4.1 KB 0644
cc_power_state_change.cpython-36.opt-1.pyc File 6.24 KB 0644
cc_power_state_change.cpython-36.pyc File 6.24 KB 0644
cc_puppet.cpython-36.opt-1.pyc File 9.46 KB 0644
cc_puppet.cpython-36.pyc File 9.46 KB 0644
cc_reset_rmc.cpython-36.opt-1.pyc File 3.59 KB 0644
cc_reset_rmc.cpython-36.pyc File 3.59 KB 0644
cc_resizefs.cpython-36.opt-1.pyc File 7.02 KB 0644
cc_resizefs.cpython-36.pyc File 7.02 KB 0644
cc_resolv_conf.cpython-36.opt-1.pyc File 4.27 KB 0644
cc_resolv_conf.cpython-36.pyc File 4.27 KB 0644
cc_rh_subscription.cpython-36.opt-1.pyc File 12.06 KB 0644
cc_rh_subscription.cpython-36.pyc File 12.06 KB 0644
cc_rightscale_userdata.cpython-36.opt-1.pyc File 2.77 KB 0644
cc_rightscale_userdata.cpython-36.pyc File 2.77 KB 0644
cc_rsyslog.cpython-36.opt-1.pyc File 10.34 KB 0644
cc_rsyslog.cpython-36.pyc File 10.34 KB 0644
cc_runcmd.cpython-36.opt-1.pyc File 2.43 KB 0644
cc_runcmd.cpython-36.pyc File 2.43 KB 0644
cc_salt_minion.cpython-36.opt-1.pyc File 4.36 KB 0644
cc_salt_minion.cpython-36.pyc File 4.36 KB 0644
cc_scripts_per_boot.cpython-36.opt-1.pyc File 1.4 KB 0644
cc_scripts_per_boot.cpython-36.pyc File 1.4 KB 0644
cc_scripts_per_instance.cpython-36.opt-1.pyc File 1.57 KB 0644
cc_scripts_per_instance.cpython-36.pyc File 1.57 KB 0644
cc_scripts_per_once.cpython-36.opt-1.pyc File 1.51 KB 0644
cc_scripts_per_once.cpython-36.pyc File 1.51 KB 0644
cc_scripts_user.cpython-36.opt-1.pyc File 1.58 KB 0644
cc_scripts_user.cpython-36.pyc File 1.58 KB 0644
cc_scripts_vendor.cpython-36.opt-1.pyc File 2.04 KB 0644
cc_scripts_vendor.cpython-36.pyc File 2.04 KB 0644
cc_seed_random.cpython-36.opt-1.pyc File 4.07 KB 0644
cc_seed_random.cpython-36.pyc File 4.07 KB 0644
cc_set_hostname.cpython-36.opt-1.pyc File 4 KB 0644
cc_set_hostname.cpython-36.pyc File 4 KB 0644
cc_set_passwords.cpython-36.opt-1.pyc File 8.4 KB 0644
cc_set_passwords.cpython-36.pyc File 8.4 KB 0644
cc_snap.cpython-36.opt-1.pyc File 5.94 KB 0644
cc_snap.cpython-36.pyc File 5.94 KB 0644
cc_spacewalk.cpython-36.opt-1.pyc File 2.87 KB 0644
cc_spacewalk.cpython-36.pyc File 2.87 KB 0644
cc_ssh.cpython-36.opt-1.pyc File 11.02 KB 0644
cc_ssh.cpython-36.pyc File 11.02 KB 0644
cc_ssh_authkey_fingerprints.cpython-36.opt-1.pyc File 3.54 KB 0644
cc_ssh_authkey_fingerprints.cpython-36.pyc File 3.54 KB 0644
cc_ssh_import_id.cpython-36.opt-1.pyc File 3.85 KB 0644
cc_ssh_import_id.cpython-36.pyc File 3.85 KB 0644
cc_timezone.cpython-36.opt-1.pyc File 1.24 KB 0644
cc_timezone.cpython-36.pyc File 1.24 KB 0644
cc_ubuntu_advantage.cpython-36.opt-1.pyc File 12.42 KB 0644
cc_ubuntu_advantage.cpython-36.pyc File 12.42 KB 0644
cc_ubuntu_autoinstall.cpython-36.opt-1.pyc File 3.89 KB 0644
cc_ubuntu_autoinstall.cpython-36.pyc File 3.89 KB 0644
cc_ubuntu_drivers.cpython-36.opt-1.pyc File 3.63 KB 0644
cc_ubuntu_drivers.cpython-36.pyc File 3.63 KB 0644
cc_update_etc_hosts.cpython-36.opt-1.pyc File 4.3 KB 0644
cc_update_etc_hosts.cpython-36.pyc File 4.3 KB 0644
cc_update_hostname.cpython-36.opt-1.pyc File 3.01 KB 0644
cc_update_hostname.cpython-36.pyc File 3.01 KB 0644
cc_users_groups.cpython-36.opt-1.pyc File 7.58 KB 0644
cc_users_groups.cpython-36.pyc File 7.58 KB 0644
cc_wireguard.cpython-36.opt-1.pyc File 8.39 KB 0644
cc_wireguard.cpython-36.pyc File 8.39 KB 0644
cc_write_files.cpython-36.opt-1.pyc File 5.61 KB 0644
cc_write_files.cpython-36.pyc File 5.61 KB 0644
cc_write_files_deferred.cpython-36.opt-1.pyc File 1.73 KB 0644
cc_write_files_deferred.cpython-36.pyc File 1.73 KB 0644
cc_yum_add_repo.cpython-36.opt-1.pyc File 6.03 KB 0644
cc_yum_add_repo.cpython-36.pyc File 6.03 KB 0644
cc_zypper_add_repo.cpython-36.opt-1.pyc File 5.66 KB 0644
cc_zypper_add_repo.cpython-36.pyc File 5.66 KB 0644
modules.cpython-36.opt-1.pyc File 7.31 KB 0644
modules.cpython-36.pyc File 7.31 KB 0644
schema.cpython-36.opt-1.pyc File 39.45 KB 0644
schema.cpython-36.pyc File 39.45 KB 0644