use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class RouterProducer method doDelete.
private void doDelete(Exchange exchange) {
final Message msg = exchange.getIn();
final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NeutronConstants.ROUTER_ID, String.class), String.class);
ObjectHelper.notEmpty(id, "Router ID");
final ActionResponse response = os.networking().router().delete(id);
checkFailure(response, msg, "Delete router with ID " + id);
}
use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class VolumeProducer method doDelete.
private void doDelete(Exchange exchange) {
final Message msg = exchange.getIn();
final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(CinderConstants.VOLUME_ID, String.class), String.class);
ObjectHelper.notEmpty(id, "Cinder Volume ID");
final ActionResponse out = os.blockStorage().volumes().delete(id);
checkFailure(out, msg, "Delete volume " + id);
}
use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class SubnetProducer method doDelete.
private void doDelete(Exchange exchange) {
final Message msg = exchange.getIn();
final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NeutronConstants.SUBNET_ID, String.class), String.class);
ObjectHelper.notEmpty(id, "Subnet ID");
final ActionResponse response = os.networking().subnet().delete(id);
checkFailure(response, msg, "Delete network " + id);
}
use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class FlavorsProducer method doDelete.
private void doDelete(Exchange exchange) {
final Message msg = exchange.getIn();
final String flavorId = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NovaConstants.FLAVOR_ID, String.class), String.class);
ObjectHelper.notEmpty(flavorId, "FlavorID");
final ActionResponse response = os.compute().flavors().delete(flavorId);
checkFailure(response, msg, "Delete flavor");
}
use of org.openstack4j.model.common.ActionResponse in project camel by apache.
the class KeypairProducer method doDelete.
private void doDelete(Exchange exchange) {
final Message msg = exchange.getIn();
final String keypairName = msg.getHeader(OpenstackConstants.NAME, String.class);
ObjectHelper.notEmpty(keypairName, "Keypair name");
final ActionResponse response = os.compute().keypairs().delete(keypairName);
checkFailure(response, msg, "Delete keypair " + keypairName);
}
Aggregations