diff --git a/cli/cmd/networkElementCreate.go b/cli/cmd/networkElementCreate.go index 2b0b7b415b1d28cc7c1bef5d5d56beff05b0a7ab..4cc764922249e65e4e0418f65eb2eb791b54b5e0 100644 --- a/cli/cmd/networkElementCreate.go +++ b/cli/cmd/networkElementCreate.go @@ -36,7 +36,6 @@ import ( "github.com/pterm/pterm" "github.com/spf13/cobra" - spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" ) @@ -65,14 +64,6 @@ if they diverge from the default credentials (user:'admin' and pw:'arista').`, }, Tls: tls, } - switch opcode { - case "plugin": - opt.Type = spb.Type_TYPE_PLUGIN - case "csbi": - opt.Type = spb.Type_TYPE_CONTAINERISED - default: - opt.Type = spb.Type_TYPE_OPENCONFIG - } pluginUUID, err := uuid.Parse(pluginID) if err != nil { @@ -96,13 +87,12 @@ if they diverge from the default credentials (user:'admin' and pw:'arista').`, // Necessary for prompt mode. The flag variables have to be resetted, // since in prompt mode the program keeps running. - mneName, opcode, pluginID, address, username, password = "", "", "", "", "", "" + mneName, pluginID, address, username, password = "", "", "", "", "" tls = false }, } var mneName string -var opcode string var pluginID string var tls bool @@ -110,7 +100,6 @@ func init() { networkElementCmd.AddCommand(networkElementCreateCmd) networkElementCreateCmd.Flags().StringVar(&mneName, "name", "", "add a network element name (optional)") - //networkElementCreateCmd.Flags().StringVar(&opcode, "type", "", "generation target (csbi or plugin)") networkElementCreateCmd.Flags().StringVar(&pluginID, "plugin-id", "", "the plugin ID of the plugin to be used") networkElementCreateCmd.Flags().StringVarP(&address, "address", "a", "", "address of a gnmi target, e.g. 192.168.1.1:6030") networkElementCreateCmd.Flags().StringVarP(&username, "username", "u", "", "username for a gnmi resource")