mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
bugfix
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
_ "yunion.io/x/onecloud/pkg/util/aliyun/provider"
|
||||
_ "yunion.io/x/onecloud/pkg/util/azure/provider"
|
||||
_ "yunion.io/x/onecloud/pkg/util/esxi/provider"
|
||||
_ "yunion.io/x/onecloud/pkg/util/aws/provider"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/cronman"
|
||||
|
||||
@@ -53,7 +53,6 @@ type SDisk struct {
|
||||
ExpiredTime time.Time
|
||||
ImageId string
|
||||
MountInstances SMountInstances
|
||||
OperationLocks SOperationLocks
|
||||
Portable bool
|
||||
ProductCode string
|
||||
ResourceGroupId string
|
||||
|
||||
@@ -24,14 +24,14 @@ func (self *SInstanceNic) GetDriver() string {
|
||||
}
|
||||
|
||||
func (self *SInstanceNic) GetINetwork() cloudprovider.ICloudNetwork {
|
||||
vswitchId := self.instance.VpcAttributes.VSwitchId
|
||||
networkId := self.instance.VpcAttributes.NetworkId
|
||||
wires, err := self.instance.host.GetIWires()
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
for i := 0; i < len(wires); i += 1 {
|
||||
wire := wires[i].(*SWire)
|
||||
net := wire.getNetworkById(vswitchId)
|
||||
net := wire.getNetworkById(networkId)
|
||||
if net != nil {
|
||||
return net
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user