Init: mediaserver

This commit is contained in:
2023-02-08 12:13:28 +01:00
parent 848bc9739c
commit f7c23d4ba9
31914 changed files with 6175775 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
#
# (c) 2016 Red Hat Inc.
#
# 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
from ansible.utils.display import Display
from ansible_collections.ansible.netcommon.plugins.action.network import (
ActionModule as ActionNetworkModule,
)
display = Display()
CLI_SUPPORTED_MODULES = ["junos_netconf", "junos_ping", "junos_command"]
class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):
del tmp # tmp no longer has any effect
module_name = self._task.action.split(".")[-1]
self._config_module = True if module_name in ["junos_config", "config"] else False
persistent_connection = self._play_context.connection.split(".")[-1]
warnings = []
if persistent_connection not in ("netconf", "network_cli"):
return {
"failed": True,
"msg": "Connection type '%s' is not valid for '%s' module. "
"Please see https://docs.ansible.com/ansible/latest/network/user_guide/platform_junos.html"
% (self._play_context.connection, module_name),
}
result = super(ActionModule, self).run(task_vars=task_vars)
if warnings:
if "warnings" in result:
result["warnings"].extend(warnings)
else:
result["warnings"] = warnings
return result

View File

@@ -0,0 +1,346 @@
#
# (c) 2017 Red Hat Inc.
#
# 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 = """
author: Ansible Networking Team (@ansible-network)
name: junos
short_description: Use junos cliconf to run command on Juniper Junos OS platform
description:
- This junos plugin provides low level abstraction apis for sending and receiving
CLI commands from Juniper Junos OS network devices.
version_added: 1.0.0
options:
config_commands:
description:
- Specifies a list of commands that can make configuration changes
to the target device.
- When `ansible_network_single_user_mode` is enabled, if a command sent
to the device is present in this list, the existing cache is invalidated.
version_added: 2.0.0
type: list
elements: str
default: []
vars:
- name: ansible_junos_config_commands
"""
import json
import re
from functools import wraps
from itertools import chain
from ansible.errors import AnsibleConnectionFailure
from ansible.module_utils._text import to_text
from ansible.module_utils.common._collections_compat import Mapping
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
from ansible_collections.ansible.netcommon.plugins.plugin_utils.cliconf_base import CliconfBase
def configure(func):
@wraps(func)
def wrapped(self, *args, **kwargs):
prompt = self._connection.get_prompt()
if not to_text(prompt, errors="surrogate_or_strict").strip().endswith("#"):
self.send_command("configure")
return func(self, *args, **kwargs)
return wrapped
class Cliconf(CliconfBase):
def __init__(self, *args, **kwargs):
self._device_info = {}
super(Cliconf, self).__init__(*args, **kwargs)
def get_text(self, ele, tag):
try:
return to_text(
ele.find(tag).text,
errors="surrogate_then_replace",
).strip()
except AttributeError:
pass
def get_device_info(self):
if not self._device_info:
device_info = {}
device_info["network_os"] = "junos"
reply = self.get(command="show version")
data = to_text(reply, errors="surrogate_or_strict").strip()
match = re.search(r"Junos: (\S+)", data)
if match:
device_info["network_os_version"] = match.group(1)
match = re.search(r"Model: (\S+)", data, re.M)
if match:
device_info["network_os_model"] = match.group(1)
match = re.search(r"Hostname: (\S+)", data, re.M)
if match:
device_info["network_os_hostname"] = match.group(1)
self._device_info = device_info
return self._device_info
def get_config(self, source="running", format="text", flags=None):
if source != "running":
raise ValueError(
"fetching configuration from %s is not supported" % source,
)
options_values = self.get_option_values()
if format not in options_values["format"]:
raise ValueError(
"'format' value %s is invalid. Valid values are %s"
% (format, ",".join(options_values["format"])),
)
if format == "text":
cmd = "show configuration"
else:
cmd = "show configuration | display %s" % format
cmd += " ".join(to_list(flags))
cmd = cmd.strip()
return self.send_command(cmd)
@configure
def edit_config(
self,
candidate=None,
commit=True,
replace=None,
comment=None,
):
operations = self.get_device_operations()
self.check_edit_config_capability(
operations,
candidate,
commit,
replace,
comment,
)
resp = {}
results = []
requests = []
if replace:
candidate = "load override {0}".format(replace)
for line in to_list(candidate):
if not isinstance(line, Mapping):
line = {"command": line}
cmd = line["command"]
try:
results.append(self.send_command(**line))
except AnsibleConnectionFailure as exc:
if "error: commit failed" in exc.message:
self.discard_changes()
raise
requests.append(cmd)
diff = self.compare_configuration()
if diff:
resp["diff"] = diff
if commit:
self.commit(comment=comment)
else:
self.discard_changes()
else:
self.send_command("top")
self.discard_changes()
resp["request"] = requests
resp["response"] = results
return resp
def get(
self,
command,
prompt=None,
answer=None,
sendonly=False,
output=None,
newline=True,
check_all=False,
):
if output:
command = self._get_command_with_output(command, output)
return self.send_command(
command=command,
prompt=prompt,
answer=answer,
sendonly=sendonly,
newline=newline,
check_all=check_all,
)
@configure
def commit(
self,
comment=None,
confirmed=False,
at_time=None,
synchronize=False,
):
"""
Execute commit command on remote device.
:param comment: Comment to be associated with commit
:param confirmed: Boolean flag to indicate if the previous commit should confirmed
:param at_time: Time at which to activate configuration changes
:param synchronize: Boolean flag to indicate if commit should synchronize on remote peers
:return: Command response received from device
"""
command = "commit"
if comment:
command += " comment {0}".format(comment)
if confirmed:
command += " confirmed"
if at_time:
command += " {0}".format(at_time)
if synchronize:
command += " peers-synchronize"
command += " and-quit"
try:
response = self.send_command(command)
except AnsibleConnectionFailure:
self.discard_changes()
raise
return response
@configure
def discard_changes(self):
command = "rollback 0"
for cmd in chain(to_list(command), ["exit"]):
self.send_command(cmd)
@configure
def validate(self):
return self.send_command("commit check")
@configure
def compare_configuration(self, rollback_id=None):
command = "show | compare"
if rollback_id is not None:
command += " rollback %s" % int(rollback_id)
resp = self.send_command(command)
r = resp.splitlines()
if len(r) == 1 and "[edit]" in r[0] or len(r) == 4 and r[1].startswith("- version"):
resp = ""
return resp
@configure
def rollback(self, rollback_id, commit=True):
resp = {}
self.send_command("rollback %s" % int(rollback_id))
resp["diff"] = self.compare_configuration()
if commit:
self.commit()
else:
self.discard_changes()
return resp
def get_diff(self, rollback_id=None):
diff = {"config_diff": None}
response = self.compare_configuration(rollback_id=rollback_id)
if response:
diff["config_diff"] = response
return diff
def get_device_operations(self):
return {
"supports_diff_replace": False,
"supports_commit": True,
"supports_rollback": True,
"supports_defaults": False,
"supports_onbox_diff": True,
"supports_commit_comment": True,
"supports_multiline_delimiter": False,
"supports_diff_match": False,
"supports_diff_ignore_lines": False,
"supports_generate_diff": False,
"supports_replace": True,
}
def get_option_values(self):
return {
"format": ["text", "set", "xml", "json"],
"diff_match": [],
"diff_replace": [],
"output": ["text", "set", "xml", "json"],
}
def get_capabilities(self):
result = super(Cliconf, self).get_capabilities()
result["rpc"] += [
"commit",
"discard_changes",
"run_commands",
"compare_configuration",
"validate",
"get_diff",
]
result["device_operations"] = self.get_device_operations()
result.update(self.get_option_values())
return json.dumps(result)
def set_cli_prompt_context(self):
"""
Make sure we are in the operational cli mode
:return: None
"""
if self._connection.connected:
self._update_cli_prompt_context(config_context="#")
def _get_command_with_output(self, command, output):
options_values = self.get_option_values()
if output not in options_values["output"]:
raise ValueError(
"'output' value %s is invalid. Valid values are %s"
% (output, ",".join(options_values["output"])),
)
if output == "json" and not command.endswith("| display json"):
cmd = "%s | display json" % command
elif output == "xml" and not command.endswith("| display xml"):
cmd = "%s | display xml" % command
elif output == "text" and (
command.endswith("| display json") or command.endswith("| display xml")
):
cmd = command.rsplit("|", 1)[0]
else:
cmd = command
return cmd

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
__metaclass__ = type
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r"""options: {}
notes:
- For information on using CLI and netconf see the :ref:`Junos OS Platform Options
guide <junos_platform_options>`
- For more information on using Ansible to manage network devices see the :ref:`Ansible
Network Guide <network_guide>`
- For more information on using Ansible to manage Juniper network devices see U(https://www.ansible.com/ansible-juniper).
"""

View File

@@ -0,0 +1,80 @@
#
# -*- coding: utf-8 -*-
# Copyright 2020 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_acl_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Acl_interfacesArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_acl_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"access_groups": {
"elements": "dict",
"options": {
"acls": {
"elements": "dict",
"options": {
"direction": {
"choices": ["in", "out"],
"type": "str",
},
"name": {"type": "str"},
},
"type": "list",
},
"afi": {"choices": ["ipv4", "ipv6"], "type": "str"},
},
"type": "list",
},
"name": {"type": "str"},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,211 @@
#
# _*_ coding: utf_8 _*_
# Copyright 2020 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl_3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_acls module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class AclsArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_acls module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"type": "list",
"options": {
"afi": {
"required": True,
"choices": ["ipv4", "ipv6"],
"type": "str",
},
"acls": {
"elements": "dict",
"type": "list",
"options": {
"name": {"required": True, "type": "str"},
"aces": {
"elements": "dict",
"type": "list",
"options": {
"name": {"required": True, "type": "str"},
"source": {
"type": "dict",
"options": {
"address": {"type": "raw"},
"prefix_list": {
"elements": "dict",
"type": "list",
"options": {
"name": {"type": "str"},
},
},
"port_protocol": {
"type": "dict",
"options": {
"eq": {"type": "str"},
"range": {
"type": "dict",
"options": {
"start": {
"type": "int",
},
"end": {"type": "int"},
},
},
},
},
},
},
"destination": {
"type": "dict",
"options": {
"address": {"type": "raw"},
"prefix_list": {
"elements": "dict",
"type": "list",
"options": {
"name": {"type": "str"},
},
},
"port_protocol": {
"type": "dict",
"options": {
"eq": {"type": "str"},
"range": {
"type": "dict",
"options": {
"start": {
"type": "int",
},
"end": {"type": "int"},
},
},
},
},
},
},
"protocol": {"type": "str"},
"protocol_options": {
"type": "dict",
"options": {
"icmp": {
"type": "dict",
"options": {
"dod_host_prohibited": {
"type": "bool",
},
"dod_net_prohibited": {
"type": "bool",
},
"echo": {"type": "bool"},
"echo_reply": {"type": "bool"},
"host_tos_unreachable": {
"type": "bool",
},
"host_redirect": {
"type": "bool",
},
"host_tos_redirect": {
"type": "bool",
},
"host_unknown": {
"type": "bool",
},
"host_unreachable": {
"type": "bool",
},
"net_redirect": {
"type": "bool",
},
"net_tos_redirect": {
"type": "bool",
},
"network_unknown": {
"type": "bool",
},
"port_unreachable": {
"type": "bool",
},
"protocol_unreachable": {
"type": "bool",
},
"reassembly_timeout": {
"type": "bool",
},
"redirect": {"type": "bool"},
"router_advertisement": {
"type": "bool",
},
"router_solicitation": {
"type": "bool",
},
"source_route_failed": {
"type": "bool",
},
"time_exceeded": {
"type": "bool",
},
"ttl_exceeded": {
"type": "bool",
},
},
},
},
},
"grant": {
"type": "str",
"choices": ["permit", "deny"],
},
},
},
},
},
},
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"parsed",
"gathered",
"rendered",
],
"default": "merged",
"type": "str",
},
}
# pylint: disable=C0301

View File

@@ -0,0 +1,894 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_bgp_address_family module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Bgp_address_familyArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_bgp_address_family module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"options": {
"address_family": {
"elements": "dict",
"options": {
"af_type": {
"elements": "dict",
"options": {
"accepted_prefix_limit": {
"options": {
"forever": {"type": "bool"},
"idle_timeout": {"type": "bool"},
"idle_timeout_value": {"type": "int"},
"limit_threshold": {"type": "int"},
"maximum": {"type": "int"},
"teardown": {"type": "bool"},
},
"type": "dict",
},
"add_path": {
"options": {
"receive": {"type": "bool"},
"send": {
"options": {
"include_backup_path": {
"type": "int",
},
"multipath": {"type": "bool"},
"path_count": {
"required": True,
"type": "int",
},
"path_selection_mode": {
"options": {
"all_paths": {
"type": "bool",
},
"equal_cost_paths": {
"type": "bool",
},
},
"type": "dict",
},
"prefix_policy": {
"type": "str",
},
},
"type": "dict",
},
},
"type": "dict",
},
"aggregate_label": {
"options": {
"community": {"type": "str"},
"set": {"type": "bool"},
},
"type": "dict",
},
"aigp": {
"options": {
"disable": {"type": "bool"},
"set": {"type": "bool"},
},
"type": "dict",
},
"damping": {"type": "bool"},
"defer_initial_multipath_build": {
"options": {
"maximum_delay": {"type": "int"},
"set": {"type": "bool"},
},
"type": "dict",
},
"delay_route_advertisements": {
"options": {
"max_delay_route_age": {"type": "int"},
"max_delay_routing_uptime": {
"type": "int",
},
"min_delay_inbound_convergence": {
"type": "int",
},
"min_delay_routing_uptime": {
"type": "int",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"entropy_label": {
"options": {
"import": {"type": "str"},
"no_next_hop_validation": {
"type": "bool",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"explicit_null": {
"options": {
"connected_only": {"type": "bool"},
"set": {"type": "bool"},
},
"type": "dict",
},
"extended_nexthop": {"type": "bool"},
"extended_nexthop_color": {"type": "bool"},
"graceful_restart_forwarding_state_bit": {
"choices": ["from-fib", "set"],
"type": "str",
},
"legacy_redirect_ip_action": {
"options": {
"receive": {"type": "bool"},
"send": {"type": "bool"},
"set": {"type": "bool"},
},
"type": "dict",
},
"local_ipv4_address": {"type": "str"},
"loops": {"type": "int"},
"no_install": {"type": "bool"},
"no_validate": {"type": "str"},
"output_queue_priority_expedited": {
"type": "bool",
},
"output_queue_priority_priority": {
"type": "int",
},
"per_group_label": {"type": "bool"},
"per_prefix_label": {"type": "bool"},
"prefix_limit": {
"options": {
"forever": {"type": "bool"},
"idle_timeout": {"type": "bool"},
"idle_timeout_value": {"type": "int"},
"limit_threshold": {"type": "int"},
"maximum": {"type": "int"},
"teardown": {"type": "bool"},
},
"type": "dict",
},
"resolve_vpn": {"type": "bool"},
"rib": {"choices": ["inet.3"], "type": "str"},
"ribgroup_name": {"type": "str"},
"route_refresh_priority_expedited": {
"type": "bool",
},
"route_refresh_priority_priority": {
"type": "int",
},
"secondary_independent_resolution": {
"type": "bool",
},
"set": {"type": "bool"},
"strip_nexthop": {"type": "bool"},
"topology": {
"elements": "dict",
"options": {
"community": {
"elements": "str",
"type": "list",
},
"name": {"type": "str"},
},
"type": "list",
},
"traffic_statistics": {
"options": {
"file": {
"options": {
"filename": {"type": "str"},
"files": {"type": "int"},
"no_world_readable": {
"type": "bool",
},
"size": {"type": "int"},
"world_readable": {
"type": "bool",
},
},
"type": "dict",
},
"interval": {"type": "int"},
"labeled_path": {"type": "bool"},
"set": {"type": "bool"},
},
"type": "dict",
},
"type": {
"choices": [
"any",
"flow",
"labeled-unicast",
"multicast",
"segment-routing-te",
"unicast",
"signaling",
"auto-discovery-mspw",
"auto-discovery-only",
],
"type": "str",
},
"withdraw_priority_expedited": {
"type": "bool",
},
"withdraw_priority_priority": {"type": "int"},
},
"type": "list",
},
"afi": {
"choices": [
"evpn",
"inet",
"inet-mdt",
"inet-mvpn",
"inet-vpn",
"inet6",
"inet6-mvpn",
"inet6-vpn",
"iso-vpn",
"l2vpn",
"route-target",
"traffic-engineering",
],
"type": "str",
},
},
"type": "list",
},
"groups": {
"elements": "dict",
"options": {
"address_family": {
"elements": "dict",
"options": {
"af_type": {
"elements": "dict",
"options": {
"accepted_prefix_limit": {
"options": {
"forever": {"type": "bool"},
"idle_timeout": {
"type": "bool",
},
"idle_timeout_value": {
"type": "int",
},
"limit_threshold": {
"type": "int",
},
"maximum": {"type": "int"},
"teardown": {"type": "bool"},
},
"type": "dict",
},
"add_path": {
"options": {
"receive": {"type": "bool"},
"send": {
"options": {
"include_backup_path": {
"type": "int",
},
"multipath": {
"type": "bool",
},
"path_count": {
"required": True,
"type": "int",
},
"path_selection_mode": {
"options": {
"all_paths": {
"type": "bool",
},
"equal_cost_paths": {
"type": "bool",
},
},
"type": "dict",
},
"prefix_policy": {
"type": "str",
},
},
"type": "dict",
},
},
"type": "dict",
},
"aggregate_label": {
"options": {
"community": {"type": "str"},
"set": {"type": "bool"},
},
"type": "dict",
},
"aigp": {
"options": {
"disable": {"type": "bool"},
"set": {"type": "bool"},
},
"type": "dict",
},
"damping": {"type": "bool"},
"defer_initial_multipath_build": {
"options": {
"maximum_delay": {
"type": "int",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"delay_route_advertisements": {
"options": {
"max_delay_route_age": {
"type": "int",
},
"max_delay_routing_uptime": {
"type": "int",
},
"min_delay_inbound_convergence": {
"type": "int",
},
"min_delay_routing_uptime": {
"type": "int",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"entropy_label": {
"options": {
"import": {"type": "str"},
"no_next_hop_validation": {
"type": "bool",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"explicit_null": {
"options": {
"connected_only": {
"type": "bool",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"extended_nexthop": {"type": "bool"},
"extended_nexthop_color": {
"type": "bool",
},
"graceful_restart_forwarding_state_bit": {
"choices": ["from-fib", "set"],
"type": "str",
},
"legacy_redirect_ip_action": {
"options": {
"receive": {"type": "bool"},
"send": {"type": "bool"},
"set": {"type": "bool"},
},
"type": "dict",
},
"local_ipv4_address": {"type": "str"},
"loops": {"type": "int"},
"no_install": {"type": "bool"},
"no_validate": {"type": "str"},
"output_queue_priority_expedited": {
"type": "bool",
},
"output_queue_priority_priority": {
"type": "int",
},
"per_group_label": {"type": "bool"},
"per_prefix_label": {"type": "bool"},
"prefix_limit": {
"options": {
"forever": {"type": "bool"},
"idle_timeout": {
"type": "bool",
},
"idle_timeout_value": {
"type": "int",
},
"limit_threshold": {
"type": "int",
},
"maximum": {"type": "int"},
"teardown": {"type": "bool"},
},
"type": "dict",
},
"resolve_vpn": {"type": "bool"},
"rib": {
"choices": ["inet.3"],
"type": "str",
},
"ribgroup_name": {"type": "str"},
"route_refresh_priority_expedited": {
"type": "bool",
},
"route_refresh_priority_priority": {
"type": "int",
},
"secondary_independent_resolution": {
"type": "bool",
},
"set": {"type": "bool"},
"strip_nexthop": {"type": "bool"},
"topology": {
"elements": "dict",
"options": {
"community": {
"elements": "str",
"type": "list",
},
"name": {"type": "str"},
},
"type": "list",
},
"traffic_statistics": {
"options": {
"file": {
"options": {
"filename": {
"type": "str",
},
"files": {
"type": "int",
},
"no_world_readable": {
"type": "bool",
},
"size": {
"type": "int",
},
"world_readable": {
"type": "bool",
},
},
"type": "dict",
},
"interval": {"type": "int"},
"labeled_path": {
"type": "bool",
},
"set": {"type": "bool"},
},
"type": "dict",
},
"type": {
"choices": [
"any",
"flow",
"labeled-unicast",
"multicast",
"segment-routing-te",
"unicast",
"signaling",
"auto-discovery-mspw",
"auto-discovery-only",
],
"type": "str",
},
"withdraw_priority_expedited": {
"type": "bool",
},
"withdraw_priority_priority": {
"type": "int",
},
},
"type": "list",
},
"afi": {
"choices": [
"evpn",
"inet",
"inet-mdt",
"inet-mvpn",
"inet-vpn",
"inet6",
"inet6-mvpn",
"inet6-vpn",
"iso-vpn",
"l2vpn",
"route-target",
"traffic-engineering",
],
"type": "str",
},
},
"type": "list",
},
"name": {"type": "str"},
"neighbors": {
"elements": "dict",
"options": {
"address_family": {
"elements": "dict",
"options": {
"af_type": {
"elements": "dict",
"options": {
"accepted_prefix_limit": {
"options": {
"forever": {
"type": "bool",
},
"idle_timeout": {
"type": "bool",
},
"idle_timeout_value": {
"type": "int",
},
"limit_threshold": {
"type": "int",
},
"maximum": {
"type": "int",
},
"teardown": {
"type": "bool",
},
},
"type": "dict",
},
"add_path": {
"options": {
"receive": {
"type": "bool",
},
"send": {
"options": {
"include_backup_path": {
"type": "int",
},
"multipath": {
"type": "bool",
},
"path_count": {
"required": True,
"type": "int",
},
"path_selection_mode": {
"options": {
"all_paths": {
"type": "bool",
},
"equal_cost_paths": {
"type": "bool",
},
},
"type": "dict",
},
"prefix_policy": {
"type": "str",
},
},
"type": "dict",
},
},
"type": "dict",
},
"aggregate_label": {
"options": {
"community": {
"type": "str",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"aigp": {
"options": {
"disable": {
"type": "bool",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"damping": {"type": "bool"},
"defer_initial_multipath_build": {
"options": {
"maximum_delay": {
"type": "int",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"delay_route_advertisements": {
"options": {
"max_delay_route_age": {
"type": "int",
},
"max_delay_routing_uptime": {
"type": "int",
},
"min_delay_inbound_convergence": {
"type": "int",
},
"min_delay_routing_uptime": {
"type": "int",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"entropy_label": {
"options": {
"import": {
"type": "str",
},
"no_next_hop_validation": {
"type": "bool",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"explicit_null": {
"options": {
"connected_only": {
"type": "bool",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"extended_nexthop": {
"type": "bool",
},
"extended_nexthop_color": {
"type": "bool",
},
"graceful_restart_forwarding_state_bit": {
"choices": [
"from-fib",
"set",
],
"type": "str",
},
"legacy_redirect_ip_action": {
"options": {
"receive": {
"type": "bool",
},
"send": {
"type": "bool",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"local_ipv4_address": {
"type": "str",
},
"loops": {"type": "int"},
"no_install": {"type": "bool"},
"no_validate": {"type": "str"},
"output_queue_priority_expedited": {
"type": "bool",
},
"output_queue_priority_priority": {
"type": "int",
},
"per_group_label": {
"type": "bool",
},
"per_prefix_label": {
"type": "bool",
},
"prefix_limit": {
"options": {
"forever": {
"type": "bool",
},
"idle_timeout": {
"type": "bool",
},
"idle_timeout_value": {
"type": "int",
},
"limit_threshold": {
"type": "int",
},
"maximum": {
"type": "int",
},
"teardown": {
"type": "bool",
},
},
"type": "dict",
},
"resolve_vpn": {
"type": "bool",
},
"rib": {
"choices": ["inet.3"],
"type": "str",
},
"ribgroup_name": {
"type": "str",
},
"route_refresh_priority_expedited": {
"type": "bool",
},
"route_refresh_priority_priority": {
"type": "int",
},
"secondary_independent_resolution": {
"type": "bool",
},
"set": {"type": "bool"},
"strip_nexthop": {
"type": "bool",
},
"topology": {
"elements": "dict",
"options": {
"community": {
"elements": "str",
"type": "list",
},
"name": {
"type": "str",
},
},
"type": "list",
},
"traffic_statistics": {
"options": {
"file": {
"options": {
"filename": {
"type": "str",
},
"files": {
"type": "int",
},
"no_world_readable": {
"type": "bool",
},
"size": {
"type": "int",
},
"world_readable": {
"type": "bool",
},
},
"type": "dict",
},
"interval": {
"type": "int",
},
"labeled_path": {
"type": "bool",
},
"set": {
"type": "bool",
},
},
"type": "dict",
},
"type": {
"choices": [
"any",
"flow",
"labeled-unicast",
"multicast",
"segment-routing-te",
"unicast",
"signaling",
"auto-discovery-mspw",
"auto-discovery-only",
],
"type": "str",
},
"withdraw_priority_expedited": {
"type": "bool",
},
"withdraw_priority_priority": {
"type": "int",
},
},
"type": "list",
},
"afi": {
"choices": [
"evpn",
"inet",
"inet-mdt",
"inet-mvpn",
"inet-vpn",
"inet6",
"inet6-mvpn",
"inet6-vpn",
"iso-vpn",
"l2vpn",
"route-target",
"traffic-engineering",
],
"type": "str",
},
},
"type": "list",
},
"neighbor_address": {"type": "str"},
},
"type": "list",
},
},
"type": "list",
},
},
"type": "dict",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"rendered",
"gathered",
"parsed",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,29 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The arg spec for the junos facts module.
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class FactsArgs(object):
"""The arg spec for the junos facts module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"gather_subset": dict(default=["min"], type="list", elements="str"),
"config_format": dict(
default="text",
choices=["xml", "text", "set", "json"],
),
"gather_network_resources": dict(type="list", elements="str"),
"available_network_resources": {"type": "bool", "default": False},
}

