%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/states/nexus.pyo

�
���^c@@sxdZddlmZmZmZddlZddlmZeje	�Z
dZd�Zddd�Zd	�ZdS(
uL
This state downloads artifacts from Nexus 3.x.

.. versionadded:: 2018.3.0
i(tabsolute_importtprint_functiontunicode_literalsN(tsixunexuscC@stS(u-
    Set the virtual name for the module
    (t__virtualname__(((s5/usr/lib/python2.7/site-packages/salt/states/nexus.pyt__virtual__su/tmpcC@s�tjd|�i|d6td6id6dd6}yt|||�}Wn1tk
r{}t|d<tj|�|d<|SXtjd|�|d|d<|d|d<|d|d<tjd	|�|S(
u�
    Ensures that the artifact from nexus 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 nexus. If it is different then the step will fail.

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

        - nexus_url: URL of the nexus instance
        - repository: Repository in nexus
        - artifact_id: Artifact ID
        - group_id: Group ID
        - packaging: Packaging
        - classifier: Classifier
        - 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: nexus username
        - password: nexus password

    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 nexus.

    An example to download an artifact to a specific file:

    .. code-block:: yaml

        jboss_module_downloaded:
          nexus.downloaded:
           - artifact:
               nexus_url: http://nexus.intranet.example.com/repository
               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

        maven_artifact_downloaded:
          nexus.downloaded:
           - artifact:
                nexus_url: http://nexus.intranet.example.com/repository
                repository: 'maven-releases'
                artifact_id: 'module'
                group_id: 'com.company.module'
                packaging: 'zip'
                classifier: 'dist'
                version: '1.0'
           - target_dir: /opt/maven/modules/com/company/release

    u= ======================== STATE: nexus.downloaded (name: %s) unameuresultuchangesuucommentufetch_result=%sustatusuret=%s(tlogtdebugtTruet__fetch_from_nexust	ExceptiontFalseRt	text_type(tnametartifactt
target_dirttarget_filetrettfetch_resulttexc((s5/usr/lib/python2.7/site-packages/salt/states/nexus.pyt
downloadeds"?


cC@s�|d}|d}|d}|d}d|kr>|dnd}d|krZ|dnd}d|krv|dnd}	d	|kr�|d	nd}
d
|kr�|d
nd}|dkr�d}t}
nE|d
kr�d}t}
n*|jd�rd}t}
nd}t}
|
rlt|d|d|d|d|d|d|d|d|d|	d|
d|�}nIt|d|d|d|d|d|d|d|d|d|	d|
�
}|S(Nu	nexus_urlu
repositoryugroup_iduartifact_idu	packagingujaru
classifieruusernameupassworduversionulatest_snapshotunexus.get_latest_snapshotulatestunexus.get_latest_releaseuSNAPSHOTunexus.get_snapshotunexus.get_releaset	nexus_urlt
repositorytgroup_idtartifact_idt	packagingt
classifierRRtusernametpasswordtversion(tNoneRtendswithRt__salt__(RRRRRRRRRRRRtfunctiont
version_paramR((s5/usr/lib/python2.7/site-packages/salt/states/nexus.pyR	qsV



				(t__doc__t
__future__RRRtloggingtsalt.extRt	getLoggert__name__RRRRRR	(((s5/usr/lib/python2.7/site-packages/salt/states/nexus.pyt<module>s	V

Zerion Mini Shell 1.0