-
Notifications
You must be signed in to change notification settings - Fork 11
/
InProvisioning.groovy
35 lines (29 loc) · 1.15 KB
/
InProvisioning.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package fr.edf.jenkins.plugins.mac.provisioning
import javax.annotation.CheckForNull
import javax.annotation.Nonnull
import hudson.ExtensionList
import hudson.ExtensionPoint
import hudson.model.Label
abstract class InProvisioning implements ExtensionPoint {
/**
* Returns the agents names in provisioning according to all implementations of this extension point for the given label.
*
* @param label the {@link Label} being checked.
* @return the agents names in provisioning according to all implementations of this extension point for the given label.
*/
@Nonnull
public static Set<String> getAllInProvisioning(@CheckForNull Label label) {
return all().collect{ it.getInProvisioning(label) }.collectMany([] as HashSet){ it }
}
public static ExtensionList<InProvisioning> all() {
return ExtensionList.lookup(InProvisioning)
}
/**
* Returns the agents in provisioning for the current label.
*
* @param label The label being checked
* @return The agents names in provisioning for the current label.
*/
@Nonnull
public abstract Set<String> getInProvisioning(Label label)
}