Skip to content

Commit

Permalink
extend cmd line support to accept multiple arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
  • Loading branch information
havetisyan committed Sep 11, 2024
1 parent 2e61197 commit 98eaebe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion libs/go/sia/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,14 @@ func SetupAgent(opts *options.Options, siaMainDir, siaLinkDir string) {
}
}

func RunAgent(siaCmd, ztsUrl string, opts *options.Options) {
func RunAgent(siaCmds, ztsUrl string, opts *options.Options) {
cmds := strings.Split(siaCmds, ",")
for _, cmd := range cmds {
runAgentCommand(cmd, ztsUrl, opts)
}
}

func runAgentCommand(siaCmd, ztsUrl string, opts *options.Options) {

//make sure the meta endpoint is configured by the caller
if opts.MetaEndPoint == "" {
Expand Down
9 changes: 8 additions & 1 deletion libs/go/sia/aws/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,14 @@ func SetupAgent(opts *options.Options, siaMainDir, siaLinkDir string) {
}
}

func RunAgent(siaCmd, ztsUrl string, opts *options.Options) {
func RunAgent(siaCmds, ztsUrl string, opts *options.Options) {
cmds := strings.Split(siaCmds, ",")
for _, cmd := range cmds {
runAgentCommand(cmd, ztsUrl, opts)
}
}

func runAgentCommand(siaCmd, ztsUrl string, opts *options.Options) {

//make sure the meta endpoint is configured by the caller
if opts.MetaEndPoint == "" {
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
<module>provider/buildkite/sia-buildkite</module>
<module>provider/gcp/sia-gce</module>
<module>provider/gcp/sia-gke</module>
<module>provider/gcp/sia-run</module>
<module>provider/github/sia-actions</module>
<module>utils/zms-cli</module>
<module>utils/athenz-conf</module>
Expand Down

0 comments on commit 98eaebe

Please sign in to comment.