Search in sources :

Example 46 with ActionResponse

use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.

the class SharesTests method extend.

@Test
public void extend() throws Exception {
    respondWith(202);
    ActionResponse response = osv3().share().shares().extend("406ea93b-32e9-4907-a117-148b3945749f", 2);
    assertTrue(response.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) Test(org.testng.annotations.Test) AbstractTest(org.openstack4j.api.AbstractTest)

Example 47 with ActionResponse

use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.

the class SharesTests method shrink.

@Test
public void shrink() throws Exception {
    respondWith(202);
    ActionResponse response = osv3().share().shares().shrink("406ea93b-32e9-4907-a117-148b3945749f", 1);
    assertTrue(response.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) Test(org.testng.annotations.Test) AbstractTest(org.openstack4j.api.AbstractTest)

Example 48 with ActionResponse

use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.

the class SharesTests method forceDelete.

@Test
public void forceDelete() throws Exception {
    respondWith(202);
    ActionResponse response = osv3().share().shares().forceDelete("406ea93b-32e9-4907-a117-148b3945749f");
    assertTrue(response.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) Test(org.testng.annotations.Test) AbstractTest(org.openstack4j.api.AbstractTest)

Example 49 with ActionResponse

use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.

the class SharesTests method unsetMetadata.

@Test
public void unsetMetadata() throws Exception {
    respondWith(200);
    ActionResponse response = osv3().share().shares().unsetMetadata("3d503524-a906-4757-8576-77a2029ff0c4", "key");
    assertTrue(response.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) Test(org.testng.annotations.Test) AbstractTest(org.openstack4j.api.AbstractTest)

Example 50 with ActionResponse

use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.

the class SharesTests method resetState.

@Test
public void resetState() throws Exception {
    respondWith(202);
    ActionResponse response = osv3().share().shares().resetState("406ea93b-32e9-4907-a117-148b3945749f", Share.Status.ERROR);
    assertTrue(response.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) Test(org.testng.annotations.Test) AbstractTest(org.openstack4j.api.AbstractTest)

Aggregations

ActionResponse (org.openstack4j.model.common.ActionResponse)123 AbstractTest (org.openstack4j.api.AbstractTest)54 Test (org.testng.annotations.Test)54 Message (org.apache.camel.Message)25 ArrayList (java.util.ArrayList)2 CreateUpdateContainerOptions (org.openstack4j.model.storage.object.options.CreateUpdateContainerOptions)2 TroveBuilders (org.openstack4j.openstack.trove.builder.TroveBuilders)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 File (java.io.File)1 InputStream (java.io.InputStream)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)1 ResponseToActionResponse (org.openstack4j.core.transport.functions.ResponseToActionResponse)1 Action (org.openstack4j.model.compute.Action)1 User (org.openstack4j.model.identity.v3.User)1 Volume (org.openstack4j.model.storage.block.Volume)1 VolumeSnapshot (org.openstack4j.model.storage.block.VolumeSnapshot)1 KeystoneUser (org.openstack4j.openstack.identity.v3.domain.KeystoneUser)1 TroveDatabase (org.openstack4j.openstack.trove.domain.TroveDatabase)1