Skip to content

Commit ca2e18e

Browse files
committed
Merge pull request #247 from RachelTucker/3_2_updated_api
Updated api
2 parents ec4a1c0 + 7bd7d13 commit ca2e18e

File tree

5 files changed

+116
-0
lines changed

5 files changed

+116
-0
lines changed

ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,10 @@ DeleteDs3TargetReadPreferenceSpectraS3Response deleteDs3TargetReadPreferenceSpec
12621262
@Resource("DS3_TARGET")
12631263
DeleteDs3TargetSpectraS3Response deleteDs3TargetSpectraS3(DeleteDs3TargetSpectraS3Request request)
12641264
throws IOException, SignatureException;
1265+
@Action("BULK_MODIFY")
1266+
@Resource("TARGET_ENVIRONMENT")
1267+
ForceTargetEnvironmentRefreshSpectraS3Response forceTargetEnvironmentRefreshSpectraS3(ForceTargetEnvironmentRefreshSpectraS3Request request)
1268+
throws IOException, SignatureException;
12651269
@ResponsePayloadModel("Ds3TargetFailureList")
12661270
@Action("LIST")
12671271
@Resource("DS3_TARGET_FAILURE")

ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,10 @@ public DeleteDs3TargetSpectraS3Response deleteDs3TargetSpectraS3(DeleteDs3Target
10991099
return new DeleteDs3TargetSpectraS3Response(this.netClient.getResponse(request));
11001100
}
11011101
@Override
1102+
public ForceTargetEnvironmentRefreshSpectraS3Response forceTargetEnvironmentRefreshSpectraS3(ForceTargetEnvironmentRefreshSpectraS3Request request) throws IOException, SignatureException {
1103+
return new ForceTargetEnvironmentRefreshSpectraS3Response(this.netClient.getResponse(request));
1104+
}
1105+
@Override
11021106
public GetDs3TargetFailuresSpectraS3Response getDs3TargetFailuresSpectraS3(GetDs3TargetFailuresSpectraS3Request request) throws IOException, SignatureException {
11031107
return new GetDs3TargetFailuresSpectraS3Response(this.netClient.getResponse(request));
11041108
}

ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteBucketSpectraS3Request.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class DeleteBucketSpectraS3Request extends AbstractRequest {
2828

2929
private boolean force;
3030

31+
private boolean replicate;
32+
3133
// Constructor
3234

3335
public DeleteBucketSpectraS3Request(final String bucketName) {
@@ -45,6 +47,16 @@ public DeleteBucketSpectraS3Request withForce(final boolean force) {
4547
return this;
4648
}
4749

50+
public DeleteBucketSpectraS3Request withReplicate(final boolean replicate) {
51+
this.replicate = replicate;
52+
if (this.replicate) {
53+
this.getQueryParams().put("replicate", null);
54+
} else {
55+
this.getQueryParams().remove("replicate");
56+
}
57+
return this;
58+
}
59+
4860

4961
@Override
5062
public HttpVerb getVerb() {
@@ -65,4 +77,9 @@ public boolean getForce() {
6577
return this.force;
6678
}
6779

80+
81+
public boolean getReplicate() {
82+
return this.replicate;
83+
}
84+
6885
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved.
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5+
* this file except in compliance with the License. A copy of the License is located at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* or in the "license" file accompanying this file.
10+
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
12+
* specific language governing permissions and limitations under the License.
13+
* ****************************************************************************
14+
*/
15+
16+
// This code is auto-generated, do not modify
17+
package com.spectralogic.ds3client.commands.spectrads3;
18+
19+
import com.spectralogic.ds3client.networking.HttpVerb;
20+
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
21+
22+
public class ForceTargetEnvironmentRefreshSpectraS3Request extends AbstractRequest {
23+
24+
// Variables
25+
26+
// Constructor
27+
28+
public ForceTargetEnvironmentRefreshSpectraS3Request() {
29+
30+
}
31+
32+
33+
@Override
34+
public HttpVerb getVerb() {
35+
return HttpVerb.PUT;
36+
}
37+
38+
@Override
39+
public String getPath() {
40+
return "/_rest_/target_environment";
41+
}
42+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved.
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5+
* this file except in compliance with the License. A copy of the License is located at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* or in the "license" file accompanying this file.
10+
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
12+
* specific language governing permissions and limitations under the License.
13+
* ****************************************************************************
14+
*/
15+
16+
// This code is auto-generated, do not modify
17+
package com.spectralogic.ds3client.commands.spectrads3;
18+
19+
import com.spectralogic.ds3client.networking.WebResponse;
20+
import java.io.IOException;
21+
import com.spectralogic.ds3client.commands.interfaces.AbstractResponse;
22+
23+
public class ForceTargetEnvironmentRefreshSpectraS3Response extends AbstractResponse {
24+
25+
26+
27+
public ForceTargetEnvironmentRefreshSpectraS3Response(final WebResponse response) throws IOException {
28+
super(response);
29+
}
30+
31+
@Override
32+
protected void processResponse() throws IOException {
33+
try {
34+
this.checkStatusCode(204);
35+
36+
switch (this.getStatusCode()) {
37+
case 204:
38+
//Do nothing, payload is null
39+
break;
40+
default:
41+
assert false : "checkStatusCode should have made it impossible to reach this line.";
42+
}
43+
} finally {
44+
this.getResponse().close();
45+
}
46+
}
47+
48+
49+
}

0 commit comments

Comments
 (0)