����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 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, 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/>.
#
# Module to send BGP commands to Lenovo Switches
# Lenovo Networking
#

DOCUMENTATION = '''
---
module: cnos_bgp
author: "Anil Kumar Muraleedharan (@amuraleedhar)"
short_description: Manage BGP resources and attributes on devices running CNOS
description:
    - This module allows you to work with Border Gateway Protocol (BGP) related
     configurations. The operators used are overloaded to ensure control over
     switch BGP configurations. This module is invoked using method with
     asNumber as one of its arguments. The first level of the BGP configuration
     allows to set up an AS number, with the following attributes going
     into various configuration operations under the context of BGP.
     After passing this level, there are eight BGP arguments that will perform
     further configurations. They are bgpArg1, bgpArg2, bgpArg3, bgpArg4,
     bgpArg5, bgpArg6, bgpArg7, and bgpArg8. For more details on how to use
     these arguments, see [Overloaded Variables].
     This module uses SSH to manage network device configuration.
     The results of the operation will be placed in a directory named 'results'
     that must be created by the user in their local directory to where the
     playbook is run.
extends_documentation_fragment:
- community.network.cnos

options:
    asNum:
        description:
            - AS number
        required: Yes
        default: Null
    bgpArg1:
        description:
            - This is an overloaded bgp first argument. Usage of this argument
              can be found is the User Guide referenced above.
        required: Yes
        default: Null
        choices: [address-family,bestpath,bgp,cluster-id,confederation,
                  enforce-first-as,fast-external-failover,graceful-restart,
                  graceful-restart-helper,log-neighbor-changes,
                  maxas-limit,neighbor,router-id,shutdown,synchronization,
                  timers,vrf]
    bgpArg2:
        description:
            - This is an overloaded bgp second argument. Usage of this argument
              can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [ipv4 or ipv6, always-compare-med,compare-confed-aspath,
                  compare-routerid,dont-compare-originator-id,tie-break-on-age,
                  as-path,med,identifier,peers]
    bgpArg3:
        description:
            - This is an overloaded bgp third argument. Usage of this argument
             can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [aggregate-address,client-to-client,dampening,distance,
                  maximum-paths,network,nexthop,redistribute,save,
                  synchronization,ignore or multipath-relax,
                  confed or missing-as-worst or non-deterministic or
                  remove-recv-med or remove-send-med]
    bgpArg4:
        description:
            - This is an overloaded bgp fourth argument. Usage of this argument
             can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [Aggregate prefix, Reachability Half-life time,route-map,
                  Distance for routes ext,ebgp or ibgp,IP prefix <network>,
                  IP prefix <network>/<length>, synchronization,
                  Delay value, direct, ospf, static, memory]
    bgpArg5:
        description:
            - This is an overloaded bgp fifth argument. Usage of this argument
             can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [as-set, summary-only, Value to start reusing a route,
                  Distance for routes internal, Supported multipath numbers,
                  backdoor, map, route-map ]
    bgpArg6:
        description:
            - This is an overloaded bgp sixth argument. Usage of this argument
             can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [summary-only,as-set, route-map name,
                  Value to start suppressing a route, Distance local routes,
                  Network mask, Pointer to route-map entries]
    bgpArg7:
        description:
            - This is an overloaded bgp seventh argument. Use of this argument
             can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [Maximum duration to suppress a stable route(minutes),
                  backdoor,route-map, Name of the route map ]
    bgpArg8:
        description:
            - This is an overloaded bgp eight argument. Usage of this argument
             can be found is the User Guide referenced above.
        required: No
        default: Null
        choices: [Un-reachability Half-life time for the penalty(minutes),
                  backdoor]
'''
EXAMPLES = '''
Tasks: The following are examples of using the module cnos_bgp. These are
 written in the main.yml file of the tasks directory.
---
- name: Test BGP  - neighbor
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "neighbor"
      bgpArg2: "10.241.107.40"
      bgpArg3: 13
      bgpArg4: "address-family"
      bgpArg5: "ipv4"
      bgpArg6: "next-hop-self"

- name: Test BGP  - BFD
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "neighbor"
      bgpArg2: "10.241.107.40"
      bgpArg3: 13
      bgpArg4: "bfd"

- name: Test BGP  - address-family - dampening
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "address-family"
      bgpArg2: "ipv4"
      bgpArg3: "dampening"
      bgpArg4: 13
      bgpArg5: 233
      bgpArg6: 333
      bgpArg7: 15
      bgpArg8: 33

- name: Test BGP  - address-family - network
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "address-family"
      bgpArg2: "ipv4"
      bgpArg3: "network"
      bgpArg4: "1.2.3.4/5"
      bgpArg5: "backdoor"

- name: Test BGP - bestpath - always-compare-med
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "bestpath"
      bgpArg2: "always-compare-med"

- name: Test BGP - bestpath-compare-confed-aspat
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "bestpath"
      bgpArg2: "compare-confed-aspath"

- name: Test BGP - bgp
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "bgp"
      bgpArg2: 33

- name: Test BGP  - cluster-id
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "cluster-id"
      bgpArg2: "1.2.3.4"

- name: Test BGP - confederation-identifier
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "confederation"
      bgpArg2: "identifier"
      bgpArg3: 333

- name: Test BGP - enforce-first-as
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "enforce-first-as"

- name: Test BGP - fast-external-failover
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "fast-external-failover"

- name: Test BGP  - graceful-restart
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "graceful-restart"
      bgpArg2: 333

- name: Test BGP - graceful-restart-helper
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "graceful-restart-helper"

- name: Test BGP - maxas-limit
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "maxas-limit"
      bgpArg2: 333

- name: Test BGP  - neighbor
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "neighbor"
      bgpArg2: "10.241.107.40"
      bgpArg3: 13
      bgpArg4: "address-family"
      bgpArg5: "ipv4"
      bgpArg6: "next-hop-self"

- name: Test BGP - router-id
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "router-id"
      bgpArg2: "1.2.3.4"

- name: Test BGP - synchronization
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "synchronization"

- name: Test BGP - timers
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "timers"
      bgpArg2: 333
      bgpArg3: 3333

- name: Test BGP - vrf
  community.network.cnos_bgp:
      deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
      outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
      asNum: 33
      bgpArg1: "vrf"

'''
RETURN = '''
msg:
  description: Success or failure message. Upon any failure, the method returns
   an error display string.
  returned: always
  type: str
'''

import sys
import time
import socket
import array
import json
import time
import re
try:
    from ansible_collections.community.network.plugins.module_utils.network.cnos import cnos
    HAS_LIB = True
except Exception:
    HAS_LIB = False
from ansible.module_utils.basic import AnsibleModule
from collections import defaultdict


def bgpNeighborConfig(module, cmd, prompt, answer):
    retVal = ''
    command = ''
    bgpNeighborArg1 = module.params['bgpArg4']
    bgpNeighborArg2 = module.params['bgpArg5']
    bgpNeighborArg3 = module.params['bgpArg6']
    bgpNeighborArg4 = module.params['bgpArg7']
    bgpNeighborArg5 = module.params['bgpArg8']
    deviceType = module.params['deviceType']

    if bgpNeighborArg1 == "address-family":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_address_family", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2 + " unicast"
            # debugOutput(command)
            inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
            cmd.extend(inner_cmd)
            retVal = retVal + bgpNeighborAFConfig(module, cmd, '(config-router-neighbor-af)#', answer)
            return retVal
        else:
            retVal = "Error-316"
            return retVal

    elif bgpNeighborArg1 == "advertisement-interval":
        command = command + bgpNeighborArg1

    elif bgpNeighborArg1 == "bfd":
        command = command + bgpNeighborArg1 + " "
        if bgpNeighborArg2 is not None and bgpNeighborArg2 == "mutihop":
            command = command + bgpNeighborArg2

    elif bgpNeighborArg1 == "connection-retry-time":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_connection_retrytime", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-315"
            return retVal

    elif bgpNeighborArg1 == "description":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_description", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-314"
            return retVal

    elif bgpNeighborArg1 == "disallow-infinite-holdtime":
        command = command + bgpNeighborArg1

    elif bgpNeighborArg1 == "dont-capability-negotiate":
        command = command + bgpNeighborArg1

    elif bgpNeighborArg1 == "dynamic-capability":
        command = command + bgpNeighborArg1

    elif bgpNeighborArg1 == "ebgp-multihop":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_maxhopcount", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-313"
            return retVal

    elif bgpNeighborArg1 == "interface":
        command = command + bgpNeighborArg1 + " "
        # TBD

    elif bgpNeighborArg1 == "local-as":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_local_as", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2 + " "
            if (bgpNeighborArg3 is not None and
                    bgpNeighborArg3 == "no-prepend"):
                command = command + bgpNeighborArg3 + " "
                if (bgpNeighborArg4 is not None and
                        bgpNeighborArg4 == "replace-as"):
                    command = command + bgpNeighborArg4 + " "
                    if (bgpNeighborArg5 is not None and
                            bgpNeighborArg5 == "dual-as"):
                        command = command + bgpNeighborArg5
                    else:
                        command = command.strip()
                else:
                    command = command.strip()
            else:
                command = command.strip()
        else:
            retVal = "Error-312"
            return retVal

    elif bgpNeighborArg1 == "maximum-peers":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_maxpeers", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-311"
            return retVal

    elif bgpNeighborArg1 == "password":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_password", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-310"
            return retVal

    elif bgpNeighborArg1 == "remove-private-AS":
        command = command + bgpNeighborArg1

    elif bgpNeighborArg1 == "timers":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_timers_Keepalive", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2 + " "
            value = cnos.checkSanityofVariable(
                deviceType, "bgp_neighbor_timers_holdtime", bgpNeighborArg3)
            if value == "ok":
                command = command + bgpNeighborArg3
            else:
                retVal = "Error-309"
                return retVal
        else:
            retVal = "Error-308"
            return retVal

    elif bgpNeighborArg1 == "transport":
        command = command + bgpNeighborArg1 + " connection-mode passive "

    elif bgpNeighborArg1 == "ttl-security":
        command = command + bgpNeighborArg1 + " hops "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_ttl_hops", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-307"
            return retVal

    elif bgpNeighborArg1 == "update-source":
        command = command + bgpNeighborArg1 + " "
        if bgpNeighborArg2 is not None:
            value = cnos.checkSanityofVariable(
                deviceType, "bgp_neighbor_update_options", bgpNeighborArg2)
            if value == "ok":
                command = command + bgpNeighborArg2 + " "
                if bgpNeighborArg2 == "ethernet":
                    value = cnos.checkSanityofVariable(
                        deviceType, "bgp_neighbor_update_ethernet",
                        bgpNeighborArg3)
                    if value == "ok":
                        command = command + bgpNeighborArg3
                    else:
                        retVal = "Error-304"
                        return retVal
                elif bgpNeighborArg2 == "loopback":
                    value = cnos.checkSanityofVariable(
                        deviceType, "bgp_neighbor_update_loopback",
                        bgpNeighborArg3)
                    if value == "ok":
                        command = command + bgpNeighborArg3
                    else:
                        retVal = "Error-305"
                        return retVal
                else:
                    value = cnos.checkSanityofVariable(
                        deviceType, "bgp_neighbor_update_vlan",
                        bgpNeighborArg3)
                    if value == "ok":
                        command = command + bgpNeighborArg3
                    else:
                        retVal = "Error-306"
                        return retVal
            else:
                command = command + bgpNeighborArg2
        else:
            retVal = "Error-303"
            return retVal

    elif bgpNeighborArg1 == "weight":
        command = command + bgpNeighborArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_weight", bgpNeighborArg2)
        if value == "ok":
            command = command + bgpNeighborArg2
        else:
            retVal = "Error-302"
            return retVal

    else:
        retVal = "Error-301"
        return retVal

    # debugOutput(command)
    inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
    cmd.extend(inner_cmd)
    retVal = retVal + str(cnos.run_cnos_commands(module, cmd))
    command = "exit \n"
    return retVal
