Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/junos/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/junos/_junos_vlan.pyo

�
�Udac@`s ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZddlmZddlmZmZddlmZmZmZmZddlmZmZmZeZd�Zdd�Zd�Z e!dkre �ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiont
deprecatedtstatustnetworktsupported_bys
---
module: junos_vlan
version_added: "2.4"
author: "Ganesh Nalawade (@ganeshrn)"
short_description: Manage VLANs on Juniper JUNOS network devices
description:
  - This module provides declarative management of VLANs
    on Juniper JUNOS network devices.
deprecated:
  removed_in: "2.13"
  why: Updated modules released with more functionality
  alternative: Use M(junos_vlans) instead.
options:
  name:
    description:
      - Name of the VLAN.
    required: true
  vlan_id:
    description:
      - ID of the VLAN. Range 1-4094.
    required: true
  l3_interface:
    description:
      -  Name of logical layer 3 interface.
    version_added: "2.7"
  filter_input:
    description:
      - The name of input filter.
    version_added: "2.8"
  filter_output:
    description:
      - The name of output filter.
    version_added: "2.8"
  description:
    description:
      - Text description of VLANs.
  interfaces:
    description:
      - List of interfaces to check the VLAN has been
        configured correctly.
  aggregate:
    description: List of VLANs definitions.
  state:
    description:
      - State of the VLAN configuration.
    default: present
    choices: ['present', 'absent']
  active:
    description:
      - Specifies whether or not the configuration is active or deactivated
    default: True
    type: bool
requirements:
  - ncclient (>=v0.5.2)
notes:
  - This module requires the netconf system service be enabled on
    the remote device being managed.
  - Tested against vSRX JUNOS version 15.1X49-D15.4, vqfx-10000 JUNOS Version 15.1X53-D60.4.
  - Recommended connection is C(netconf). See L(the Junos OS Platform Options,../network/user_guide/platform_junos.html).
  - This module also works with C(local) connections for legacy playbooks.
extends_documentation_fragment: junos
sx
- name: configure VLAN ID and name
  junos_vlan:
    name: test
    vlan_id: 20

- name: Link to logical layer 3 interface
  junos_vlan:
    name: test
    vlan_id: 20
    l3-interface: vlan.20

- name: remove VLAN configuration
  junos_vlan:
    name: test
    state: absent

- name: deactive VLAN configuration
  junos_vlan:
    name: test
    state: present
    active: False

- name: activate VLAN configuration
  junos_vlan:
    name: test
    state: present
    active: True

- name: Create vlan configuration using aggregate
  junos_vlan:
    aggregate:
      - { vlan_id: 159, name: test_vlan_1, description: test vlan-1 }
      - { vlan_id: 160, name: test_vlan_2, description: test vlan-2 }

- name: Delete vlan configuration using aggregate
  junos_vlan:
    aggregate:
      - { vlan_id: 159, name: test_vlan_1 }
      - { vlan_id: 160, name: test_vlan_2 }
    state: absent
s
diff.prepared:
  description: Configuration difference before and after applying change.
  returned: when configuration is changed and diff option is enabled.
  type: str
  sample: >
         [edit vlans]
         +   test-vlan-1 {
         +       vlan-id 60;
         +   }
N(tdeepcopy(t
AnsibleModule(tremove_default_spec(tjunos_argument_specttostring(tload_configtmap_params_to_objtmap_obj_to_elet
to_param_list(tcommit_configurationtdiscard_changest
locked_configcC`s:|r6d|kodknr6|jdd�ndS(Nii�tmsgs"vlan_id must be between 1 and 4094(t	fail_json(tvaluetmodule((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_vlan.pytvalidate_vlan_id�s#cC`sb|s|j}nxI|D]A}t�jd|�}t|�r||j|�|�qqWdS(Nsvalidate_%s(tparamstglobalstgettcallable(Rtobjtparamtkeyt	validator((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_vlan.pytvalidate_param_values�s
cC`s�tdt�dtdd�dt�dt�dt�dt�d	t�d
tddd
ddg�dtdtdd��	}t|�}tdt�|d<t|�tdtddddd|��}|j|�|jt�ddgg}ddgg}td|d|d|dt�}t�}itd6}|rM||d<nd}t	j
�}	|	jdidd6td6fd*d+d,d-d.g�t|�}
t�}x�|
D]�}x7|D]/}
|j|
�d)kr�|j|
||
<q�q�W|j�}t||	d$|�t||	d$|�}|jt|||d$|��q�Wd)}t|���x,|D]$}t|t|�|d%d&�}q_W|j}|r�|r�t|�n
t|�t|d<|jr�i|d'6|d(<q�nWd)QX|j|�d)S(/s+ main entry point for module execution
    tnametvlan_idttypetinttdescriptiont
interfacestl3_interfacetfilter_inputt
filter_outputtstatetdefaulttpresenttchoicestabsenttactivetbooltrequiredt	aggregatetlisttelementstdicttoptionst
argument_spectrequired_one_oftmutually_exclusivetsupports_check_modetchangedtwarningss
vlans/vlantxpathtis_keysvlan-idsl3-interfacesforwarding-options/filter/inputs forwarding-options/filter/outputRtactiontmergetpreparedtdiffN(R#svlan-id(R(sl3-interface(R)sforwarding-options/filter/input(R*s forwarding-options/filter/output(R&R&(R6tTrueRR
tupdateRR	R4tFalsetcollectionstOrderedDictRRtNoneRtcopyR!RtappendRRR
Rt
check_modeRRt_difft	exit_json(telement_spectaggregate_specR8R9R:RR=tresultttoptparam_to_xpath_mapRtrequestsRRtitemtwantRCtreqtcommit((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_vlan.pytmain�sv						


		


	

#

"



	t__main__("t
__future__RRRR$t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRGRJRtansible.module_utils.basicR	t)ansible.module_utils.network.common.utilsR
t(ansible.module_utils.network.junos.junosRRR
RRRRRRRDtUSE_PERSISTENT_CONNECTIONRRIR!RYt__name__(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/junos/_junos_vlan.pyt<module>s(


@+"	
	Y

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