����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: ~ $
# -*- 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 module file for nxos_interfaces
"""

from __future__ import absolute_import, division, print_function


__metaclass__ = type


DOCUMENTATION = """
module: nxos_interfaces
short_description: Interfaces resource module
description: This module manages the interface attributes of NX-OS interfaces.
version_added: 1.0.0
author: Trishna Guha (@trishnaguha)
notes:
- Tested against NXOS 7.3.(0)D1(1) on VIRL
- Unsupported for Cisco MDS
options:
  running_config:
    description:
    - This option is used only with state I(parsed).
    - The value of this option should be the output received from the NX-OS device
      by executing the command B(show running-config | section ^interface)
    - The state I(parsed) reads the configuration from C(running_config) option and
      transforms it into Ansible structured data as per the resource module's argspec
      and the value is then returned in the I(parsed) key within the result.
    type: str
  config:
    description: A dictionary of interface options
    type: list
    elements: dict
    suboptions:
      name:
        description:
        - Full name of interface, e.g. Ethernet1/1, port-channel10.
        type: str
        required: true
      description:
        description:
        - Interface description.
        type: str
      enabled:
        description:
        - Administrative state of the interface. Set the value to C(true) to
          administratively enable the interface or C(false) to disable it
        type: bool
      speed:
        description:
        - Interface link speed. Applicable for Ethernet interfaces only.
        type: str
      mode:
        description:
        - Manage Layer2 or Layer3 state of the interface. Applicable for Ethernet
          and port channel interfaces only.
        choices:
        - layer2
        - layer3
        type: str
      mtu:
        description:
        - MTU for a specific interface. Must be an even number between 576 and 9216.
          Applicable for Ethernet interfaces only.
        type: str
      duplex:
        description:
        - Interface link status. Applicable for Ethernet interfaces only.
        type: str
        choices:
        - full
        - half
        - auto
      ip_forward:
        description:
        - Enable or disable IP forward feature on SVIs. Set the value to C(true) to
          enable  or C(false) to disable.
        type: bool
      fabric_forwarding_anycast_gateway:
        description:
        - Associate SVI with anycast gateway under VLAN configuration mode. Applicable
          for SVI interfaces only.
        type: bool
  state:
    description:
    - The state of the configuration after module completion
    - The state I(rendered) considers the system default mode for interfaces to be
      "Layer 3" and the system default state for interfaces to be shutdown.
    - The state I(purged) negates virtual interfaces that are specified in task
      from running-config.
    type: str
    choices:
    - merged
    - replaced
    - overridden
    - deleted
    - gathered
    - rendered
    - parsed
    - purged
    default: merged

"""
EXAMPLES = """
# Using merged

# Before state:
# -------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
#   description testing
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

- name: Merge provided configuration with device configuration
  cisco.nxos.nxos_interfaces:
    config:
    - name: Ethernet1/1
      description: Configured by Ansible
      enabled: true
    - name: Ethernet1/2
      description: Configured by Ansible Network
      enabled: false
    state: merged

# Task Output
# -----------
#
# before:
# - description: testing
#   name: Ethernet1/1
# - description: mgmt interface
#   name: mgmt0
# commands:
# - interface Ethernet1/1
# - description Configured by Ansible
# - interface Ethernet1/2
# - description Configured by Ansible Network
# - shutdown
# after:
# - description: Configured by Ansible
#   name: Ethernet1/1
# - description: Configured by Ansible Network
#   enabled: false
#   name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0

# After state:
# ------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
#   description Configured by Ansible
# interface Ethernet1/2
#   description Configured by Ansible Network
#   shutdown
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

# Using replaced

# Before state:
# -------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
#   description Updated by Ansible
# interface Ethernet1/2
#   description Configured by Ansible Network
#   shutdown
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

- name: Replaces device configuration of listed interfaces with provided configuration
  cisco.nxos.nxos_interfaces:
    config:
    - name: Ethernet1/1
      description: Configured by Ansible
      enabled: true
      mtu: 9000
    - name: Ethernet1/2
      description: Configured by Ansible Network
      enabled: false
      mode: layer2
    state: replaced

