����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
module: ce_vrrp
short_description: Manages VRRP interfaces on HUAWEI CloudEngine devices.
description:
- Manages VRRP interface attributes on HUAWEI CloudEngine devices.
author:
- Li Yanfeng (@numone213)
notes:
- This module requires the netconf system service be enabled on the remote device being managed.
- Recommended connection is C(netconf).
- This module also works with C(local) connections for legacy playbooks.
options:
interface:
description:
- Name of an interface. The value is a string of 1 to 63 characters.
vrid:
description:
- VRRP backup group ID.
The value is an integer ranging from 1 to 255.
default: present
virtual_ip :
description:
- Virtual IP address. The value is a string of 0 to 255 characters.
vrrp_type:
description:
- Type of a VRRP backup group.
type: str
choices: ['normal', 'member', 'admin']
admin_ignore_if_down:
description:
- mVRRP ignores an interface Down event.
type: bool
default: 'false'
admin_vrid:
description:
- Tracked mVRRP ID. The value is an integer ranging from 1 to 255.
admin_interface:
description:
- Tracked mVRRP interface name. The value is a string of 1 to 63 characters.
admin_flowdown:
description:
- Disable the flowdown function for service VRRP.
type: bool
default: 'false'
priority:
description:
- Configured VRRP priority.
The value ranges from 1 to 254. The default value is 100. A larger value indicates a higher priority.
version:
description:
- VRRP version. The default version is v2.
type: str
choices: ['v2','v3']
advertise_interval:
description:
- Configured interval between sending advertisements, in milliseconds.
Only the master router sends VRRP advertisements. The default value is 1000 milliseconds.
preempt_timer_delay:
description:
- Preemption delay.
The value is an integer ranging from 0 to 3600. The default value is 0.
gratuitous_arp_interval:
description:
- Interval at which gratuitous ARP packets are sent, in seconds.
The value ranges from 30 to 1200.The default value is 300.
recover_delay:
description:
- Delay in recovering after an interface goes Up.
The delay is used for interface flapping suppression.
The value is an integer ranging from 0 to 3600.
The default value is 0 seconds.
holding_multiplier:
description:
- The configured holdMultiplier.The value is an integer ranging from 3 to 10. The default value is 3.
auth_mode:
description:
- Authentication type used for VRRP packet exchanges between virtual routers.
The values are noAuthentication, simpleTextPassword, md5Authentication.
The default value is noAuthentication.
type: str
choices: ['simple','md5','none']
is_plain:
description:
- Select the display mode of an authentication key.
By default, an authentication key is displayed in ciphertext.
type: bool
default: 'false'
auth_key:
description:
- This object is set based on the authentication type.
When noAuthentication is specified, the value is empty.
When simpleTextPassword or md5Authentication is specified, the value is a string of 1 to 8 characters
in plaintext and displayed as a blank text for security.
fast_resume:
description:
- mVRRP's fast resume mode.
type: str
choices: ['enable','disable']
state:
description:
- Specify desired state of the resource.
type: str
default: present
choices: ['present','absent']
'''
EXAMPLES = '''
- name: Vrrp module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Set vrrp version
community.network.ce_vrrp:
version: v3
provider: "{{ cli }}"
- name: Set vrrp gratuitous-arp interval
community.network.ce_vrrp:
gratuitous_arp_interval: 40
mlag_id: 4
provider: "{{ cli }}"
- name: Set vrrp recover-delay
community.network.ce_vrrp:
recover_delay: 10
provider: "{{ cli }}"
- name: Set vrrp vrid virtual-ip
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
virtual_ip: 10.14.2.7
provider: "{{ cli }}"
- name: Set vrrp vrid admin
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
vrrp_type: admin
provider: "{{ cli }}"
- name: Set vrrp vrid fast_resume
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
fast_resume: enable
provider: "{{ cli }}"
- name: Set vrrp vrid holding-multiplier
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
holding_multiplier: 4
provider: "{{ cli }}"
- name: Set vrrp vrid preempt timer delay
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
preempt_timer_delay: 10
provider: "{{ cli }}"
- name: Set vrrp vrid admin-vrrp
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
admin_interface: 40GE2/0/9
admin_vrid: 2
vrrp_type: member
provider: "{{ cli }}"
- name: Set vrrp vrid authentication-mode
community.network.ce_vrrp:
interface: 40GE2/0/8
vrid: 1
is_plain: true
auth_mode: simple
auth_key: aaa
provider: "{{ cli }}"
'''
RETURN = '''
changed:
description: check to see if a change was made on the device
returned: always
type: bool
sample: true
proposed:
description: k/v pairs of parameters passed into module
returned: always
type: dict
sample: {
"auth_key": "aaa",
"auth_mode": "simple",
"interface": "40GE2/0/8",
"is_plain": true,
"state": "present",
"vrid": "1"
}
existing:
description: k/v pairs of existing aaa server
returned: always
type: dict
sample: {
"auth_mode": "none",
"interface": "40GE2/0/8",
"is_plain": "false",
"vrid": "1",
"vrrp_type": "normal"
}
end_state:
description: k/v pairs of aaa params after module execution
returned: always
type: dict
sample: {
"auth_mode": "simple",
"interface": "40GE2/0/8",
"is_plain": "true",
"vrid": "1",
"vrrp_type": "normal"
}
updates:
description: command sent to the device
returned: always
type: list
sample: { "interface 40GE2/0/8",
"vrrp vrid 1 authentication-mode simple plain aaa"}
'''
from xml.etree import ElementTree
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.network.plugins.module_utils.network.cloudengine.ce import get_nc_config, set_nc_config, ce_argument_spec
CE_NC_GET_VRRP_GROUP_INFO = """
<filter type="subtree">
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGroups>
<vrrpGroup>
<ifName>%s</ifName>
<vrrpId>%s</vrrpId>
</vrrpGroup>
</vrrpGroups>
</vrrp>
</filter>
"""
CE_NC_SET_VRRP_GROUP_INFO_HEAD = """
<config>
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGroups>
<vrrpGroup operation="merge">
<ifName>%s</ifName>
<vrrpId>%s</vrrpId>
"""
CE_NC_SET_VRRP_GROUP_INFO_TAIL = """
</vrrpGroup>
</vrrpGroups>
</vrrp>
</config>
"""
CE_NC_GET_VRRP_GLOBAL_INFO = """
<filter type="subtree">
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGlobalCfg>
<gratuitousArpFlag></gratuitousArpFlag>
<gratuitousArpTimeOut></gratuitousArpTimeOut>
<recoverDelay></recoverDelay>
<version></version>
</vrrpGlobalCfg>
</vrrp>
</filter>
"""
CE_NC_SET_VRRP_GLOBAL_HEAD = """
<config>
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGlobalCfg operation="merge">
"""
CE_NC_SET_VRRP_GLOBAL_TAIL = """
</vrrpGlobalCfg>
</vrrp>
</config>
"""
CE_NC_GET_VRRP_VIRTUAL_IP_INFO = """
<filter type="subtree">
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGroups>
<vrrpGroup>
<vrrpId>%s</vrrpId>
<ifName>%s</ifName>
<virtualIps>
<virtualIp>
<virtualIpAddress></virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>
</vrrpGroups>
</vrrp>
</filter>
"""
CE_NC_CREATE_VRRP_VIRTUAL_IP_INFO = """
<config>
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGroups>
<vrrpGroup>
<vrrpId>%s</vrrpId>
<ifName>%s</ifName>
<virtualIps>
<virtualIp operation="create">
<virtualIpAddress>%s</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>
</vrrpGroups>
</vrrp>
</config>
"""
CE_NC_DELETE_VRRP_VIRTUAL_IP_INFO = """
<config>
<vrrp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vrrpGroups>
<vrrpGroup>
<vrrpId>%s</vrrpId>
<ifName>%s</ifName>
<virtualIps>
<virtualIp operation="delete">
<virtualIpAddress>%s</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>
</vrrpGroups>
</vrrp>
</config>
"""
def is_valid_address(address):
"""check ip-address is valid"""
if address.find('.') != -1:
addr_list = address.split('.')
if len(addr_list) != 4:
return False
for each_num in addr_list:
if not each_num.isdigit():
return False
if int(each_num) > 255:
return False
return True
return False
def get_interface_type(interface):
"""Gets the type of interface, such as 10GE, ETH-TRUNK, VLANIF..."""
if interface is None:
return None
iftype = None
if interface.upper().startswith('GE'):
iftype = 'ge'
elif interface.upper().startswith('10GE'):
iftype = '10ge'
elif interface.upper().startswith('25GE'):
iftype = '25ge'
elif interface.upper().startswith('40GE'):
iftype = '40ge'
elif interface.upper().startswith('100GE'):
iftype = '100ge'
elif interface.upper().startswith('ETH-TRUNK'):
iftype = 'eth-trunk'
elif interface.upper().startswith('NULL'):
iftype = 'null'
elif interface.upper().startswith('VLANIF'):
iftype = 'vlanif'
else:
return None
return iftype.lower()
class Vrrp(object):
"""
Manages Manages vrrp information.
"""
def __init__(self, argument_spec):
self.spec = argument_spec
self.module = None
self.init_module()
# module input info
self.interface = self.module.params['interface']
self.vrid = self.module.params['vrid']
self.virtual_ip = self.module.params['virtual_ip']
self.vrrp_type = self.module.params['vrrp_type']
self.admin_ignore_if_down = 'false' if self.module.params['admin_ignore_if_down'] is False else 'true'
self.admin_vrid = self.module.params['admin_vrid']
self.admin_interface = self.module.params['admin_interface']
self.admin_flowdown = 'false' if self.module.params['admin_flowdown'] is False else 'true'
self.priority = self.module.params['priority']
self.version = self.module.params['version']
self.advertise_interval = self.module.params['advertise_interval']
self.preempt_timer_delay = self.module.params['preempt_timer_delay']
self.gratuitous_arp_interval = self.module.params[
'gratuitous_arp_interval']
self.recover_delay = self.module.params['recover_delay']
self.holding_multiplier = self.module.params['holding_multiplier']
self.auth_mode = self.module.params['auth_mode']
self.is_plain = 'false' if self.module.params['is_plain'] is False else 'true'
self.auth_key = self.module.params['auth_key']
self.fast_resume = self.module.params['fast_resume']
self.state = self.module.params['state']
# vrrp info
self.vrrp_global_info = None
self.virtual_ip_info = None
self.vrrp_group_info = None
# state
self.changed = False
self.updates_cmd = list()
self.results = dict()
self.existing = dict()
self.proposed = dict()
self.end_state = dict()
def init_module(self):
""" init module """
self.module = AnsibleModule(
argument_spec=self.spec, supports_check_mode=True)
def get_virtual_ip_info(self):
""" get vrrp virtual ip info."""
virtual_ip_info = dict()
conf_str = CE_NC_GET_VRRP_VIRTUAL_IP_INFO % (self.vrid, self.interface)
xml_str = get_nc_config(self.module, conf_str)
if "<data/>" in xml_str:
return virtual_ip_info
else:
xml_str = xml_str.replace('\r', '').replace('\n', '').\
replace('xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"', "").\
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
virtual_ip_info["vrrpVirtualIpInfos"] = list()
root = ElementTree.fromstring(xml_str)
vrrp_virtual_ip_infos = root.findall(
"vrrp/vrrpGroups/vrrpGroup/virtualIps/virtualIp")
if vrrp_virtual_ip_infos:
for vrrp_virtual_ip_info in vrrp_virtual_ip_infos:
virtual_ip_dict = dict()
for ele in vrrp_virtual_ip_info:
if ele.tag in ["virtualIpAddress"]:
virtual_ip_dict[ele.tag] = ele.text
virtual_ip_info["vrrpVirtualIpInfos"].append(
virtual_ip_dict)
return virtual_ip_info
def get_vrrp_global_info(self):
""" get vrrp global info."""
vrrp_global_info = dict()
conf_str = CE_NC_GET_VRRP_GLOBAL_INFO
xml_str = get_nc_config(self.module, conf_str)
if "<data/>" in xml_str:
return vrrp_global_info
else:
xml_str = xml_str.replace('\r', '').replace('\n', '').\
replace('xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"', "").\
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
global_info = root.findall(
"vrrp/vrrpGlobalCfg")
if global_info:
for tmp in global_info:
for site in tmp:
if site.tag in ["gratuitousArpTimeOut", "gratuitousArpFlag", "recoverDelay", "version"]:
vrrp_global_info[site.tag] = site.text
return vrrp_global_info
def get_vrrp_group_info(self):
""" get vrrp group info."""
vrrp_group_info = dict()
conf_str = CE_NC_GET_VRRP_GROUP_INFO % (self.interface, self.vrid)
xml_str = get_nc_config(self.module, conf_str)
if "<data/>" in xml_str:
return vrrp_group_info
else:
xml_str = xml_str.replace('\r', '').replace('\n', '').\
replace('xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"', "").\
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
global_info = root.findall(
"vrrp/vrrpGroups/vrrpGroup")
if global_info:
for tmp in global_info:
for site in tmp:
if site.tag in ["ifName", "vrrpId", "priority", "advertiseInterval", "preemptMode", "delayTime",
"authenticationMode", "authenticationKey", "vrrpType", "adminVrrpId",
"adminIfName", "adminIgnoreIfDown", "isPlain", "unflowdown", "fastResume",
"holdMultiplier"]:
vrrp_group_info[site.tag] = site.text
return vrrp_group_info
def check_params(self):
"""Check all input params"""
# interface check
if self.interface:
intf_type = get_interface_type(self.interface)
if not intf_type:
self.module.fail_json(
msg='Error: Interface name of %s '
'is error.' % self.interface)
# vrid check
if self.vrid:
if not self.vrid.isdigit():
self.module.fail_json(
msg='Error: The value of vrid is an integer.')
if int(self.vrid) < 1 or int(self.vrid) > 255:
self.module.fail_json(
msg='Error: The value of vrid ranges from 1 to 255.')
# virtual_ip check
if self.virtual_ip:
if not is_valid_address(self.virtual_ip):
self.module.fail_json(
msg='Error: The %s is not a valid ip address.' % self.virtual_ip)
# admin_vrid check
if self.admin_vrid:
if not self.admin_vrid.isdigit():
self.module.fail_json(
msg='Error: The value of admin_vrid is an integer.')
if int(self.admin_vrid) < 1 or int(self.admin_vrid) > 255:
self.module.fail_json(
msg='Error: The value of admin_vrid ranges from 1 to 255.')
# admin_interface check
if self.admin_interface:
intf_type = get_interface_type(self.admin_interface)
if not intf_type:
self.module.fail_json(
msg='Error: Admin interface name of %s '
'is error.' % self.admin_interface)
# priority check
if self.priority:
if not self.priority.isdigit():
self.module.fail_json(
msg='Error: The value of priority is an integer.')
if int(self.priority) < 1 or int(self.priority) > 254:
self.module.fail_json(
msg='Error: The value of priority ranges from 1 to 254. The default value is 100.')
# advertise_interval check
if self.advertise_interval:
if not self.advertise_interval.isdigit():
self.module.fail_json(
msg='Error: The value of advertise_interval is an integer.')
if int(self.advertise_interval) < 1000 or int(self.advertise_interval) > 255000:
self.module.fail_json(
msg='Error: The value of advertise_interval ranges from 1000 to 255000 milliseconds. The default value is 1000 milliseconds.')
if int(self.advertise_interval) % 1000 != 0:
self.module.fail_json(
msg='Error: The advertisement interval value of VRRP must be a multiple of 1000 milliseconds.')
# preempt_timer_delay check
if self.preempt_timer_delay:
if not self.preempt_timer_delay.isdigit():
self.module.fail_json(
msg='Error: The value of preempt_timer_delay is an integer.')
if int(self.preempt_timer_delay) < 1 or int(self.preempt_timer_delay) > 3600:
self.module.fail_json(
msg='Error: The value of preempt_timer_delay ranges from 1 to 3600. The default value is 0.')
# holding_multiplier check
if self.holding_multiplier:
if not self.holding_multiplier.isdigit():
self.module.fail_json(
msg='Error: The value of holding_multiplier is an integer.')
if int(self.holding_multiplier) < 3 or int(self.holding_multiplier) > 10:
self.module.fail_json(
msg='Error: The value of holding_multiplier ranges from 3 to 10. The default value is 3.')
# auth_key check
if self.auth_key:
if len(self.auth_key) > 16 \
or len(self.auth_key.replace(' ', '')) < 1:
self.module.fail_json(
msg='Error: The length of auth_key is not in the range from 1 to 16.')
def is_virtual_ip_change(self):
"""whether virtual ip change"""
if not self.virtual_ip_info:
return True
for info in self.virtual_ip_info["vrrpVirtualIpInfos"]:
if info["virtualIpAddress"] == self.virtual_ip:
return False
return True
def is_virtual_ip_exist(self):
"""whether virtual ip info exist"""
if not self.virtual_ip_info:
return False
for info in self.virtual_ip_info["vrrpVirtualIpInfos"]:
if info["virtualIpAddress"] == self.virtual_ip:
return True
return False
def is_vrrp_global_info_change(self):
"""whether vrrp global attribute info change"""
if not self.vrrp_global_info:
return True
if self.gratuitous_arp_interval:
if self.vrrp_global_info["gratuitousArpFlag"] == "false":
self.module.fail_json(msg="Error: gratuitousArpFlag is false.")
if self.vrrp_global_info["gratuitousArpTimeOut"] != self.gratuitous_arp_interval:
return True
if self.recover_delay:
if self.vrrp_global_info["recoverDelay"] != self.recover_delay:
return True
if self.version:
if self.vrrp_global_info["version"] != self.version:
return True
return False
def is_vrrp_global_info_exist(self):
"""whether vrrp global attribute info exist"""
if self.gratuitous_arp_interval or self.recover_delay or self.version:
if self.gratuitous_arp_interval:
if self.vrrp_global_info["gratuitousArpFlag"] == "false":
self.module.fail_json(
msg="Error: gratuitousArpFlag is false.")
if self.vrrp_global_info["gratuitousArpTimeOut"] != self.gratuitous_arp_interval:
return False
if self.recover_delay:
if self.vrrp_global_info["recoverDelay"] != self.recover_delay:
return False
if self.version:
if self.vrrp_global_info["version"] != self.version:
return False
return True
return False
def is_vrrp_group_info_change(self):
"""whether vrrp group attribute info change"""
if self.vrrp_type:
if self.vrrp_group_info["vrrpType"] != self.vrrp_type:
return True
if self.admin_ignore_if_down:
if self.vrrp_group_info["adminIgnoreIfDown"] != self.admin_ignore_if_down:
return True
if self.admin_vrid:
if self.vrrp_group_info["adminVrrpId"] != self.admin_vrid:
return True
if self.admin_interface:
if self.vrrp_group_info["adminIfName"] != self.admin_interface:
return True
if self.admin_flowdown:
if self.vrrp_group_info["unflowdown"] != self.admin_flowdown:
return True
if self.priority:
if self.vrrp_group_info["priority"] != self.priority:
return True
if self.fast_resume:
fast_resume = "false"
if self.fast_resume == "enable":
fast_resume = "true"
if self.vrrp_group_info["fastResume"] != fast_resume:
return True
if self.advertise_interval:
if self.vrrp_group_info["advertiseInterval"] != self.advertise_interval:
return True
if self.preempt_timer_delay:
if self.vrrp_group_info["delayTime"] != self.preempt_timer_delay:
return True
if self.holding_multiplier:
if self.vrrp_group_info["holdMultiplier"] != self.holding_multiplier:
return True
if self.auth_mode:
if self.vrrp_group_info["authenticationMode"] != self.auth_mode:
return True
if self.auth_key:
return True
if self.is_plain:
if self.vrrp_group_info["isPlain"] != self.is_plain:
return True
return False
def is_vrrp_group_info_exist(self):
"""whether vrrp group attribute info exist"""
if self.vrrp_type:
if self.vrrp_group_info["vrrpType"] != self.vrrp_type:
return False
if self.admin_ignore_if_down:
if self.vrrp_group_info["adminIgnoreIfDown"] != self.admin_ignore_if_down:
return False
if self.admin_vrid:
if self.vrrp_group_info["adminVrrpId"] != self.admin_vrid:
return False
if self.admin_interface:
if self.vrrp_group_info["adminIfName"] != self.admin_interface:
return False
if self.admin_flowdown:
if self.vrrp_group_info["unflowdown"] != self.admin_flowdown:
return False
if self.priority:
if self.vrrp_group_info["priority"] != self.priority:
return False
if self.fast_resume:
fast_resume = "false"
if self.fast_resume == "enable":
fast_resume = "true"
if self.vrrp_group_info["fastResume"] != fast_resume:
return False
if self.advertise_interval:
if self.vrrp_group_info["advertiseInterval"] != self.advertise_interval:
return False
if self.preempt_timer_delay:
if self.vrrp_group_info["delayTime"] != self.preempt_timer_delay:
return False
if self.holding_multiplier:
if self.vrrp_group_info["holdMultiplier"] != self.holding_multiplier:
return False
if self.auth_mode:
if self.vrrp_group_info["authenticationMode"] != self.auth_mode:
return False
if self.is_plain:
if self.vrrp_group_info["isPlain"] != self.is_plain:
return False
return True
def create_virtual_ip(self):
"""create virtual ip info"""
if self.is_virtual_ip_change():
conf_str = CE_NC_CREATE_VRRP_VIRTUAL_IP_INFO % (
self.vrid, self.interface, self.virtual_ip)
recv_xml = set_nc_config(self.module, conf_str)
if "<ok/>" not in recv_xml:
self.module.fail_json(
msg='Error: create virtual ip info failed.')
self.updates_cmd.append("interface %s" % self.interface)
self.updates_cmd.append(
"vrrp vrid %s virtual-ip %s" % (self.vrid, self.virtual_ip))
self.changed = True
def delete_virtual_ip(self):
"""delete virtual ip info"""
if self.is_virtual_ip_exist():
conf_str = CE_NC_DELETE_VRRP_VIRTUAL_IP_INFO % (
self.vrid, self.interface, self.virtual_ip)
recv_xml = set_nc_config(self.module, conf_str)
if "<ok/>" not in recv_xml:
self.module.fail_json(
msg='Error: delete virtual ip info failed.')
self.updates_cmd.append("interface %s" % self.interface)
self.updates_cmd.append(
"undo vrrp vrid %s virtual-ip %s " % (self.vrid, self.virtual_ip))
self.changed = True
def set_vrrp_global(self):
"""set vrrp global attribute info"""
if self.is_vrrp_global_info_change():
conf_str = CE_NC_SET_VRRP_GLOBAL_HEAD
if self.gratuitous_arp_interval:
conf_str += "<gratuitousArpTimeOut>%s</gratuitousArpTimeOut>" % self.gratuitous_arp_interval
if self.recover_delay:
conf_str += "<recoverDelay>%s</recoverDelay>" % self.recover_delay
if self.version:
conf_str += "<version>%s</version>" % self.version
conf_str += CE_NC_SET_VRRP_GLOBAL_TAIL
recv_xml = set_nc_config(self.module, conf_str)
if "<ok/>" not in recv_xml:
self.module.fail_json(
msg='Error: set vrrp global attribute info failed.')
if self.gratuitous_arp_interval:
self.updates_cmd.append(
"vrrp gratuitous-arp interval %s" % self.gratuitous_arp_interval)
if self.recover_delay:
self.updates_cmd.append(
"vrrp recover-delay %s" % self.recover_delay)
if self.version:
version = "3"
if self.version == "v2":
version = "2"
self.updates_cmd.append("vrrp version %s" % version)
self.changed = True
def delete_vrrp_global(self):
"""delete vrrp global attribute info"""
if self.is_vrrp_global_info_exist():
conf_str = CE_NC_SET_VRRP_GLOBAL_HEAD
if self.gratuitous_arp_interval:
if self.gratuitous_arp_interval == "120":
self.module.fail_json(
msg='Error: The default value of gratuitous_arp_interval is 120.')
gratuitous_arp_interval = "120"
conf_str += "<gratuitousArpTimeOut>%s</gratuitousArpTimeOut>" % gratuitous_arp_interval
if self.recover_delay:
if self.recover_delay == "0":
self.module.fail_json(
msg='Error: The default value of recover_delay is 0.')
recover_delay = "0"
conf_str += "<recoverDelay>%s</recoverDelay>" % recover_delay
if self.version:
if self.version == "v2":
self.module.fail_json(
msg='Error: The default value of version is v2.')
version = "v2"
conf_str += "<version>%s</version>" % version
conf_str += CE_NC_SET_VRRP_GLOBAL_TAIL
recv_xml = set_nc_config(self.module, conf_str)
if "<ok/>" not in recv_xml:
self.module.fail_json(
msg='Error: set vrrp global attribute info failed.')
if self.gratuitous_arp_interval:
self.updates_cmd.append("undo vrrp gratuitous-arp interval")
if self.recover_delay:
self.updates_cmd.append("undo vrrp recover-delay")
if self.version == "v3":
self.updates_cmd.append("undo vrrp version")
self.changed = True
def set_vrrp_group(self):
"""set vrrp group attribute info"""
if self.is_vrrp_group_info_change():
conf_str = CE_NC_SET_VRRP_GROUP_INFO_HEAD % (
self.interface, self.vrid)
if self.vrrp_type:
conf_str += "<vrrpType>%s</vrrpType>" % self.vrrp_type
if self.admin_vrid:
conf_str += "<adminVrrpId>%s</adminVrrpId>" % self.admin_vrid
if self.admin_interface:
conf_str += "<adminIfName>%s</adminIfName>" % self.admin_interface
if self.admin_flowdown:
conf_str += "<unflowdown>%s</unflowdown>" % self.admin_flowdown
if self.priority:
conf_str += "<priority>%s</priority>" % self.priority
if self.vrrp_type == "admin":
if self.admin_ignore_if_down:
conf_str += "<adminIgnoreIfDown>%s</adminIgnoreIfDown>" % self.admin_ignore_if_down
if self.fast_resume:
fast_resume = "false"
if self.fast_resume == "enable":
fast_resume = "true"
conf_str += "<fastResume>%s</fastResume>" % fast_resume
if self.advertise_interval:
conf_str += "<advertiseInterval>%s</advertiseInterval>" % self.advertise_interval
if self.preempt_timer_delay:
conf_str += "<delayTime>%s</delayTime>" % self.preempt_timer_delay
if self.holding_multiplier:
conf_str += "<holdMultiplier>%s</holdMultiplier>" % self.holding_multiplier
if self.auth_mode:
conf_str += "<authenticationMode>%s</authenticationMode>" % self.auth_mode
if self.auth_key:
conf_str += "<authenticationKey>%s</authenticationKey>" % self.auth_key
if self.auth_mode == "simple":
conf_str += "<isPlain>%s</isPlain>" % self.is_plain
conf_str += CE_NC_SET_VRRP_GROUP_INFO_TAIL
recv_xml = set_nc_config(self.module, conf_str)
if "<ok/>" not in recv_xml:
self.module.fail_json(
msg='Error: set vrrp group attribute info failed.')
if self.interface and self.vrid:
self.updates_cmd.append("interface %s" % self.interface)
if self.vrrp_type == "admin":
if self.admin_ignore_if_down == "true":
self.updates_cmd.append(
"vrrp vrid %s admin ignore-if-down" % self.vrid)
else:
self.updates_cmd.append(
"vrrp vrid %s admin" % self.vrid)
if self.priority:
self.updates_cmd.append(
"vrrp vrid %s priority %s" % (self.vrid, self.priority))
if self.fast_resume == "enable":
self.updates_cmd.append(
"vrrp vrid %s fast-resume" % self.vrid)
if self.fast_resume == "disable":
self.updates_cmd.append(
"undo vrrp vrid %s fast-resume" % self.vrid)
if self.advertise_interval:
advertise_interval = int(self.advertise_interval) / 1000
self.updates_cmd.append("vrrp vrid %s timer advertise %s<seconds>" % (
self.vrid, int(advertise_interval)))
if self.preempt_timer_delay:
self.updates_cmd.append("vrrp vrid %s preempt timer delay %s" % (self.vrid,
self.preempt_timer_delay))
if self.holding_multiplier:
self.updates_cmd.append(
"vrrp vrid %s holding-multiplier %s" % (self.vrid, self.holding_multiplier))
if self.admin_vrid and self.admin_interface:
if self.admin_flowdown == "true":
self.updates_cmd.append("vrrp vrid %s track admin-vrrp interface %s vrid %s unflowdown" %
(self.vrid, self.admin_interface, self.admin_vrid))
else:
self.updates_cmd.append("vrrp vrid %s track admin-vrrp interface %s vrid %s" %
(self.vrid, self.admin_interface, self.admin_vrid))
if self.auth_mode and self.auth_key:
if self.auth_mode == "simple":
if self.is_plain == "true":
self.updates_cmd.append("vrrp vrid %s authentication-mode simple plain %s" %
(self.vrid, self.auth_key))
else:
self.updates_cmd.append("vrrp vrid %s authentication-mode simple cipher %s" %
(self.vrid, self.auth_key))
if self.auth_mode == "md5":
self.updates_cmd.append(
"vrrp vrid %s authentication-mode md5 %s" % (self.vrid, self.auth_key))
self.changed = True
def delete_vrrp_group(self):
"""delete vrrp group attribute info"""
if self.is_vrrp_group_info_exist():
conf_str = CE_NC_SET_VRRP_GROUP_INFO_HEAD % (
self.interface, self.vrid)
if self.vrrp_type:
vrrp_type = self.vrrp_type
if self.vrrp_type == "admin":
vrrp_type = "normal"
if self.vrrp_type == "member" and self.admin_vrid and self.admin_interface:
vrrp_type = "normal"
conf_str += "<vrrpType>%s</vrrpType>" % vrrp_type
if self.priority:
if self.priority == "100":
self.module.fail_json(
msg='Error: The default value of priority is 100.')
priority = "100"
conf_str += "<priority>%s</priority>" % priority
if self.fast_resume:
fast_resume = "false"
if self.fast_resume == "enable":
fast_resume = "true"
conf_str += "<fastResume>%s</fastResume>" % fast_resume
if self.advertise_interval:
if self.advertise_interval == "1000":
self.module.fail_json(
msg='Error: The default value of advertise_interval is 1000.')
advertise_interval = "1000"
conf_str += "<advertiseInterval>%s</advertiseInterval>" % advertise_interval
if self.preempt_timer_delay:
if self.preempt_timer_delay == "0":
self.module.fail_json(
msg='Error: The default value of preempt_timer_delay is 0.')
preempt_timer_delay = "0"
conf_str += "<delayTime>%s</delayTime>" % preempt_timer_delay
if self.holding_multiplier:
if self.holding_multiplier == "0":
self.module.fail_json(
msg='Error: The default value of holding_multiplier is 3.')
holding_multiplier = "3"
conf_str += "<holdMultiplier>%s</holdMultiplier>" % holding_multiplier
if self.auth_mode:
auth_mode = self.auth_mode
if self.auth_mode == "md5" or self.auth_mode == "simple":
auth_mode = "none"
conf_str += "<authenticationMode>%s</authenticationMode>" % auth_mode
conf_str += CE_NC_SET_VRRP_GROUP_INFO_TAIL
recv_xml = set_nc_config(self.module, conf_str)
if "<ok/>" not in recv_xml:
self.module.fail_json(
msg='Error: set vrrp global attribute info failed.')
if self.interface and self.vrid:
self.updates_cmd.append("interface %s" % self.interface)
if self.vrrp_type == "admin":
self.updates_cmd.append(
"undo vrrp vrid %s admin" % self.vrid)
if self.priority:
self.updates_cmd.append(
"undo vrrp vrid %s priority" % self.vrid)
if self.fast_resume:
self.updates_cmd.append(
"undo vrrp vrid %s fast-resume" % self.vrid)
if self.advertise_interval:
self.updates_cmd.append(
"undo vrrp vrid %s timer advertise" % self.vrid)
if self.preempt_timer_delay:
self.updates_cmd.append(
"undo vrrp vrid %s preempt timer delay" % self.vrid)
if self.holding_multiplier:
self.updates_cmd.append(
"undo vrrp vrid %s holding-multiplier" % self.vrid)
if self.admin_vrid and self.admin_interface:
self.updates_cmd.append(
"undo vrrp vrid %s track admin-vrrp" % self.vrid)
if self.auth_mode:
self.updates_cmd.append(
"undo vrrp vrid %s authentication-mode" % self.vrid)
self.changed = True
def get_proposed(self):
"""get proposed info"""
if self.interface:
self.proposed["interface"] = self.interface
if self.vrid:
self.proposed["vrid"] = self.vrid
if self.virtual_ip:
self.proposed["virtual_ip"] = self.virtual_ip
if self.vrrp_type:
self.proposed["vrrp_type"] = self.vrrp_type
if self.admin_vrid:
self.proposed["admin_vrid"] = self.admin_vrid
if self.admin_interface:
self.proposed["admin_interface"] = self.admin_interface
if self.admin_flowdown:
self.proposed["unflowdown"] = self.admin_flowdown
if self.admin_ignore_if_down:
self.proposed["admin_ignore_if_down"] = self.admin_ignore_if_down
if self.priority:
self.proposed["priority"] = self.priority
if self.version:
self.proposed["version"] = self.version
if self.advertise_interval:
self.proposed["advertise_interval"] = self.advertise_interval
if self.preempt_timer_delay:
self.proposed["preempt_timer_delay"] = self.preempt_timer_delay
if self.gratuitous_arp_interval:
self.proposed[
"gratuitous_arp_interval"] = self.gratuitous_arp_interval
if self.recover_delay:
self.proposed["recover_delay"] = self.recover_delay
if self.holding_multiplier:
self.proposed["holding_multiplier"] = self.holding_multiplier
if self.auth_mode:
self.proposed["auth_mode"] = self.auth_mode
if self.is_plain:
self.proposed["is_plain"] = self.is_plain
if self.auth_key:
self.proposed["auth_key"] = self.auth_key
if self.fast_resume:
self.proposed["fast_resume"] = self.fast_resume
if self.state:
self.proposed["state"] = self.state
def get_existing(self):
"""get existing info"""
if self.gratuitous_arp_interval:
self.existing["gratuitous_arp_interval"] = self.vrrp_global_info[
"gratuitousArpTimeOut"]
if self.version:
self.existing["version"] = self.vrrp_global_info["version"]
if self.recover_delay:
self.existing["recover_delay"] = self.vrrp_global_info[
"recoverDelay"]
if self.virtual_ip:
if self.virtual_ip_info:
self.existing["interface"] = self.interface
self.existing["vrid"] = self.vrid
self.existing["virtual_ip_info"] = self.virtual_ip_info[
"vrrpVirtualIpInfos"]
if self.vrrp_group_info:
self.existing["interface"] = self.vrrp_group_info["ifName"]
self.existing["vrid"] = self.vrrp_group_info["vrrpId"]
self.existing["vrrp_type"] = self.vrrp_group_info["vrrpType"]
if self.vrrp_type == "admin":
self.existing["admin_ignore_if_down"] = self.vrrp_group_info[
"adminIgnoreIfDown"]
if self.admin_vrid and self.admin_interface:
self.existing["admin_vrid"] = self.vrrp_group_info[
"adminVrrpId"]
self.existing["admin_interface"] = self.vrrp_group_info[
"adminIfName"]
self.existing["admin_flowdown"] = self.vrrp_group_info[
"unflowdown"]
if self.priority:
self.existing["priority"] = self.vrrp_group_info["priority"]
if self.advertise_interval:
self.existing["advertise_interval"] = self.vrrp_group_info[
"advertiseInterval"]
if self.preempt_timer_delay:
self.existing["preempt_timer_delay"] = self.vrrp_group_info[
"delayTime"]
if self.holding_multiplier:
self.existing["holding_multiplier"] = self.vrrp_group_info[
"holdMultiplier"]
if self.fast_resume:
fast_resume_exist = "disable"
fast_resume = self.vrrp_group_info["fastResume"]
if fast_resume == "true":
fast_resume_exist = "enable"
self.existing["fast_resume"] = fast_resume_exist
if self.auth_mode:
self.existing["auth_mode"] = self.vrrp_group_info[
"authenticationMode"]
self.existing["is_plain"] = self.vrrp_group_info["isPlain"]
def get_end_state(self):
"""get end state info"""
if self.gratuitous_arp_interval or self.version or self.recover_delay:
self.vrrp_global_info = self.get_vrrp_global_info()
if self.interface and self.vrid:
if self.virtual_ip:
self.virtual_ip_info = self.get_virtual_ip_info()
if self.virtual_ip_info:
self.vrrp_group_info = self.get_vrrp_group_info()
if self.gratuitous_arp_interval:
self.end_state["gratuitous_arp_interval"] = self.vrrp_global_info[
"gratuitousArpTimeOut"]
if self.version:
self.end_state["version"] = self.vrrp_global_info["version"]
if self.recover_delay:
self.end_state["recover_delay"] = self.vrrp_global_info[
"recoverDelay"]
if self.virtual_ip:
if self.virtual_ip_info:
self.end_state["interface"] = self.interface
self.end_state["vrid"] = self.vrid
self.end_state["virtual_ip_info"] = self.virtual_ip_info[
"vrrpVirtualIpInfos"]
if self.vrrp_group_info:
self.end_state["interface"] = self.vrrp_group_info["ifName"]
self.end_state["vrid"] = self.vrrp_group_info["vrrpId"]
self.end_state["vrrp_type"] = self.vrrp_group_info["vrrpType"]
if self.vrrp_type == "admin":
self.end_state["admin_ignore_if_down"] = self.vrrp_group_info[
"adminIgnoreIfDown"]
if self.admin_vrid and self.admin_interface:
self.end_state["admin_vrid"] = self.vrrp_group_info[
"adminVrrpId"]
self.end_state["admin_interface"] = self.vrrp_group_info[
"adminIfName"]
self.end_state["admin_flowdown"] = self.vrrp_group_info[
"unflowdown"]
if self.priority:
self.end_state["priority"] = self.vrrp_group_info["priority"]
if self.advertise_interval:
self.end_state["advertise_interval"] = self.vrrp_group_info[
"advertiseInterval"]
if self.preempt_timer_delay:
self.end_state["preempt_timer_delay"] = self.vrrp_group_info[
"delayTime"]
if self.holding_multiplier:
self.end_state["holding_multiplier"] = self.vrrp_group_info[
"holdMultiplier"]
if self.fast_resume:
fast_resume_end = "disable"
fast_resume = self.vrrp_group_info["fastResume"]
if fast_resume == "true":
fast_resume_end = "enable"
self.end_state["fast_resume"] = fast_resume_end
if self.auth_mode:
self.end_state["auth_mode"] = self.vrrp_group_info[
"authenticationMode"]
self.end_state["is_plain"] = self.vrrp_group_info["isPlain"]
if self.existing == self.end_state:
self.changed = False
def work(self):
"""worker"""
self.check_params()
if self.gratuitous_arp_interval or self.version or self.recover_delay:
self.vrrp_global_info = self.get_vrrp_global_info()
if self.interface and self.vrid:
self.virtual_ip_info = self.get_virtual_ip_info()
if self.virtual_ip_info:
self.vrrp_group_info = self.get_vrrp_group_info()
self.get_proposed()
self.get_existing()
if self.gratuitous_arp_interval or self.version or self.recover_delay:
if self.state == "present":
self.set_vrrp_global()
else:
self.delete_vrrp_global()
else:
if not self.interface or not self.vrid:
self.module.fail_json(
msg='Error: interface, vrid must be config at the same time.')
if self.interface and self.vrid:
if self.virtual_ip:
if self.state == "present":
self.create_virtual_ip()
else:
self.delete_virtual_ip()
else:
if not self.vrrp_group_info:
self.module.fail_json(
msg='Error: The VRRP group does not exist.')
if self.admin_ignore_if_down == "true":
if self.vrrp_type != "admin":
self.module.fail_json(
msg='Error: vrrpType must be admin when admin_ignore_if_down is true.')
if self.admin_interface or self.admin_vrid:
if self.vrrp_type != "member":
self.module.fail_json(
msg='Error: it binds a VRRP group to an mVRRP group, vrrp_type must be "member".')
if not self.vrrp_type or not self.interface or not self.vrid:
self.module.fail_json(
msg='Error: admin_interface admin_vrid vrrp_type interface vrid must '
'be config at the same time.')
if self.auth_mode == "md5" and self.is_plain == "true":
self.module.fail_json(
msg='Error: is_plain can not be True when auth_mode is md5.')
if self.state == "present":
self.set_vrrp_group()
else:
self.delete_vrrp_group()
self.get_end_state()
self.results['changed'] = self.changed
self.results['proposed'] = self.proposed
self.results['existing'] = self.existing
self.results['end_state'] = self.end_state
if self.changed:
self.results['updates'] = self.updates_cmd
else:
self.results['updates'] = list()
self.module.exit_json(**self.results)
def main():
""" Module main """
argument_spec = dict(
interface=dict(type='str'),
vrid=dict(type='str'),
virtual_ip=dict(type='str'),
vrrp_type=dict(type='str', choices=['normal', 'member', 'admin']),
admin_ignore_if_down=dict(type='bool', default=False),
admin_vrid=dict(type='str'),
admin_interface=dict(type='str'),
admin_flowdown=dict(type='bool', default=False),
priority=dict(type='str'),
version=dict(type='str', choices=['v2', 'v3']),
advertise_interval=dict(type='str'),
preempt_timer_delay=dict(type='str'),
gratuitous_arp_interval=dict(type='str'),
recover_delay=dict(type='str'),
holding_multiplier=dict(type='str'),
auth_mode=dict(type='str', choices=['simple', 'md5', 'none']),
is_plain=dict(type='bool', default=False),
auth_key=dict(type='str', no_log=True),
fast_resume=dict(type='str', choices=['enable', 'disable']),
state=dict(type='str', default='present',
choices=['present', 'absent'])
)
argument_spec.update(ce_argument_spec)
module = Vrrp(argument_spec=argument_spec)
module.work()
if __name__ == '__main__':
main()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 0 B | 0644 |
|
| a10_server.py | File | 10.45 KB | 0644 |
|
| a10_server_axapi3.py | File | 8.67 KB | 0644 |
|
| a10_service_group.py | File | 12.91 KB | 0644 |
|
| a10_virtual_server.py | File | 10.92 KB | 0644 |
|
| aireos_command.py | File | 6.93 KB | 0644 |
|
| aireos_config.py | File | 13.73 KB | 0644 |
|
| apconos_command.py | File | 5.96 KB | 0644 |
|
| aruba_command.py | File | 6.7 KB | 0644 |
|
| aruba_config.py | File | 16.41 KB | 0644 |
|
| avi_actiongroupconfig.py | File | 5.3 KB | 0644 |
|
| avi_alertconfig.py | File | 12.43 KB | 0644 |
|
| avi_alertemailconfig.py | File | 3.73 KB | 0644 |
|
| avi_alertscriptconfig.py | File | 3.53 KB | 0644 |
|
| avi_alertsyslogconfig.py | File | 3.69 KB | 0644 |
|
| avi_analyticsprofile.py | File | 31.36 KB | 0644 |
|
| avi_api_session.py | File | 8.86 KB | 0644 |
|
| avi_api_version.py | File | 2.65 KB | 0644 |
|
| avi_applicationpersistenceprofile.py | File | 6.47 KB | 0644 |
|
| avi_applicationprofile.py | File | 7.58 KB | 0644 |
|
| avi_authprofile.py | File | 5.06 KB | 0644 |
|
| avi_autoscalelaunchconfig.py | File | 4.38 KB | 0644 |
|
| avi_backup.py | File | 3.95 KB | 0644 |
|
| avi_backupconfiguration.py | File | 5.35 KB | 0644 |
|
| avi_certificatemanagementprofile.py | File | 3.64 KB | 0644 |
|
| avi_cloud.py | File | 11.09 KB | 0644 |
|
| avi_cloudconnectoruser.py | File | 4.57 KB | 0644 |
|
| avi_cloudproperties.py | File | 3.66 KB | 0644 |
|
| avi_cluster.py | File | 3.79 KB | 0644 |
|
| avi_clusterclouddetails.py | File | 3.47 KB | 0644 |
|
| avi_controllerproperties.py | File | 19.1 KB | 0644 |
|
| avi_customipamdnsprofile.py | File | 3.76 KB | 0644 |
|
| avi_dnspolicy.py | File | 3.69 KB | 0644 |
|
| avi_errorpagebody.py | File | 3.78 KB | 0644 |
|
| avi_errorpageprofile.py | File | 4.44 KB | 0644 |
|
| avi_gslb.py | File | 14.35 KB | 0644 |
|
| avi_gslbgeodbprofile.py | File | 4.07 KB | 0644 |
|
| avi_gslbservice.py | File | 9.43 KB | 0644 |
|
| avi_gslbservice_patch_member.py | File | 10.19 KB | 0644 |
|
| avi_hardwaresecuritymodulegroup.py | File | 3.5 KB | 0644 |
|
| avi_healthmonitor.py | File | 7.44 KB | 0644 |
|
| avi_httppolicyset.py | File | 5.22 KB | 0644 |
|
| avi_ipaddrgroup.py | File | 4.8 KB | 0644 |
|
| avi_ipamdnsproviderprofile.py | File | 6.04 KB | 0644 |
|
| avi_l4policyset.py | File | 4.03 KB | 0644 |
|
| avi_microservicegroup.py | File | 3.78 KB | 0644 |
|
| avi_network.py | File | 5.13 KB | 0644 |
|
| avi_networkprofile.py | File | 4.14 KB | 0644 |
|
| avi_networksecuritypolicy.py | File | 4.15 KB | 0644 |
|
| avi_pkiprofile.py | File | 5.32 KB | 0644 |
|
| avi_pool.py | File | 22.34 KB | 0644 |
|
| avi_poolgroup.py | File | 5.87 KB | 0644 |
|
| avi_poolgroupdeploymentpolicy.py | File | 5.49 KB | 0644 |
|
| avi_prioritylabels.py | File | 3.62 KB | 0644 |
|
| avi_role.py | File | 3.25 KB | 0644 |
|
| avi_scheduler.py | File | 5.08 KB | 0644 |
|
| avi_seproperties.py | File | 3.51 KB | 0644 |
|
| avi_serverautoscalepolicy.py | File | 7.22 KB | 0644 |
|
| avi_serviceengine.py | File | 5.74 KB | 0644 |
|
| avi_serviceenginegroup.py | File | 53.38 KB | 0644 |
|
| avi_snmptrapprofile.py | File | 3.4 KB | 0644 |
|
| avi_sslkeyandcertificate.py | File | 6.75 KB | 0644 |
|
| avi_sslprofile.py | File | 8.21 KB | 0644 |
|
| avi_stringgroup.py | File | 4.08 KB | 0644 |
|
| avi_systemconfiguration.py | File | 6.76 KB | 0644 |
|
| avi_tenant.py | File | 3.87 KB | 0644 |
|
| avi_trafficcloneprofile.py | File | 4.01 KB | 0644 |
|
| avi_user.py | File | 6.12 KB | 0644 |
|
| avi_useraccount.py | File | 5.02 KB | 0644 |
|
| avi_useraccountprofile.py | File | 4.65 KB | 0644 |
|
| avi_virtualservice.py | File | 29.62 KB | 0644 |
|
| avi_vrfcontext.py | File | 4.51 KB | 0644 |
|
| avi_vsdatascriptset.py | File | 4.86 KB | 0644 |
|
| avi_vsvip.py | File | 5.21 KB | 0644 |
|
| avi_webhook.py | File | 3.77 KB | 0644 |
|
| bcf_switch.py | File | 4.86 KB | 0644 |
|
| bigmon_chain.py | File | 3.99 KB | 0644 |
|
| bigmon_policy.py | File | 6.23 KB | 0644 |
|
| ce_aaa_server.py | File | 69.09 KB | 0644 |
|
| ce_aaa_server_host.py | File | 101.81 KB | 0644 |
|
| ce_acl.py | File | 35.95 KB | 0644 |
|
| ce_acl_advance.py | File | 73.4 KB | 0644 |
|
| ce_acl_interface.py | File | 10.36 KB | 0644 |
|
| ce_bfd_global.py | File | 21.02 KB | 0644 |
|
| ce_bfd_session.py | File | 21.99 KB | 0644 |
|
| ce_bfd_view.py | File | 19.71 KB | 0644 |
|
| ce_bgp.py | File | 79.52 KB | 0644 |
|
| ce_bgp_af.py | File | 133.02 KB | 0644 |
|
| ce_bgp_neighbor.py | File | 72.12 KB | 0644 |
|
| ce_bgp_neighbor_af.py | File | 110.55 KB | 0644 |
|
| ce_command.py | File | 7.79 KB | 0644 |
|
| ce_config.py | File | 17.88 KB | 0644 |
|
| ce_dldp.py | File | 18.62 KB | 0644 |
|
| ce_dldp_interface.py | File | 22.41 KB | 0644 |
|
| ce_eth_trunk.py | File | 22.44 KB | 0644 |
|
| ce_evpn_bd_vni.py | File | 39.01 KB | 0644 |
|
| ce_evpn_bgp.py | File | 26.71 KB | 0644 |
|
| ce_evpn_bgp_rr.py | File | 18 KB | 0644 |
|
| ce_evpn_global.py | File | 6.93 KB | 0644 |
|
| ce_facts.py | File | 11.4 KB | 0644 |
|
| ce_file_copy.py | File | 13.18 KB | 0644 |
|
| ce_info_center_debug.py | File | 21.33 KB | 0644 |
|
| ce_info_center_global.py | File | 67.85 KB | 0644 |
|
| ce_info_center_log.py | File | 20.09 KB | 0644 |
|
| ce_info_center_trap.py | File | 24.65 KB | 0644 |
|
| ce_interface.py | File | 31 KB | 0644 |
|
| ce_interface_ospf.py | File | 30.25 KB | 0644 |
|
| ce_ip_interface.py | File | 23.63 KB | 0644 |
|
| ce_is_is_instance.py | File | 8.95 KB | 0644 |
|
| ce_is_is_interface.py | File | 27.75 KB | 0644 |
|
| ce_is_is_view.py | File | 76.21 KB | 0644 |
|
| ce_lacp.py | File | 17.68 KB | 0644 |
|
| ce_link_status.py | File | 21.76 KB | 0644 |
|
| ce_lldp.py | File | 31.85 KB | 0644 |
|
| ce_lldp_interface.py | File | 68.35 KB | 0644 |
|
| ce_mdn_interface.py | File | 12.96 KB | 0644 |
|
| ce_mlag_config.py | File | 34.52 KB | 0644 |
|
| ce_mlag_interface.py | File | 36.1 KB | 0644 |
|
| ce_mtu.py | File | 18.87 KB | 0644 |
|
| ce_multicast_global.py | File | 8.98 KB | 0644 |
|
| ce_multicast_igmp_enable.py | File | 17.36 KB | 0644 |
|
| ce_netconf.py | File | 5.81 KB | 0644 |
|
| ce_netstream_aging.py | File | 18.14 KB | 0644 |
|
| ce_netstream_export.py | File | 18.9 KB | 0644 |
|
| ce_netstream_global.py | File | 36.93 KB | 0644 |
|
| ce_netstream_template.py | File | 16.57 KB | 0644 |
|
| ce_ntp.py | File | 20.32 KB | 0644 |
|
| ce_ntp_auth.py | File | 16.36 KB | 0644 |
|
| ce_ospf.py | File | 33.93 KB | 0644 |
|
| ce_ospf_vrf.py | File | 67.18 KB | 0644 |
|
| ce_reboot.py | File | 4.28 KB | 0644 |
|
| ce_rollback.py | File | 15.86 KB | 0644 |
|
| ce_sflow.py | File | 44.08 KB | 0644 |
|
| ce_snmp_community.py | File | 34.64 KB | 0644 |
|
| ce_snmp_contact.py | File | 7.23 KB | 0644 |
|
| ce_snmp_location.py | File | 6.96 KB | 0644 |
|
| ce_snmp_target_host.py | File | 32.84 KB | 0644 |
|
| ce_snmp_traps.py | File | 19.59 KB | 0644 |
|
| ce_snmp_user.py | File | 36.66 KB | 0644 |
|
| ce_startup.py | File | 15.45 KB | 0644 |
|
| ce_static_route.py | File | 29 KB | 0644 |
|
| ce_static_route_bfd.py | File | 60.9 KB | 0644 |
|
| ce_stp.py | File | 36.76 KB | 0644 |
|
| ce_switchport.py | File | 38.54 KB | 0644 |
|
| ce_vlan.py | File | 20.88 KB | 0644 |
|
| ce_vrf.py | File | 10.73 KB | 0644 |
|
| ce_vrf_af.py | File | 30.04 KB | 0644 |
|
| ce_vrf_interface.py | File | 15.17 KB | 0644 |
|
| ce_vrrp.py | File | 52.15 KB | 0644 |
|
| ce_vxlan_arp.py | File | 24.02 KB | 0644 |
|
| ce_vxlan_gateway.py | File | 33.38 KB | 0644 |
|
| ce_vxlan_global.py | File | 18.3 KB | 0644 |
|
| ce_vxlan_tunnel.py | File | 30.95 KB | 0644 |
|
| ce_vxlan_vap.py | File | 33.03 KB | 0644 |
|
| cnos_backup.py | File | 9.69 KB | 0644 |
|
| cnos_banner.py | File | 5.64 KB | 0644 |
|
| cnos_bgp.py | File | 43.15 KB | 0644 |
|
| cnos_command.py | File | 5.84 KB | 0644 |
|
| cnos_conditional_command.py | File | 5.62 KB | 0644 |
|
| cnos_conditional_template.py | File | 6.68 KB | 0644 |
|
| cnos_config.py | File | 10.86 KB | 0644 |
|
| cnos_factory.py | File | 3.36 KB | 0644 |
|
| cnos_facts.py | File | 17.45 KB | 0644 |
|
| cnos_image.py | File | 8.65 KB | 0644 |
|
| cnos_interface.py | File | 15.57 KB | 0644 |
|
| cnos_l2_interface.py | File | 17.75 KB | 0644 |
|
| cnos_l3_interface.py | File | 12.54 KB | 0644 |
|
| cnos_linkagg.py | File | 9.84 KB | 0644 |
|
| cnos_lldp.py | File | 4.13 KB | 0644 |
|
| cnos_logging.py | File | 12.73 KB | 0644 |
|
| cnos_reload.py | File | 3.25 KB | 0644 |
|
| cnos_rollback.py | File | 10.32 KB | 0644 |
|
| cnos_save.py | File | 3.42 KB | 0644 |
|
| cnos_showrun.py | File | 3.34 KB | 0644 |
|
| cnos_static_route.py | File | 9.47 KB | 0644 |
|
| cnos_system.py | File | 12.93 KB | 0644 |
|
| cnos_template.py | File | 5.25 KB | 0644 |
|
| cnos_user.py | File | 12.28 KB | 0644 |
|
| cnos_vlag.py | File | 15.19 KB | 0644 |
|
| cnos_vlan.py | File | 10.69 KB | 0644 |
|
| cnos_vrf.py | File | 11.64 KB | 0644 |
|
| cv_server_provision.py | File | 23.67 KB | 0644 |
|
| dladm_etherstub.py | File | 3.93 KB | 0644 |
|
| dladm_iptun.py | File | 7.49 KB | 0644 |
|
| dladm_linkprop.py | File | 7.53 KB | 0644 |
|
| dladm_vlan.py | File | 5.15 KB | 0644 |
|
| dladm_vnic.py | File | 6.43 KB | 0644 |
|
| edgeos_command.py | File | 5.57 KB | 0644 |
|
| edgeos_config.py | File | 10.65 KB | 0644 |
|
| edgeos_facts.py | File | 8.06 KB | 0644 |
|
| edgeswitch_facts.py | File | 7.56 KB | 0644 |
|
| edgeswitch_vlan.py | File | 15.03 KB | 0644 |
|
| enos_command.py | File | 6.07 KB | 0644 |
|
| enos_config.py | File | 10.95 KB | 0644 |
|
| enos_facts.py | File | 15.23 KB | 0644 |
|
| eric_eccli_command.py | File | 6.89 KB | 0644 |
|
| exos_command.py | File | 7.23 KB | 0644 |
|
| exos_config.py | File | 16.96 KB | 0644 |
|
| exos_facts.py | File | 5.72 KB | 0644 |
|
| exos_l2_interfaces.py | File | 26.19 KB | 0644 |
|
| exos_lldp_global.py | File | 10.39 KB | 0644 |
|
| exos_lldp_interfaces.py | File | 13.68 KB | 0644 |
|
| exos_vlans.py | File | 16.07 KB | 0644 |
|
| flowadm.py | File | 14.32 KB | 0644 |
|
| ftd_configuration.py | File | 4.93 KB | 0644 |
|
| ftd_file_download.py | File | 4.26 KB | 0644 |
|
| ftd_file_upload.py | File | 3.54 KB | 0644 |
|
| ftd_install.py | File | 11.54 KB | 0644 |
|
| iap_start_workflow.py | File | 5.21 KB | 0644 |
|
| iap_token.py | File | 3.83 KB | 0644 |
|
| icx_banner.py | File | 6.54 KB | 0644 |
|
| icx_command.py | File | 7.22 KB | 0644 |
|
| icx_config.py | File | 18.28 KB | 0644 |
|
| icx_copy.py | File | 15.16 KB | 0644 |
|
| icx_facts.py | File | 17 KB | 0644 |
|
| icx_interface.py | File | 23.05 KB | 0644 |
|
| icx_l3_interface.py | File | 14.56 KB | 0644 |
|
| icx_linkagg.py | File | 10.03 KB | 0644 |
|
| icx_lldp.py | File | 5.13 KB | 0644 |
|
| icx_logging.py | File | 18.1 KB | 0644 |
|
| icx_ping.py | File | 7.84 KB | 0644 |
|
| icx_static_route.py | File | 9.38 KB | 0644 |
|
| icx_system.py | File | 16.14 KB | 0644 |
|
| icx_user.py | File | 13.05 KB | 0644 |
|
| icx_vlan.py | File | 26.24 KB | 0644 |
|
| ig_config.py | File | 16 KB | 0644 |
|
| ig_unit_information.py | File | 3.9 KB | 0644 |
|
| ipadm_addr.py | File | 11.31 KB | 0644 |
|
| ipadm_addrprop.py | File | 6.86 KB | 0644 |
|
| ipadm_if.py | File | 5.47 KB | 0644 |
|
| ipadm_ifprop.py | File | 7.94 KB | 0644 |
|
| ipadm_prop.py | File | 6.79 KB | 0644 |
|
| ironware_command.py | File | 5.07 KB | 0644 |
|
| ironware_config.py | File | 11.11 KB | 0644 |
|
| ironware_facts.py | File | 19.45 KB | 0644 |
|
| nclu.py | File | 8.02 KB | 0644 |
|
| netact_cm_command.py | File | 11.77 KB | 0644 |
|
| netscaler_cs_action.py | File | 8.71 KB | 0644 |
|
| netscaler_cs_policy.py | File | 9.28 KB | 0644 |
|
| netscaler_cs_vserver.py | File | 42.83 KB | 0644 |
|
| netscaler_gslb_service.py | File | 23.35 KB | 0644 |
|
| netscaler_gslb_site.py | File | 13.73 KB | 0644 |
|
| netscaler_gslb_vserver.py | File | 32.98 KB | 0644 |
|
| netscaler_lb_monitor.py | File | 46.23 KB | 0644 |
|
| netscaler_lb_vserver.py | File | 70.58 KB | 0644 |
|
| netscaler_nitro_request.py | File | 27.82 KB | 0644 |
|
| netscaler_save_config.py | File | 4.67 KB | 0644 |
|
| netscaler_server.py | File | 12.88 KB | 0644 |
|
| netscaler_service.py | File | 30.9 KB | 0644 |
|
| netscaler_servicegroup.py | File | 34.33 KB | 0644 |
|
| netscaler_ssl_certkey.py | File | 11.6 KB | 0644 |
|
| nos_command.py | File | 7.15 KB | 0644 |
|
| nos_config.py | File | 14.61 KB | 0644 |
|
| nos_facts.py | File | 13.44 KB | 0644 |
|
| nuage_vspk.py | File | 41.3 KB | 0644 |
|
| opx_cps.py | File | 12.18 KB | 0644 |
|
| ordnance_config.py | File | 12.03 KB | 0644 |
|
| ordnance_facts.py | File | 8.26 KB | 0644 |
|
| pn_access_list.py | File | 4.29 KB | 0644 |
|
| pn_access_list_ip.py | File | 4.42 KB | 0644 |
|
| pn_admin_service.py | File | 5.62 KB | 0644 |
|
| pn_admin_session_timeout.py | File | 2.96 KB | 0644 |
|
| pn_admin_syslog.py | File | 6.4 KB | 0644 |
|
| pn_connection_stats_settings.py | File | 10.3 KB | 0644 |
|
| pn_cpu_class.py | File | 5.65 KB | 0644 |
|
| pn_cpu_mgmt_class.py | File | 3.75 KB | 0644 |
|
| pn_dhcp_filter.py | File | 4.66 KB | 0644 |
|
| pn_dscp_map.py | File | 4.03 KB | 0644 |
|
| pn_dscp_map_pri_map.py | File | 3.99 KB | 0644 |
|
| pn_fabric_local.py | File | 4.71 KB | 0644 |
|
| pn_igmp_snooping.py | File | 6.22 KB | 0644 |
|
| pn_ipv6security_raguard.py | File | 6.64 KB | 0644 |
|
| pn_ipv6security_raguard_port.py | File | 3.73 KB | 0644 |
|
| pn_ipv6security_raguard_vlan.py | File | 4.77 KB | 0644 |
|
| pn_log_audit_exception.py | File | 5.65 KB | 0644 |
|
| pn_port_config.py | File | 11.93 KB | 0644 |
|
| pn_port_cos_bw.py | File | 3.96 KB | 0644 |
|
| pn_port_cos_rate_setting.py | File | 5.67 KB | 0644 |
|
| pn_prefix_list.py | File | 4.12 KB | 0644 |
|
| pn_prefix_list_network.py | File | 5.06 KB | 0644 |
|
| pn_role.py | File | 6.14 KB | 0644 |
|
| pn_snmp_community.py | File | 4.99 KB | 0644 |
|
| pn_snmp_trap_sink.py | File | 6 KB | 0644 |
|
| pn_snmp_vacm.py | File | 6.09 KB | 0644 |
|
| pn_stp.py | File | 5.91 KB | 0644 |
|
| pn_stp_port.py | File | 5.02 KB | 0644 |
|
| pn_switch_setup.py | File | 12.88 KB | 0644 |
|
| pn_user.py | File | 5.11 KB | 0644 |
|
| pn_vflow_table_profile.py | File | 3.62 KB | 0644 |
|
| pn_vrouter_bgp.py | File | 16.33 KB | 0644 |
|
| pn_vrouter_bgp_network.py | File | 5.06 KB | 0644 |
|
| pn_vrouter_interface_ip.py | File | 7.05 KB | 0644 |
|
| pn_vrouter_loopback_interface.py | File | 6.4 KB | 0644 |
|
| pn_vrouter_ospf.py | File | 5.57 KB | 0644 |
|
| pn_vrouter_ospf6.py | File | 5.49 KB | 0644 |
|
| pn_vrouter_packet_relay.py | File | 5.49 KB | 0644 |
|
| pn_vrouter_pim_config.py | File | 4.77 KB | 0644 |
|
| pn_vtep.py | File | 5.1 KB | 0644 |
|
| slxos_command.py | File | 7.19 KB | 0644 |
|
| slxos_config.py | File | 17.87 KB | 0644 |
|
| slxos_facts.py | File | 13.43 KB | 0644 |
|
| slxos_interface.py | File | 14.25 KB | 0644 |
|
| slxos_l2_interface.py | File | 16.58 KB | 0644 |
|
| slxos_l3_interface.py | File | 9.41 KB | 0644 |
|
| slxos_linkagg.py | File | 9.57 KB | 0644 |
|
| slxos_lldp.py | File | 3.33 KB | 0644 |
|
| slxos_vlan.py | File | 9.39 KB | 0644 |
|
| sros_command.py | File | 6.66 KB | 0644 |
|
| sros_config.py | File | 10.97 KB | 0644 |
|
| sros_rollback.py | File | 6.26 KB | 0644 |
|
| vdirect_commit.py | File | 12.58 KB | 0644 |
|
| vdirect_file.py | File | 8.99 KB | 0644 |
|
| vdirect_runnable.py | File | 13.38 KB | 0644 |
|
| voss_command.py | File | 7.75 KB | 0644 |
|
| voss_config.py | File | 18.33 KB | 0644 |
|
| voss_facts.py | File | 15.67 KB | 0644 |
|