Skip to content

Instantly share code, notes, and snippets.

@michaelrice
Created May 5, 2015 06:12
Show Gist options
  • Select an option

  • Save michaelrice/27350531db72d40db023 to your computer and use it in GitHub Desktop.

Select an option

Save michaelrice/27350531db72d40db023 to your computer and use it in GitHub Desktop.
// Set the resource pool
ResourcePool rp
if (build.resourcePool) {
rp = (ResourcePool) new InventoryNavigator(rootFolder).searchManagedEntity("ResourcePool", build.resourcePool)
if (rp == null) {
throw new ProvisioningException(
"Could not find the user-provided ResourcePool " +
"${build.resourcePool}.")
}
}
else {
rp = (ResourcePool) host.parent.resourcePool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment