Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor modifications in RequestInfo and RequestState

  • Loading branch information...
commit d37b3b5937fb627e50c7a04eb2daacabb7e81e85 1 parent 332434e
@pauloricardomg pauloricardomg authored
View
7 service-api/java/source/src/org/nimbustools/api/_repr/_RequestInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2008 University of Chicago
+ * Copyright 1999-2010 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
@@ -18,10 +18,8 @@
import java.util.Calendar;
-import org.nimbustools.api.repr.Caller;
import org.nimbustools.api.repr.RequestInfo;
import org.nimbustools.api.repr.si.RequestState;
-import org.nimbustools.api.repr.vm.ResourceAllocation;
import org.nimbustools.api.repr.vm.VMFile;
public interface _RequestInfo extends RequestInfo {
@@ -34,8 +32,5 @@
public void setVMFiles(VMFile[] files);
public void setSshKeyName(String sshKeyName);
- public void setCreator(Caller creator);
- public void setMdUserData(String mdUserData);
- public void setResourceAllocation(ResourceAllocation ra);
public void setGroupID(String groupId);
}
View
19 service-api/java/source/src/org/nimbustools/api/repr/RequestInfo.java
@@ -1,9 +1,23 @@
+/*
+ * Copyright 1999-2010 University of Chicago
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
package org.nimbustools.api.repr;
import java.util.Calendar;
import org.nimbustools.api.repr.si.RequestState;
-import org.nimbustools.api.repr.vm.ResourceAllocation;
import org.nimbustools.api.repr.vm.VMFile;
public interface RequestInfo {
@@ -16,9 +30,6 @@
public VMFile[] getVMFiles();
public String getSshKeyName();
- public Caller getCreator();
- public String getMdUserData();
- public ResourceAllocation getResourceAllocation();
public String getGroupID();
}
View
10 service-api/java/source/src/org/nimbustools/api/repr/si/RequestState.java
@@ -19,11 +19,11 @@
public interface RequestState {
- public static final String STATE_Open = "Open";
- public static final String STATE_Active = "Active";
- public static final String STATE_Closed = "Closed";
- public static final String STATE_Cancelled = "Cancelled";
- public static final String STATE_Failed = "Failed";
+ public static final String STATE_Open = "open";
+ public static final String STATE_Active = "active";
+ public static final String STATE_Closed = "closed";
+ public static final String STATE_Canceled = "canceled";
+ public static final String STATE_Failed = "failed";
public String getStateStr();
public Throwable getProblem();
View
13 service/service/java/source/src/org/globus/workspace/persistence/DataConvert.java
@@ -42,7 +42,6 @@
import org.nimbustools.api._repr.vm._State;
import org.nimbustools.api._repr.vm._VM;
import org.nimbustools.api._repr.vm._VMFile;
-import org.nimbustools.api.defaults.repr.DefaultSpotRequestInfo;
import org.nimbustools.api.defaults.repr.si.DefaultSIRequestState;
import org.nimbustools.api.repr.Caller;
import org.nimbustools.api.repr.CannotTranslateException;
@@ -272,18 +271,20 @@ private void populate(AsyncRequest asyncReq, final _RequestInfo result) throws C
result.setInstanceCount(asyncReq.getRequestedInstances());
result.setCreationTime(asyncReq.getCreationTime());
- result.setCreator(asyncReq.getCaller());
result.setGroupID(asyncReq.getGroupID());
- result.setMdUserData(bindings[0].getMdUserData());
result.setRequestID(asyncReq.getId());
result.setVMFiles(this.getStorage(bindings[0]));
- result.setResourceAllocation(this.getRA(bindings[0]));
-
+ result.setSshKeyName(asyncReq.getSshKeyName());
result.setVMIds(getVMIDs(asyncReq.getVMIds()));
_SIRequestState state = new DefaultSIRequestState();
state.setState(this.getSIRequestState(asyncReq.getStatus()));
result.setState(state);
+
+ //FIXME remove if not used
+ //result.setMdUserData(bindings[0].getMdUserData());
+ //result.setResourceAllocation(this.getRA(bindings[0]));
+ //result.setCreator(asyncReq.getCaller());
}
@@ -306,7 +307,7 @@ private String getSIRequestState(AsyncRequestStatus status) {
case ACTIVE:
return RequestState.STATE_Active;
case CANCELLED:
- return RequestState.STATE_Cancelled;
+ return RequestState.STATE_Canceled;
case CLOSED:
return RequestState.STATE_Closed;
case FAILED:
Please sign in to comment.
Something went wrong with that request. Please try again.