From 2506ab966609d7362b975e31d1247959c390dc5f Mon Sep 17 00:00:00 2001 From: floriankammermann Date: Sun, 3 Dec 2017 23:58:31 +0100 Subject: [PATCH] added orgvdc command --- cmd/query.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/query.go b/cmd/query.go index 5b18422..3c506b4 100755 --- a/cmd/query.go +++ b/cmd/query.go @@ -49,9 +49,23 @@ var vmCommand = &cobra.Command{ }, } +var orgvdcCmd = &cobra.Command{ + Use: "orgvdc", + Short: "query orgvdc requests", + Long: "query orgvdc requests", + Run: func(cmd *cobra.Command, args []string) { + url := viper.GetString("url") + user := viper.GetString("user") + password := viper.GetString("password") + org := viper.GetString("org") + vcdapi.GetAuthToken(url, user, password, org) + vcdapi.GetAllVdcorg(url) + }, +} func init() { queryCmd.AddCommand(allocatedipCmd) allocatedipCmd.Flags().StringVarP(&networkname, "network", "n", "", "network name to search allocated ips on") queryCmd.AddCommand(vmCommand) + queryCmd.AddCommand(orgvdcCmd) RootCmd.AddCommand(queryCmd) }