Skip to content

Commit

Permalink
Merge pull request #240 from fogbow/develop
Browse files Browse the repository at this point in the history
Merge pull request #239 from fogbow/sebal-deployment
  • Loading branch information
giovannifs committed Nov 3, 2015
2 parents 7ade54b + 0c3d47d commit 056140f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public enum RequestAttribute {
EXTRA_USER_DATA_ATT("org.fogbowcloud.request.extra-user-data"),
EXTRA_USER_DATA_CONTENT_TYPE_ATT("org.fogbowcloud.request.extra-user-data-content-type"),
REQUIREMENTS("org.fogbowcloud.request.requirements"),
BATCH_ID("org.fogbowcloud.request.batch-id");
BATCH_ID("org.fogbowcloud.request.batch-id"),
REQUESTING_MEMBER("org.fogbowcloud.request.requesting-member"),
PROVIDING_MEMBER("org.fogbowcloud.request.providing-member");

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,14 @@ private String generateURIListResponse(List<Request> requests, HttpRequest req,
requestEndpoint += requestEndpoint + "/";
}
if (verbose) {
String providingMemberId = (request.getProvidingMemberId() == null) ? "None"
: request.getProvidingMemberId();

result += requestEndpoint + request.getId() + "; " + "State="
+ request.getState() + "; " + RequestAttribute.TYPE.getValue() + "="
+ request.getAttValue(RequestAttribute.TYPE.getValue()) + "; "
+ RequestAttribute.REQUESTING_MEMBER.getValue() + "=" + request.getRequestingMemberId() + "; "
+ RequestAttribute.PROVIDING_MEMBER.getValue() + "=" + providingMemberId + "; "
+ RequestAttribute.INSTANCE_ID.getValue() + "="
+ request.getGlobalInstanceId() + "\n";

Expand Down Expand Up @@ -188,6 +193,12 @@ private String generateTextPlainResponseOneRequest(Request request) {
}

attToOutput.put(RequestAttribute.STATE.getValue(), request.getState().getValue());
attToOutput.put(RequestAttribute.REQUESTING_MEMBER.getValue(), request.getRequestingMemberId());
if (request.getProvidingMemberId() == null) {
attToOutput.put(RequestAttribute.PROVIDING_MEMBER.getValue(), "None");
} else {
attToOutput.put(RequestAttribute.PROVIDING_MEMBER.getValue(), request.getProvidingMemberId());
}
attToOutput.put(RequestAttribute.INSTANCE_ID.getValue(), request.getGlobalInstanceId());

for (String attName : attToOutput.keySet()) {
Expand Down

0 comments on commit 056140f

Please sign in to comment.