# Task Output
# -----------
#
# before:
# - description: Updated by Ansible
#   name: Ethernet1/1
# - description: Configured by Ansible Network
#   enabled: false
#   name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0
# commands:
# - interface Ethernet1/1
# - mtu 1500
# - interface Ethernet1/2
# - description Updated by Ansible
# after:
# - description: Updated by Ansible
#   name: Ethernet1/1
# - description: Updated by Ansible
#   enabled: false
#   name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0

# After state:
# ------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
#   description Updated by Ansible
# interface Ethernet1/2
#   description Updated by Ansible
#   shutdown
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

# Using overridden

# Before state:
# -------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
#   description Updated by Ansible
# interface Ethernet1/2
#   description Updated by Ansible
#   shutdown
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

- name: Override device configuration of all interfaces with provided configuration
  cisco.nxos.nxos_interfaces:
    config:
    - name: Ethernet1/1
      enabled: true
    - name: Ethernet1/2
      description: Configured by Ansible Network
      enabled: false
    - description: mgmt interface
      name: mgmt0
    state: overridden

# Task Output
# -----------
#
# before:
# - description: Updated by Ansible
#   name: Ethernet1/1
# - description: Updated by Ansible
#   enabled: false
#   name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0
# commands:
# - interface Ethernet1/1
# - no description
# - interface Ethernet1/2
# - description Configured by Ansible Network
# after:
# - name: Ethernet1/1
# - description: Configured by Ansible Network
#   enabled: false
#   name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0

# After state:
# ------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
# interface Ethernet1/2
#   description Configured by Ansible Network
#   shutdown
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

# Using deleted

# Before state:
# -------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
# interface Ethernet1/2
#   description Configured by Ansible Network
#   shutdown
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

- name: Delete or return interface parameters to default settings
  cisco.nxos.nxos_interfaces:
    config:
    - name: Ethernet1/2
    state: deleted

# Task Output
# -----------
#
# before:
# - name: Ethernet1/1
# - description: Configured by Ansible Network
#   enabled: false
#   name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0
# commands:
# - interface Ethernet1/2
# - no description
# - no shutdown
# after:
# - name: Ethernet1/1
# - name: Ethernet1/2
# - description: mgmt interface
#   name: mgmt0

# After state:
# ------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
# interface Ethernet1/2
# interface mgmt0
#   description mgmt interface
#   ip address dhcp
#   vrf member management

# Using rendered

- name: Use rendered state to convert task input to device specific commands
  cisco.nxos.nxos_interfaces:
    config:
    - name: Ethernet1/1
      description: outbound-intf
      mode: layer3
      speed: 100
    - name: Ethernet1/2
      mode: layer2
      enabled: true
      duplex: full
    state: rendered

# Task Output
# -----------
#
# rendered:
#   - "interface Ethernet1/1"
#   - "description outbound-intf"
#   - "speed 100"
#   - "interface Ethernet1/2"
#   - "switchport"
#   - "duplex full"
#   - "no shutdown"

# Using parsed

# parsed.cfg
# ------------
#
# interface Ethernet1/800
#   description test-1
#   speed 1000
#   shutdown
#   no switchport
#   duplex half
# interface Ethernet1/801
#   description test-2
#   switchport
#   no shutdown
#   mtu 1800

- name: Use parsed state to convert externally supplied config to structured format
  cisco.nxos.nxos_interfaces:
    running_config: "{{ lookup('file', 'parsed.cfg') }}"
    state: parsed

# Task output
# -----------
#
#  parsed:
#    - description: "test-1"
#      duplex: "half"
#      enabled: false
#      mode: "layer3"
#      name: "Ethernet1/800"
#      speed: "1000"
#    - description: "test-2"
#      enabled: true
#      mode: "layer2"
#      mtu: "1800"
#      name: "Ethernet1/801"

# Using gathered

# Before state:
# -------------
#
# switch# show running-config | section interface
# interface Ethernet1/1
#   description outbound-intf
#   switchport
#   no shutdown
# interface Ethernet1/2
#   description intf-l3
#   speed 1000
# interface Ethernet1/3
# interface Ethernet1/4
# interface Ethernet1/5

