/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/vmware/govmomi/object/network.go
42 строки
948 B
Justin Pierce
Add compat_otp package with openshift-tests-private (OTP) util implementations
11 авг 2025, 18:00
11 авг 2025, 18:00
80ac5c1
Код
Авторство
О чём код?
// © Broadcom. All Rights Reserved. // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. // SPDX-License-Identifier: Apache-2.0 package object import ( "context" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/types" ) type Network struct { Common } func NewNetwork(c *vim25.Client, ref types.ManagedObjectReference) *Network { return &Network{ Common: NewCommon(c, ref), } } func (n Network) GetInventoryPath() string { return n.InventoryPath } // EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network func (n Network) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { name, err := n.ObjectName(ctx) if err != nil { return nil, err } backing := &types.VirtualEthernetCardNetworkBackingInfo{ VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ DeviceName: name, }, } return backing, nil }