# EOM


def bgpNeighborAFConfig(module, cmd, prompt, answer):
    retVal = ''
    command = ''
    bgpNeighborAFArg1 = module.params['bgpArg6']
    bgpNeighborAFArg2 = module.params['bgpArg7']
    bgpNeighborAFArg3 = module.params['bgpArg8']
    deviceType = module.params['deviceType']
    if bgpNeighborAFArg1 == "allowas-in":
        command = command + bgpNeighborAFArg1 + " "
        if bgpNeighborAFArg2 is not None:
            value = cnos.checkSanityofVariable(
                deviceType, "bgp_neighbor_af_occurances", bgpNeighborAFArg2)
            if value == "ok":
                command = command + bgpNeighborAFArg2
            else:
                retVal = "Error-325"
                return retVal

    elif bgpNeighborAFArg1 == "default-originate":
        command = command + bgpNeighborAFArg1 + " "
        if bgpNeighborAFArg2 is not None and bgpNeighborAFArg2 == "route-map":
            command = command + bgpNeighborAFArg2 + " "
            value = cnos.checkSanityofVariable(
                deviceType, "bgp_neighbor_af_routemap", bgpNeighborAFArg2)
            if value == "ok":
                command = command + bgpNeighborAFArg3
            else:
                retVal = "Error-324"
                return retVal

    elif bgpNeighborAFArg1 == "filter-list":
        command = command + bgpNeighborAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_af_filtername", bgpNeighborAFArg2)
        if value == "ok":
            command = command + bgpNeighborAFArg2 + " "
            if bgpNeighborAFArg3 == "in" or bgpNeighborAFArg3 == "out":
                command = command + bgpNeighborAFArg3
            else:
                retVal = "Error-323"
                return retVal
        else:
            retVal = "Error-322"
            return retVal

    elif bgpNeighborAFArg1 == "maximum-prefix":
        command = command + bgpNeighborAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_af_maxprefix", bgpNeighborAFArg2)
        if value == "ok":
            command = command + bgpNeighborAFArg2 + " "
            if bgpNeighborAFArg3 is not None:
                command = command + bgpNeighborAFArg3
            else:
                command = command.strip()
        else:
            retVal = "Error-326"
            return retVal

    elif bgpNeighborAFArg1 == "next-hop-self":
        command = command + bgpNeighborAFArg1

    elif bgpNeighborAFArg1 == "prefix-list":
        command = command + bgpNeighborAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_af_prefixname", bgpNeighborAFArg2)
        if value == "ok":
            command = command + bgpNeighborAFArg2 + " "
            if bgpNeighborAFArg3 == "in" or bgpNeighborAFArg3 == "out":
                command = command + bgpNeighborAFArg3
            else:
                retVal = "Error-321"
                return retVal
        else:
            retVal = "Error-320"
            return retVal

    elif bgpNeighborAFArg1 == "route-map":
        command = command + bgpNeighborAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_af_routemap", bgpNeighborAFArg2)
        if value == "ok":
            command = command + bgpNeighborAFArg2
        else:
            retVal = "Error-319"
            return retVal
    elif bgpNeighborAFArg1 == "route-reflector-client":
        command = command + bgpNeighborAFArg1

    elif bgpNeighborAFArg1 == "send-community":
        command = command + bgpNeighborAFArg1 + " "
        if bgpNeighborAFArg2 is not None and bgpNeighborAFArg2 == "extended":
            command = command + bgpNeighborAFArg2

    elif bgpNeighborAFArg1 == "soft-reconfiguration":
        command = command + bgpNeighborAFArg1 + " inbound"

    elif bgpNeighborAFArg1 == "unsuppress-map":
        command = command + bgpNeighborAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_neighbor_af_routemap", bgpNeighborAFArg2)
        if value == "ok":
            command = command + bgpNeighborAFArg2
        else:
            retVal = "Error-318"
            return retVal

    else:
        retVal = "Error-317"
        return retVal

    # debugOutput(command)
    inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
    cmd.extend(inner_cmd)
    retVal = retVal + str(cnos.run_cnos_commands(module, cmd))
    return retVal
