use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class ServerProducer method doAction.
private void doAction(Exchange exchange) {
final Message msg = exchange.getIn();
final Action action = msg.getHeader(NovaConstants.ACTION, Action.class);
final String serverId = msg.getHeader(OpenstackConstants.ID, String.class);
ObjectHelper.notNull(action, "Server action");
ObjectHelper.notEmpty(serverId, "Server ID");
final ActionResponse response = os.compute().servers().action(serverId, action);
checkFailure(response, msg, "Performing action " + action.name());
}
use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class ServerProducer method doDelete.
private void doDelete(Exchange exchange) {
final Message msg = exchange.getIn();
final String serverId = msg.getHeader(OpenstackConstants.ID, String.class);
ObjectHelper.notEmpty(serverId, "Server ID");
final ActionResponse response = os.compute().servers().delete(serverId);
checkFailure(response, msg, "Delete server with ID " + serverId);
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class FirewallRuleTests method testDeleteFirewallRule.
public void testDeleteFirewallRule() {
respondWith(200);
ActionResponse result = osv3().networking().firewalls().firewallrule().delete("8722e0e0-9cc9-4490-9660-8c9a5732fbb0");
assertTrue(result.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class HealthMonitorV2Tests method testDeleteHealthMonitorV2.
public void testDeleteHealthMonitorV2() {
respondWith(204);
ActionResponse result = osv3().networking().lbaasV2().healthMonitor().delete("350576d8-5015-4d4e-b73f-23df2397e4c4");
assertTrue(result.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class LbPoolTests method testDeletePool.
public void testDeletePool() {
respondWith(200);
ActionResponse result = osv3().networking().loadbalancers().lbPool().delete("02ae87ec-5502-469e-8c41-f2c57d185054");
assertTrue(result.isSuccess());
}
Aggregations