feature: host add property server_ips that carries the ip list of

baremetal server
This commit is contained in:
Qiu Jian
2019-03-30 08:11:17 +08:00
committed by Yousong Zhou
parent 2519ef5551
commit cab68198a0
+3
View File
@@ -2180,6 +2180,9 @@ func (self *SHost) getMoreDetails(ctx context.Context, extra *jsonutils.JSONDict
if server != nil {
extra.Add(jsonutils.NewString(server.Id), "server_id")
extra.Add(jsonutils.NewString(server.Name), "server")
if self.HostType == HOST_TYPE_BAREMETAL {
extra.Add(jsonutils.NewString(strings.Join(server.getRealIPs(), ",")), "server_ips")
}
}
netifs := self.GetNetInterfaces()
if netifs != nil && len(netifs) > 0 {