diff options
author | 2020-08-29 01:27:53 -0700 | |
---|---|---|
committer | 2020-09-02 13:59:58 -0700 | |
commit | d8ed6e76a40b8942c2b56c623dcc097d734e3dca (patch) | |
tree | fe5712061d02d1d971b84cbc2f2f7bca68666cfd /src/tools/emcoctl/cmd/delete.go | |
parent | d14246bb9a2c8874f9925c45322d678a93584adb (diff) |
Update CLI with complete get implementation
CLI updated with get functionality. Also adding
vFw test case
Issue-ID: MULTICLOUD-1065
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Change-Id: I7bd22aca9fac9cb7b1f4c93d0ffad5b07b62cced
Diffstat (limited to 'src/tools/emcoctl/cmd/delete.go')
-rw-r--r-- | src/tools/emcoctl/cmd/delete.go | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/tools/emcoctl/cmd/delete.go b/src/tools/emcoctl/cmd/delete.go index d6dbfe34..faa52b5b 100644 --- a/src/tools/emcoctl/cmd/delete.go +++ b/src/tools/emcoctl/cmd/delete.go @@ -1,5 +1,5 @@ /* -Copyright © 2020 Intel Corp +Copyright © 2020 Intel Corp Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,9 +24,8 @@ import ( // deleteCmd represents the delete command var deleteCmd = &cobra.Command{ Use: "delete", - Short: "Delete resources in input file or commandline", + Short: "Delete the resources from input file or url from command line", Run: func(cmd *cobra.Command, args []string) { - fmt.Println("delete called") c := NewRestClient() if len(inputFiles) > 0 { resources := readResources() @@ -35,23 +34,14 @@ var deleteCmd = &cobra.Command{ c.RestClientDelete(res.anchor, res.body) } } else if len(args) >= 1 { - fmt.Println(args[0]) - c.RestClientDelete(args[0], nil) + c.RestClientDeleteAnchor(args[0]) + } else { + fmt.Println("Error: No args ") } }, } func init() { rootCmd.AddCommand(deleteCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // deleteCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // deleteCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") deleteCmd.Flags().StringSliceVarP(&inputFiles, "filename", "f", []string{}, "Filename of the input file") } |