go.mod: update images to 0.11

Mainly to include:

- distro/rhel9: Make /boot 600 MiB big on RHEL 9.3+
- fedora: exclude sdubby
- Minimal image builds

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2023-10-06 10:00:29 +02:00 committed by Ondřej Budai
parent edc45fde72
commit 19edaca01a
213 changed files with 4113 additions and 3823 deletions

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -180,7 +180,7 @@ func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error {
}
type infoResult struct {
Datastores []mo.Datastore
Datastores []mo.Datastore `json:"datastores"`
objects []*object.Datastore
}

94
vendor/github.com/vmware/govmomi/govc/flags/env.go generated vendored Normal file
View file

@ -0,0 +1,94 @@
/*
Copyright (c) 2023-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package flags
import (
"context"
"flag"
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/vim25/mo"
)
type EnvBrowser struct {
*ClusterFlag
*HostSystemFlag
*VirtualMachineFlag
}
func (cmd *EnvBrowser) Register(ctx context.Context, f *flag.FlagSet) {
cmd.ClusterFlag, ctx = NewClusterFlag(ctx)
cmd.ClusterFlag.Register(ctx, f)
cmd.HostSystemFlag, ctx = NewHostSystemFlag(ctx)
cmd.HostSystemFlag.Register(ctx, f)
cmd.VirtualMachineFlag, ctx = NewVirtualMachineFlag(ctx)
cmd.VirtualMachineFlag.Register(ctx, f)
}
func (cmd *EnvBrowser) Process(ctx context.Context) error {
if err := cmd.ClusterFlag.Process(ctx); err != nil {
return err
}
if err := cmd.HostSystemFlag.Process(ctx); err != nil {
return err
}
return cmd.VirtualMachineFlag.Process(ctx)
}
func (cmd *EnvBrowser) Browser(ctx context.Context) (*object.EnvironmentBrowser, error) {
c, err := cmd.VirtualMachineFlag.Client()
if err != nil {
return nil, err
}
vm, err := cmd.VirtualMachine()
if err != nil {
return nil, err
}
if vm != nil {
return vm.EnvironmentBrowser(ctx)
}
host, err := cmd.HostSystemIfSpecified()
if err != nil {
return nil, err
}
if host != nil {
var h mo.HostSystem
err = host.Properties(ctx, host.Reference(), []string{"parent"}, &h)
if err != nil {
return nil, err
}
return object.NewComputeResource(c, *h.Parent).EnvironmentBrowser(ctx)
}
finder, ferr := cmd.ClusterFlag.Finder()
if ferr != nil {
return nil, ferr
}
cr, ferr := finder.ComputeResourceOrDefault(ctx, cmd.ClusterFlag.Name)
if ferr != nil {
return nil, ferr
}
return cr.EnvironmentBrowser(ctx)
}

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -31,33 +31,33 @@ type Command struct {
}
type CommandInfoItem struct {
Name string `xml:"name"`
DisplayName string `xml:"displayName"`
Help string `xml:"help"`
Name string `xml:"name" json:"name"`
DisplayName string `xml:"displayName" json:"displayName"`
Help string `xml:"help" json:"help"`
}
type CommandInfoParam struct {
CommandInfoItem
Aliases []string `xml:"aliases"`
Flag bool `xml:"flag"`
Aliases []string `xml:"aliases" json:"aliases"`
Flag bool `xml:"flag" json:"flag"`
}
type CommandInfoHint struct {
Key string `xml:"key"`
Value string `xml:"value"`
Key string `xml:"key" json:"key"`
Value string `xml:"value" json:"value"`
}
type CommandInfoHints []CommandInfoHint
type CommandInfoMethod struct {
CommandInfoItem
Param []CommandInfoParam `xml:"param"`
Hints CommandInfoHints `xml:"hints"`
Param []CommandInfoParam `xml:"param" json:"param"`
Hints CommandInfoHints `xml:"hints" json:"hints"`
}
type CommandInfo struct {
CommandInfoItem
Method []*CommandInfoMethod `xml:"method"`
Method []*CommandInfoMethod `xml:"method" json:"method"`
}
func NewCommand(args []string) *Command {

View file

@ -27,8 +27,8 @@ import (
)
type Fault struct {
Message string
Detail string
Message string `json:"message"`
Detail string `json:"detail"`
}
func (f Fault) Error() string {

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -19,9 +19,9 @@ package esxcli
import "github.com/vmware/govmomi/object"
type FirewallInfo struct {
Loaded bool
Enabled bool
DefaultAction string
Loaded bool `json:"loaded"`
Enabled bool `json:"enabled"`
DefaultAction string `json:"defaultAction"`
}
// GetFirewallInfo via 'esxcli network firewall get'

View file

@ -24,9 +24,9 @@ import (
type Values map[string][]string
type Response struct {
Info *CommandInfoMethod
Values []Values
String string
Info *CommandInfoMethod `json:"info"`
Values []Values `json:"values"`
String string `json:"string"`
}
func (v Values) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -29,8 +29,39 @@ import (
"github.com/vmware/govmomi/vim25/types"
)
type KeyValue struct {
Key string
Value string
}
// case insensitive for Key + Value
func (kv *KeyValue) UnmarshalJSON(b []byte) error {
e := struct {
types.KeyValue
Key *string
Value *string
}{
types.KeyValue{}, &kv.Key, &kv.Value,
}
err := json.Unmarshal(b, &e)
if err != nil {
return err
}
if kv.Key == "" {
kv.Key = e.KeyValue.Key // "key"
}
if kv.Value == "" {
kv.Value = e.KeyValue.Value // "value"
}
return nil
}
type Property struct {
types.KeyValue
KeyValue
Spec *ovf.Property `json:",omitempty"`
}

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -161,7 +161,10 @@ func (cmd *ovfx) Prepare(f *flag.FlagSet) (string, error) {
func (cmd *ovfx) Map(op []Property) (p []types.KeyValue) {
for _, v := range op {
p = append(p, v.KeyValue)
p = append(p, types.KeyValue{
Key: v.Key,
Value: v.Value,
})
}
return

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -171,7 +171,7 @@ func (cmd *spec) Map(e *ovf.Envelope) (res []Property) {
k = fmt.Sprintf("%s.%s", k, *p.Instance)
}
np := Property{KeyValue: types.KeyValue{Key: k, Value: d}}
np := Property{KeyValue: KeyValue{Key: k, Value: d}}
if cmd.Verbose() {
np.Spec = &p.Property[i]
}

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -159,7 +159,7 @@ func (cmd *ps) Run(ctx context.Context, f *flag.FlagSet) error {
type psResult struct {
cmd *ps
ProcessInfo []types.GuestProcessInfo
ProcessInfo []types.GuestProcessInfo `json:"processInfo"`
}
func (r *psResult) Write(w io.Writer) error {

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -175,7 +175,7 @@ func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error {
}
type infoResult struct {
VirtualMachines []mo.VirtualMachine
VirtualMachines []mo.VirtualMachine `json:"virtualMachines"`
objects []*object.VirtualMachine
entities map[types.ManagedObjectReference]string
cmd *info

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -68,7 +68,7 @@ func (cmd *ip) Description() string {
By default the vm.ip command depends on vmware-tools to report the 'guest.ipAddress' field and will
wait until it has done so. This value can also be obtained using:
govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.IpAddress
govc vm.info -json $vm | jq -r .virtualMachines[].guest.ipAddress
When given the '-a' flag, only IP addresses for which there is a corresponding virtual nic are listed.
If there are multiple nics, the listed addresses will be comma delimited. The '-a' flag depends on
@ -78,7 +78,7 @@ by tools for which there is no virtual nic are not included, for example that of
These values can also be obtained using:
govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.Net[].IpConfig.IpAddress[].IpAddress
govc vm.info -json $vm | jq -r .virtualMachines[].guest.net[].ipConfig.ipAddress[].ipAddress
When given the '-n' flag, filters '-a' behavior to the nic specified by MAC address or device name.