amitsi / networkscripts

scripts to parse networking outputs
GNU General Public License v3.0
1 stars 3 forks source link

Add vLAG support + fix indentations #76

Closed ashxjain closed 6 years ago

ashxjain commented 6 years ago
# python auto_vlag_vrrp.py -c config.ini --show-only

### Configure Spine Clusters
### ========================
### cluster-create name spine-cluster-1 cluster-node-1 spine1 cluster-node-2 spine2
### cluster-create name spine-cluster-2 cluster-node-1 spine3 cluster-node-2 spine4

### Configure Leaf Clusters
### =======================
### cluster-create name leaf-cluster-1 cluster-node-1 core1 cluster-node-2 core2
### cluster-create name leaf-cluster-2 cluster-node-1 leaf6 cluster-node-2 leaf5
### cluster-create name leaf-cluster-3 cluster-node-1 leaf3 cluster-node-2 leaf4
### cluster-create name leaf-cluster-4 cluster-node-1 leaf2 cluster-node-2 leaf1
### cluster-create name leaf-cluster-5 cluster-node-1 core1 cluster-node-2 leaf3

### Configure Spine-<->-Leaf vLAG
### =============================
### switch spine1 vlag-create name to-leaf2-leaf1 port 97 peer-port 101
### switch leaf2 vlag-create name to-spine2-spine1 port 49 peer-port 53

### Configure Spine vRouters
### ========================
### switch spine1 vnet-create name spine1-vn1 scope fabric
### switch spine1 vrouter-create name spine1-vr1 vnet spine1-vn1 router-type hardware
### switch spine1 vnet-create name spine1-vn2 scope fabric
### switch spine1 vrouter-create name spine1-vr2 vnet spine1-vn2 router-type hardware
### switch spine3 vnet-create name spine3-vn1 scope fabric
### switch spine3 vrouter-create name spine3-vr1 vnet spine3-vn1 router-type hardware
### switch spine3 vnet-create name spine3-vn2 scope fabric
### switch spine3 vrouter-create name spine3-vr2 vnet spine3-vn2 router-type hardware
### switch spine2 vnet-create name spine2-vn1 scope fabric
### switch spine2 vrouter-create name spine2-vr1 vnet spine2-vn1 router-type hardware
### switch spine2 vnet-create name spine2-vn2 scope fabric
### switch spine2 vrouter-create name spine2-vr2 vnet spine2-vn2 router-type hardware
### switch spine4 vnet-create name spine4-vn1 scope fabric
### switch spine4 vrouter-create name spine4-vr1 vnet spine4-vn1 router-type hardware
### switch spine4 vnet-create name spine4-vn2 scope fabric
### switch spine4 vrouter-create name spine4-vr2 vnet spine4-vn2 router-type hardware

### Configure VRRP for all spine vrouter vr2
### ========================================
Creating vrrp vlan fabric scoped: 102 on spine1
### switch spine1 vlan-create id 102 scope cluster

Set vrrp-id 15 for spine1-vr2
### vrouter-modify name spine1-vr2 hw-vrrp-id 15

Creating primary interface on sw: spine1 with ip: 10.100.102.2/24, vlan-id: 102
### vrouter-interface-add vrouter-name spine1-vr2 ip 10.100.102.2/24 vlan 102 if data

Setting vrrp-vip interface on sw: spine1 with vip: 10.100.102.1/24, vlan-id: 102, vrrp-id: 15, vrrp-priority: 100
### vrouter-interface-add vrouter-name spine1-vr2 ip 10.100.102.1/24 vlan 102 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 100

Set vrrp-id 15 for spine3-vr2
### vrouter-modify name spine3-vr2 hw-vrrp-id 15

Creating primary interface on sw: spine3 with ip: 10.100.102.3/24, vlan-id: 102
### vrouter-interface-add vrouter-name spine3-vr2 ip 10.100.102.3/24 vlan 102 if data

Setting vrrp-vip interface on sw: spine3 with vip: 10.100.102.1/24, vlan-id: 102, vrrp-id: 15, vrrp-priority: 101
### vrouter-interface-add vrouter-name spine3-vr2 ip 10.100.102.1/24 vlan 102 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 101