# EOM


def bgpAFConfig(module, cmd, prompt, answer):
    retVal = ''
    command = ''
    bgpAFArg1 = module.params['bgpArg3']
    bgpAFArg2 = module.params['bgpArg4']
    bgpAFArg3 = module.params['bgpArg5']
    bgpAFArg4 = module.params['bgpArg6']
    bgpAFArg5 = module.params['bgpArg7']
    bgpAFArg6 = module.params['bgpArg8']
    deviceType = module.params['deviceType']
    if bgpAFArg1 == "aggregate-address":
        command = command + bgpAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_aggregate_prefix", bgpAFArg2)
        if value == "ok":
            if bgpAFArg2 is None:
                command = command.strip()
            elif bgpAFArg2 == "as-set" or bgpAFArg2 == "summary-only":
                command = command + bgpAFArg2 + " "
                if (bgpAFArg3 is not None) and (bgpAFArg2 == "as-set"):
                    command = command + "summary-only"
            else:
                retVal = "Error-297"
                return retVal
        else:
            retVal = "Error-296"
            return retVal

    elif bgpAFArg1 == "client-to-client":
        command = command + bgpAFArg1 + " reflection "

    elif bgpAFArg1 == "dampening":
        command = command + bgpAFArg1 + " "
        if bgpAFArg2 == "route-map":
            command = command + bgpAFArg2 + " "
            value = cnos.checkSanityofVariable(
                deviceType, "addrfamily_routemap_name", bgpAFArg3)
            if value == "ok":
                command = command + bgpAFArg3
            else:
                retVal = "Error-196"
                return retVal
        elif bgpAFArg2 is not None:
            value = cnos.checkSanityofVariable(
                deviceType, "reachability_half_life", bgpAFArg2)
            if value == "ok":
                command = command + bgpAFArg2 + " "
                if bgpAFArg3 is not None:
                    value1 = cnos.checkSanityofVariable(
                        deviceType, "start_reuse_route_value", bgpAFArg3)
                    value2 = cnos.checkSanityofVariable(
                        deviceType, "start_suppress_route_value", bgpAFArg4)
                    value3 = cnos.checkSanityofVariable(
                        deviceType, "max_duration_to_suppress_route",
                        bgpAFArg5)
                    if (value1 == "ok" and value2 == "ok" and value3 == "ok"):
                        command = command + bgpAFArg3 + " " + bgpAFArg4 + \
                            " " + bgpAFArg5 + " "
                        if (bgpAFArg6 is not None):
                            value = cnos.checkSanityofVariable(
                                deviceType,
                                "unreachability_halftime_for_penalty",
                                bgpAFArg6)
                            if (value == "ok"):
                                command = command + bgpAFArg6
                    else:
                        retVal = "Error-295"
                        return retVal
                else:
                    command = command.strip()
            else:
                retVal = "Error-294"
                return retVal

    elif bgpAFArg1 == "distance":
        command = command + bgpAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "distance_external_AS", bgpAFArg2)
        if value == "ok":
            command = command + bgpAFArg2 + " "
            value = cnos.checkSanityofVariable(
                deviceType, "distance_internal_AS", bgpAFArg3)
            if value == "ok":
                command = command + bgpAFArg3 + " "
                value = cnos.checkSanityofVariable(
                    deviceType, "distance_local_routes", bgpAFArg4)
                if value == "ok":
                    command = command + bgpAFArg4
                else:
                    retVal = "Error-291"
                    return retVal
            else:
                retVal = "Error-292"
                return retVal
        else:
            retVal = "Error-293"
            return retVal

    elif bgpAFArg1 == "maximum-paths":
        command = command + bgpAFArg1 + " "
        value = cnos.checkSanityofVariable(deviceType, "maxpath_option", bgpAFArg2)
        if value == "ok":
            command = command + bgpAFArg2 + " "
            value = cnos.checkSanityofVariable(
                deviceType, "maxpath_numbers", bgpAFArg3)
            if value == "ok":
                command = command + bgpAFArg3
            else:
                retVal = "Error-199"
                return retVal
        else:
            retVal = "Error-290"
            return retVal

    elif bgpAFArg1 == "network":
        command = command + bgpAFArg1 + " "
        if bgpAFArg2 == "synchronization":
            command = command + bgpAFArg2
        else:
            value = cnos.checkSanityofVariable(
                deviceType, "network_ip_prefix_with_mask", bgpAFArg2)
            if value == "ok":
                command = command + bgpAFArg2 + " "
                if bgpAFArg3 is not None and bgpAFArg3 == "backdoor":
                    command = command + bgpAFArg3
                elif bgpAFArg3 is not None and bgpAFArg3 == "route-map":
                    command = command + bgpAFArg3
                    value = cnos.checkSanityofVariable(
                        deviceType, "addrfamily_routemap_name", bgpAFArg4)
                    if (value == "ok"):
                        command = command + bgpAFArg4 + " "
                        if (bgpAFArg5 is not None and bgpAFArg5 == "backdoor"):
                            command = command + bgpAFArg5
                        else:
                            retVal = "Error-298"
                            return retVal
                    else:
                        retVal = "Error-196"
                        return retVal
                else:
                    command = command.strip()
            else:
                value = cnos.checkSanityofVariable(
                    deviceType, "network_ip_prefix_value", bgpAFArg2)
                if (value == "ok"):
                    command = command + bgpAFArg2 + " "
                    if (bgpAFArg3 is not None and bgpAFArg3 == "backdoor"):
                        command = command + bgpAFArg3
                    elif (bgpAFArg3 is not None and bgpAFArg3 == "route-map"):
                        command = command + bgpAFArg3
                        value = cnos.checkSanityofVariable(
                            deviceType, "addrfamily_routemap_name", bgpAFArg4)
                        if (value == "ok"):
                            command = command + bgpAFArg4 + " "
                            if (bgpAFArg5 is not None and
                                    bgpAFArg5 == "backdoor"):
                                command = command + bgpAFArg5
                            else:
                                retVal = "Error-298"
                                return retVal
                        else:
                            retVal = "Error-196"
                            return retVal
                    elif (bgpAFArg3 is not None and bgpAFArg3 == "mask"):
                        command = command + bgpAFArg3
                        value = cnos.checkSanityofVariable(
                            deviceType, "network_ip_prefix_mask", bgpAFArg4)
                        if (value == "ok"):
                            command = command + bgpAFArg4 + " "
                        else:
                            retVal = "Error-299"
                            return retVal
                    else:
                        command = command.strip()
                else:
                    retVal = "Error-300"
                    return retVal

    elif (bgpAFArg1 == "nexthop"):
        command = command + bgpAFArg1 + " trigger-delay critical "
        value = cnos.checkSanityofVariable(
            deviceType, "nexthop_crtitical_delay", bgpAFArg2)
        if (value == "ok"):
            command = command + bgpAFArg2 + " "
            value = cnos.checkSanityofVariable(
                deviceType, "nexthop_noncrtitical_delay", bgpAFArg3)
            if (value == "ok"):
                command = command + bgpAFArg3 + " "
            else:
                retVal = "Error-198"
                return retVal
        else:
            retVal = "Error-197"
            return retVal

    elif (bgpAFArg1 == "redistribute"):
        command = command + bgpAFArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "addrfamily_redistribute_option", bgpAFArg2)
        if (value == "ok"):
            if (bgpAFArg2 is not None):
                command = command + bgpAFArg2 + " " + "route-map "
                value = cnos.checkSanityofVariable(
                    deviceType, "addrfamily_routemap_name", bgpAFArg3)
                if (value == "ok"):
                    command = command + bgpAFArg3
                else:
                    retVal = "Error-196"
                    return retVal
        else:
            retVal = "Error-195"
            return retVal

    elif (bgpAFArg1 == "save" or bgpAFArg1 == "synchronization"):
        command = command + bgpAFArg1

    else:
        retVal = "Error-194"
        return retVal
    # debugOutput(command)
    inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
    cmd.extend(inner_cmd)
    retVal = retVal + str(cnos.run_cnos_commands(module, cmd))
    command = "exit \n"
    return retVal
