From c225b5b2580147f6ea364257a5daf64fb4149af4 Mon Sep 17 00:00:00 2001 From: ioito Date: Fri, 18 Mar 2022 14:10:37 +0800 Subject: [PATCH] fix(region): host schedtags with topology --- pkg/apis/compute/vpc.go | 1 + pkg/compute/models/vpcs.go | 1 + pkg/compute/models/wires.go | 1 + 3 files changed, 3 insertions(+) diff --git a/pkg/apis/compute/vpc.go b/pkg/apis/compute/vpc.go index e82cac3ed7..fca65766cc 100644 --- a/pkg/apis/compute/vpc.go +++ b/pkg/apis/compute/vpc.go @@ -144,6 +144,7 @@ type HostTopologyOutput struct { HostStatus string `json:"host_status"` HostType string `json:"host_type"` Networks []HostnetworkTopologyOutput `json:"networks"` + Schedtags []SchedtagShortDescDetails `json:"schedtags"` } type WireTopologyOutput struct { diff --git a/pkg/compute/models/vpcs.go b/pkg/compute/models/vpcs.go index ad03c2f1e4..2c48fb2a9d 100644 --- a/pkg/compute/models/vpcs.go +++ b/pkg/compute/models/vpcs.go @@ -1757,6 +1757,7 @@ func (self *SVpc) GetDetailsTopology(ctx context.Context, userCred mcclient.Toke HostStatus: hosts[i].HostStatus, HostType: hosts[i].HostType, Networks: []api.HostnetworkTopologyOutput{}, + Schedtags: GetSchedtagsDetailsToResourceV2(&hosts[i], ctx), } for j := range hns { host.Networks = append(host.Networks, api.HostnetworkTopologyOutput{ diff --git a/pkg/compute/models/wires.go b/pkg/compute/models/wires.go index a8ded1e729..6d068ed84a 100644 --- a/pkg/compute/models/wires.go +++ b/pkg/compute/models/wires.go @@ -1561,6 +1561,7 @@ func (self *SWire) GetDetailsTopology(ctx context.Context, userCred mcclient.Tok HostStatus: hosts[i].HostStatus, HostType: hosts[i].HostType, Networks: []api.HostnetworkTopologyOutput{}, + Schedtags: GetSchedtagsDetailsToResourceV2(&hosts[i], ctx), } for j := range hns { host.Networks = append(host.Networks, api.HostnetworkTopologyOutput{