Skip to content

Instantly share code, notes, and snippets.

@fredhsu
Last active August 29, 2015 14:08
Show Gist options
  • Save fredhsu/f4d93384a95948edbf1b to your computer and use it in GitHub Desktop.
Save fredhsu/f4d93384a95948edbf1b to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/fredhsu/go-eapi"
)
func main() {
cmds2 := []string{"enable", "show running-config"}
url1 := "https://admin:admin@bleaf1/command-api/"
url2 := "https://admin:admin@bleaf2/command-api/"
url3 := "https://admin:admin@bleaf3/command-api/"
url4 := "https://admin:admin@bleaf5/command-api/"
msg1 := eapi.Call(url1, cmds2, "text")
msg2 := eapi.Call(url2, cmds2, "text")
msg3 := eapi.Call(url3, cmds2, "text")
msg4 := eapi.Call(url4, cmds2, "text")
fmt.Println(msg1)
fmt.Println(msg2)
fmt.Println(msg3)
fmt.Println(msg4)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment