Skip to content

Commit

Permalink
fix: support govc import.spec for remote ova
Browse files Browse the repository at this point in the history
PR #1885 added support for remote ovf files, but not ova.

Issue #1836
  • Loading branch information
dougm committed Feb 2, 2022
1 parent 4b34060 commit ad66761
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion govc/importx/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (cmd *spec) Run(ctx context.Context, f *flag.FlagSet) error {
return fmt.Errorf("invalid file extension %s", path.Ext(fpath))
}

if isRemotePath(fpath) {
if isRemotePath(f.Arg(0)) {
client, err := cmd.Client()
if err != nil {
return err
Expand Down
3 changes: 3 additions & 0 deletions govc/test/import.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ load test_helper
run govc import.spec "https://$(govc env GOVC_URL)/folder/$TTYLINUX_NAME.ovf"
assert_success

run govc import.spec "https://$(govc env GOVC_URL)/folder/$TTYLINUX_NAME.ova"
assert_success

proto=$(jq -r .IPProtocol <<<"$output")
assert_equal IPv4 "$proto"

Expand Down

0 comments on commit ad66761

Please sign in to comment.