Skip to content
This repository was archived by the owner on Jan 1, 2023. It is now read-only.

Commit 2506ab9

Browse files
added orgvdc command
1 parent b5e8b53 commit 2506ab9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmd/query.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,23 @@ var vmCommand = &cobra.Command{
4949
},
5050
}
5151

52+
var orgvdcCmd = &cobra.Command{
53+
Use: "orgvdc",
54+
Short: "query orgvdc requests",
55+
Long: "query orgvdc requests",
56+
Run: func(cmd *cobra.Command, args []string) {
57+
url := viper.GetString("url")
58+
user := viper.GetString("user")
59+
password := viper.GetString("password")
60+
org := viper.GetString("org")
61+
vcdapi.GetAuthToken(url, user, password, org)
62+
vcdapi.GetAllVdcorg(url)
63+
},
64+
}
5265
func init() {
5366
queryCmd.AddCommand(allocatedipCmd)
5467
allocatedipCmd.Flags().StringVarP(&networkname, "network", "n", "", "network name to search allocated ips on")
5568
queryCmd.AddCommand(vmCommand)
69+
queryCmd.AddCommand(orgvdcCmd)
5670
RootCmd.AddCommand(queryCmd)
5771
}

0 commit comments

Comments
 (0)