diff --git a/src/main/java/org/fogbowcloud/manager/occi/request/RequestAttribute.java b/src/main/java/org/fogbowcloud/manager/occi/request/RequestAttribute.java index acd305c1..3a411f9d 100644 --- a/src/main/java/org/fogbowcloud/manager/occi/request/RequestAttribute.java +++ b/src/main/java/org/fogbowcloud/manager/occi/request/RequestAttribute.java @@ -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; diff --git a/src/main/java/org/fogbowcloud/manager/occi/request/RequestServerResource.java b/src/main/java/org/fogbowcloud/manager/occi/request/RequestServerResource.java index 5aa35ff8..3d67509a 100644 --- a/src/main/java/org/fogbowcloud/manager/occi/request/RequestServerResource.java +++ b/src/main/java/org/fogbowcloud/manager/occi/request/RequestServerResource.java @@ -140,9 +140,14 @@ private String generateURIListResponse(List 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"; @@ -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()) {