From b1406adcd933c8acb9e2861145011d0c71899e3c Mon Sep 17 00:00:00 2001 From: Shannon Byrnes Date: Fri, 31 Jan 2025 19:43:44 -0700 Subject: [PATCH] clean up --- internal-lab-setup-assets/Makefile | 8 +++- .../startup-config/cisco1.conf | 37 +++--------------- .../startup-config/cisco2.conf | 37 +++--------------- .../startup-config/cisco3.conf | 38 ++++--------------- .../workshop.clab.yml.j2 | 2 +- 5 files changed, 26 insertions(+), 96 deletions(-) diff --git a/internal-lab-setup-assets/Makefile b/internal-lab-setup-assets/Makefile index 7ca3252..28087c6 100644 --- a/internal-lab-setup-assets/Makefile +++ b/internal-lab-setup-assets/Makefile @@ -1,3 +1,7 @@ +# .phony: gen + +FILES=$(wildcard workshop[0-9]*.clab.yml) + clab-install: dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo dnf config-manager --add-repo https://yum.fury.io/netdevops/ @@ -38,11 +42,11 @@ inspect-all: docker-stop-all: # This allows the destruction of all running docker containers, regardless of if clab topology file exists - docker stop $(docker ps -a -q) + docker stop $$(docker ps -a -q) docker-remove-all: # This allows the removal of all running docker containers, regardless of if clab topology file exists - docker rm $(docker ps -a -q) + docker rm $$(docker ps -a -q) container: docker build -t internet2/getting_started -f Containerfile . diff --git a/internal-lab-setup-assets/startup-config/cisco1.conf b/internal-lab-setup-assets/startup-config/cisco1.conf index 760414b..59f82e7 100644 --- a/internal-lab-setup-assets/startup-config/cisco1.conf +++ b/internal-lab-setup-assets/startup-config/cisco1.conf @@ -21,9 +21,6 @@ vrf {{ .Env.CLAB_MGMT_VRF }} line default transport input ssh ! -netconf-yang agent - ssh -! cdp lldp ! @@ -73,37 +70,15 @@ interface GigabitEthernet0/0/0/2.100 ipv4 helper-address vrf default 192.168.100.100 ip address 10.1.0.1 255.255.255.0 ! -route-policy PERMIT_ALL - pass -end-policy -! -!router bgp 64500 -! bgp router-id 198.51.100.1 -! address-family ipv4 unicast -! redistribute connected - ! -! neighbor-group LAB -! remote-as 64500 -! password encrypted 15140403062B39 -! update-source Loopback0 -! address-family ipv4 unicast -! route-policy PERMIT_ALL in -! route-policy PERMIT_ALL out - ! - ! -! neighbor 172.17.1.17 -! use neighbor-group LAB - ! -! neighbor 172.17.1.19 -! use neighbor-group LAB - ! -! -! xml agent tty -! iteration off -! ssh server v2 {{- if .Env.CLAB_MGMT_VRF }} ssh server vrf {{ .Env.CLAB_MGMT_VRF }} {{- end}} +! +{{- if .Env.ENABLE_NETCONF }} +netconf-yang agent + ssh +! ssh server netconf {{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +{{- end}} end diff --git a/internal-lab-setup-assets/startup-config/cisco2.conf b/internal-lab-setup-assets/startup-config/cisco2.conf index 05c0adc..5eadc5f 100644 --- a/internal-lab-setup-assets/startup-config/cisco2.conf +++ b/internal-lab-setup-assets/startup-config/cisco2.conf @@ -21,9 +21,6 @@ vrf {{ .Env.CLAB_MGMT_VRF }} line default transport input ssh ! -netconf-yang agent - ssh -! cdp lldp ! @@ -73,37 +70,15 @@ interface GigabitEthernet0/0/0/2.100 ipv4 helper-address vrf default 10.2.3.4 ip address 10.2.0.1 255.255.255.0 ! -route-policy PERMIT_ALL - pass -end-policy -! -!router bgp 64500 -! bgp router-id 198.51.100.1 -! address-family ipv4 unicast -! redistribute connected - ! -! neighbor-group LAB -! remote-as 64500 -! password encrypted 15140403062B39 -! update-source Loopback0 -! address-family ipv4 unicast -! route-policy PERMIT_ALL in -! route-policy PERMIT_ALL out - ! - ! -! neighbor 172.17.1.17 -! use neighbor-group LAB - ! -! neighbor 172.17.1.19 -! use neighbor-group LAB - ! -! -! xml agent tty -! iteration off -! ssh server v2 {{- if .Env.CLAB_MGMT_VRF }} ssh server vrf {{ .Env.CLAB_MGMT_VRF }} {{- end}} +! +{{- if .Env.ENABLE_NETCONF }} +netconf-yang agent + ssh +! ssh server netconf {{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +{{- end}} end \ No newline at end of file diff --git a/internal-lab-setup-assets/startup-config/cisco3.conf b/internal-lab-setup-assets/startup-config/cisco3.conf index 818cafb..aa293a7 100644 --- a/internal-lab-setup-assets/startup-config/cisco3.conf +++ b/internal-lab-setup-assets/startup-config/cisco3.conf @@ -21,9 +21,6 @@ vrf {{ .Env.CLAB_MGMT_VRF }} line default transport input ssh ! -netconf-yang agent - ssh -! cdp lldp ! @@ -63,37 +60,16 @@ interface GigabitEthernet0/0/0/2.100 ipv4 helper-address vrf default 10.2.3.4 ip address 10.3.0.1 255.255.255.0 ! -route-policy PERMIT_ALL - pass -end-policy -! -!router bgp 64500 -! bgp router-id 198.51.100.1 -! address-family ipv4 unicast -! redistribute connected - ! -! neighbor-group LAB -! remote-as 64500 -! password encrypted 15140403062B39 -! update-source Loopback0 -! address-family ipv4 unicast -! route-policy PERMIT_ALL in -! route-policy PERMIT_ALL out - ! - ! -! neighbor 172.17.1.17 -! use neighbor-group LAB - ! -! neighbor 172.17.1.19 -! use neighbor-group LAB - ! -! -! xml agent tty -! iteration off -! ssh server v2 {{- if .Env.CLAB_MGMT_VRF }} ssh server vrf {{ .Env.CLAB_MGMT_VRF }} {{- end}} +! +{{- if .Env.ENABLE_NETCONF }} +netconf-yang agent + ssh +! ssh server netconf {{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +{{- end}} +end end \ No newline at end of file diff --git a/internal-lab-setup-assets/workshop.clab.yml.j2 b/internal-lab-setup-assets/workshop.clab.yml.j2 index e1765f0..a637146 100644 --- a/internal-lab-setup-assets/workshop.clab.yml.j2 +++ b/internal-lab-setup-assets/workshop.clab.yml.j2 @@ -41,7 +41,7 @@ topology: image: internet2/getting_started {{- shared_node_settings(x) }} env: - LAB_PASSWORD: Ninja-{{"%02d" % id}}-Turtle + LAB_PASSWORD: Ninja-Turtle-{{"%02d" % id}} links: - endpoints: ["cisco1:Gi0-0-0-0", "cisco3:Gi0-0-0-0"]