%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/poudriere.pyc

�
���^c@@s
dZddlmZmZmZddlZddlZddlZddl	Zddl
Zeje�Z
d�Zd�Zd�Zdd�Zd�Zd	�Zdd
�Zd�Zd�Zd
�Zdd�Zd�Zd�Zd�Zd�Zed�ZdS(u
Support for poudriere
i(tabsolute_importtprint_functiontunicode_literalsNcC@s7tddkr)tjjjd�r)dStdfSdS(u@
    Module load on freebsd only and if poudriere installed
    uosuFreeBSDu	poudriereuoThe poudriere execution module failed to load: only available on FreeBSD with the poudriere binary in the path.N(t
__grains__tsalttutilstpathtwhichtFalse(((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt__virtual__s%cC@stdd�S(u0
    Return the config file location to use
    u
config.optionupoudriere.config(t__salt__(((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt_config_filescC@stdd�S(u3
    Return the configuration directory to use
    u
config.optionupoudriere.config_dir(R
(((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt_config_dir$scC@s2|dkrt�}ntjj|�s.tStS(u+
    Verify the config file is present
    N(tNoneRtosRtisfileRtTrue(tconfig_file((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt_check_config_exists+s
cC@s8t�}x(|D] }|j�d|krtSqWtS(u�
    Return True if jail exists False if not

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.is_jail <jail name>
    i(t
list_jailstsplitRR(tnametjailstjail((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytis_jail6s

	
cC@siid6}t�}tjj|�smtj|�tjj|�r]dj|�|d<qmdj|�Sntddjtjj||��d�tjjtjj||�d�r�djtjj|dj|���|d<|Sd	jtjj||d��Sd
S(u�
    Make jail ``jname`` pkgng aware

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.make_pkgng_aware <jail name>
    uchangesu#Created poudriere make file dir {0}u/Could not create or find required directory {0}u
file.writeu
{0}-make.confuWITH_PKGNG=yesu
-make.confuCreated {0}u(Looks like file {0} could not be createdN(	RRRtisdirtmakedirstformatR
tjoinR(tjnametrettcdir((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytmake_pkgng_awareGs

	

)%%cC@s�|dkrt�}ni}t|�r�tjjj|��F}x<|D]4}tjjj|�j	d�\}}|||<qIWWdQX|Sdj
|�S(u�
    Returns a dict of poudriere main configuration definitions

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.parse_config
    u=Nu!Could not find {0} on file system(R
RRRRtfilestfopentstringutilst
to_unicodeRR(RRtifiletlinetkeytval((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytparse_configjs

$cC@sd}td|�S(ur
    Return poudriere version

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.version
    upoudriere versionucmd.run(R
(tcmd((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytversion�s
cC@s't�d}td|�}|j�S(u�
    Return a list of current jails managed by poudriere

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.list_jails
    upoudriere jails -lucmd.run(RR
t
splitlines(R*tres((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyR�s
cC@s't�d}td|�j�}|S(u�
    Return a list of current port trees managed by poudriere

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.list_ports
    upoudriere ports -lucmd.run(RR
R,(R*R-((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt
list_ports�s
u9.0-RELEASEcC@sst�t|�r dj|�Sdj|||�}td|�t|�t|�rfdj|�Sdj|�S(u�
    Creates a new poudriere jail if one does not exist

    *NOTE* creating a new jail will take some time the master is not hanging

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.create_jail 90amd64 amd64
    u{0} already existsu'poudriere jails -c -j {0} -v {1} -a {2}ucmd.runuCreated jail {0}uIssue creating jail {0}(RRRR
R (RtarchR+R*((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytcreate_jail�s



cC@s@t|�r/dj|�}td|�}|Sdj|�SdS(u�
    Run freebsd-update on `name` poudriere jail

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.update_jail freebsd:10:x86:64
    upoudriere jail -u -j {0}ucmd.runuCould not find jail {0}N(RRR
(RR*R((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytupdate_jail�s

cC@s�t|�rEdj|�}td|�t|�rRdj|�Sn
dj|�Stjjt�dj|��}tjj|�r�ytj|�Wn!t	t
fk
r�dj|�SXtd|�ndj|�S(	u�
    Deletes poudriere jail with `name`

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.delete_jail 90amd64
    upoudriere jail -d -j {0}ucmd.runu<Looks like there was an issue deleteing jail             {0}u(Looks like jail {0} has not been createdu
{0}-make.confu:Deleted jail "{0}" but was unable to remove jail make fileufile.removeuDeleted jail {0}(RRR
RRRRRtremovetIOErrortOSError(RR*t	make_file((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytdelete_jail�s

!cC@s!t�d}td|�}|S(u;
    Not working need to run portfetch non interactive
    upoudriere ports -cucmd.run(RR
(R*R((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytcreate_ports_treescC@s9t�|rdj|�}nd}td|�}|S(u�
    Updates the ports tree, either the default or the `ports_tree` specified

    CLI Example:

    .. code-block:: bash

        salt '*' poudriere.update_ports_tree staging
    upoudriere ports -u -p {0}upoudriere ports -uucmd.run(RRR
(t
ports_treeR*R((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pytupdate_ports_trees
cC@s�tjj|�sdj|�St|�s8dj|�S|rSdj||�}ndj||�}td|�}|j�}x|D]}d|kr�|Sq�Wdj|�S(u�
    Run bulk build on poudriere server.

    Return number of pkg builds, failures, and errors, on error dump to CLI

    CLI Example:

    .. code-block:: bash

        salt -N buildbox_group poudriere.bulk_build 90amd64 /root/pkg_list

    u%Could not find file {0} on filesystemuCould not find jail {0}upoudriere bulk -k -f {0} -j {1}upoudriere bulk -f {0} -j {1}ucmd.runupackages builtuBThere may have been an issue building packages dumping output: {0}(RRRRRR
R,(Rtpkg_filetkeepR*R-tlinesR&((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt
bulk_build!s


( t__doc__t
__future__RRRRtloggingtsalt.utils.filesRtsalt.utils.pathtsalt.utils.stringutilst	getLoggert__name__tlogR	RRR
RRR R)R+RR.R0R1R6R7R9RR=(((s:/usr/lib/python2.7/site-packages/salt/modules/poudriere.pyt<module>s.	
				#			 		#	
	

Zerion Mini Shell 1.0