- name: Gather interfaces facts from the device using nxos_interfaces
  cisco.nxos.nxos_interfaces:
    state: gathered

# Task output
# -----------
#
# - name: Ethernet1/1
#   description: outbound-intf
#   mode: layer2
#   enabled: True
# - name: Ethernet1/2
#   description: intf-l3
#   speed: "1000"

# Using purged

# Before state:
# -------------
#
# switch# show running-config | section interface
# interface Vlan1
# interface Vlan42
#   mtu 1800
# interface port-channel10
# interface port-channel11
# interface Ethernet1/1
# interface Ethernet1/2
# interface Ethernet1/2.100
#   description sub-intf

- name: Purge virtual interfaces from running-config
  cisco.nxos.nxos_interfaces:
    config:
      - name: Vlan42
      - name: port-channel10
      - name: Ethernet1/2.100
    state: purged

# Task output
# ------------
#
# before:
#   - name: Vlan1
#   - mtu: '1800'
#     name: Vlan42
#   - name: port-channel10
#   - name: port-channel11
#   - name: Ethernet1/1
#   - name: Ethernet1/2
#   - description: sub-intf
#     name: Ethernet1/2.100
# commands:
#   - no interface port-channel10
#   - no interface Ethernet1/2.100
#   - no interface Vlan42
# after:
#   - name: Vlan1
#   - name: port-channel11
#   - name: Ethernet1/1
#   - name: Ethernet1/2

# After state:
# -------------
#
# switch# show running-config | section interface
# interface Vlan1
# interface port-channel11
# interface Ethernet1/1
# interface Ethernet1/2


"""
RETURN = """
before:
  description: The configuration as structured data prior to module invocation.
  returned: always
  type: list
  sample: >
    The configuration returned will always be in the same format
     of the parameters above.
after:
  description: The configuration as structured data after module completion.
  returned: when changed
  type: list
  sample: >
    The configuration returned will always be in the same format
     of the parameters above.
commands:
  description: The set of commands pushed to the remote device.
  returned: always
  type: list
  sample: ['interface Ethernet1/1', 'mtu 1800']
