Feature junos filter (#44703)

* Add filter in l3_interface

* Add filter in vlan

* Add filter in l2_interface

* Update version to 2.8
This commit is contained in:
linnil1 2019-01-23 12:06:24 +08:00 committed by Ganesh Nalawade
parent e7a113a70f
commit dabdf171c5
3 changed files with 49 additions and 1 deletions

View file

@ -59,6 +59,14 @@ options:
- Logical interface number. Value of C(unit) should be of type
integer.
default: 0
filter_input:
description:
- The name of input filter of ethernet-switching.
version_added: "2.8"
filter_output:
description:
- The name of output filter of ethernet-switching.
version_added: "2.8"
state:
description:
- State of the Layer-2 Interface configuration.
@ -177,6 +185,8 @@ def main():
native_vlan=dict(type='int'),
trunk_vlans=dict(type='list'),
unit=dict(default=0, type='int'),
filter_input=dict(),
filter_output=dict(),
description=dict(),
enhanced_layer=dict(default=True, type='bool'),
state=dict(default='present', choices=['present', 'absent']),
@ -225,6 +235,8 @@ def main():
('mode', {'xpath': 'interface-mode', 'top': 'unit/family/ethernet-switching'}),
('access_vlan', {'xpath': 'members', 'top': 'unit/family/ethernet-switching/vlan'}),
('trunk_vlans', {'xpath': 'members', 'top': 'unit/family/ethernet-switching/vlan'}),
('filter_input', {'xpath': 'input', 'top': 'unit/family/ethernet-switching/filter'}),
('filter_output', {'xpath': 'output', 'top': 'unit/family/ethernet-switching/filter'}),
('native_vlan', {'xpath': 'native-vlan-id'}),
('description', 'description')
])

View file

@ -36,6 +36,22 @@ options:
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:
@ -120,6 +136,10 @@ def main():
name=dict(),
ipv4=dict(),
ipv6=dict(),
filter_input=dict(),
filter_output=dict(),
filter6_input=dict(),
filter6_output=dict(),
unit=dict(default=0, type='int'),
state=dict(default='present', choices=['present', 'absent']),
active=dict(default=True, type='bool')
@ -159,7 +179,11 @@ def main():
('name', {'xpath': 'name', 'parent_attrib': False, 'is_key': True}),
('unit', {'xpath': 'name', 'top': 'unit', 'parent_attrib': False, 'is_key': True}),
('ipv4', {'xpath': 'inet/address/name', 'top': 'unit/family', 'is_key': True}),
('ipv6', {'xpath': 'inet6/address/name', 'top': 'unit/family', 'is_key': True})
('ipv6', {'xpath': 'inet6/address/name', 'top': 'unit/family', 'is_key': True}),
('filter_input', {'xpath': 'inet/filter/input', 'top': 'unit/family'}),
('filter_output', {'xpath': 'inet/filter/output', 'top': 'unit/family'}),
('filter6_input', {'xpath': 'inet6/filter/input', 'top': 'unit/family'}),
('filter6_output', {'xpath': 'inet6/filter/output', 'top': 'unit/family'}),
])
params = to_param_list(module)

View file

@ -34,6 +34,14 @@ options:
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.
@ -157,6 +165,8 @@ def main():
description=dict(),
interfaces=dict(),
l3_interface=dict(),
filter_input=dict(),
filter_output=dict(),
state=dict(default='present', choices=['present', 'absent']),
active=dict(default=True, type='bool')
)
@ -195,6 +205,8 @@ def main():
('name', {'xpath': 'name', 'is_key': True}),
('vlan_id', 'vlan-id'),
('l3_interface', 'l3-interface'),
('filter_input', 'forwarding-options/filter/input'),
('filter_output', 'forwarding-options/filter/output'),
('description', 'description')
])