Skip to content

Commit 72006c9

Browse files
authored
Fix container get (#19)
1 parent 7817322 commit 72006c9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GO_LINK_FLAGS_INJECT_VERSION := -s -w \
2525
-X github.com/v3io/version-go.os=$(GOOS) \
2626
-X github.com/v3io/version-go.arch=$(GOARCH)
2727

28-
V3CTL_BUILD_COMMAND ?= CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="${GO_LINK_FLAGS_INJECT_VERSION}" -o ${V3CTL_BIN_PATH}/v3ctl-$(V3CTL_TAG)-$(GOOS)-$(GOARCH) $(V3CTL_SRC_PATH)/cmd/v3ctl/main.go
28+
V3CTL_BUILD_COMMAND ?= GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="${GO_LINK_FLAGS_INJECT_VERSION}" -o ${V3CTL_BIN_PATH}/v3ctl-$(V3CTL_TAG)-$(GOOS)-$(GOARCH) $(V3CTL_SRC_PATH)/cmd/v3ctl/main.go
2929

3030
.PHONY: lint
3131
lint:

pkg/v3ctl/container/get.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package container
2222

2323
import (
2424
"strconv"
25+
"time"
2526

2627
"github.com/v3io/v3ctl/pkg/v3ctl"
2728

@@ -57,8 +58,10 @@ func newGetContainerCommandeer(getCommandeer *v3ctl.GetCommandeer) (*getContaine
5758
)
5859
getContainersInput.AccessKey = getCommandeer.RootCommandeer.AccessKey
5960
getContainersInput.ContainerName = getCommandeer.RootCommandeer.ContainerName
60-
61-
response, err := getCommandeer.RootCommandeer.DataPlaneContext.GetContainersSync(&getContainersInput)
61+
getContainersInput.URL = getCommandeer.RootCommandeer.WebapiURL
62+
getContainersInput.Timeout = time.Duration(60) * time.Second
63+
getContainersInput.IncludeResponseInError = true
64+
response, err := getCommandeer.RootCommandeer.Container.GetContainersSync(&getContainersInput)
6265
if err != nil {
6366
return errors.Wrap(err, "Failed to get containers")
6467
}

0 commit comments

Comments
 (0)