HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/proxy/__pycache__/marathon.cpython-310.pyc
o

�N�g��@sPdZddlZddlZdgZiZdZe�e�Z	dd�Z
dd�Zd	d
�Zdd�Z
dS)
a�
Marathon
========

Proxy minion for managing a Marathon cluster.

Dependencies
------------

- :mod:`marathon execution module (salt.modules.marathon) <salt.modules.marathon>`

Pillar
------

The marathon proxy configuration requires a 'base_url' property that points to
the marathon endpoint:

.. code-block:: yaml

    proxy:
      proxytype: marathon
      base_url: http://my-marathon-master.mydomain.com:8080

.. versionadded:: 2015.8.2
�NZmarathonZbase_urlcCsdS)NT�rrr�G/opt/saltstack/salt/lib/python3.10/site-packages/salt/proxy/marathon.py�__virtual__%srcCs:t|dvr|dttt<nt�dt�t�dt�dS)z#
    Perform any needed setup.
    �proxyzmissing proxy property %sz
CONFIG: %sN)�CONFIG_BASE_URL�CONFIG�log�error�debug��optsrrr�init)sr
c
Cs�z*tjjjtt�d�ddd�}t�d|�d|vr%|d��dkr(WdSWd
SWd
St	yF}zt�
dtt|�WYd	}~d
Sd	}~ww)z)
    Is the marathon api responding?
    z/ping�plainT)Zdecode_type�decodez'marathon.info returned successfully: %s�textZpongz0error calling marathon.info with base_url %s: %sNF)�salt�utils�http�queryrrrr
�strip�	Exceptionr	)�response�exrrr�ping4s2��������rcCst�d�dS)z,
    For this proxy shutdown is a no-op
    z#marathon proxy shutdown() called...N)rr
rrrr�shutdownMsr)�__doc__�loggingZsalt.utils.httprZ__proxyenabled__rr�	getLogger�__file__rrr
rrrrrr�<module>s