�
�Udac @` s d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z d d
l
m Z d d l m Z d d l m Z m Z d d l m Z m Z m Z d d l m Z m Z m Z m Z e Z d � Z e d k re � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont
deprecatedt statust networkt supported_bysW
---
module: junos_l3_interface
version_added: "2.4"
author: "Ganesh Nalawade (@ganeshrn)"
short_description: Manage L3 interfaces on Juniper JUNOS network devices
description:
- This module provides declarative management of L3 interfaces
on Juniper JUNOS network devices.
deprecated:
removed_in: "2.13"
why: Updated modules released with more functionality
alternative: Use M(junos_l3_interfaces) instead.
options:
name:
description:
- Name of the L3 interface.
ipv4:
description:
- IPv4 of the L3 interface.
ipv6:
description:
- IPv6 of the L3 interface.
unit:
description:
- Logical interface number.
default: 0
filter_input:
description:
- The name of input filter.
version_added: "2.8"
filter_output:
description:
- The name of output filter.
version_added: "2.8"
filter6_input:
description:
- The name of input filter for ipv6.
version_added: "2.8"
filter6_output:
description:
- The name of output filter for ipv6.
version_added: "2.8"
aggregate:
description: List of L3 interfaces definitions
state:
description:
- State of the L3 interface 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
sB
- name: Set ge-0/0/1 IPv4 address
junos_l3_interface:
name: ge-0/0/1
ipv4: 192.168.0.1
- name: Remove ge-0/0/1 IPv4 address
junos_l3_interface:
name: ge-0/0/1
state: absent
- name: Set ipv4 address using aggregate
junos_l3_interface:
aggregate:
- name: ge-0/0/1
ipv4: 192.0.2.1
- name: ge-0/0/2
ipv4: 192.0.2.2
ipv6: fd5d:12c9:2201:2::2
- name: Delete ipv4 address using aggregate
junos_l3_interface:
aggregate:
- name: ge-0/0/1
ipv4: 192.0.2.1
- name: ge-0/0/2
ipv4: 192.0.2.2
state: absent
ss
diff:
description: Configuration difference before and after applying change.
returned: when configuration is changed and diff option is enabled.
type: str
sample: >
[edit interfaces ge-0/0/1 unit 0 family inet]
+ address 192.0.2.1/32;
[edit interfaces ge-0/0/1 unit 0 family inet6]
+ address fd5d:12c9:2201:1::1/128;
N( t deepcopy( t
AnsibleModule( t remove_default_spec( t junos_argument_spect tostring( t load_configt map_params_to_objt map_obj_to_ele( t commit_configurationt discard_changest
locked_configt
to_param_listc C` s� t d t � d t � d t � d t � d t � d t � d t � d t d d
d d � d
t d d d d d g � d t d t d d � �
} t | � } t d t � | d <t | � t d t d d d d d | � � } | j | � | j t � d d g g } d d g g } t d | d t d | d | � } t � } i t d 6} | r\| | d <n d } t j
� } | j d i d d 6t d! 6t d"