%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/openstack_config.pyc

�
���^c@@sgdZddlmZmZmZddlmZddlmZd�Z	dd�Zdd�ZdS(	u�
Manage OpenStack configuration file settings.

:maintainer: Jeffrey C. Ollie <jeff@ocjtech.us>
:maturity: new
:depends:
:platform: linux

i(tabsolute_importtprint_functiontunicode_literals(tsix(tCommandExecutionErrorcC@s4dtkrtSdtkr tSdtkr0tStS(uA
    Only load if the openstack_config module is in __salt__
    uopenstack_config.getuopenstack_config.setuopenstack_config.delete(t__salt__tFalsetTrue(((s@/usr/lib/python2.7/site-packages/salt/states/openstack_config.pyt__virtual__sc	C@s2|dkr|}ni|d6id6td6dd6}yutdd|d|d	|�}||kr}t|d<d
|d<|Stdr�d|d<dj||�|d<|SWn7tk
r�}tj|�j	�j
d
�s��q�nXtdd|d|d	|d|�idd6|d<t|d<d|d<|S(up
    Ensure a value is set in an OpenStack configuration file.

    filename
        The full path to the configuration file

    section
        The section in which the parameter will be set

    parameter (optional)
        The parameter to change.  If the parameter is not supplied, the name will be used as the parameter.

    value
        The value to set

    unameuchangesuresultuucommentuopenstack_config.gettfilenametsectiont	parameteru-The value is already set to the correct valueutestu*Value '{0}' is set to be changed to '{1}'.uparameter not found:uopenstack_config.settvalueuUpdateduValueuThe value has been updatedN(tNoneRRRt__opts__tformatRRt	text_typetlowert
startswith(tnameR	R
RRtrett	old_valueterr((s@/usr/lib/python2.7/site-packages/salt/states/openstack_config.pytpresent!s>	

	







cC@s|dkr|}ni|d6id6td6dd6}y#tdd|d|d	|�}WnLtk
r�}tj|�j�jd
�r�t|d<d|d<|S�nXt	dr�d|d<d
j
|�|d<|Stdd|d|d	|�idd6|d<t|d<d|d<|S(uP
    Ensure a value is not set in an OpenStack configuration file.

    filename
        The full path to the configuration file

    section
        The section in which the parameter will be set

    parameter (optional)
        The parameter to change.  If the parameter is not supplied, the name will be used as the parameter.

    unameuchangesuresultuucommentuopenstack_config.getR	R
Ruparameter not found:uThe value is already absentutestu!Value '{0}' is set to be deleted.uopenstack_config.deleteuDeleteduValueuThe value has been deletedN(R
RRRRRRRRRR(RR	R
RRRR((s@/usr/lib/python2.7/site-packages/salt/states/openstack_config.pytabsent]s8	









N(
t__doc__t
__future__RRRtsalt.extRtsalt.exceptionsRRR
RR(((s@/usr/lib/python2.7/site-packages/salt/states/openstack_config.pyt<module>
s	
<

Zerion Mini Shell 1.0