mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
add more instance filed
This commit is contained in:
@@ -415,6 +415,16 @@ func (self *SRegion) GetInstances(zoneId string, ids []string, offset int, limit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var networkInterfaces SNetworkInterfaces
|
||||||
|
for _, n := range instance.NetworkInterfaces {
|
||||||
|
i := SNetworkInterface{
|
||||||
|
MacAddress: StrVal(n.MacAddress),
|
||||||
|
NetworkInterfaceId: StrVal(n.NetworkInterfaceId),
|
||||||
|
PrimaryIpAddress: StrVal(n.PrivateIpAddress),
|
||||||
|
}
|
||||||
|
networkInterfaces.NetworkInterface = append(networkInterfaces.NetworkInterface, i)
|
||||||
|
}
|
||||||
|
|
||||||
sinstance := SInstance{
|
sinstance := SInstance{
|
||||||
RegionId: self.RegionId,
|
RegionId: self.RegionId,
|
||||||
ZoneId: *instance.Placement.AvailabilityZone,
|
ZoneId: *instance.Placement.AvailabilityZone,
|
||||||
@@ -434,13 +444,13 @@ func (self *SRegion) GetInstances(zoneId string, ids []string, offset int, limit
|
|||||||
Status: *instance.State.Name,
|
Status: *instance.State.Name,
|
||||||
Disks: disks,
|
Disks: disks,
|
||||||
SecurityGroupIds: secgroups,
|
SecurityGroupIds: secgroups,
|
||||||
|
NetworkInterfaces: networkInterfaces,
|
||||||
// EipAddress:
|
// EipAddress:
|
||||||
// VlanId:
|
// VlanId:
|
||||||
// VpcAttributes:
|
// VpcAttributes:
|
||||||
// NetworkInterfaces:
|
|
||||||
// OSName:
|
// OSName:
|
||||||
// OSType:
|
// OSType:
|
||||||
// Description:
|
Description: tagspec.GetDescTag(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if instance.PrivateIpAddress != nil {
|
if instance.PrivateIpAddress != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user