Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pass in kernel id

  • Loading branch information...
commit cff357909d759030e29df5de9f56daf7f0e54ddd 1 parent 3c791d5
John Bresnahan buzztroll authored
17 ...astic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultRun.java
View
@@ -23,6 +23,7 @@
import org.nimbustools.api._repr._CustomizationRequest;
import org.nimbustools.api._repr.vm._NIC;
import org.nimbustools.api.brain.ModuleLocator;
+import org.nimbustools.api.defaults.repr.vm.DefaultKernel;
import org.nimbustools.api.repr.Caller;
import org.nimbustools.api.repr.CannotTranslateException;
import org.nimbustools.api.repr.CreateRequest;
@@ -46,6 +47,8 @@
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.security.SSHKey;
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.security.SSHKeys;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.rmi.RemoteException;
public class DefaultRun implements Run {
@@ -215,6 +218,18 @@ public CreateRequest translateRunInstances(RunInstancesType req,
final _CreateRequest creq = this.repr._newCreateRequest();
+ DefaultKernel kernel = null;
+ String kernelRequestString = req.getKernelId();
+ if (kernelRequestString != null) {
+ kernel = new DefaultKernel();
+ try {
+ URI kernelURI = new URI("file://" + kernelRequestString);
+ kernel.setKernel(kernelURI);
+ } catch(URISyntaxException ueie) {
+ throw new RemoteException(ueie.toString());
+ }
+ }
+
creq.setContext(null);
creq.setCoScheduleDone(false);
creq.setCoScheduleID(null);
@@ -222,7 +237,7 @@ public CreateRequest translateRunInstances(RunInstancesType req,
creq.setCustomizationRequests(custRequests);
creq.setInitialStateRequest(State.STATE_Running);
creq.setName(imageID);
- creq.setRequestedKernel(null); // todo
+ creq.setRequestedKernel(kernel); // todo
creq.setRequestedNics(nics);
creq.setRequestedRA(ra);
creq.setRequestedSchedule(null); // ask for default
Please sign in to comment.
Something went wrong with that request. Please try again.