Copyright(C) 2024. Huawei Technologies Co.,Ltd. All rights reserved.
*/
Package common is common function or object of ranktable.
*/
package common
import "ascend-common/api"
type Server struct {
DeviceList []*Device `json:"device"`
Hardware string `json:"hardware_type,omitempty"`
ServerID string `json:"server_id"`
HostIP string `json:"host_ip"`
ContainerIP string `json:"container_ip,omitempty"`
SuperPodRank string `json:"-"`
SuperPodID string `json:"-"`
}
type Instance struct {
PodName string `json:"pod_name"`
ServerID string `json:"server_id"`
ServerIP string `json:"server_ip"`
HostIp string `json:"host_ip"`
SuperPodId int32 `json:"super_pod_id"`
Devices []Dev `json:"devices"`
RackID int32 `json:"rack_id"`
SeverIndex string `json:"server_index"`
}
type Dev struct {
DeviceID string `json:"device_id"`
DeviceIP string `json:"device_ip"`
SuperDeviceID string `json:"super_device_id,omitempty"`
LevelList []api.RankLevel `json:"levelList,omitempty"`
}
type Device struct {
Dev
RankID string `json:"rank_id"`
RackID int32 `json:"rack_id,omitempty"`
ServerID string `json:"server_id,omitempty"`
SuperPodId int32 `json:"super_pod_id,omitempty"`
}