Skip to content

Commit c98b59b

Browse files
authored
Updated to BP API 5.3.1 (#590)
1 parent 6b43a95 commit c98b59b

18 files changed

+310
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ plugins {
3636

3737
allprojects {
3838
group = 'com.spectralogic.ds3'
39-
version = '5.2.0'
39+
version = '5.3.0'
4040
}
4141

4242
subprojects {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,13 @@ InspectAllTapesSpectraS3Response inspectAllTapesSpectraS3(final InspectAllTapesS
20502050
InspectTapeSpectraS3Response inspectTapeSpectraS3(final InspectTapeSpectraS3Request request)
20512051
throws IOException;
20522052

2053+
@ResponsePayloadModel("Tape")
2054+
@Action("MODIFY")
2055+
@Resource("TAPE")
2056+
2057+
MarkTapeForCompactionSpectraS3Response markTapeForCompactionSpectraS3(final MarkTapeForCompactionSpectraS3Request request)
2058+
throws IOException;
2059+
20532060
@Action("BULK_MODIFY")
20542061
@Resource("TAPE_PARTITION")
20552062

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,10 @@ public InspectTapeSpectraS3Response inspectTapeSpectraS3(final InspectTapeSpectr
12581258
return new InspectTapeSpectraS3ResponseParser().response(this.netClient.getResponse(request));
12591259
}
12601260
@Override
1261+
public MarkTapeForCompactionSpectraS3Response markTapeForCompactionSpectraS3(final MarkTapeForCompactionSpectraS3Request request) throws IOException {
1262+
return new MarkTapeForCompactionSpectraS3ResponseParser().response(this.netClient.getResponse(request));
1263+
}
1264+
@Override
12611265
public ModifyAllTapePartitionsSpectraS3Response modifyAllTapePartitionsSpectraS3(final ModifyAllTapePartitionsSpectraS3Request request) throws IOException {
12621266
return new ModifyAllTapePartitionsSpectraS3ResponseParser().response(this.netClient.getResponse(request));
12631267
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2019 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.parsers;
18+
19+
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
20+
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
21+
import com.spectralogic.ds3client.commands.spectrads3.MarkTapeForCompactionSpectraS3Response;
22+
import com.spectralogic.ds3client.models.Tape;
23+
import com.spectralogic.ds3client.networking.WebResponse;
24+
import com.spectralogic.ds3client.serializer.XmlOutput;
25+
import java.io.IOException;
26+
import java.io.InputStream;
27+
28+
public class MarkTapeForCompactionSpectraS3ResponseParser extends AbstractResponseParser<MarkTapeForCompactionSpectraS3Response> {
29+
private final int[] expectedStatusCodes = new int[]{200};
30+
31+
@Override
32+
public MarkTapeForCompactionSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
33+
final int statusCode = response.getStatusCode();
34+
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
35+
switch (statusCode) {
36+
case 200:
37+
try (final InputStream inputStream = response.getResponseStream()) {
38+
final Tape result = XmlOutput.fromXml(inputStream, Tape.class);
39+
return new MarkTapeForCompactionSpectraS3Response(result, this.getChecksum(), this.getChecksumType());
40+
}
41+
42+
default:
43+
assert false: "validateStatusCode should have made it impossible to reach this line";
44+
}
45+
}
46+
47+
throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
48+
}
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2019 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+
import java.util.UUID;
22+
import com.google.common.net.UrlEscapers;
23+
24+
public class MarkTapeForCompactionSpectraS3Request extends AbstractRequest {
25+
26+
// Variables
27+
28+
private final String tapeId;
29+
30+
// Constructor
31+
32+
33+
public MarkTapeForCompactionSpectraS3Request(final UUID tapeId) {
34+
this.tapeId = tapeId.toString();
35+
36+
this.getQueryParams().put("operation", "mark_for_compaction");
37+
38+
}
39+
40+
41+
public MarkTapeForCompactionSpectraS3Request(final String tapeId) {
42+
this.tapeId = tapeId;
43+
44+
this.getQueryParams().put("operation", "mark_for_compaction");
45+
46+
}
47+
48+
49+
@Override
50+
public HttpVerb getVerb() {
51+
return HttpVerb.PUT;
52+
}
53+
54+
@Override
55+
public String getPath() {
56+
return "/_rest_/tape/" + tapeId;
57+
}
58+
59+
public String getTapeId() {
60+
return this.tapeId;
61+
}
62+
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2019 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.models.Tape;
20+
import com.spectralogic.ds3client.models.ChecksumType;
21+
import com.spectralogic.ds3client.commands.interfaces.AbstractResponse;
22+
23+
public class MarkTapeForCompactionSpectraS3Response extends AbstractResponse {
24+
25+
private final Tape tapeResult;
26+
27+
public MarkTapeForCompactionSpectraS3Response(final Tape tapeResult, final String checksum, final ChecksumType.Type checksumType) {
28+
super(checksum, checksumType);
29+
this.tapeResult = tapeResult;
30+
}
31+
32+
public Tape getTapeResult() {
33+
return this.tapeResult;
34+
}
35+
36+
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import com.spectralogic.ds3client.networking.HttpVerb;
2020
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
21+
import java.lang.Integer;
2122
import com.spectralogic.ds3client.models.Priority;
2223
import com.spectralogic.ds3client.models.Quiesced;
2324
import com.spectralogic.ds3client.models.ReservedTaskType;
@@ -30,6 +31,8 @@ public class ModifyTapeDriveSpectraS3Request extends AbstractRequest {
3031

3132
private final String tapeDriveId;
3233

34+
private Integer maxFailedTapes;
35+
3336
private Priority minimumTaskPriority;
3437

3538
private Quiesced quiesced;
@@ -50,6 +53,13 @@ public ModifyTapeDriveSpectraS3Request(final String tapeDriveId) {
5053

5154
}
5255

56+
public ModifyTapeDriveSpectraS3Request withMaxFailedTapes(final Integer maxFailedTapes) {
57+
this.maxFailedTapes = maxFailedTapes;
58+
this.updateQueryParam("max_failed_tapes", maxFailedTapes);
59+
return this;
60+
}
61+
62+
5363
public ModifyTapeDriveSpectraS3Request withMinimumTaskPriority(final Priority minimumTaskPriority) {
5464
this.minimumTaskPriority = minimumTaskPriority;
5565
this.updateQueryParam("minimum_task_priority", minimumTaskPriority);
@@ -87,6 +97,11 @@ public String getTapeDriveId() {
8797
}
8898

8999

100+
public Integer getMaxFailedTapes() {
101+
return this.maxFailedTapes;
102+
}
103+
104+
90105
public Priority getMinimumTaskPriority() {
91106
return this.minimumTaskPriority;
92107
}

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import com.spectralogic.ds3client.networking.HttpVerb;
2020
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
21+
import java.lang.Integer;
2122
import com.spectralogic.ds3client.models.Quiesced;
2223
import com.google.common.net.UrlEscapers;
2324

@@ -29,6 +30,10 @@ public class ModifyTapePartitionSpectraS3Request extends AbstractRequest {
2930

3031
private boolean autoCompactionEnabled;
3132

33+
private boolean autoQuiesceEnabled;
34+
35+
private Integer driveIdleTimeoutInMinutes;
36+
3237
private int minimumReadReservedDrives;
3338

3439
private int minimumWriteReservedDrives;
@@ -52,6 +57,20 @@ public ModifyTapePartitionSpectraS3Request withAutoCompactionEnabled(final boole
5257
}
5358

5459

60+
public ModifyTapePartitionSpectraS3Request withAutoQuiesceEnabled(final boolean autoQuiesceEnabled) {
61+
this.autoQuiesceEnabled = autoQuiesceEnabled;
62+
this.updateQueryParam("auto_quiesce_enabled", autoQuiesceEnabled);
63+
return this;
64+
}
65+
66+
67+
public ModifyTapePartitionSpectraS3Request withDriveIdleTimeoutInMinutes(final Integer driveIdleTimeoutInMinutes) {
68+
this.driveIdleTimeoutInMinutes = driveIdleTimeoutInMinutes;
69+
this.updateQueryParam("drive_idle_timeout_in_minutes", driveIdleTimeoutInMinutes);
70+
return this;
71+
}
72+
73+
5574
public ModifyTapePartitionSpectraS3Request withMinimumReadReservedDrives(final int minimumReadReservedDrives) {
5675
this.minimumReadReservedDrives = minimumReadReservedDrives;
5776
this.updateQueryParam("minimum_read_reserved_drives", minimumReadReservedDrives);
@@ -101,6 +120,16 @@ public boolean getAutoCompactionEnabled() {
101120
}
102121

103122

123+
public boolean getAutoQuiesceEnabled() {
124+
return this.autoQuiesceEnabled;
125+
}
126+
127+
128+
public Integer getDriveIdleTimeoutInMinutes() {
129+
return this.driveIdleTimeoutInMinutes;
130+
}
131+
132+
104133
public int getMinimumReadReservedDrives() {
105134
return this.minimumReadReservedDrives;
106135
}

ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheFilesystemInformation.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class CacheFilesystemInformation {
3636
@JacksonXmlElementWrapper(useWrapping = false)
3737
private List<CacheEntryInformation> entries = new ArrayList<>();
3838

39+
@JsonProperty("JobLockedCacheInBytes")
40+
private long jobLockedCacheInBytes;
41+
3942
@JsonProperty("Summary")
4043
private String summary;
4144

@@ -82,6 +85,15 @@ public void setEntries(final List<CacheEntryInformation> entries) {
8285
}
8386

8487

88+
public long getJobLockedCacheInBytes() {
89+
return this.jobLockedCacheInBytes;
90+
}
91+
92+
public void setJobLockedCacheInBytes(final long jobLockedCacheInBytes) {
93+
this.jobLockedCacheInBytes = jobLockedCacheInBytes;
94+
}
95+
96+
8597
public String getSummary() {
8698
return this.summary;
8799
}

ds3-sdk/src/main/java/com/spectralogic/ds3client/models/DetailedTapePartition.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public class DetailedTapePartition {
3030
@JsonProperty("AutoCompactionEnabled")
3131
private boolean autoCompactionEnabled;
3232

33+
@JsonProperty("AutoQuiesceEnabled")
34+
private boolean autoQuiesceEnabled;
35+
36+
@JsonProperty("DriveIdleTimeoutInMinutes")
37+
private Integer driveIdleTimeoutInMinutes;
38+
3339
@JsonProperty("DriveType")
3440
private TapeDriveType driveType;
3541

@@ -87,6 +93,24 @@ public void setAutoCompactionEnabled(final boolean autoCompactionEnabled) {
8793
}
8894

8995

96+
public boolean getAutoQuiesceEnabled() {
97+
return this.autoQuiesceEnabled;
98+
}
99+
100+
public void setAutoQuiesceEnabled(final boolean autoQuiesceEnabled) {
101+
this.autoQuiesceEnabled = autoQuiesceEnabled;
102+
}
103+
104+
105+
public Integer getDriveIdleTimeoutInMinutes() {
106+
return this.driveIdleTimeoutInMinutes;
107+
}
108+
109+
public void setDriveIdleTimeoutInMinutes(final Integer driveIdleTimeoutInMinutes) {
110+
this.driveIdleTimeoutInMinutes = driveIdleTimeoutInMinutes;
111+
}
112+
113+
90114
public TapeDriveType getDriveType() {
91115
return this.driveType;
92116
}

0 commit comments

Comments
 (0)