Skip to content

Commit

Permalink
chore: streamline: replace use of GetMayastorPluginCmdString
Browse files Browse the repository at this point in the history
Replace use of GetMayastorPluginCmdString
with GetMayastorPluginCmd().String()

Signed-off-by: Blaise Dias <[email protected]>
  • Loading branch information
blaisedias committed Nov 20, 2024
1 parent d002e89 commit 8a57b1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
8 changes: 0 additions & 8 deletions common/controlplane/v1/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,3 @@ func GetMayastorPluginCmd(arg ...string) *exec.Cmd {
}
return exec.Command(binPath, arg...)
}

// GetMayastorPluginCmdString return a string which can be supplied to
// shell commands to invoke the plugin for the mayastor IOEngine
// deprecated: use GetMayastorPluginCmd in preference
func GetMayastorPluginCmdString() string {
cmd := GetMayastorPluginCmd()
return fmt.Sprintf("%v ", cmd)
}
7 changes: 3 additions & 4 deletions common/k8stest/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ func GenerateSupportBundle(testLogDir string) {
bashCmd := fmt.Sprintf("%s/e2e-cluster-dump.sh --destdir '%s' --plugin '%s'",
locations.GetE2EScriptsPath(),
testLogDir,
mcpV1.GetMayastorPluginCmdString(),
mcpV1.GetMayastorPluginCmd().String(),
)
logf.Log.Info("About to execute", "command", bashCmd)
cmd := exec.Command("bash", "-c", bashCmd)
Expand All @@ -1012,9 +1012,8 @@ func GenerateSupportBundle(testLogDir string) {
logf.Log.Info("command failed", "error", err)
logf.Log.Info(out.String())
}
bashCmd = fmt.Sprintf("%s -n %s get volume-replica-topologies -o json > %s/%s",
mcpV1.GetMayastorPluginCmdString(),
common.NSMayastor(),
bashCmd = fmt.Sprintf("%s > %s/%s",
mcpV1.GetMayastorPluginCmd("-n", common.NSMayastor(), "get", "volume-replica-topologies", "-o", "json").String(),
testLogDir,
"replica-topologies.json")
logf.Log.Info("About to execute", "command", bashCmd)
Expand Down

0 comments on commit 8a57b1e

Please sign in to comment.