Search in sources :

Example 21 with ActionResponse

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

the class ExternalSegmentServiceTest method testDeleteExternalSegment.

@Test
public void testDeleteExternalSegment() {
    respondWith(200);
    String id = "fff89eb8-8f9d-49a2-b66c-ad75d9a95287";
    ActionResponse result = osv2().gbp().externalSegment().delete(id);
    assertTrue(result.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

Example 22 with ActionResponse

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

the class ServerTagTests method checkTag.

@Test
public void checkTag() {
    respondWith(204);
    ActionResponse check = osv3().compute().serverTags().check("1", "tag1");
    assertTrue(check.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

Example 23 with ActionResponse

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

the class ServerTagTests method addTag.

@Test
public void addTag() {
    respondWith(204);
    ActionResponse check = osv3().compute().serverTags().addSingle("1", "tag");
    assertTrue(check.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

Example 24 with ActionResponse

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

the class ServerTagTests method deleteTag.

@Test
public void deleteTag() {
    respondWith(204);
    ActionResponse delete = osv3().compute().serverTags().delete("1", "tag1");
    assertTrue(delete.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

Example 25 with ActionResponse

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

the class NetworkPolicyServiceTest method testDeleteNetworkServicePolicy.

@Test
public void testDeleteNetworkServicePolicy() {
    respondWith(200);
    String id = "d98e3cd5-3eb4-41ba-9069-6f5867ceb162";
    ActionResponse result = osv2().gbp().networkPolicyService().delete(id);
    assertTrue(result.isSuccess());
}
Also used : ActionResponse(org.openstack4j.model.common.ActionResponse) AbstractTest(org.openstack4j.api.AbstractTest) Test(org.testng.annotations.Test)

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