build(deps): bump the go-deps group across 1 directory with 8 updates
Bumps the go-deps group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [cloud.google.com/go/compute](https://github.com/googleapis/google-cloud-go) | `1.27.3` | `1.27.4` | | [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) | `1.3.2` | `1.4.0` | | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.54.18` | `1.55.2` | | [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) | `1.13.0` | `1.14.0` | | [github.com/openshift-online/ocm-sdk-go](https://github.com/openshift-online/ocm-sdk-go) | `0.1.429` | `0.1.432` | | [github.com/osbuild/images](https://github.com/osbuild/images) | `0.70.0` | `0.72.0` | | [github.com/vmware/govmomi](https://github.com/vmware/govmomi) | `0.38.0` | `0.39.0` | Updates `cloud.google.com/go/compute` from 1.27.3 to 1.27.4 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.27.3...compute/v1.27.4) Updates `github.com/Azure/azure-sdk-for-go/sdk/storage/azblob` from 1.3.2 to 1.4.0 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/storage/azblob/v1.3.2...sdk/azcore/v1.4.0) Updates `github.com/aws/aws-sdk-go` from 1.54.18 to 1.55.2 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.54.18...v1.55.2) Updates `github.com/gophercloud/gophercloud` from 1.13.0 to 1.14.0 - [Release notes](https://github.com/gophercloud/gophercloud/releases) - [Changelog](https://github.com/gophercloud/gophercloud/blob/v1.14.0/CHANGELOG.md) - [Commits](https://github.com/gophercloud/gophercloud/compare/v1.13.0...v1.14.0) Updates `github.com/openshift-online/ocm-sdk-go` from 0.1.429 to 0.1.432 - [Release notes](https://github.com/openshift-online/ocm-sdk-go/releases) - [Changelog](https://github.com/openshift-online/ocm-sdk-go/blob/main/CHANGES.md) - [Commits](https://github.com/openshift-online/ocm-sdk-go/compare/v0.1.429...v0.1.432) Updates `github.com/osbuild/images` from 0.70.0 to 0.72.0 - [Release notes](https://github.com/osbuild/images/releases) - [Commits](https://github.com/osbuild/images/compare/v0.70.0...v0.72.0) Updates `github.com/vmware/govmomi` from 0.38.0 to 0.39.0 - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.38.0...v0.39.0) Updates `google.golang.org/api` from 0.188.0 to 0.189.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.188.0...v0.189.0) --- updated-dependencies: - dependency-name: cloud.google.com/go/compute dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/gophercloud/gophercloud dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/openshift-online/ocm-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/osbuild/images dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
fd71c9cefa
commit
ca2c2dfa4f
104 changed files with 4713 additions and 2477 deletions
77
vendor/github.com/vmware/govmomi/object/virtual_device_list.go
generated
vendored
77
vendor/github.com/vmware/govmomi/object/virtual_device_list.go
generated
vendored
|
|
@ -361,6 +361,77 @@ func (l VirtualDeviceList) newNVMEBusNumber() int32 {
|
|||
return -1
|
||||
}
|
||||
|
||||
// FindSATAController will find the named SATA or AHCI controller if given, otherwise will pick an available controller.
|
||||
// An error is returned if the named controller is not found or not a SATA or AHCI controller. Or, if name is not
|
||||
// given and no available controller can be found.
|
||||
func (l VirtualDeviceList) FindSATAController(name string) (types.BaseVirtualController, error) {
|
||||
if name != "" {
|
||||
d := l.Find(name)
|
||||
if d == nil {
|
||||
return nil, fmt.Errorf("device '%s' not found", name)
|
||||
}
|
||||
switch c := d.(type) {
|
||||
case *types.VirtualSATAController:
|
||||
return c, nil
|
||||
case *types.VirtualAHCIController:
|
||||
return c, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("%s is not a SATA or AHCI controller", name)
|
||||
}
|
||||
}
|
||||
|
||||
c := l.PickController((*types.VirtualSATAController)(nil))
|
||||
if c == nil {
|
||||
c = l.PickController((*types.VirtualAHCIController)(nil))
|
||||
}
|
||||
if c == nil {
|
||||
return nil, errors.New("no available SATA or AHCI controller")
|
||||
}
|
||||
|
||||
switch c := c.(type) {
|
||||
case *types.VirtualSATAController:
|
||||
return c, nil
|
||||
case *types.VirtualAHCIController:
|
||||
return c, nil
|
||||
}
|
||||
|
||||
return nil, errors.New("unexpected controller type")
|
||||
}
|
||||
|
||||
// CreateSATAController creates a new SATA controller.
|
||||
func (l VirtualDeviceList) CreateSATAController() (types.BaseVirtualDevice, error) {
|
||||
sata := &types.VirtualAHCIController{}
|
||||
sata.BusNumber = l.newSATABusNumber()
|
||||
sata.Key = l.NewKey()
|
||||
|
||||
return sata, nil
|
||||
}
|
||||
|
||||
var sataBusNumbers = []int{0, 1, 2, 3}
|
||||
|
||||
// newSATABusNumber returns the bus number to use for adding a new SATA bus device.
|
||||
// -1 is returned if there are no bus numbers available.
|
||||
func (l VirtualDeviceList) newSATABusNumber() int32 {
|
||||
var used []int
|
||||
|
||||
for _, d := range l.SelectByType((*types.VirtualSATAController)(nil)) {
|
||||
num := d.(types.BaseVirtualController).GetVirtualController().BusNumber
|
||||
if num >= 0 {
|
||||
used = append(used, int(num))
|
||||
} // else caller is creating a new vm using SATAControllerTypes
|
||||
}
|
||||
|
||||
sort.Ints(used)
|
||||
|
||||
for i, n := range sataBusNumbers {
|
||||
if i == len(used) || n != used[i] {
|
||||
return int32(n)
|
||||
}
|
||||
}
|
||||
|
||||
return -1
|
||||
}
|
||||
|
||||
// FindDiskController will find an existing ide or scsi disk controller.
|
||||
func (l VirtualDeviceList) FindDiskController(name string) (types.BaseVirtualController, error) {
|
||||
switch {
|
||||
|
|
@ -370,6 +441,8 @@ func (l VirtualDeviceList) FindDiskController(name string) (types.BaseVirtualCon
|
|||
return l.FindSCSIController("")
|
||||
case name == "nvme":
|
||||
return l.FindNVMEController("")
|
||||
case name == "sata":
|
||||
return l.FindSATAController("")
|
||||
default:
|
||||
if c, ok := l.Find(name).(types.BaseVirtualController); ok {
|
||||
return c, nil
|
||||
|
|
@ -389,6 +462,8 @@ func (l VirtualDeviceList) PickController(kind types.BaseVirtualController) type
|
|||
return num < 15
|
||||
case *types.VirtualIDEController:
|
||||
return num < 2
|
||||
case types.BaseVirtualSATAController:
|
||||
return num < 30
|
||||
case *types.VirtualNVMEController:
|
||||
return num < 8
|
||||
default:
|
||||
|
|
@ -909,8 +984,6 @@ func (l VirtualDeviceList) Type(device types.BaseVirtualDevice) string {
|
|||
return "pvscsi"
|
||||
case *types.VirtualLsiLogicSASController:
|
||||
return "lsilogic-sas"
|
||||
case *types.VirtualNVMEController:
|
||||
return "nvme"
|
||||
case *types.VirtualPrecisionClock:
|
||||
return "clock"
|
||||
default:
|
||||
|
|
|
|||
27
vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go
generated
vendored
27
vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go
generated
vendored
|
|
@ -94,6 +94,33 @@ func (m VirtualDiskManager) CreateVirtualDisk(
|
|||
return NewTask(m.c, res.Returnval), nil
|
||||
}
|
||||
|
||||
// ExtendVirtualDisk extends an existing virtual disk.
|
||||
func (m VirtualDiskManager) ExtendVirtualDisk(
|
||||
ctx context.Context,
|
||||
name string, datacenter *Datacenter,
|
||||
capacityKb int64,
|
||||
eagerZero *bool) (*Task, error) {
|
||||
|
||||
req := types.ExtendVirtualDisk_Task{
|
||||
This: m.Reference(),
|
||||
Name: name,
|
||||
NewCapacityKb: capacityKb,
|
||||
EagerZero: eagerZero,
|
||||
}
|
||||
|
||||
if datacenter != nil {
|
||||
ref := datacenter.Reference()
|
||||
req.Datacenter = &ref
|
||||
}
|
||||
|
||||
res, err := methods.ExtendVirtualDisk_Task(ctx, m.c, &req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewTask(m.c, res.Returnval), nil
|
||||
}
|
||||
|
||||
// MoveVirtualDisk moves a virtual disk.
|
||||
func (m VirtualDiskManager) MoveVirtualDisk(
|
||||
ctx context.Context,
|
||||
|
|
|
|||
111
vendor/github.com/vmware/govmomi/object/vm_compatability_checker.go
generated
vendored
Normal file
111
vendor/github.com/vmware/govmomi/object/vm_compatability_checker.go
generated
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
Copyright (c) 2024-2024 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 object
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/vmware/govmomi/vim25"
|
||||
"github.com/vmware/govmomi/vim25/methods"
|
||||
"github.com/vmware/govmomi/vim25/types"
|
||||
)
|
||||
|
||||
// VmCompatibilityChecker models the CompatibilityChecker, a singleton managed
|
||||
// object that can answer questions about compatibility of a virtual machine
|
||||
// with a host.
|
||||
//
|
||||
// For more information, see:
|
||||
// https://dp-downloads.broadcom.com/api-content/apis/API_VWSA_001/8.0U3/html/ReferenceGuides/vim.vm.check.CompatibilityChecker.html
|
||||
type VmCompatibilityChecker struct {
|
||||
Common
|
||||
}
|
||||
|
||||
func NewVmCompatibilityChecker(c *vim25.Client) *VmCompatibilityChecker {
|
||||
return &VmCompatibilityChecker{
|
||||
Common: NewCommon(c, *c.ServiceContent.VmCompatibilityChecker),
|
||||
}
|
||||
}
|
||||
|
||||
func (c VmCompatibilityChecker) CheckCompatibility(
|
||||
ctx context.Context,
|
||||
vm types.ManagedObjectReference,
|
||||
host *types.ManagedObjectReference,
|
||||
pool *types.ManagedObjectReference,
|
||||
testTypes ...types.CheckTestType) ([]types.CheckResult, error) {
|
||||
|
||||
req := types.CheckCompatibility_Task{
|
||||
This: c.Reference(),
|
||||
Vm: vm,
|
||||
Host: host,
|
||||
Pool: pool,
|
||||
TestType: checkTestTypesToStrings(testTypes),
|
||||
}
|
||||
|
||||
res, err := methods.CheckCompatibility_Task(ctx, c.c, &req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ti, err := NewTask(c.c, res.Returnval).WaitForResult(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return ti.Result.(types.ArrayOfCheckResult).CheckResult, nil
|
||||
}
|
||||
|
||||
func (c VmCompatibilityChecker) CheckVmConfig(
|
||||
ctx context.Context,
|
||||
spec types.VirtualMachineConfigSpec,
|
||||
vm *types.ManagedObjectReference,
|
||||
host *types.ManagedObjectReference,
|
||||
pool *types.ManagedObjectReference,
|
||||
testTypes ...types.CheckTestType) ([]types.CheckResult, error) {
|
||||
|
||||
req := types.CheckVmConfig_Task{
|
||||
This: c.Reference(),
|
||||
Spec: spec,
|
||||
Vm: vm,
|
||||
Host: host,
|
||||
Pool: pool,
|
||||
TestType: checkTestTypesToStrings(testTypes),
|
||||
}
|
||||
|
||||
res, err := methods.CheckVmConfig_Task(ctx, c.c, &req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ti, err := NewTask(c.c, res.Returnval).WaitForResult(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return ti.Result.(types.ArrayOfCheckResult).CheckResult, nil
|
||||
}
|
||||
|
||||
func checkTestTypesToStrings(testTypes []types.CheckTestType) []string {
|
||||
if len(testTypes) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
s := make([]string, len(testTypes))
|
||||
for i := range testTypes {
|
||||
s[i] = string(testTypes[i])
|
||||
}
|
||||
return s
|
||||
}
|
||||
67
vendor/github.com/vmware/govmomi/object/vm_provisioning_checker.go
generated
vendored
Normal file
67
vendor/github.com/vmware/govmomi/object/vm_provisioning_checker.go
generated
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
Copyright (c) 2024-2024 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 object
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/vmware/govmomi/vim25"
|
||||
"github.com/vmware/govmomi/vim25/methods"
|
||||
"github.com/vmware/govmomi/vim25/types"
|
||||
)
|
||||
|
||||
// VmProvisioningChecker models the ProvisioningChecker, a singleton managed
|
||||
// object that can answer questions about the feasibility of certain
|
||||
// provisioning operations.
|
||||
//
|
||||
// For more information, see:
|
||||
// https://dp-downloads.broadcom.com/api-content/apis/API_VWSA_001/8.0U3/html/ReferenceGuides/vim.vm.check.ProvisioningChecker.html
|
||||
type VmProvisioningChecker struct {
|
||||
Common
|
||||
}
|
||||
|
||||
func NewVmProvisioningChecker(c *vim25.Client) *VmProvisioningChecker {
|
||||
return &VmProvisioningChecker{
|
||||
Common: NewCommon(c, *c.ServiceContent.VmProvisioningChecker),
|
||||
}
|
||||
}
|
||||
|
||||
func (c VmProvisioningChecker) CheckRelocate(
|
||||
ctx context.Context,
|
||||
vm types.ManagedObjectReference,
|
||||
spec types.VirtualMachineRelocateSpec,
|
||||
testTypes ...types.CheckTestType) ([]types.CheckResult, error) {
|
||||
|
||||
req := types.CheckRelocate_Task{
|
||||
This: c.Reference(),
|
||||
Vm: vm,
|
||||
Spec: spec,
|
||||
TestType: checkTestTypesToStrings(testTypes),
|
||||
}
|
||||
|
||||
res, err := methods.CheckRelocate_Task(ctx, c.c, &req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ti, err := NewTask(c.c, res.Returnval).WaitForResult(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return ti.Result.(types.ArrayOfCheckResult).CheckResult, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue