DaanHoogland commented on code in PR #102:
URL:
https://github.com/apache/cloudstack-kubernetes-provider/pull/102#discussion_r3835879486
##########
cloudstack_loadbalancer.go:
##########
@@ -507,24 +524,37 @@ func (cs *CSCloud) verifyHosts(nodes []*corev1.Node)
([]string, string, error) {
p.SetProjectid(cs.projectID)
}
- l, err := cs.client.VirtualMachine.ListVirtualMachines(p)
+ vms, err := listAll(p, func() (int, []*cloudstack.VirtualMachine,
error) {
+ l, err := cs.client.VirtualMachine.ListVirtualMachines(p)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ return l.Count, l.VirtualMachines, nil
+ })
if err != nil {
return nil, "", fmt.Errorf("error retrieving list of hosts:
%v", err)
}
var hostIDs []string
var networkID string
+ seen := map[string]bool{}
Review Comment:
```suggestion
seen := map[string]bool{} // used to check whether the changing set of
VMs contains one we had already seen in another page.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]