%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/cc_ubuntu_autoinstall.cpython-39.pyc

a

'�Dg��@s�UdZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZmZm
Z
ddlmZe�e�Zdd	ged
gd�Zeed<d
Zee	eedd�dd�Zdd�ZdS)z;Autoinstall: Support ubuntu live-server autoinstall syntax.�N)�subp�util)�Cloud)�Config)�
MetaSchema�
SchemaProblem�SchemaValidationError)�PER_ONCEZcc_ubuntu_autoinstallZubuntu�autoinstall)�idZdistrosZ	frequencyZactivate_by_schema_keys�meta)Z	subiquityzubuntu-desktop-installer)�name�cfg�cloud�args�returncCs�d|vrt�d|�dSt�|�t�ddg�\}}d}tD]}t�||�r<|}q<|slt�dd�	t��dSt
|�t�d|�dS)Nr
z?Skipping module named %s, no 'autoinstall' key in configurationZsnap�listzaSkipping autoinstall module. Expected one of the Ubuntu installer snap packages to be present: %sz, z8Valid autoinstall schema. Config will be processed by %s)�LOG�debugrZwait_for_snap_seededr�LIVE_INSTALLER_SNAPS�re�searchZwarning�join�validate_config_schema)r
rrrZ	snap_list�_Zinstaller_presentZ	snap_name�r�J/usr/lib/python3.9/site-packages/cloudinit/config/cc_ubuntu_autoinstall.py�handles.�
��rcCs||d}t|t�s.ttddt|�j���g��d|vrHttdd�g��n0t|�d�t�sxttddt|d�j���g��dS)a>Supplemental runtime schema validation for autoinstall yaml.

    Schema validation issues currently result in a warning log currently which
    can be easily ignored because warnings do not bubble up to cloud-init
    status output.

    In the case of the live-installer, we want cloud-init to raise an error
    to set overall cloud-init status to 'error' so it is more discoverable
    in installer environments.

    # TODO(Drop this validation When cloud-init schema is strict and errors)

    :raise: SchemaValidationError if any known schema values are present.
    r
zExpected dict type but found: �versionzMissing required 'version' keyzautoinstall.versionzExpected int type but found: N)�
isinstance�dictrr�type�__name__�get�int)rZautoinstall_cfgrrrr<s2
����

�����r)�__doc__ZloggingrZ	cloudinitrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarrrZcloudinit.settingsr	Z	getLoggerr"rr�__annotations__r�strrrrrrrr�<module>s 
�

Zerion Mini Shell 1.0