use of org.apache.camel.Message 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.apache.camel.Message in project camel by apache.
the class RouterProducer method doUpdate.
private void doUpdate(Exchange exchange) {
final Message msg = exchange.getIn();
final Router router = messageToRouter(msg);
final Router updatedRouter = os.networking().router().update(router);
msg.setBody(updatedRouter);
}
use of org.apache.camel.Message in project camel by apache.
the class SnapshotProducer method doCreate.
private void doCreate(Exchange exchange) {
final Message msg = exchange.getIn();
final VolumeSnapshot in = messageToSnapshot(msg);
final VolumeSnapshot out = os.blockStorage().snapshots().create(in);
msg.setBody(out);
}
use of org.apache.camel.Message in project camel by apache.
the class SnapshotProducer method doGet.
private void doGet(Exchange exchange) {
final Message msg = exchange.getIn();
final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(CinderConstants.SNAPSHOT_ID, String.class), String.class);
ObjectHelper.notEmpty(id, "Snapshot ID");
final VolumeSnapshot out = os.blockStorage().snapshots().get(id);
msg.setBody(out);
}
use of org.apache.camel.Message in project camel by apache.
the class VolumeProducer method doGet.
private void doGet(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, "Volume ID");
final Volume out = os.blockStorage().volumes().get(id);
msg.setBody(out);
}
Aggregations