Skip to content
Snippets Groups Projects

Resolve "Remove CSBI stuff from gosdnc"

Merged Fabian Seidl requested to merge 311-remove-csbi-stuff-from-gosdnc into master
@@ -36,7 +36,6 @@ import (
@@ -36,7 +36,6 @@ import (
"github.com/pterm/pterm"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
"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"
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').`,
@@ -65,14 +64,6 @@ if they diverge from the default credentials (user:'admin' and pw:'arista').`,
},
},
Tls: tls,
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)
pluginUUID, err := uuid.Parse(pluginID)
if err != nil {
if err != nil {
@@ -96,13 +87,12 @@ if they diverge from the default credentials (user:'admin' and pw:'arista').`,
@@ -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,
// Necessary for prompt mode. The flag variables have to be resetted,
// since in prompt mode the program keeps running.
// since in prompt mode the program keeps running.
mneName, opcode, pluginID, address, username, password = "", "", "", "", "", ""
mneName, pluginID, address, username, password = "", "", "", "", ""
tls = false
tls = false
},
},
}
}
var mneName string
var mneName string
var opcode string
var pluginID string
var pluginID string
var tls bool
var tls bool
@@ -110,7 +100,6 @@ func init() {
@@ -110,7 +100,6 @@ func init() {
networkElementCmd.AddCommand(networkElementCreateCmd)
networkElementCmd.AddCommand(networkElementCreateCmd)
networkElementCreateCmd.Flags().StringVar(&mneName, "name", "", "add a network element name (optional)")
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().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(&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")
networkElementCreateCmd.Flags().StringVarP(&username, "username", "u", "", "username for a gnmi resource")
Loading