use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class ShareServerTests method delete.
@Test
public void delete() throws Exception {
respondWith(202);
ActionResponse response = osv3().share().shareServers().delete("ba11930a-bf1a-4aa7-bae4-a8dfbaa3cc73");
assertTrue(response.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class SessionTests method testDeploySession.
public void testDeploySession() throws IOException {
respondWith(200);
String id = "b8f4006064d24c10a33d9ed68e554f0f";
ActionResponse deploy = osv3().murano().sessions().deploy(envId, id);
assertTrue(deploy.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class ImageV2Tests method testDeactivateImage.
public void testDeactivateImage() throws IOException {
respondWith(204);
ActionResponse deactivate = osv3().imagesV2().deactivate("8a2ea42d-06b5-42c2-a54d-97105420f2bb");
assertTrue(deactivate.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class ImageV2Tests method testDeleteImageTag.
public void testDeleteImageTag() throws IOException {
respondWith(204);
String tag = "tag1";
String imageId = "8a2ea42d-06b5-42c2-a54d-97105420f2bb";
ActionResponse deleteTag = osv3().imagesV2().deleteTag(imageId, tag);
assertTrue(deleteTag.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class ImageV2Tests method DownloadImage.
public void DownloadImage() throws IOException {
respondWith(200);
String imageId = "4b434528-032b-4467-946c-b5880ce15c06";
URI uri = null;
try {
uri = new URI("file:////test.iso");
} catch (URISyntaxException e) {
e.printStackTrace();
}
File file = new File(uri);
ActionResponse download = osv3().imagesV2().download(imageId, file);
// Should fail to write to file
assertEquals(download.getCode(), 400);
}
Aggregations