-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from rpmoore/master
Delete Tape Drive and Partition Call Support
- Loading branch information
Showing
10 changed files
with
245 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteTapeDriveRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* ****************************************************************************** | ||
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use | ||
* this file except in compliance with the License. A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. | ||
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* **************************************************************************** | ||
*/ | ||
package com.spectralogic.ds3client.commands; | ||
|
||
import com.spectralogic.ds3client.HttpVerb; | ||
|
||
public class DeleteTapeDriveRequest extends AbstractRequest { | ||
|
||
private final String id; | ||
|
||
public DeleteTapeDriveRequest(final String id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String getPath() { | ||
return "/_rest_/tape_drive/" + id; | ||
} | ||
|
||
@Override | ||
public HttpVerb getVerb() { | ||
return HttpVerb.DELETE; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteTapeDriveResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* ****************************************************************************** | ||
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use | ||
* this file except in compliance with the License. A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. | ||
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* **************************************************************************** | ||
*/ | ||
package com.spectralogic.ds3client.commands; | ||
|
||
import com.spectralogic.ds3client.networking.WebResponse; | ||
|
||
import java.io.IOException; | ||
|
||
public class DeleteTapeDriveResponse extends AbstractResponse{ | ||
public DeleteTapeDriveResponse(final WebResponse response) throws IOException { | ||
super(response); | ||
} | ||
|
||
@Override | ||
protected void processResponse() throws IOException { | ||
try { | ||
this.checkStatusCode(204); | ||
} finally { | ||
this.getResponse().close(); | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteTapePartitionRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* ****************************************************************************** | ||
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use | ||
* this file except in compliance with the License. A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. | ||
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* **************************************************************************** | ||
*/ | ||
package com.spectralogic.ds3client.commands; | ||
|
||
import com.spectralogic.ds3client.HttpVerb; | ||
|
||
public class DeleteTapePartitionRequest extends AbstractRequest { | ||
|
||
private final String id; | ||
|
||
public DeleteTapePartitionRequest(final String id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String getPath() { | ||
return "/_rest_/tape_partition/" + this.id; | ||
} | ||
|
||
@Override | ||
public HttpVerb getVerb() { | ||
return HttpVerb.DELETE; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/DeleteTapePartitionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* ****************************************************************************** | ||
* Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use | ||
* this file except in compliance with the License. A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. | ||
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* **************************************************************************** | ||
*/ | ||
package com.spectralogic.ds3client.commands; | ||
|
||
import com.spectralogic.ds3client.networking.WebResponse; | ||
|
||
import java.io.IOException; | ||
|
||
public class DeleteTapePartitionResponse extends AbstractResponse { | ||
public DeleteTapePartitionResponse(final WebResponse response) throws IOException { | ||
super(response); | ||
} | ||
|
||
@Override | ||
protected void processResponse() throws IOException { | ||
try { | ||
this.checkStatusCode(204); | ||
} finally { | ||
this.getResponse().close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.