get hostname for switch #59
llxpeter495
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
package main
import (
"context"
"fmt"
"github.com/nornir-automation/gornir/pkg/gornir"
"github.com/nornir-automation/gornir/pkg/plugins/connection"
"github.com/nornir-automation/gornir/pkg/plugins/inventory"
"github.com/nornir-automation/gornir/pkg/plugins/logger"
"github.com/nornir-automation/gornir/pkg/plugins/output"
"github.com/nornir-automation/gornir/pkg/plugins/runner"
"github.com/nornir-automation/gornir/pkg/plugins/task"
"os"
)
func main() {
log := logger.NewLogrus(false)
}
In this code, I wish to run command "tftp 10.8.61.116 put vrpcfg.zip Hostname.zip" in every switch , Hostname stands for every switch 's management ip address . I know we can use f'tftp 10.8.61.116 put vrpcfg.zip {task.host.hostname}.zip' in nornir in python but I don't know how to do in gornir . Could you provide any idea ?
Beta Was this translation helpful? Give feedback.
All reactions