D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib
/
python3.6
/
site-packages
/
cloudinit
/
config
/
__pycache__
/
Filename :
cc_scripts_vendor.cpython-36.pyc
back
Copy
3 \�me+ � @ s� U d Z ddlZddlZddlmZ ddlmZmZ ddlm Z ddl mZ ddlm Z mZ ddlmZ dd lmZ d Zddd eegeed�ed�ed�gg d�Ze ee�Z eje�ZdZeee edd�dd�ZdS )z"Scripts Vendor: Run vendor scripts� N)�dedent)�subp�util)�Cloud)�Config)� MetaSchema�get_meta_doc)�ALL_DISTROS)�PER_INSTANCEai On select Datasources, vendors have a channel for the consumption of all supported user data types via a special channel called vendor data. Any scripts in the ``scripts/vendor`` directory in the datasource will be run when a new instance is first booted. Scripts will be run in alphabetical order. This module allows control over the execution of vendor data. Zcc_scripts_vendorzScripts VendorzRun vendor scriptszg vendor_data: enabled: true prefix: /usr/bin/ltrace ze vendor_data: enabled: true prefix: [timeout, 30] zr # Vendor data will not be processed vendor_data: enabled: false )�id�name�title�descriptionZdistrosZ frequencyZexamplesZactivate_by_schema_keysZvendor)r �cfg�cloud�args�returnc C s` t jj|j� dt�}tj|dg �}ytj||d� W n& t k rZ t jd| t|� � Y nX d S )N�scripts�vendor_data�prefix)Z exe_prefixz"Failed to run module %s (%s in %s))r r )�os�path�joinZ get_ipath_cur� SCRIPT_SUBDIRr Zget_cfg_by_pathr Zrunparts� Exception�LOGZwarning)r r r r Z runparts_pathr � r �'/usr/lib/python3.6/cc_scripts_vendor.py�handleD s r )�__doc__Zloggingr �textwrapr Z cloudinitr r Zcloudinit.cloudr Zcloudinit.configr Zcloudinit.config.schemar r Zcloudinit.distrosr Zcloudinit.settingsr ZMODULE_DESCRIPTION�metaZ getLogger�__name__r r �str�listr r r r r �<module> s6