%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/artifactory.pyc

�
���^c@@sldZddlmZmZmZddlZddlmZeje	�Z
dded�Z
d�ZdS(u3
This state downloads artifacts from artifactory.

i(tabsolute_importtprint_functiontunicode_literalsN(tsixu/tmpcC@stjd|�i|d6td6id6dd6}dtkr�tdtkr�i}t|d<d	j|d
�|d<i|d<nMyt||||�}Wn1tk
r�}t|d<tj	|�|d<|SXtjd|�|d|d<|d|d<|d|d<tjd|�|S(
u	
    Ensures that the artifact from artifactory exists at given location. If it doesn't exist, then
    it will be downloaded. If it already exists then the checksum of existing file is checked against checksum
    in artifactory. If it is different then the step will fail.

    artifact
        Details of the artifact to be downloaded from artifactory. Various options are:

        - artifactory_url: URL of the artifactory instance
        - repository: Repository in artifactory
        - artifact_id: Artifact ID
        - group_id: Group ID
        - packaging: Packaging
        - classifier: Classifier
          .. versionadded:: 2015.8.0
        - version: Version
            One of the following:
            - Version to download
            - ``latest`` - Download the latest release of this artifact
            - ``latest_snapshot`` - Download the latest snapshot for this artifact

        - username: Artifactory username
          .. versionadded:: 2015.8.0
        - password: Artifactory password
          .. versionadded:: 2015.8.0

    target_dir
        Directory where the artifact should be downloaded. By default it is downloaded to /tmp directory.

    target_file
        Target file to download artifact to. By default file name is resolved by artifactory.

    An example to download an artifact to a specific file:

    .. code-block:: yaml

        jboss_module_downloaded:
          artifactory.downloaded:
           - artifact:
               artifactory_url: http://artifactory.intranet.example.com/artifactory
               repository: 'libs-release-local'
               artifact_id: 'module'
               group_id: 'com.company.module'
               packaging: 'jar'
               classifier: 'sources'
               version: '1.0'
           - target_file: /opt/jboss7/modules/com/company/lib/module.jar

    Download artifact to the folder (automatically resolves file name):

    .. code-block:: yaml

        jboss_module_downloaded:
          artifactory.downloaded:
           - artifact:
                artifactory_url: http://artifactory.intranet.example.com/artifactory
                repository: 'libs-release-local'
                artifact_id: 'module'
                group_id: 'com.company.module'
                packaging: 'jar'
                classifier: 'sources'
                version: '1.0'
           - target_dir: /opt/jboss7/modules/com/company/lib

    uC ======================== STATE: artifactory.downloaded (name: %s) unameuresultuchangesuucommentutestustatusu*Artifact would be downloaded from URL: {0}uartifactory_urlufetch_result = %suret = %s(
tlogtdebugtTruet__opts__tformatt__fetch_from_artifactoryt	ExceptiontFalseRt	text_type(tnametartifactt
target_dirttarget_filetuse_literal_group_idtrettfetch_resulttexc((s;/usr/lib/python2.7/site-packages/salt/states/artifactory.pyt
downloadeds,B




cC@sFd|kr|ds&|ddkr�tdd|dd|dd|d	d
|ddd
|krn|d
nddd|kr�|dndd|d|dd|kr�|dnddd|kr�|dndd|�}nb|djd�r�tdd|dd|dd|d	d
|ddd
|kr;|d
nddd|krW|dndd|dd|d|dd|kr�|dnddd|kr�|dndd|�}n�|ddkr�tdd|dd|dd|d	d
|ddd
|kr|d
nddd|kr+|dndd|d|dd|krS|dnddd|kro|dndd|�}n�tdd|dd|dd|d	d
|ddd
|kr�|d
nddd|kr�|dndd|dd|d|dd|kr|dnddd|kr3|dndd|�}|S(Nulatest_snapshotuversionuartifactory.get_latest_snapshottartifactory_urluartifactory_urlt
repositoryu
repositorytgroup_idugroup_idtartifact_iduartifact_idt	packagingu	packagingujart
classifieru
classifierRRtusernameuusernametpasswordupasswordRuSNAPSHOTuartifactory.get_snapshottversionulatestuartifactory.get_latest_releaseuartifactory.get_release(t__salt__tNonetendswith(RRRRR((s;/usr/lib/python2.7/site-packages/salt/states/artifactory.pyR	nsd&













	(t__doc__t
__future__RRRtloggingtsalt.extRt	getLoggert__name__RR RRR	(((s;/usr/lib/python2.7/site-packages/salt/states/artifactory.pyt<module>s_

Zerion Mini Shell 1.0