Skip to content

Commit ad66761

Browse files
committed
fix: support govc import.spec for remote ova
PR #1885 added support for remote ovf files, but not ova. Issue #1836
1 parent 4b34060 commit ad66761

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

govc/importx/spec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (cmd *spec) Run(ctx context.Context, f *flag.FlagSet) error {
107107
return fmt.Errorf("invalid file extension %s", path.Ext(fpath))
108108
}
109109

110-
if isRemotePath(fpath) {
110+
if isRemotePath(f.Arg(0)) {
111111
client, err := cmd.Client()
112112
if err != nil {
113113
return err

govc/test/import.bats

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ load test_helper
2222
run govc import.spec "https://$(govc env GOVC_URL)/folder/$TTYLINUX_NAME.ovf"
2323
assert_success
2424

25+
run govc import.spec "https://$(govc env GOVC_URL)/folder/$TTYLINUX_NAME.ova"
26+
assert_success
27+
2528
proto=$(jq -r .IPProtocol <<<"$output")
2629
assert_equal IPv4 "$proto"
2730

0 commit comments

Comments
 (0)