(cmd *cobra.Command, args []string)
| 43 | } |
| 44 | |
| 45 | func removeAction(cmd *cobra.Command, args []string) error { |
| 46 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
| 47 | if err != nil { |
| 48 | return err |
| 49 | } |
| 50 | |
| 51 | options := types.NetworkRemoveOptions{ |
| 52 | GOptions: globalOptions, |
| 53 | Networks: args, |
| 54 | Stdout: cmd.OutOrStdout(), |
| 55 | } |
| 56 | |
| 57 | client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address) |
| 58 | if err != nil { |
| 59 | return err |
| 60 | } |
| 61 | defer cancel() |
| 62 | |
| 63 | return network.Remove(ctx, client, options) |
| 64 | } |
| 65 | |
| 66 | func networkRmShellComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { |
| 67 | // show network names, including "bridge" |
nothing calls this directly
no test coverage detected
searching dependent graphs…