From 6c3465b15e1e2c3805c77d597656cbf45c23ae55 Mon Sep 17 00:00:00 2001 From: Fabian Seidl <fabian.seidl@h-da.de> Date: Fri, 1 Sep 2023 12:15:34 +0000 Subject: [PATCH] Resolve "Remove CSBI stuff from gosdnc" See merge request danet/gosdn!516 --- cli/cmd/networkElementCreate.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cli/cmd/networkElementCreate.go b/cli/cmd/networkElementCreate.go index 2b0b7b415..4cc764922 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") -- GitLab