datacenter/aci-fabric-deploy

语言: Python

git: https://github.com/datacenter/aci-fabric-deploy

用于在ACI结构上自动执行物理配置部署(访问端口,PortChannel,VPC)的工具。
Tool to automate physical configuration deployment (access ports, PortChannels, VPCs) on an ACI fabric.
README.md (中文)
  _____     _          _           ____             _             
 |  ___|_ _| |__  _ __(_) ___     |  _ \  ___ _ __ | | ___  _   _ 
 | |_ / _` | '_ \| '__| |/ __|____| | | |/ _ \ '_ \| |/ _ \| | | |
 |  _| (_| | |_) | |  | | (_|_____| |_| |  __/ |_) | | (_) | |_| |
 |_|  \__,_|_.__/|_|  |_|\___|    |____/ \___| .__/|_|\___/ \__, |
                                             |_|            |___/ 
  == A tool to deploy physical configuration on an ACI fabric ==

介绍

Fabric-Deploy是一种自动部署物理配置的工具 (访问端口,端口通道和VPC)到ACI结构。该工具读取端口 从Excel电子表格中分配并自动推送所有相关内容 配置到Fabric以配置此类端口。支持的类型包括 常规访问端口,端口通道和VPC。该工具也是实例 CDP,LLDP,LACP,MCP,STP等的默认接口策略

要求

  • Python3.3或更高版本。
  • “acifabriclib”图书馆 从以下URL下载并使用“python3 setup.py install”安装它 https://github.com/datacenter/acifabriclib
  • “请求”库。

用法

$ python3 aci-fabric-deploy.py --input <spreadhseet>

Optional arguments:
  -u URL, --url URL                 APIC IP address.
  -l LOGIN, --login LOGIN           APIC login ID.
  -p PASSWORD, --password PASSWORD  APIC login password.
  -i INPUT, --input INPUT           Input file
  -d DEBUG, --debug DEBUG           Enable debug mode

该应用程序还采用APIC地址,用户名和常用参数 密码,以及解析存储在中的任何现有credentials.py文件 同一目录。在这种情况下,credentials.py文件的内容必须 请遵循以下格式:

URL="https://192.168.0.90"
LOGIN="admin"
PASSWORD="Ap1cPass123"

如果credentials.py不存在且未提供凭据 在命令行中,应用程序将以交互方式请求它们。

用法示例

$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx
$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx --debug yes
$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx -l admin -p "Ap1cPass123" -u "https://192.168.0.90"

输出示例

$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx

   _____     _          _           ____             _
  |  ___|_ _| |__  _ __(_) ___     |  _ \  ___ _ __ | | ___  _   _
  | |_ / _` | '_ \| '__| |/ __|____| | | |/ _ \ '_ \| |/ _ \| | | |
  |  _| (_| | |_) | |  | | (_|_____| |_| |  __/ |_) | | (_) | |_| |
  |_|  \__,_|_.__/|_|  |_|\___|    |____/ \___| .__/|_|\___/ \__, |
                                              |_|            |___/

  == A tool to deploy physical configuration on an ACI fabric ==

[+] Creating standard interface policies
[+] Creating interface 'Access_DC001_ESX1_452'
[+] Creating interface 'Access_DC001_ESX1_454'
[+] Creating interface 'VPC_DC001_ESX7_583'
[+] Creating interface 'VPC_DC001_ESX7_584'
[+] Creating interface 'VPC_DC001_ESX7_585'
[+] Creating interface 'VPC_DC001_ESX7_586'
[+] Creating interface 'VPC_DC001_ESX1_690'
[+] Creating interface 'VPC_DC001_ESX1_703'
[+] Creating interface 'PC_DC001_ESX7_284'

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md
  _____     _          _           ____             _             
 |  ___|_ _| |__  _ __(_) ___     |  _ \  ___ _ __ | | ___  _   _ 
 | |_ / _` | '_ \| '__| |/ __|____| | | |/ _ \ '_ \| |/ _ \| | | |
 |  _| (_| | |_) | |  | | (_|_____| |_| |  __/ |_) | | (_) | |_| |
 |_|  \__,_|_.__/|_|  |_|\___|    |____/ \___| .__/|_|\___/ \__, |
                                             |_|            |___/ 
  == A tool to deploy physical configuration on an ACI fabric ==

Introduction

Fabric-Deploy is a tool to automate the deployment of physical configuration
(access ports, port channels and VPCs) to an ACI fabric. The tool reads port
allocations from an Excel spreadsheet and automatically pushes all relevant
configuration to the fabric to configure such ports. Supported types include
regular access ports, port channels, and VPCs. The tool also instances
default interface policies for CDP, LLDP, LACP, MCP, STP, etc.

Requirements

Usage

$ python3 aci-fabric-deploy.py --input <spreadhseet>

Optional arguments:
  -u URL, --url URL                 APIC IP address.
  -l LOGIN, --login LOGIN           APIC login ID.
  -p PASSWORD, --password PASSWORD  APIC login password.
  -i INPUT, --input INPUT           Input file
  -d DEBUG, --debug DEBUG           Enable debug mode

The application also takes the regular parameters for APIC address, username and
password, as well as parses any existing credentials.py file stored in the
same directory. In that case, the content of the credentials.py file must
follow this format:

URL="https://192.168.0.90"
LOGIN="admin"
PASSWORD="Ap1cPass123"

If the credentials.py does not exist and the credentials are not supplied from
the command line, the application will ask for them interactively.

Usage Examples

$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx
$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx --debug yes
$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx -l admin -p "Ap1cPass123" -u "https://192.168.0.90"

Output Examples

$ python3 aci-fabric-deploy.py --input Sample_PortMapping.xlsx

   _____     _          _           ____             _
  |  ___|_ _| |__  _ __(_) ___     |  _ \  ___ _ __ | | ___  _   _
  | |_ / _` | '_ \| '__| |/ __|____| | | |/ _ \ '_ \| |/ _ \| | | |
  |  _| (_| | |_) | |  | | (_|_____| |_| |  __/ |_) | | (_) | |_| |
  |_|  \__,_|_.__/|_|  |_|\___|    |____/ \___| .__/|_|\___/ \__, |
                                              |_|            |___/

  == A tool to deploy physical configuration on an ACI fabric ==

[+] Creating standard interface policies
[+] Creating interface 'Access_DC001_ESX1_452'
[+] Creating interface 'Access_DC001_ESX1_454'
[+] Creating interface 'VPC_DC001_ESX7_583'
[+] Creating interface 'VPC_DC001_ESX7_584'
[+] Creating interface 'VPC_DC001_ESX7_585'
[+] Creating interface 'VPC_DC001_ESX7_586'
[+] Creating interface 'VPC_DC001_ESX1_690'
[+] Creating interface 'VPC_DC001_ESX1_703'
[+] Creating interface 'PC_DC001_ESX7_284'