# EOM


def bgpConfig(module, cmd, prompt, answer):
    retVal = ''
    command = ''
    bgpArg1 = module.params['bgpArg1']
    bgpArg2 = module.params['bgpArg2']
    bgpArg3 = module.params['bgpArg3']
    bgpArg4 = module.params['bgpArg4']
    bgpArg5 = module.params['bgpArg5']
    bgpArg6 = module.params['bgpArg6']
    bgpArg7 = module.params['bgpArg7']
    bgpArg8 = module.params['bgpArg8']
    asNum = module.params['asNum']
    deviceType = module.params['deviceType']
    # cnos.debugOutput(bgpArg1)
    if (bgpArg1 == "address-family"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_address_family", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2 + " " + "unicast \n"
            # debugOutput(command)
            inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
            cmd.extend(inner_cmd)
            retVal = retVal + bgpAFConfig(module, cmd, prompt, answer)
            return retVal
        else:
            retVal = "Error-178"
            return retVal

    elif (bgpArg1 == "bestpath"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        if (bgpArg2 == "always-compare-med"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2
        elif (bgpArg2 == "compare-confed-aspath"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2
        elif (bgpArg2 == "compare-routerid"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2
        elif (bgpArg2 == "dont-compare-originator-id"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2
        elif (bgpArg2 == "tie-break-on-age"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2
        elif (bgpArg2 == "as-path"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2 + " "
            if (bgpArg3 == "ignore" or bgpArg3 == "multipath-relax"):
                command = command + bgpArg3
            else:
                retVal = "Error-179"
                return retVal
        elif (bgpArg2 == "med"):
            # debugOutput(bgpArg2)
            command = command + bgpArg2 + " "
            if (bgpArg3 == "confed" or
               bgpArg3 == "missing-as-worst" or
               bgpArg3 == "non-deterministic" or
               bgpArg3 == "remove-recv-med" or
               bgpArg3 == "remove-send-med"):
                command = command + bgpArg3
            else:
                retVal = "Error-180"
                return retVal
        else:
            retVal = "Error-181"
            return retVal

    elif (bgpArg1 == "bgp"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " as-local-count "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_bgp_local_count", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
        else:
            retVal = "Error-182"
            return retVal

    elif (bgpArg1 == "cluster-id"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        value = cnos.checkSanityofVariable(deviceType, "cluster_id_as_ip", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
        else:
            value = cnos.checkSanityofVariable(
                deviceType, "cluster_id_as_number", bgpArg2)
            if (value == "ok"):
                command = command + bgpArg2
            else:
                retVal = "Error-183"
                return retVal

    elif (bgpArg1 == "confederation"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        if (bgpArg2 == "identifier"):
            value = cnos.checkSanityofVariable(
                deviceType, "confederation_identifier", bgpArg3)
            if (value == "ok"):
                command = command + bgpArg2 + " " + bgpArg3 + "\n"
            else:
                retVal = "Error-184"
                return retVal
        elif (bgpArg2 == "peers"):
            value = cnos.checkSanityofVariable(
                deviceType, "confederation_peers_as", bgpArg3)
            if (value == "ok"):
                command = command + bgpArg2 + " " + bgpArg3
            else:
                retVal = "Error-185"
                return retVal
        else:
            retVal = "Error-186"
            return retVal

    elif (bgpArg1 == "enforce-first-as"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1

    elif (bgpArg1 == "fast-external-failover"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1

    elif (bgpArg1 == "graceful-restart"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " stalepath-time "
        value = cnos.checkSanityofVariable(
            deviceType, "stalepath_delay_value", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
        else:
            retVal = "Error-187"
            return retVal

    elif (bgpArg1 == "graceful-restart-helper"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1

    elif (bgpArg1 == "log-neighbor-changes"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1

    elif (bgpArg1 == "maxas-limit"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        value = cnos.checkSanityofVariable(deviceType, "maxas_limit_as", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
        else:
            retVal = "Error-188"
            return retVal

    elif (bgpArg1 == "neighbor"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        value = cnos.checkSanityofVariable(
            deviceType, "neighbor_ipaddress", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
            if (bgpArg3 is not None):
                command = command + " remote-as "
                value = cnos.checkSanityofVariable(
                    deviceType, "neighbor_as", bgpArg3)
                if (value == "ok"):
                    # debugOutput(command)
                    command = command + bgpArg3
                    inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
                    cmd.extend(inner_cmd)
                    retVal = retVal + bgpNeighborConfig(module, cmd, prompt, answer)
                    return retVal
        else:
            retVal = "Error-189"
            return retVal

    elif (bgpArg1 == "router-id"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " "
        value = cnos.checkSanityofVariable(deviceType, "router_id", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
        else:
            retVal = "Error-190"
            return retVal

    elif (bgpArg1 == "shutdown"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1

    elif (bgpArg1 == "synchronization"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1

    elif (bgpArg1 == "timers"):
        # cnos.debugOutput(bgpArg3)
        command = command + bgpArg1 + " bgp "
        value = cnos.checkSanityofVariable(
            deviceType, "bgp_keepalive_interval", bgpArg2)
        if (value == "ok"):
            command = command + bgpArg2
        else:
            retVal = "Error-191"
            return retVal
        if (bgpArg3 is not None):
            value = cnos.checkSanityofVariable(deviceType, "bgp_holdtime", bgpArg3)
            if (value == "ok"):
                command = command + " " + bgpArg3
            else:
                retVal = "Error-192"
                return retVal
        else:
            retVal = "Error-192"
            return retVal

    elif (bgpArg1 == "vrf"):
        # debugOutput(bgpArg1)
        command = command + bgpArg1 + " default"
    else:
        # debugOutput(bgpArg1)
        retVal = "Error-192"
        return retVal
    # debugOutput(command)
    inner_cmd = [{'command': command, 'prompt': None, 'answer': None}]
    cmd.extend(inner_cmd)
    retVal = retVal + str(cnos.run_cnos_commands(module, cmd))
    command = "exit \n"
    # debugOutput(command)
    return retVal
# EOM


def main():
    module = AnsibleModule(
        argument_spec=dict(
            outputfile=dict(required=True),
            host=dict(required=False),
            username=dict(required=False),
            password=dict(required=False, no_log=True),
            enablePassword=dict(required=False, no_log=True),
            deviceType=dict(required=True),
            bgpArg1=dict(required=True),
            bgpArg2=dict(required=False),
            bgpArg3=dict(required=False),
            bgpArg4=dict(required=False),
            bgpArg5=dict(required=False),
            bgpArg6=dict(required=False),
            bgpArg7=dict(required=False),
            bgpArg8=dict(required=False),
            asNum=dict(required=True),),
        supports_check_mode=False)

    asNum = module.params['asNum']
    outputfile = module.params['outputfile']
    deviceType = module.params['deviceType']
    output = ''
    command = 'router bgp '
    value = cnos.checkSanityofVariable(deviceType, "bgp_as_number", asNum)
    if (value == "ok"):
        # BGP command happens here. It creates if not present
        command = command + asNum
        cmd = [{'command': command, 'prompt': None, 'answer': None}]
        output = output + bgpConfig(module, cmd, '(config)#', None)
    else:
        output = "Error-176"
    # Save it into the file
    file = open(outputfile, "a")
    file.write(output)
    file.close()

    # Logic to check when changes occur or not
    errorMsg = cnos.checkOutputForError(output)
    if (errorMsg is None):
        module.exit_json(changed=True, msg="BGP configurations accomplished")
    else:
        module.fail_json(msg=errorMsg)


if __name__ == '__main__':
    main()

Filemanager

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