if (c.canProvision(state.getLabel())) { c.provision(state.getLabel(), workloadToProvision);
public static List<Descriptor<Cloud>> getCloudDescriptors() { return Cloud.all(); }
/** * Gets all {@link Cloud}s that can launch for this label. */ @Exported public Set<Cloud> getClouds() { if(clouds==null) { Set<Cloud> r = new HashSet<Cloud>(); Jenkins h = Jenkins.getInstance(); for (Cloud c : h.clouds) { if(c.canProvision(this)) r.add(c); } clouds = Collections.unmodifiableSet(r); } return clouds; }
public ACL superGetACL() { return super.getACL(); }
Collection<PlannedNode> additionalCapacities = c.provision(label, (int)Math.round(Math.floor(excessWorkload+m))); for (PlannedNode ac : additionalCapacities) { excessWorkload -= ac.numExecutors;
public String superGetDisplayName() { return super.getDisplayName(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
/** * Gets all {@link Cloud}s that can launch for this label. */ @Exported public Set<Cloud> getClouds() { if(clouds==null) { Set<Cloud> r = new HashSet<Cloud>(); Jenkins h = Jenkins.getInstance(); for (Cloud c : h.clouds) { if(c.canProvision(this)) r.add(c); } clouds = Collections.unmodifiableSet(r); } return clouds; }
@Override public final boolean hasPermission(Permission permission) { return getACL().hasPermission(permission); }
Collection<PlannedNode> additionalCapacities = c.provision(label, (int)Math.round(Math.floor(excessWorkload+m))); for (PlannedNode ac : additionalCapacities) { excessWorkload -= ac.numExecutors;
public Cloud getByDisplayName(Jenkins.CloudList clouds, String name) { Iterator i$ = clouds.iterator(); Cloud c; c = (Cloud) i$.next(); while (!c.getDisplayName().equals(name)) { if (!i$.hasNext()) { return null; } c = (Cloud) i$.next(); } return c; } }
public Descriptor<Cloud> superGetDescriptor() { return super.getDescriptor(); }
for (Cloud cloud : jenkinsInstance.clouds) { if (!(cloud instanceof AmazonEC2Cloud)) continue; if (!cloud.canProvision(label)) continue; AmazonEC2Cloud ec2 = (AmazonEC2Cloud) cloud; if (!ec2.isNoDelayProvisioning()) continue; Collection<NodeProvisioner.PlannedNode> plannedNodes = cloud.provision(label, currentDemand - availableCapacity); LOGGER.log(Level.FINE, "Planned {0} new nodes", plannedNodes.size()); strategyState.recordPendingLaunches(plannedNodes);
/** * Gets all {@link Cloud}s that can launch for this label. */ @Exported public Set<Cloud> getClouds() { if(clouds==null) { Set<Cloud> r = new HashSet<Cloud>(); Hudson h = Hudson.getInstance(); for (Cloud c : h.clouds) { if(c.canProvision(this)) r.add(c); } clouds = Collections.unmodifiableSet(r); } return clouds; }
@Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { try { Jenkins.get().clouds.rebuildHetero(req,json, Cloud.all(), "cloud"); return true; } catch (IOException e) { throw new FormException(e,"clouds"); } } }
@Override public final void checkPermission(Permission permission) { getACL().checkPermission(permission); }
Collection<PlannedNode> additionalCapacities = c.provision(label, (int)Math.round(Math.floor(excessWorkload+m))); for (PlannedNode ac : additionalCapacities) { excessWorkload -= ac.numExecutors;
public ListBoxModel doFillCloudItems() { ListBoxModel r = new ListBoxModel(); r.add("", ""); Jenkins.CloudList clouds = jenkins.model.Jenkins.getActiveInstance().clouds; for (Cloud cList : clouds) { if (cList instanceof AmazonEC2Cloud) { r.add(cList.getDisplayName(), cList.getDisplayName()); } } return r; }
@Override public Descriptor<Cloud> getDescriptor() { initPython(); if (pexec.isImplemented(3)) { return (Descriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } }
if (c.canProvision(state.getLabel())) { c.provision(state.getLabel(), workloadToProvision);