Skip to content

Commit 8de0a71

Browse files
authored
Merge pull request #73 from lgiommi/master
Add force parameter
2 parents 5019d8f + f82b261 commit 8de0a71

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/es/upv/i3m/grycap/im/InfrastructureManager.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class InfrastructureManager {
5252
private static final String REST_PARAMETER_NAME_CONTEXT = "context";
5353
private static final String REST_PARAMETER_NAME_ASYNC = "async";
5454
private static final String REST_PARAMETER_NAME_VMLIST = "vm_list";
55+
private static final String REST_PARAMETER_NAME_FORCE = "force";
5556

5657
private final ImClient imClient;
5758

@@ -275,11 +276,15 @@ public void destroyInfrastructure(String infId) throws ImClientException {
275276
*
276277
* @param infId
277278
* : infrastructure id
279+
* @param force
280+
* : flag to specify that the infra will be from the IM although not
281+
all resources are deleted
278282
*/
279-
public void destroyInfrastructureAsync(String infId) throws ImClientException {
283+
public void destroyInfrastructureAsync(String infId, boolean force) throws ImClientException {
280284
RestParameter asyncParameter = createCallParameters(REST_PARAMETER_NAME_ASYNC, true);
285+
RestParameter forceParameter = createCallParameters(REST_PARAMETER_NAME_FORCE, force);
281286
getImClient().delete(PATH_INFRASTRUCTURES + PATH_SEPARATOR + infId,
282-
String.class, asyncParameter);
287+
String.class, asyncParameter, forceParameter);
283288
}
284289

285290
/**

0 commit comments

Comments
 (0)