Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Jan 23, 2024
1 parent 1f5f552 commit 93bf471
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clab/clab.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (c *CLab) ProcessTopoPath(path string) (string, error) {
}
// if the path is not a local file and a URL, download the file and store it in the tmp dir
case !utils.FileOrDirExists(path) && utils.IsHttpURL(path, true):
file, err = downloadTopoFile(path, c.TopoPaths.ClabTmpDir())
file, err = c.downloadTopoFile(path)
if err != nil {
return "", err
}
Expand Down
6 changes: 6 additions & 0 deletions types/topo_paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ func (*TopoPaths) ClabTmpDir() string {
return clabTmpDir
}

// StartupConfigDownloadFileAbsPath returns the absolute path to the startup-config file
// when it is downloaded from a remote location to the clab temp directory.
func (t *TopoPaths) StartupConfigDownloadFileAbsPath(node, postfix string) string {
return filepath.Join(t.ClabTmpDir(), fmt.Sprintf("%s-%s-%s", t.topoName, node, postfix))
}

// DownloadFileTmpAbsPath returns the absolute path to a file
// when it is downloaded from a remote location to the clab temp directory.
func (t *TopoPaths) DownloadFileTmpAbsPath(node string, postfix string) string {
Expand Down

0 comments on commit 93bf471

Please sign in to comment.