"""


from ansible.module_utils.basic import AnsibleModule

from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.interfaces.interfaces import (
    InterfacesArgs,
)
from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.interfaces.interfaces import (
    Interfaces,
)


def main():
    """
    Main entry point for module execution

    :returns: the result form module invocation
    """
    required_if = [
        ("state", "merged", ("config",)),
        ("state", "replaced", ("config",)),
        ("state", "overridden", ("config",)),
        ("state", "rendered", ("config",)),
        ("state", "parsed", ("running_config",)),
    ]
    mutually_exclusive = [("config", "running_config")]

    module = AnsibleModule(
        argument_spec=InterfacesArgs.argument_spec,
        required_if=required_if,
        mutually_exclusive=mutually_exclusive,
        supports_check_mode=True,
    )

    result = Interfaces(module).execute_module()
    module.exit_json(**result)


if __name__ == "__main__":
    main()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
storage Folder 0755
__init__.py File 0 B 0644
nxos_aaa_server.py File 10.19 KB 0644
nxos_aaa_server_host.py File 10.92 KB 0644
nxos_acl_interfaces.py File 10.21 KB 0644
nxos_acls.py File 28.71 KB 0644
nxos_banner.py File 6.44 KB 0644
nxos_bfd_global.py File 9.08 KB 0644
nxos_bfd_interfaces.py File 6.84 KB 0644
nxos_bgp.py File 25.3 KB 0644
nxos_bgp_address_family.py File 30.41 KB 0644
nxos_bgp_af.py File 31.01 KB 0644
nxos_bgp_global.py File 48.43 KB 0644
nxos_bgp_neighbor.py File 18.79 KB 0644
nxos_bgp_neighbor_address_family.py File 33.62 KB 0644
nxos_bgp_neighbor_af.py File 26.84 KB 0644
nxos_command.py File 7.41 KB 0644
nxos_config.py File 22.51 KB 0644
nxos_devicealias.py File 18.33 KB 0644
nxos_evpn_global.py File 2.62 KB 0644
nxos_evpn_vni.py File 9.44 KB 0644
nxos_facts.py File 8.52 KB 0644
nxos_feature.py File 9.21 KB 0644
nxos_file_copy.py File 17.39 KB 0644
nxos_gir.py File 11.5 KB 0644
nxos_gir_profile_management.py File 5.84 KB 0644
nxos_hostname.py File 5.63 KB 0644
nxos_hsrp.py File 15.02 KB 0644
nxos_hsrp_interfaces.py File 6.16 KB 0644
nxos_igmp.py File 4.49 KB 0644
nxos_igmp_interface.py File 21.88 KB 0644
nxos_igmp_snooping.py File 9.72 KB 0644
nxos_install_os.py File 21.07 KB 0644
nxos_interfaces.py File 13.69 KB 0644
nxos_l2_interfaces.py File 12.05 KB 0644
nxos_l3_interfaces.py File 15.12 KB 0644
nxos_lacp.py File 6.39 KB 0644
nxos_lacp_interfaces.py File 9.13 KB 0644
nxos_lag_interfaces.py File 8.66 KB 0644
nxos_lldp_global.py File 8.68 KB 0644
nxos_lldp_interfaces.py File 6.21 KB 0644
nxos_logging.py File 27.52 KB 0644
nxos_logging_global.py File 21.08 KB 0644
nxos_ntp.py File 12.98 KB 0644
nxos_ntp_auth.py File 9.17 KB 0644
nxos_ntp_global.py File 19.63 KB 0644
nxos_ntp_options.py File 4.53 KB 0644
nxos_nxapi.py File 14.01 KB 0644
nxos_ospf_interfaces.py File 43.32 KB 0644
nxos_ospfv2.py File 62.64 KB 0644
nxos_ospfv3.py File 53.01 KB 0644
nxos_overlay_global.py File 5.64 KB 0644
nxos_pim.py File 6.15 KB 0644
nxos_pim_interface.py File 19.74 KB 0644
nxos_pim_rp_address.py File 7.61 KB 0644
nxos_ping.py File 7.05 KB 0644
nxos_prefix_lists.py File 26.39 KB 0644
nxos_reboot.py File 2.24 KB 0644
nxos_rollback.py File 3.51 KB 0644
nxos_route_maps.py File 57.7 KB 0644
nxos_rpm.py File 12.29 KB 0644
nxos_snapshot.py File 12.17 KB 0644
nxos_snmp_community.py File 6.6 KB 0644
nxos_snmp_contact.py File 3.81 KB 0644
nxos_snmp_host.py File 15.1 KB 0644
nxos_snmp_location.py File 3.91 KB 0644
nxos_snmp_server.py File 50.27 KB 0644
nxos_snmp_traps.py File 7.97 KB 0644
nxos_snmp_user.py File 12.34 KB 0644
nxos_static_routes.py File 20.79 KB 0644
nxos_system.py File 12.77 KB 0644
nxos_telemetry.py File 8.98 KB 0644
nxos_udld.py File 7.09 KB 0644
nxos_udld_interface.py File 8.51 KB 0644
nxos_user.py File 15.37 KB 0644
nxos_vlans.py File 10.6 KB 0644
nxos_vpc.py File 15.59 KB 0644
nxos_vpc_interface.py File 9.92 KB 0644
nxos_vrf.py File 19.78 KB 0644
nxos_vrf_af.py File 7.71 KB 0644
nxos_vrf_interface.py File 7.37 KB 0644
nxos_vrrp.py File 12 KB 0644
nxos_vsan.py File 10.8 KB 0644
nxos_vtp_domain.py File 5.73 KB 0644
nxos_vtp_password.py File 7.8 KB 0644
nxos_vtp_version.py File 5.54 KB 0644
nxos_vxlan_vtep.py File 16.86 KB 0644
nxos_vxlan_vtep_vni.py File 15.7 KB 0644
nxos_zone_zoneset.py File 33.96 KB 0644