Search in sources :

Example 11 with ActionResponse

use of org.openstack4j.model.common.ActionResponse in project camel by apache.

the class GroupProducer method doDelete.

private void doDelete(Exchange exchange) {
    final Message msg = exchange.getIn();
    final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(KeystoneConstants.GROUP_ID, String.class), String.class);
    ObjectHelper.notEmpty(id, "Group ID");
    final ActionResponse response = osV3Client.identity().groups().delete(id);
    checkFailure(response, msg, "Delete group with ID " + id);
}
Also used : Message(org.apache.camel.Message) ActionResponse(org.openstack4j.model.common.ActionResponse)

Example 12 with ActionResponse

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

the class PolicyClassifierServiceTest method testDeletePolicyClassifier.

@Test
public void testDeletePolicyClassifier() {
    respondWith(200);
    String id = "36e41adb-0b9b-4a11-abd5-66e5386139d4";
    ActionResponse result = osv2().gbp().policyClassifier().delete(id);
    assertTrue(result.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) Test(org.testng.annotations.Test) AbstractTest(org.openstack4j.api.AbstractTest)

Example 13 with ActionResponse

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

the class PolicyRuleServiceTest method testDeletePolicyRule.

@Test
public void testDeletePolicyRule() {
    respondWith(200);
    String id = "059909d1-7f20-40cf-a78a-27c340a5aaac";
    ActionResponse result = osv2().gbp().policyRule().delete(id);
    assertTrue(result.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

Example 14 with ActionResponse

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

the class PolicyRuleSetServiceTest method testDeletePolicyRuleSet.

@Test
public void testDeletePolicyRuleSet() {
    respondWith(200);
    String id = "1bbc10a8-aeb2-4e53-ab31-a1fed18763f4";
    ActionResponse result = osv2().gbp().policyRuleSet().delete(id);
    assertTrue(result.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

Example 15 with ActionResponse

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

the class ContainerTests method testDeleteContainer.

public void testDeleteContainer() throws IOException {
    respondWith(204);
    ActionResponse result = osv3().barbican().containers().delete(containerId);
    assertTrue(result.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse)

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