%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/glanceng.pyc

�
���^c@@s�dZddlmZmZmZeZyddlZeZWne	k
rQnXdZ
d�Zd�Zed�Z
dd�Zdd	�Zdd
�Zdd�Zdd�Zdd
�Zdd�Zdd�Zdd�ZdS(u�
Glance module for interacting with OpenStack Glance

.. versionadded:: 2018.3.0

:depends:shade

Example configuration

.. code-block:: yaml

    glance:
      cloud: default

.. code-block:: yaml

    glance:
      auth:
        username: admin
        password: password123
        user_domain_name: mydomain
        project_name: myproject
        project_domain_name: myproject
        auth_url: https://example.org:5000/v3
      identity_api_version: 3
i(tabsolute_importtunicode_literalstprint_functionNuglancengcC@str
tStdfS(uC
    Only load this module if shade python module is installed
    uRThe glanceng execution module failed to load: shade python module is not available(t	HAS_SHADEt__virtualname__tFalse(((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyt__virtual__)scK@sWi}xJ|j�D]<\}}||kr|||krO||||<qOqqW|S(ut
    Compare two dicts returning only keys that exist in the first dict and are
    different in the second one
    (titems(tobjtkwargstchangestktv((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pytcompare_changes2scK@s7d|kr)|r)|jd�|d<ntd|�S(u7
    Sanatize the the arguments for use with shade
    unameu
name_or_iduargs.clean_kwargs(tpopt	__utils__(t	keep_nameR	((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyt
_clean_kwargs?scC@st|�t|�dS(u�
    Call functions to create Shade cloud objects in __context__ to take
    advantage of Shade's in-memory caching across several states
    N(tget_operator_cloudtget_openstack_cloud(tauth((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pytsetup_cloudsIs
cC@sg|dkr"tddi�}ndtkrLtdj|krLtdSntj|�td<tdS(u"
    Return an operator_cloud
    u
config.optionuglanceu
shade_opcloudN(tNonet__salt__t__context__Rtshadetoperator_cloud(R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyRRscC@sg|dkr"tddi�}ndtkrLtdj|krLtdSntj|�td<tdS(u#
    Return an openstack_cloud
    u
config.optionuglanceu
shade_oscloudN(RRRRRtopenstack_cloud(R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyR_scK@s+t|�}tdt|�}|j|�S(u
    Create an image

    CLI Example:

    .. code-block:: bash

        salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw
        salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw hw_scsi_model=virtio-scsi hw_disk_bus=scsi
    R(RRtTruetcreate_image(RR	tcloud((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pytimage_createlscK@s%t|�}t|�}|j|�S(u�
    Delete an image

    CLI Example:

    .. code-block:: bash

        salt '*' glanceng.image_delete name=image1
        salt '*' glanceng.image_delete name=0e4febc2a5ab4f2c8f374b054162506d
    (RRtdelete_image(RR	R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pytimage_delete|scK@s%t|�}t|�}|j|�S(u�
    List images

    CLI Example:

    .. code-block:: bash

        salt '*' glanceng.image_list
        salt '*' glanceng.image_list
    (RRtlist_images(RR	R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyt
image_list�scK@s%t|�}t|�}|j|�S(u�
    Search for images

    CLI Example:

    .. code-block:: bash

        salt '*' glanceng.image_search name=image1
        salt '*' glanceng.image_search
    (RRt
search_images(RR	R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pytimage_search�scK@s%t|�}t|�}|j|�S(u�
    Get a single image

    CLI Example:

    .. code-block:: bash

        salt '*' glanceng.image_get name=image1
        salt '*' glanceng.image_get name=0e4febc2a5ab4f2c8f374b054162506d
    (RRt	get_image(RR	R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyt	image_get�scK@s%t|�}t|�}|j|�S(u#
    Update properties for an image

    CLI Example:

    .. code-block:: bash

        salt '*' glanceng.update_image_properties name=image1 hw_scsi_model=virtio-scsi hw_disk_bus=scsi
        salt '*' glanceng.update_image_properties name=0e4febc2a5ab4f2c8f374b054162506d min_ram=1024
    (RRtupdate_image_properties(RR	R((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyR(�s(t__doc__t
__future__RRRRRRRtImportErrorRRR
RRRRRRR!R#R%R'R((((s9/usr/lib/python2.7/site-packages/salt/modules/glanceng.pyt<module>s(

			

	



Zerion Mini Shell 1.0