(schedulerClient schedulerclient.V2)
| 106 | }) |
| 107 | |
| 108 | func calculateNormalHostCountFromScheduler(schedulerClient schedulerclient.V2) (hostCount int) { |
| 109 | resp, err := schedulerClient.ListHosts(context.Background(), "", &schedulerv2.ListHostsRequest{}) |
| 110 | fmt.Println(resp, err) |
| 111 | Expect(err).NotTo(HaveOccurred()) |
| 112 | |
| 113 | for _, host := range resp.Hosts { |
| 114 | hostType := types.HostType(host.Type) |
| 115 | if hostType == types.HostTypeNormal { |
| 116 | hostCount++ |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | return |
| 121 | } |
no test coverage detected