%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/marathon_app.pyo

�
���^c@@s�dZddlmZmZmZddlZddlZddlZdgZ	ej
e�Zd�Z
d�Zeed�ZdS(u(
Configure Marathon apps via a salt proxy.

.. code-block:: yaml

    my_app:
      marathon_app.config:
        - config:
            cmd: "while [ true ] ; do echo 'Hello Marathon' ; sleep 5 ; done"
            cpus: 0.1
            mem: 10
            instances: 3

.. versionadded:: 2015.8.2
i(tabsolute_importtprint_functiontunicode_literalsNumarathoncC@sgi|d6id6td6dd6}d}td|�rOtd|�d}n|r�tj|�}tjjj|||d�n"i|d	6dd
6|dd<|}|drFt	dr�d|d<dj
|�|d<|Std
||�}d|kr"t|d<dj
||d�|d<|St|d<dj
|�|d<|Snt|d<dj
|�|d<|S(u
    Ensure that the marathon app with the given id is present and is configured
    to match the given config values.

    :param name: The app name/id
    :param config: The configuration to apply (dict)
    :return: A standard Salt changes dictionary
    unameuchangesuresultuucommentumarathon.has_appumarathon.appuappunewuoldutestu%Marathon app {0} is set to be updatedumarathon.update_appu	exceptionu(Failed to update app config for {0}: {1}uUpdated app config for {0}u%Marathon app {0} configured correctlyN(tFalsetNonet__salt__tcopytdeepcopytsalttutilstconfigcomparertcompare_and_update_configt__opts__tformattTrue(tnametconfigtrettexisting_configt
update_configt
update_result((s</usr/lib/python2.7/site-packages/salt/states/marathon_app.pyRsJ








cC@s�i|d6id6td6dd6}td|�sSt|d<dj|�|d<|Stdr~d|d<d	j|�|d<|Std
|�r�i|d6|d<t|d<dj|�|d<|St|d<d
j|�|d<|SdS(u�
    Ensure that the marathon app with the given id is not present.

    :param name: The app name/id
    :return: A standard Salt changes dictionary
    unameuchangesuresultuucommentumarathon.has_appuApp {0} already absentutestuApp {0} is set to be removedumarathon.rm_appuappuRemoved app {0}uFailed to remove app {0}N(RRRR
RR(RR((s</usr/lib/python2.7/site-packages/salt/states/marathon_app.pytabsent\s(






cC@s!i|d6id6td6dd6}td|�sSt|d<dj|�|d<|Stdr�d|d<|rsd	nd
}dj||�|d<|Std|||�}d
|kr�t|d<dj||d
�|d<|S||d<t|d<|r�dnd}dj||�|d<|SdS(u�
    Ensure that the marathon app with the given id is present and restart if set.

    :param name: The app name/id
    :param restart: Restart the app
    :param force: Override the current deployment
    :return: A standard Salt changes dictionary
    unameuchangesuresultuucommentumarathon.has_appu0App {0} cannot be restarted because it is absentutestuisuis notuApp {0} {1} set to be restartedumarathon.restart_appu	exceptionuFailed to restart app {0}: {1}u	RestarteduDid not restartu{0} app {1}N(RRR
RRR(RtrestarttforceRt	qualifiertrestart_result((s</usr/lib/python2.7/site-packages/salt/states/marathon_app.pytrunningzs2	







(t__doc__t
__future__RRRRtloggingtsalt.utils.configcomparerRt__proxyenabled__t	getLoggert__file__tlogRRRRR(((s</usr/lib/python2.7/site-packages/salt/states/marathon_app.pyt<module>s		A	

Zerion Mini Shell 1.0