View File

@@ -0,0 +1,56 @@
#
# -*- coding: utf-8 -*-
# Copyright 2021 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_hostname module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class HostnameArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_hostname module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {"options": {"hostname": {"type": "str"}}, "type": "dict"},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"deleted",
"overridden",
"parsed",
"gathered",
"rendered",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,86 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class InterfacesArgs(object):
"""The arg spec for the junos_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"description": {"type": "str"},
"duplex": {
"choices": ["automatic", "full-duplex", "half-duplex"],
"type": "str",
},
"enabled": {"default": True, "type": "bool"},
"hold_time": {
"options": {
"down": {"type": "int"},
"up": {"type": "int"},
},
"required_together": [["down", "up"]],
"type": "dict",
},
"mtu": {"type": "int"},
"name": {"required": True, "type": "str"},
"speed": {"type": "str"},
"units": {
"elements": "dict",
"options": {
"name": {"type": "int"},
"description": {"type": "str"},
},
"type": "list",
},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,75 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_l2_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class L2_interfacesArgs(object):
"""The arg spec for the junos_l2_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"access": {
"type": "dict",
"options": {"vlan": {"type": "str"}},
},
"name": {"required": True, "type": "str"},
"trunk": {
"type": "dict",
"options": {
"allowed_vlans": {"elements": "str", "type": "list"},
"native_vlan": {"type": "str"},
},
},
"unit": {"type": "int"},
"enhanced_layer": {"type": "bool"},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The arg spec for the junos_l3_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class L3_interfacesArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_l3_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"ipv4": {
"elements": "dict",
"options": {"address": {"type": "str"}},
"type": "list",
},
"ipv6": {
"elements": "dict",
"options": {"address": {"type": "str"}},
"type": "list",
},
"name": {"required": True, "type": "str"},
"unit": {"type": "int", "default": 0},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"parsed",
"rendered",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,64 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_lacp module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class LacpArgs(object):
"""The arg spec for the junos_lacp module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"type": "dict",
"options": {
"link_protection": {
"choices": ["revertive", "non-revertive"],
"type": "str",
},
"system_priority": {"type": "int"},
},
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,79 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_lacp_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Lacp_interfacesArgs(object):
"""The arg spec for the junos_lacp_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"force_up": {"type": "bool"},
"name": {"type": "str"},
"period": {"choices": ["fast", "slow"]},
"port_priority": {"type": "int"},
"sync_reset": {
"choices": ["disable", "enable"],
"type": "str",
},
"system": {
"options": {
"mac": {
"type": "dict",
"options": {"address": {"type": "str"}},
},
"priority": {"type": "int"},
},
"type": "dict",
},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,72 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_lag_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Lag_interfacesArgs(object):
"""The arg spec for the junos_lag_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"members": {
"elements": "dict",
"options": {
"link_type": {"choices": ["primary", "backup"]},
"member": {"type": "str"},
},
"type": "list",
},
"mode": {"choices": ["active", "passive"]},
"name": {"required": True, "type": "str"},
"link_protection": {"type": "bool"},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"parsed",
"rendered",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,64 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_lldp module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Lldp_globalArgs(object):
"""The arg spec for the junos_lldp module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"options": {
"address": {"type": "str"},
"enabled": {"type": "bool"},
"hold_multiplier": {"type": "int"},
"interval": {"type": "int"},
"transmit_delay": {"type": "int"},
},
"type": "dict",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,63 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_lldp_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Lldp_interfacesArgs(object):
"""The arg spec for the junos_lldp_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"enabled": {"type": "bool"},
"name": {"required": True, "type": "str"},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"deleted",
"overridden",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
}

View File

@@ -0,0 +1,133 @@
#
# -*- coding: utf-8 -*-
# Copyright 2021 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_ntp_global module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Ntp_globalArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_ntp_global module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"options": {
"authentication_keys": {
"elements": "dict",
"no_log": False,
"options": {
"algorithm": {
"choices": ["md5", "sha1", "sha256"],
"type": "str",
},
"id": {"type": "int"},
"key": {"type": "str", "no_log": True},
},
"type": "list",
},
"boot_server": {"type": "str"},
"broadcast_client": {"type": "bool"},
"broadcasts": {
"elements": "dict",
"options": {
"address": {"type": "str"},
"key": {"type": "str", "no_log": False},
"routing_instance_name": {"type": "str"},
"ttl": {"type": "int"},
"version": {"type": "int"},
},
"type": "list",
},
"interval_range": {"type": "int"},
"multicast_client": {"type": "str"},
"peers": {
"elements": "dict",
"options": {
"key_id": {"type": "int", "no_log": False},
"peer": {"type": "str"},
"prefer": {"type": "bool"},
"version": {"type": "int"},
},
"type": "list",
},
"servers": {
"elements": "dict",
"options": {
"key_id": {"type": "int"},
"prefer": {"type": "bool"},
"routing_instance": {"type": "str"},
"server": {"type": "str"},
"version": {"type": "int"},
},
"type": "list",
},
"source_addresses": {
"elements": "dict",
"options": {
"routing_instance": {"type": "str"},
"source_address": {"type": "str"},
},
"type": "list",
},
"threshold": {
"options": {
"action": {
"choices": ["accept", "reject"],
"type": "str",
},
"value": {"type": "int"},
},
"type": "dict",
},
"trusted_keys": {
"type": "list",
"elements": "dict",
"no_log": False,
"options": {"key_id": {"type": "int"}},
},
},
"type": "dict",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"deleted",
"overridden",
"parsed",
"gathered",
"rendered",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,141 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by the resource
# module builder playbook.
#
# Do not edit this file manually.
#
# Changes to this file will be over written
# by the resource module builder.
#
# Changes should be made in the model used to
# generate this file or in the resource module
# builder template.
#
#############################################
"""
The arg spec for the junos_ospf_interfaces module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Ospf_interfacesArgs(object): # pylint: disable=R0903
"""The arg spec for the junos_ospf_interfaces module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"router_id": {"type": "str"},
"address_family": {
"elements": "dict",
"options": {
"afi": {
"choices": ["ipv4", "ipv6"],
"required": True,
"type": "str",
},
"processes": {
"options": {
"area": {
"options": {"area_id": {"type": "str"}},
"type": "dict",
},
"authentication": {
"options": {
"md5": {
"options": {
"key_id": {"type": "str"},
"key_value": {
"type": "str",
"no_log": True,
},
"start_time": {"type": "str"},
},
"type": "dict",
},
"simple_password": {
"type": "str",
"no_log": True,
},
},
"type": "dict",
},
"bandwidth_based_metrics": {
"elements": "dict",
"options": {
"bandwidth": {
"choices": ["1g", "10g"],
"type": "str",
},
"metric": {"type": "int"},
},
"type": "list",
},
"dead_interval": {"type": "int"},
"demand_circuit": {"type": "bool"},
"flood_reduction": {"type": "bool"},
"hello_interval": {"type": "int"},
"interface_type": {
"choices": ["nbma", "p2mp", "p2p"],
"type": "str",
},
"ipsec_sa": {"type": "str"},
"metric": {"type": "int"},
"mtu": {"type": "int"},
"no_advertise_adjacency_segment": {
"type": "bool",
},
"no_eligible_backup": {"type": "bool"},
"no_eligible_remote_backup": {"type": "bool"},
"no_interface_state_traps": {"type": "bool"},
"no_neighbor_down_notification": {
"type": "bool",
},
"node_link_protection": {"type": "str"},
"poll_interval": {"type": "int"},
"priority": {"type": "int"},
"passive": {"type": "bool"},
"retransmit_interval": {"type": "int"},
"secondary": {"type": "bool"},
"te_metric": {"type": "int"},
"transit_delay": {"type": "int"},
},
"type": "dict",
},
},
"type": "list",
},
"name": {"required": True, "type": "str"},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"parsed",
"rendered",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,125 @@
# Copyright (C) 2020 Red Hat, Inc.
#
# This program 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.
#
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
"""
The arg spec for the junos_ospfv2 module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Ospfv2Args(object): # pylint: disable=R0903
"""The arg spec for the junos_ospfv2 module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"router_id": {"type": "str"},
"areas": {
"elements": "dict",
"options": {
"area_id": {"required": True, "type": "str"},
"area_range": {"type": "str"},
"stub": {
"type": "dict",
"options": {
"default_metric": {"type": "int"},
"set": {"type": "bool"},
},
},
"interfaces": {
"elements": "dict",
"options": {
"authentication": {
"type": "dict",
"options": {"type": {"type": "dict"}},
},
"bandwidth_based_metrics": {
"elements": "dict",
"options": {
"bandwidth": {
"choices": ["1g", "10g"],
"type": "str",
},
"metric": {"type": "int"},
},
"type": "list",
},
"name": {"required": True, "type": "str"},
"priority": {"type": "int"},
"metric": {"type": "int"},
"flood_reduction": {"type": "bool"},
"passive": {"type": "bool"},
"timers": {
"type": "dict",
"options": {
"dead_interval": {"type": "int"},
"hello_interval": {"type": "int"},
"poll_interval": {"type": "int"},
"retransmit_interval": {"type": "int"},
"transit_delay": {"type": "int"},
},
},
},
"type": "list",
},
},
"type": "list",
},
"external_preference": {"type": "int"},
"overload": {
"type": "dict",
"options": {"timeout": {"type": "int"}},
},
"preference": {"type": "int"},
"prefix_export_limit": {"type": "int"},
"reference_bandwidth": {
"choices": ["1g", "10g"],
"type": "str",
},
"rfc1583compatibility": {"type": "bool"},
"spf_options": {
"type": "dict",
"options": {
"delay": {"type": "int"},
"holddown": {"type": "int"},
"rapid_runs": {"type": "int"},
},
},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

View File

@@ -0,0 +1,125 @@
# Copyright (C) 2020 Red Hat, Inc.
#
# This program 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.
#
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
"""
The arg spec for the junos_ospfv3 module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class Ospfv3Args(object): # pylint: disable=R0903
"""The arg spec for the junos_ospfv3 module"""
def __init__(self, **kwargs):
pass
argument_spec = {
"config": {
"elements": "dict",
"options": {
"router_id": {"type": "str"},
"areas": {
"elements": "dict",
"options": {
"area_id": {"required": True, "type": "str"},
"area_range": {"type": "str"},
"stub": {
"type": "dict",
"options": {
"default_metric": {"type": "int"},
"set": {"type": "bool"},
},
},
"interfaces": {
"elements": "dict",
"options": {
"authentication": {
"type": "dict",
"options": {"type": {"type": "dict"}},
},
"bandwidth_based_metrics": {
"elements": "dict",
"options": {
"bandwidth": {
"choices": ["1g", "10g"],
"type": "str",
},
"metric": {"type": "int"},
},
"type": "list",
},
"name": {"required": True, "type": "str"},
"priority": {"type": "int"},
"metric": {"type": "int"},
"flood_reduction": {"type": "bool"},
"passive": {"type": "bool"},
"timers": {
"type": "dict",
"options": {
"dead_interval": {"type": "int"},
"hello_interval": {"type": "int"},
"poll_interval": {"type": "int"},
"retransmit_interval": {"type": "int"},
"transit_delay": {"type": "int"},
},
},
},
"type": "list",
},
},
"type": "list",
},
"external_preference": {"type": "int"},
"overload": {
"type": "dict",
"options": {"timeout": {"type": "int"}},
},
"preference": {"type": "int"},
"prefix_export_limit": {"type": "int"},
"reference_bandwidth": {
"choices": ["1g", "10g"],
"type": "str",
},
"rfc1583compatibility": {"type": "bool"},
"spf_options": {
"type": "dict",
"options": {
"delay": {"type": "int"},
"holddown": {"type": "int"},
"rapid_runs": {"type": "int"},
},
},
},
"type": "list",
},
"running_config": {"type": "str"},
"state": {
"choices": [
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
"rendered",
"parsed",
],
"default": "merged",
"type": "str",
},
} # pylint: disable=C0301

Some files were not shown because too many files have changed in this diff Show More