func (tc *testContext) listFullyConfiguredWindowsNodes(isBYOH bool) ([]v1.Node, error) {
	nodes, err := tc.client.K8s.CoreV1().Nodes().List(context.TODO(),
		metav1.ListOptions{LabelSelector: v1.LabelOSStable + "=windows"})
	if err != nil {
		return nil, errors.Wrap(err, "unable to list nodes")
	}
	var windowsNodes []v1.Node
	for _, node := range nodes.Items {
		// filter out nodes that haven't been fully configured
		if _, present := node.Annotations[nodeconfig.VersionAnnotation]; !present {
			continue
		}
		if (isBYOH && node.Annotations[controllers.BYOHAnnotation] == "true") ||
			(!isBYOH && node.Annotations[controllers.BYOHAnnotation] != "true") {
			windowsNodes = append(windowsNodes, node)
		}
	}
	return windowsNodes, nil
}
// listFullyConfiguredWindowsNodes returns a slice of nodes. If isBYOH is set to true, the nodes returned will be
// BYOH nodes, else they will be nodes configured by the Machine controller.
// A node is considered fully configured once it has the WMCO version annotation applied to it.
listFullyConfiguredWindowsNodes returns a slice of nodes. If isBYOH is set to true, the nodes returned will be
BYOH nodes, else they will be nodes configured by the Machine controller.
A node is considered fully configured once it has the WMCO version annotation applied to it.
// listFullyConfiguredWindowsNodes returns a slice of nodes . If isBYOH is set to true the nodes returned will be // BYOH nodes else they will be nodes configured by the Machine controller . // A node is considered fully configured once it has the WMCO version annotation applied to it .
func (tc *testContext) listFullyConfiguredWindowsNodes(isBYOH bool) ([]v1.Node, error) {
	nodes, err := tc.client.K8s.CoreV1().Nodes().List(context.TODO(),
		metav1.ListOptions{LabelSelector: v1.LabelOSStable + "=windows"})
	if err != nil {
		return nil, errors.Wrap(err, "unable to list nodes")
	}
	var windowsNodes []v1.Node
	for _, node := range nodes.Items {
		if _, present := node.Annotations[nodeconfig.VersionAnnotation]; !present {
			continue
		}
		if (isBYOH && node.Annotations[controllers.BYOHAnnotation] == "true") ||
			(!isBYOH && node.Annotations[controllers.BYOHAnnotation] != "true") {
			windowsNodes = append(windowsNodes, node)
		}
	}
	return windowsNodes, nil
}
func ( tc * testContext ) listFullyConfiguredWindowsNodes ( isBYOH bool ) ( [ ] v1 . Node , error ) { nodes , err := tc . client . K8s . CoreV1 ( ) . Nodes ( ) . List ( context . TODO ( ) , metav1 . ListOptions { LabelSelector : v1 . LabelOSStable + " " } ) if err != nil { return nil , errors . Wrap ( err , " " ) } var windowsNodes [ ] v1 . Node for _ , node := range nodes . Items { if _ , present := node . Annotations [ nodeconfig . VersionAnnotation ] ; ! present { continue } if ( isBYOH && node . Annotations [ controllers . BYOHAnnotation ] == " " ) || ( ! isBYOH && node . Annotations [ controllers . BYOHAnnotation ] != " " ) { windowsNodes = append ( windowsNodes , node ) } } return windowsNodes , nil }
listFullyConfiguredWindowsNodes returns a slice of nodes.
listFullyConfiguredWindowsNodes returns a slice of nodes .
// filter out nodes that haven't been fully configured