batch_linux

所属分类:Linux/Unix编程
开发工具:Shell
文件大小:0KB
下载次数:0
上传日期:2022-06-09 00:39:07
上 传 者sh-1993
说明:  网络自动化和可编程性工具
(Tools for Network Automation and Programmability)

文件列表:
CHANGELOG (386, 2022-06-08)
LICENSE (34452, 2022-06-08)
backup/ (0, 2022-06-08)
backup/mod_backup.py (50, 2022-06-08)
batch_key.py (12963, 2022-06-08)
configs/ (0, 2022-06-08)
configs/mod_config.py (336, 2022-06-08)
expect/ (0, 2022-06-08)
expect/mod_expect.py (4948, 2022-06-08)
hosts/ (0, 2022-06-08)
hosts/mod_hosts.py (1237, 2022-06-08)
inventory/ (0, 2022-06-08)
inventory/mod_inventory.py (50, 2022-06-08)
legacy_tools/ (0, 2022-06-08)
legacy_tools/batch_key.sh (10952, 2022-06-08)
legacy_tools/batch_key_bkp.sh (25630, 2022-06-08)
legacy_tools/batch_key_inventory.sh (14258, 2022-06-08)
legacy_tools/cisco_bkp.tcl (1051, 2022-06-08)
legacy_tools/cisco_inventory.tcl (1223, 2022-06-08)
legacy_tools/hosts (192, 2022-06-08)
legacy_tools/var_chave.sh (909, 2022-06-08)
options_exec.txt (4107, 2022-06-08)
programmability/ (0, 2022-06-08)
programmability/mod_programmability.py (50, 2022-06-08)
requirements.txt (29, 2022-06-08)
scripts/ (0, 2022-06-08)
scripts/add_errdisable.tcl (78, 2022-06-08)
tmp/ (0, 2022-06-08)
tmp/.txt (60, 2022-06-08)
var/ (0, 2022-06-08)
var/mod_vars_keys.py (1821, 2022-06-08)

# Tools for Automation and Programmability in Network Operations * These tools aim to automate the execution of commands in a parallel/sequential and massive way in network operations, based on the python3, shell script and expect (Tcl). * The idea of developing these tools is in the style of Ansible and HPIMC operations. # TODO * In the process of developing three more modules in python as follows: - mod_backup.py ==> Module for backup - mod_inventory.py ==> Module for Inventory - mod_programmability.py ==> Module for Programmability # Getting Started * The batch_key.py tool can be used to perform interactive inserts on groups of hosts defined in module mod_hosts.py - $ python3 batch_key.py --exec_hosts_all file_lote.tcl To check the options for each equipment use the tool help with -h, --help In the expect file we must declare the commands that will be executed on the hosts, following the example model cisco_bkp.tcl as it is in the repository. * You must include the host groups in the mod_hosts.py file, following the examples below: EXAMPLE = [ "10.20.20.87", "10.2.20.50", "10.2.20.51", "10.217.20.34", "10.217.0.20" ] The structure of the hosts file is defined in a way that allows the tool to limit the search by creating groups of hosts. * Each expect file contains the user and password environment variables that must be included in the ~/.bashrc of the user who will run the tools, it is in these variables that the expect script will use to authenticate into the host groups to perform the operations. - export USERNAME_EXP = "username" - export PASSWORD_EXP = "password" * All operations will initially be performed preferably via telnet, if you are not able to use TELNET, you will try SSH. * This behavior of attempting to perform operations primarily by Telnet aims to guarantee compatibility with legacy devices, but it can be customized in expect to always give preference to SSH. # Requeriments base - For the execution of the tools, we have python3.6 as a requeriments and installation is necessary in most cases. - Minimal python3.6 # Python3 packages requeriments - pexpect==4.8.0 - psutil==5.8.0 # Comment * Before executing these tools make sure that the desired impact on the network infrastructure has been mapped, perform with caution.

近期下载者

相关文件


收藏者