mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix(region): vendor update (#25570)
This commit is contained in:
2
go.mod
2
go.mod
@@ -112,7 +112,7 @@ require (
|
||||
k8s.io/cri-api v0.28.15
|
||||
k8s.io/klog/v2 v2.90.1
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260831080818-2179b7a0181c
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260904120442-091221507d42
|
||||
yunion.io/x/executor v0.0.0-20260312022053-f538abd2b005
|
||||
yunion.io/x/jsonutils v1.0.1-0.20260715075349-615cfb44ff7c
|
||||
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1754,8 +1754,8 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260831080818-2179b7a0181c h1:/SYJVNyrocWhzaQ+WQiGRS/o/RdOb93+ZhIk4T2FsUU=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260831080818-2179b7a0181c/go.mod h1:IwmeqVkld+4XylS80cyVBXyN8fJ5ynAspd/6tcvqJuc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260904120442-091221507d42 h1:UwlzQiM9AqN2p59h3XOuKZM4Zj1hnXJVGlqKnLgCARE=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260904120442-091221507d42/go.mod h1:IwmeqVkld+4XylS80cyVBXyN8fJ5ynAspd/6tcvqJuc=
|
||||
yunion.io/x/executor v0.0.0-20260312022053-f538abd2b005 h1:3sWwcjGXGjG9mLBWa7AyLq+QSi0udTAx21pfVQRFMBE=
|
||||
yunion.io/x/executor v0.0.0-20260312022053-f538abd2b005/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
|
||||
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -2545,7 +2545,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
|
||||
# sigs.k8s.io/yaml v1.3.0
|
||||
## explicit; go 1.12
|
||||
sigs.k8s.io/yaml
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260831080818-2179b7a0181c
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260904120442-091221507d42
|
||||
## explicit; go 1.24
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
|
||||
15
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/virtualmachine.go
generated
vendored
15
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/virtualmachine.go
generated
vendored
@@ -966,6 +966,18 @@ func (svm *SVirtualMachine) getNetTags() string {
|
||||
info = append(info, nicConf.Mac, nicConf.Network)
|
||||
info = append(info, nicConf.IPs...)
|
||||
}
|
||||
if len(info) > 0 {
|
||||
return strings.Join(info, "/")
|
||||
}
|
||||
// guest.net 为空时回退读取虚拟网卡硬件配置
|
||||
for i := range svm.vnics {
|
||||
mac := svm.vnics[i].GetMAC()
|
||||
network := svm.vnics[i].GetNetworkName()
|
||||
if len(mac) == 0 && len(network) == 0 {
|
||||
continue
|
||||
}
|
||||
info = append(info, mac, network)
|
||||
}
|
||||
return strings.Join(info, "/")
|
||||
}
|
||||
|
||||
@@ -978,6 +990,9 @@ type sNicConfig struct {
|
||||
func (svm *SVirtualMachine) fetchGuestIps() map[string]sNicConfig {
|
||||
guestIps := make(map[string]sNicConfig)
|
||||
moVM := svm.getVirtualMachine()
|
||||
if moVM.Guest == nil {
|
||||
return guestIps
|
||||
}
|
||||
for _, net := range moVM.Guest.Net {
|
||||
if len(net.Network) == 0 {
|
||||
continue
|
||||
|
||||
29
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/vnic.go
generated
vendored
29
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/vnic.go
generated
vendored
@@ -63,7 +63,34 @@ func (nic *SVirtualNIC) GetDriver() string {
|
||||
}
|
||||
|
||||
func (nic *SVirtualNIC) GetMAC() string {
|
||||
return netutils.FormatMacAddr(nic.getVirtualEthernetCard().MacAddress)
|
||||
card := nic.getVirtualEthernetCard()
|
||||
if card == nil {
|
||||
return ""
|
||||
}
|
||||
return netutils.FormatMacAddr(card.MacAddress)
|
||||
}
|
||||
|
||||
func (nic *SVirtualNIC) GetNetworkName() string {
|
||||
card := nic.getVirtualEthernetCard()
|
||||
if card == nil {
|
||||
return ""
|
||||
}
|
||||
switch bk := card.Backing.(type) {
|
||||
case *types.VirtualEthernetCardNetworkBackingInfo:
|
||||
if len(bk.DeviceName) > 0 {
|
||||
return bk.DeviceName
|
||||
}
|
||||
case *types.VirtualEthernetCardOpaqueNetworkBackingInfo:
|
||||
if len(bk.OpaqueNetworkId) > 0 {
|
||||
return bk.OpaqueNetworkId
|
||||
}
|
||||
}
|
||||
if card.DeviceInfo != nil {
|
||||
if desc := card.DeviceInfo.GetDescription(); desc != nil && len(desc.Summary) > 0 {
|
||||
return desc.Summary
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (nic *SVirtualNIC) InClassicNetwork() bool {
|
||||
|
||||
Reference in New Issue
Block a user