Set vrrp-id 15 for spine2-vr2
### vrouter-modify name spine2-vr2 hw-vrrp-id 15

Creating primary interface on sw: spine2 with ip: 10.100.102.4/24, vlan-id: 102
### vrouter-interface-add vrouter-name spine2-vr2 ip 10.100.102.4/24 vlan 102 if data

Setting vrrp-vip interface on sw: spine2 with vip: 10.100.102.1/24, vlan-id: 102, vrrp-id: 15, vrrp-priority: 99
### vrouter-interface-add vrouter-name spine2-vr2 ip 10.100.102.1/24 vlan 102 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 99

Set vrrp-id 15 for spine4-vr2
### vrouter-modify name spine4-vr2 hw-vrrp-id 15

Creating primary interface on sw: spine4 with ip: 10.100.102.5/24, vlan-id: 102
### vrouter-interface-add vrouter-name spine4-vr2 ip 10.100.102.5/24 vlan 102 if data

Setting vrrp-vip interface on sw: spine4 with vip: 10.100.102.1/24, vlan-id: 102, vrrp-id: 15, vrrp-priority: 102
### vrouter-interface-add vrouter-name spine4-vr2 ip 10.100.102.1/24 vlan 102 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 102

### Configure VRRP for all spine vrouter vr1
### ========================================
Creating vrrp vlan fabric scoped: 101 on spine1
### switch spine1 vlan-create id 101 scope cluster

Set vrrp-id 15 for spine1-vr1
### vrouter-modify name spine1-vr1 hw-vrrp-id 15

Creating primary interface on sw: spine1 with ip: 10.100.101.2/24, vlan-id: 101
### vrouter-interface-add vrouter-name spine1-vr1 ip 10.100.101.2/24 vlan 101 if data

Setting vrrp-vip interface on sw: spine1 with vip: 10.100.101.1/24, vlan-id: 101, vrrp-id: 15, vrrp-priority: 99
### vrouter-interface-add vrouter-name spine1-vr1 ip 10.100.101.1/24 vlan 101 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 99

Set vrrp-id 15 for spine3-vr1
### vrouter-modify name spine3-vr1 hw-vrrp-id 15

Creating primary interface on sw: spine3 with ip: 10.100.101.3/24, vlan-id: 101
### vrouter-interface-add vrouter-name spine3-vr1 ip 10.100.101.3/24 vlan 101 if data

Setting vrrp-vip interface on sw: spine3 with vip: 10.100.101.1/24, vlan-id: 101, vrrp-id: 15, vrrp-priority: 100
### vrouter-interface-add vrouter-name spine3-vr1 ip 10.100.101.1/24 vlan 101 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 100

Set vrrp-id 15 for spine2-vr1
### vrouter-modify name spine2-vr1 hw-vrrp-id 15

Creating primary interface on sw: spine2 with ip: 10.100.101.4/24, vlan-id: 101
### vrouter-interface-add vrouter-name spine2-vr1 ip 10.100.101.4/24 vlan 101 if data

Setting vrrp-vip interface on sw: spine2 with vip: 10.100.101.1/24, vlan-id: 101, vrrp-id: 15, vrrp-priority: 101
### vrouter-interface-add vrouter-name spine2-vr1 ip 10.100.101.1/24 vlan 101 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 101

Set vrrp-id 15 for spine4-vr1
### vrouter-modify name spine4-vr1 hw-vrrp-id 15

Creating primary interface on sw: spine4 with ip: 10.100.101.5/24, vlan-id: 101
### vrouter-interface-add vrouter-name spine4-vr1 ip 10.100.101.5/24 vlan 101 if data

Setting vrrp-vip interface on sw: spine4 with vip: 10.100.101.1/24, vlan-id: 101, vrrp-id: 15, vrrp-priority: 102
### vrouter-interface-add vrouter-name spine4-vr1 ip 10.100.101.1/24 vlan 101 if data vrrp-id 15 vrrp-primary <nic> vrrp-priority 102