Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/net_tools/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
d
efd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: ip_netns
version_added: 2.5
author: "Arie Bregman (@bregman-arie)"
short_description: Manage network namespaces
requirements: [ ip ]
description:
    - Create or delete network namespaces using the ip command.
options:
    name:
        required: false
        description:
            - Name of the namespace
    state:
        required: false
        default: "present"
        choices: [ present, absent ]
        description:
            - Whether the namespace should exist
s�
# Create a namespace named mario
- name: Create a namespace named mario
  namespace:
    name: mario
    state: present
- name: Delete a namespace named luigi
  namespace:
    name: luigi
    state: absent
s
# Default return values
(t
AnsibleModule(tto_textt	NamespacecB`sMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(s!Interface to network namespaces. cC`s-||_|jd|_|jd|_dS(Ntnametstate(tmoduletparamsRR(tselfR
((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pyt__init__Fs	cC`s|jjddg|�S(sRun ip nents commandtiptnetns(R
trun_command(Rtcommand((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pyt_netnsKscC`sP|jjd�\}}}|dkrC|jjdt|��n|j|kS(s%Check if the namespace already existss
ip netns listitmsg(R
Rt	fail_jsonR	R(Rtrctoutterr((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pytexistsOscC`sG|jd|jg�\}}}|dkrC|jjd|�ndS(sCreate network namespacetaddiRN(RRR
R(RtrtcRR((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pyRVs!cC`sG|jd|jg�\}}}|dkrC|jjd|�ndS(sDelete network namespacetdeliRN(RRR
R(RRRR((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pytdelete]s!cC`s�t}|jdkr*|j�r*t}nI|jdkrN|j�rNt}n%|jdkrs|j�rst}n|jjd|�dS(sRun check modetpresenttabsenttchangedN(tFalseRRtTrueR
t	exit_json(RR"((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pytcheckcs			cC`st}|jdkr7|j�rh|j�t}qhn1|jdkrh|j�sh|j�t}qhn|jjd|�dS(sMake the necessary changesR!R R"N(R#RRRR$RR
R%(RR"((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pytrunqs

(
t__name__t
__module__t__doc__RRRRRR&R'(((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pyR
Cs						cC`sntdiid	d6d6idd6ddgd6d6dt�}t|�}|jr`|j�n
|j�d	S(
sEntry point.t
argument_spectdefaultRR R!tchoicesRtsupports_check_modeN(RtNoneR$R
t
check_modeR&R'(R
tnetwork_namespace((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pytmain�s		
t__main__N(t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRtansible.module_utils._textR	tobjectR
R2R((((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ip_netns.pyt<module>s


>	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]