From dc1d2dce0c84179429333d2aa633a5d85a66318a Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 04:56:09 -0700 Subject: [PATCH 1/9] done --- topo/node/cisco/cisco.go | 56 +++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 73eaaf55..bdcf42bf 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -607,6 +607,28 @@ func endTelnet(d *scraplinetwork.Driver) error { return nil } +// Helper function to push a config string. +func (n *Node) pushConfig(ctx context.Context, cfg string) error { + cfgs := processConfig(cfg) + log.V(1).Info(cfgs) + + if n.Proto.Model != ModelXRD { + err = n.SpawnCLIConn() + } else { + err = n.SpawnCLIConnConf() + } + if err != nil { + return err + } + defer n.cliConn.Close() + + resp, err := n.cliConn.SendConfig(cfgs) + if err != nil { + return err + } + return resp.Failed +} + func (n *Node) ResetCfg(ctx context.Context) error { log.Infof("%s resetting config", n.Name()) err := n.SpawnCLIConn() @@ -640,6 +662,24 @@ func (n *Node) ResetCfg(ctx context.Context) error { if err != nil { return err } + if resp.Failed != nil { + return resp.Failed + } + + // For XRd, need to manually reapply the snooped IP address to the management interface. + if n.Proto.Model == ModelXRD { + // Get the Pod IP address. + pod, err := n.KubeClient.CoreV1().Pods(n.Namespace).Get(ctx, n.Proto.Name, metav1.GetOptions{}) + if err != nil { + return err + } + cfg := fmt.Sprintf("interface MgmtEth0/RP0/CPU0/0\n ipv4 address %s/16\n!", pod.Status.PodIP) + resp, err := n.pushConfig(ctx, cfg) + if err != nil { + return err + } + } + if resp.Failed == nil { log.Infof("%s - finished resetting config", n.Name()) } @@ -674,27 +714,13 @@ func (n *Node) ConfigPush(ctx context.Context, r io.Reader) error { return err } cfgs := string(cfg) - cfgs = processConfig(cfgs) - log.V(1).Info(cfgs) - - if n.Proto.Model != ModelXRD { - err = n.SpawnCLIConn() - } else { - err = n.SpawnCLIConnConf() - } - if err != nil { - return err - } - defer n.cliConn.Close() - - resp, err := n.cliConn.SendConfig(cfgs) + resp, err := n.pushConfig(ctx, cfgs) if err != nil { return err } if resp.Failed == nil { log.Infof("%s - finished config push", n.Impl.Proto.Name) } - return resp.Failed } From 159b00fa1ec78322af5099f765ad52de6e8004c1 Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 04:59:00 -0700 Subject: [PATCH 2/9] . --- cloudbuild/vendors/testbed.textproto | 224 +------------------ cloudbuild/vendors/topology.textproto | 309 +------------------------- 2 files changed, 3 insertions(+), 530 deletions(-) diff --git a/cloudbuild/vendors/testbed.textproto b/cloudbuild/vendors/testbed.textproto index fe987c0c..a6ddcc3e 100644 --- a/cloudbuild/vendors/testbed.textproto +++ b/cloudbuild/vendors/testbed.textproto @@ -1,69 +1,3 @@ -duts { - id: "ceos" - vendor: ARISTA - ports { - id: "port1" - } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } -} -duts { - id: "ncptx" - vendor: JUNIPER - ports { - id: "port1" - } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } -} -duts { - id: "srl" - vendor: NOKIA - ports { - id: "port1" - } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } -} duts { id: "xrd" vendor: CISCO @@ -71,66 +5,6 @@ duts { ports { id: "port1" } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } -} -duts { - id: "e8000" - vendor: CISCO - hardware_model: "8201" - ports { - id: "port1" - } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } -} -duts { - id: "lemming" - vendor: OPENCONFIG - ports { - id: "port1" - } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } } ates { id: "otg" @@ -138,104 +12,8 @@ ates { ports { id: "port1" } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } } links { a: "otg:port1" - b: "ceos:port1" -} -links { - a: "otg:port2" - b: "ncptx:port1" -} -links { - a: "otg:port3" - b: "srl:port1" -} -links { - a: "otg:port4" b: "xrd:port1" -} -links { - a: "otg:port5" - b: "e8000:port1" -} -links { - a: "otg:port6" - b: "lemming:port1" -} -links { - a: "ceos:port2" - b: "ncptx:port2" -} -links { - a: "ceos:port3" - b: "srl:port2" -} -links { - a: "ceos:port4" - b: "xrd:port2" -} -links { - a: "ceos:port5" - b: "e8000:port2" -} -links { - a: "ceos:port6" - b: "lemming:port2" -} -links { - a: "ncptx:port3" - b: "srl:port3" -} -links { - a: "ncptx:port4" - b: "xrd:port3" -} -links { - a: "ncptx:port5" - b: "e8000:port3" -} -links { - a: "ncptx:port6" - b: "lemming:port3" -} -links { - a: "srl:port4" - b: "xrd:port4" -} -links { - a: "srl:port5" - b: "e8000:port4" -} -links { - a: "srl:port6" - b: "lemming:port4" -} -links { - a: "xrd:port5" - b: "e8000:port5" -} -links { - a: "xrd:port6" - b: "lemming:port5" -} -links { - a: "e8000:port6" - b: "lemming:port6" -} - +} \ No newline at end of file diff --git a/cloudbuild/vendors/topology.textproto b/cloudbuild/vendors/topology.textproto index f2b29c6c..373da8b1 100644 --- a/cloudbuild/vendors/topology.textproto +++ b/cloudbuild/vendors/topology.textproto @@ -1,109 +1,10 @@ name: "vendors" -nodes: { - name: "ceos" - vendor: ARISTA - model: "ceos" - config: { - image: "us-west1-docker.pkg.dev/gep-kne/arista/ceos:ga" - file: "ceos.cfg" - } -} -nodes: { - name: "ncptx" - vendor: JUNIPER - model: "ncptx" - config: { - image: "us-west1-docker.pkg.dev/gep-kne/juniper/ncptx:ga" - file: "juniper.cfg" - } - interfaces: { - key: "eth5" - value: { - name: "et-0/0/0:0" - } - } - interfaces: { - key: "eth13" - value: { - name: "et-0/0/1:0" - } - } - interfaces: { - key: "eth21" - value: { - name: "et-0/0/2:0" - } - } - interfaces: { - key: "eth29" - value: { - name: "et-0/0/3:0" - } - } - interfaces: { - key: "eth37" - value: { - name: "et-0/0/4:0" - } - } - interfaces: { - key: "eth41" - value: { - name: "et-0/0/6:0" - } - } -} -nodes: { - name: "srl" - vendor: NOKIA - model: "ixr6e" - config: { - image: "us-west1-docker.pkg.dev/gep-kne/nokia/srlinux:ga" - file: "srl.cfg" - } - interfaces: { - key: "e1-1" - value: { - name: "ethernet-1/1" - } - } - interfaces: { - key: "e1-2" - value: { - name: "ethernet-1/2" - } - } - interfaces: { - key: "e1-3" - value: { - name: "ethernet-1/3" - } - } - interfaces: { - key: "e1-4" - value: { - name: "ethernet-1/4" - } - } - interfaces: { - key: "e1-5" - value: { - name: "ethernet-1/5" - } - } - interfaces: { - key: "e1-6" - value: { - name: "ethernet-1/6" - } - } -} nodes: { name: "xrd" vendor: CISCO model: "xrd" config: { - image: "us-west1-docker.pkg.dev/gep-kne/cisco/xrd:ga" + image: "xrd:latest" file: "cisco_xrd.cfg" } interfaces: { @@ -112,86 +13,6 @@ nodes: { name: "GigabitEthernet0/0/0/0" } } - interfaces: { - key: "eth2" - value: { - name: "GigabitEthernet0/0/0/1" - } - } - interfaces: { - key: "eth3" - value: { - name: "GigabitEthernet0/0/0/2" - } - } - interfaces: { - key: "eth4" - value: { - name: "GigabitEthernet0/0/0/3" - } - } - interfaces: { - key: "eth5" - value: { - name: "GigabitEthernet0/0/0/4" - } - } - interfaces: { - key: "eth6" - value: { - name: "GigabitEthernet0/0/0/5" - } - } -} -nodes: { - name: "8000e" - vendor: CISCO - model: "8201" - config: { - image: "us-west1-docker.pkg.dev/gep-kne/cisco/8000e:ga" - file: "cisco_8000e.cfg" - } - interfaces: { - key: "eth1" - value: { - name: "FourHundredGigE0/0/0/0" - } - } - interfaces: { - key: "eth2" - value: { - name: "FourHundredGigE0/0/0/1" - } - } - interfaces: { - key: "eth3" - value: { - name: "FourHundredGigE0/0/0/2" - } - } - interfaces: { - key: "eth4" - value: { - name: "FourHundredGigE0/0/0/3" - } - } - interfaces: { - key: "eth5" - value: { - name: "FourHundredGigE0/0/0/4" - } - } - interfaces: { - key: "eth6" - value: { - name: "FourHundredGigE0/0/0/5" - } - } -} -nodes: { - name: "lemming" - vendor: OPENCONFIG - model: "LEMMING" } nodes: { name: "otg" @@ -202,132 +23,6 @@ nodes: { links: { a_node: "otg" a_int: "eth1" - z_node: "ceos" - z_int: "eth1" -} -links: { - a_node: "otg" - a_int: "eth2" - z_node: "ncptx" - z_int: "eth5" -} -links: { - a_node: "otg" - a_int: "eth3" - z_node: "srl" - z_int: "e1-1" -} -links: { - a_node: "otg" - a_int: "eth4" z_node: "xrd" z_int: "eth1" -} -links: { - a_node: "otg" - a_int: "eth5" - z_node: "8000e" - z_int: "eth1" -} -links: { - a_node: "otg" - a_int: "eth6" - z_node: "lemming" - z_int: "eth1" -} -# Links from ceos -links: { - a_node: "ceos" - a_int: "eth2" - z_node: "ncptx" - z_int: "eth13" -} -links: { - a_node: "ceos" - a_int: "eth3" - z_node: "srl" - z_int: "e1-2" -} -links: { - a_node: "ceos" - a_int: "eth4" - z_node: "xrd" - z_int: "eth2" -} -links: { - a_node: "ceos" - a_int: "eth5" - z_node: "8000e" - z_int: "eth2" -} -links: { - a_node: "ceos" - a_int: "eth6" - z_node: "lemming" - z_int: "eth2" -} -# Links from ncptx -links: { - a_node: "ncptx" - a_int: "eth21" - z_node: "srl" - z_int: "e1-3" -} -links: { - a_node: "ncptx" - a_int: "eth29" - z_node: "xrd" - z_int: "eth3" -} -links: { - a_node: "ncptx" - a_int: "eth37" - z_node: "8000e" - z_int: "eth3" -} -links: { - a_node: "ncptx" - a_int: "eth41" - z_node: "lemming" - z_int: "eth3" -} -# Links from srl -links: { - a_node: "srl" - a_int: "e1-4" - z_node: "xrd" - z_int: "eth4" -} -links: { - a_node: "srl" - a_int: "e1-5" - z_node: "8000e" - z_int: "eth4" -} -links: { - a_node: "srl" - a_int: "e1-6" - z_node: "lemming" - z_int: "eth4" -} -# Links from xrd -links: { - a_node: "xrd" - a_int: "eth5" - z_node: "8000e" - z_int: "eth5" -} -links: { - a_node: "xrd" - a_int: "eth6" - z_node: "lemming" - z_int: "eth5" -} -# Links from 8000e -links: { - a_node: "8000e" - a_int: "eth6" - z_node: "lemming" - z_int: "eth6" -} - +} \ No newline at end of file From a2e489fb8c5584378c7d423ad35503d119907ac8 Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 05:01:23 -0700 Subject: [PATCH 3/9] fix declaration --- topo/node/cisco/cisco.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index bdcf42bf..a03ac773 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -613,9 +613,9 @@ func (n *Node) pushConfig(ctx context.Context, cfg string) error { log.V(1).Info(cfgs) if n.Proto.Model != ModelXRD { - err = n.SpawnCLIConn() + err := n.SpawnCLIConn() } else { - err = n.SpawnCLIConnConf() + err := n.SpawnCLIConnConf() } if err != nil { return err @@ -674,7 +674,7 @@ func (n *Node) ResetCfg(ctx context.Context) error { return err } cfg := fmt.Sprintf("interface MgmtEth0/RP0/CPU0/0\n ipv4 address %s/16\n!", pod.Status.PodIP) - resp, err := n.pushConfig(ctx, cfg) + resp, err = n.pushConfig(ctx, cfg) if err != nil { return err } From aba24487d54a7f3ff1a9a628481e2eb7ba78fe8e Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 05:03:52 -0700 Subject: [PATCH 4/9] . --- topo/node/cisco/cisco.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index a03ac773..81ce6263 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -612,10 +612,11 @@ func (n *Node) pushConfig(ctx context.Context, cfg string) error { cfgs := processConfig(cfg) log.V(1).Info(cfgs) + var err error if n.Proto.Model != ModelXRD { - err := n.SpawnCLIConn() + err = n.SpawnCLIConn() } else { - err := n.SpawnCLIConnConf() + err = n.SpawnCLIConnConf() } if err != nil { return err @@ -674,7 +675,7 @@ func (n *Node) ResetCfg(ctx context.Context) error { return err } cfg := fmt.Sprintf("interface MgmtEth0/RP0/CPU0/0\n ipv4 address %s/16\n!", pod.Status.PodIP) - resp, err = n.pushConfig(ctx, cfg) + err = n.pushConfig(ctx, cfg) if err != nil { return err } From 00f3a6477af6f0ec11ab8b32c0ee82d9b2c9f5fe Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 05:07:08 -0700 Subject: [PATCH 5/9] . --- topo/node/cisco/cisco.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 81ce6263..c938ef35 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -681,10 +681,8 @@ func (n *Node) ResetCfg(ctx context.Context) error { } } - if resp.Failed == nil { - log.Infof("%s - finished resetting config", n.Name()) - } - return resp.Failed + log.Infof("%s - finished resetting config", n.Name()) + return nil } // processConfig removes end command from config @@ -715,14 +713,11 @@ func (n *Node) ConfigPush(ctx context.Context, r io.Reader) error { return err } cfgs := string(cfg) - resp, err := n.pushConfig(ctx, cfgs) - if err != nil { - return err - } - if resp.Failed == nil { + err := n.pushConfig(ctx, cfgs) + if err == nil { log.Infof("%s - finished config push", n.Impl.Proto.Name) } - return resp.Failed + return err } func (n *Node) GenerateSelfSigned(context.Context) error { From 228e1dc830c00efd53b7217143b3e5464c286847 Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 05:07:29 -0700 Subject: [PATCH 6/9] . --- topo/node/cisco/cisco.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index c938ef35..57f56409 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -713,7 +713,7 @@ func (n *Node) ConfigPush(ctx context.Context, r io.Reader) error { return err } cfgs := string(cfg) - err := n.pushConfig(ctx, cfgs) + err = n.pushConfig(ctx, cfgs) if err == nil { log.Infof("%s - finished config push", n.Impl.Proto.Name) } From 1bfdc4600e0427def8093c9b1bde9427e808880a Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 05:24:09 -0700 Subject: [PATCH 7/9] . --- topo/node/cisco/cisco.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 57f56409..199968fc 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -674,6 +674,8 @@ func (n *Node) ResetCfg(ctx context.Context) error { if err != nil { return err } + // Must close the existing connection before creating a new one. + n.cliConn.Close() cfg := fmt.Sprintf("interface MgmtEth0/RP0/CPU0/0\n ipv4 address %s/16\n!", pod.Status.PodIP) err = n.pushConfig(ctx, cfg) if err != nil { From 4f276a6b5e5dbc12ee9ffcd9d785b29880e874d8 Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 05:56:11 -0700 Subject: [PATCH 8/9] . --- topo/node/cisco/cisco.go | 79 +++++++++++++++------------------------- 1 file changed, 29 insertions(+), 50 deletions(-) diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 199968fc..c3a64665 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -44,6 +44,7 @@ const ( scrapliPlatformName = "cisco_iosxr" reset8000eCMD = "copy disk0:/startup-config running-config replace" + xrdInterfaceConfig = "/var/opt/cisco/iosxr/xrd/interface_ip_config.txt" // Add the empty echo to work around the copy command not outputting a newline at the end if there is no // change in config. resetXRdCMD = "/pkg/bin/xr_cli \"copy disk0:/startup-config running-config replace\" ; echo \"\"" @@ -607,29 +608,6 @@ func endTelnet(d *scraplinetwork.Driver) error { return nil } -// Helper function to push a config string. -func (n *Node) pushConfig(ctx context.Context, cfg string) error { - cfgs := processConfig(cfg) - log.V(1).Info(cfgs) - - var err error - if n.Proto.Model != ModelXRD { - err = n.SpawnCLIConn() - } else { - err = n.SpawnCLIConnConf() - } - if err != nil { - return err - } - defer n.cliConn.Close() - - resp, err := n.cliConn.SendConfig(cfgs) - if err != nil { - return err - } - return resp.Failed -} - func (n *Node) ResetCfg(ctx context.Context) error { log.Infof("%s resetting config", n.Name()) err := n.SpawnCLIConn() @@ -640,14 +618,16 @@ func (n *Node) ResetCfg(ctx context.Context) error { var cmd string if n.Proto.Model == ModelXRD { - // Copy startup config from mounted location so it can be applied. This is required since the "copy" - // xr_cli command can only access files on disk 0/1. + // Copy the snooped management interface config from a know location and the startup config from + // the mounted location so it can be applied. This is required to preserve the snooped management + // IP addres and since the "copy" xr_cli command can only access files on disk 0/1. startup_config := n.Proto.Config.Env["XR_EVERY_BOOT_CONFIG"] if startup_config == "" { return status.Errorf(codes.InvalidArgument, "XR_EVERY_BOOT_CONFIG is not set") } // Send an additional return command to make sure any error messages are read. - resp, err := n.cliConn.SendCommands([]string{"cp " + startup_config + " /disk0:/startup-config", ""}) + copyCfgCmd := "cat " + xrdInterfaceConfig + " " + startup_config + " > /disk0:/startup-config" + resp, err := n.cliConn.SendCommands([]string{copyCfgCmd, ""}) if err != nil { return err } @@ -663,28 +643,10 @@ func (n *Node) ResetCfg(ctx context.Context) error { if err != nil { return err } - if resp.Failed != nil { - return resp.Failed - } - - // For XRd, need to manually reapply the snooped IP address to the management interface. - if n.Proto.Model == ModelXRD { - // Get the Pod IP address. - pod, err := n.KubeClient.CoreV1().Pods(n.Namespace).Get(ctx, n.Proto.Name, metav1.GetOptions{}) - if err != nil { - return err - } - // Must close the existing connection before creating a new one. - n.cliConn.Close() - cfg := fmt.Sprintf("interface MgmtEth0/RP0/CPU0/0\n ipv4 address %s/16\n!", pod.Status.PodIP) - err = n.pushConfig(ctx, cfg) - if err != nil { - return err - } + if resp.Failed == nil { + log.Infof("%s - finished resetting config", n.Name()) } - - log.Infof("%s - finished resetting config", n.Name()) - return nil + return resp.Failed } // processConfig removes end command from config @@ -715,11 +677,28 @@ func (n *Node) ConfigPush(ctx context.Context, r io.Reader) error { return err } cfgs := string(cfg) - err = n.pushConfig(ctx, cfgs) - if err == nil { + cfgs = processConfig(cfgs) + log.V(1).Info(cfgs) + + if n.Proto.Model != ModelXRD { + err = n.SpawnCLIConn() + } else { + err = n.SpawnCLIConnConf() + } + if err != nil { + return err + } + defer n.cliConn.Close() + + resp, err := n.cliConn.SendConfig(cfgs) + if err != nil { + return err + } + if resp.Failed == nil { log.Infof("%s - finished config push", n.Impl.Proto.Name) } - return err + + return resp.Failed } func (n *Node) GenerateSelfSigned(context.Context) error { From 246425891d173c83d1629007f3d44bc7b06c6cdd Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Mon, 12 May 2025 06:03:33 -0700 Subject: [PATCH 9/9] test cases --- topo/node/cisco/testdata/xrd_reset_config_failure | 4 ++-- topo/node/cisco/testdata/xrd_reset_config_failure_invalid | 2 +- topo/node/cisco/testdata/xrd_reset_config_success | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/topo/node/cisco/testdata/xrd_reset_config_failure b/topo/node/cisco/testdata/xrd_reset_config_failure index 6450c8e2..75f325fe 100644 --- a/topo/node/cisco/testdata/xrd_reset_config_failure +++ b/topo/node/cisco/testdata/xrd_reset_config_failure @@ -1,6 +1,6 @@ [node0_RP0_CPU0:~]$ -[node0_RP0_CPU0:~]$cp /startup.cfg /disk0:/startup-config -cp: cannot stat '/startup.cfg': No such file or directory +[node0_RP0_CPU0:~]$cat /var/opt/cisco/iosxr/xrd/interface_ip_config.txt /startup.cfg > /disk0:/startup-config +cat: /startup.cfg: No such file or directory [node0_RP0_CPU0:~]$ [node0_RP0_CPU0:~]$ [node0_RP0_CPU0:~]$ \ No newline at end of file diff --git a/topo/node/cisco/testdata/xrd_reset_config_failure_invalid b/topo/node/cisco/testdata/xrd_reset_config_failure_invalid index aa76dfeb..59544bba 100644 --- a/topo/node/cisco/testdata/xrd_reset_config_failure_invalid +++ b/topo/node/cisco/testdata/xrd_reset_config_failure_invalid @@ -1,5 +1,5 @@ [node0_RP0_CPU0:~]$ -[node0_RP0_CPU0:~]$cp /startup.cfg /disk0:/startup-config +[node0_RP0_CPU0:~]$cat /var/opt/cisco/iosxr/xrd/interface_ip_config.txt /startup.cfg > /disk0:/startup-config [node0_RP0_CPU0:~]$ [node0_RP0_CPU0:~]$/pkg/bin/xr_cli "copy disk0:/startup-config running-config replace" ; echo "" diff --git a/topo/node/cisco/testdata/xrd_reset_config_success b/topo/node/cisco/testdata/xrd_reset_config_success index 0f93d289..2ce33b4b 100644 --- a/topo/node/cisco/testdata/xrd_reset_config_success +++ b/topo/node/cisco/testdata/xrd_reset_config_success @@ -1,5 +1,5 @@ [node0_RP0_CPU0:~]$ -[node0_RP0_CPU0:~]$cp /startup.cfg /disk0:/startup-config +[node0_RP0_CPU0:~]$cat /var/opt/cisco/iosxr/xrd/interface_ip_config.txt /startup.cfg > /disk0:/startup-config [node0_RP0_CPU0:~]$ [node0_RP0_CPU0:~]$/pkg/bin/xr_cli "copy disk0:/startup-config running-config replace" ; echo ""