camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [15/17] camel git commit: CAMEL-9748: fix CS
Date Sat, 17 Dec 2016 11:53:54 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
index 8184355..8320539 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
@@ -16,99 +16,100 @@
  */
 package org.apache.camel.component.openstack.keystone.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.keystone.KeystoneConstants;
 import org.apache.camel.component.openstack.keystone.KeystoneEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
 import org.openstack4j.model.identity.v3.Domain;
 import org.openstack4j.model.identity.v3.builder.DomainBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class DomainProducer extends AbstractKeystoneProducer {
 
-	public DomainProducer(KeystoneEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case KeystoneConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case KeystoneConstants.GET:
-				doGet(exchange);
-				break;
-			case KeystoneConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case KeystoneConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case KeystoneConstants.DELETE:
-				doDelete(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final Domain in = messageToDomain(exchange.getIn());
-		final Domain out = osV3Client.identity().domains().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.DOMAIN_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Domain ID");
-		final Domain out = osV3Client.identity().domains().get(id);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Domain> out = osV3Client.identity().domains().list();
-		exchange.getIn().setBody(out);
-	}
-
-	private void doUpdate(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final Domain in = messageToDomain(msg);
-		final Domain out = osV3Client.identity().domains().update(in);
-		msg.setBody(out);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.DOMAIN_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Domain ID");
-		final ActionResponse response = osV3Client.identity().domains().delete(id);
-		checkFailure(response, msg, "Delete domain" + id);
-	}
-
-	private Domain messageToDomain(Message message) {
-		Domain domain = message.getBody(Domain.class);
-		if(domain == null) {
-			Map headers = message.getHeaders();
-			DomainBuilder builder = Builders.domain();
-
-			ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
-
-			if (headers.containsKey(KeystoneConstants.DESCRIPTION))
-				builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
-
-			domain = builder.build();
-		}
-
-		return domain;
-	}
+    public DomainProducer(KeystoneEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case KeystoneConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case KeystoneConstants.GET:
+            doGet(exchange);
+            break;
+        case KeystoneConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case KeystoneConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case KeystoneConstants.DELETE:
+            doDelete(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final Domain in = messageToDomain(exchange.getIn());
+        final Domain out = osV3Client.identity().domains().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.DOMAIN_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Domain ID");
+        final Domain out = osV3Client.identity().domains().get(id);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Domain> out = osV3Client.identity().domains().list();
+        exchange.getIn().setBody(out);
+    }
+
+    private void doUpdate(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final Domain in = messageToDomain(msg);
+        final Domain out = osV3Client.identity().domains().update(in);
+        msg.setBody(out);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.DOMAIN_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Domain ID");
+        final ActionResponse response = osV3Client.identity().domains().delete(id);
+        checkFailure(response, msg, "Delete domain" + id);
+    }
+
+    private Domain messageToDomain(Message message) {
+        Domain domain = message.getBody(Domain.class);
+        if (domain == null) {
+            Map headers = message.getHeaders();
+            DomainBuilder builder = Builders.domain();
+
+            ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
+
+            if (headers.containsKey(KeystoneConstants.DESCRIPTION)) {
+                builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
+            }
+
+            domain = builder.build();
+        }
+
+        return domain;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
index 258ebaa..6c25a63 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
@@ -16,142 +16,143 @@
  */
 package org.apache.camel.component.openstack.keystone.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.keystone.KeystoneConstants;
 import org.apache.camel.component.openstack.keystone.KeystoneEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
 import org.openstack4j.model.identity.v3.Group;
 import org.openstack4j.model.identity.v3.builder.GroupBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class GroupProducer extends AbstractKeystoneProducer {
 
-	public GroupProducer(KeystoneEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override
-	public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case KeystoneConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case KeystoneConstants.GET:
-				doGet(exchange);
-				break;
-			case KeystoneConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case KeystoneConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case KeystoneConstants.DELETE:
-				doDelete(exchange);
-				break;
-			case KeystoneConstants.ADD_USER_TO_GROUP:
-				doAddUser(exchange);
-				break;
-			case KeystoneConstants.CHECK_GROUP_USER:
-				doCheckUserGroup(exchange);
-				break;
-			case KeystoneConstants.REMOVE_USER_FROM_GROUP:
-				doRemoveUserFromGroup(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final Group in = messageToGroup(exchange.getIn());
-		final Group out = osV3Client.identity().groups().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.GROUP_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Group ID");
-		final Group result = osV3Client.identity().groups().get(id);
-		msg.setBody(result);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Group> out = osV3Client.identity().groups().list();
-		exchange.getIn().setBody(out);
-	}
-
-	private void doUpdate(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final Group group = messageToGroup(msg);
-		final Group updatedGroup = osV3Client.identity().groups().update(group);
-		msg.setBody(updatedGroup);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.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);
-	}
-
-	private void doAddUser(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String userId = msg.getHeader(KeystoneConstants.USER_ID, String.class);
-		final String groupId = msg.getHeader(KeystoneConstants.GROUP_ID, String.class);
-		ObjectHelper.notEmpty(userId, "User ID");
-		ObjectHelper.notEmpty(groupId, "Group ID");
-		final ActionResponse response = osV3Client.identity().groups().addUserToGroup(groupId, userId);
-		checkFailure(response, msg, String.format("Add user %s to group %s", userId, groupId));
-	}
-
-	private void doCheckUserGroup(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String userId = msg.getHeader(KeystoneConstants.USER_ID, String.class);
-		final String groupId = msg.getHeader(KeystoneConstants.GROUP_ID, String.class);
-		ObjectHelper.notEmpty(userId, "User ID");
-		ObjectHelper.notEmpty(groupId, "Group ID");
-		final ActionResponse response = osV3Client.identity().groups().checkGroupUser(groupId, userId);
-		msg.setBody(response.isSuccess());
-	}
-
-	private void doRemoveUserFromGroup(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String userId = msg.getHeader(KeystoneConstants.USER_ID, String.class);
-		final String groupId = msg.getHeader(KeystoneConstants.GROUP_ID, String.class);
-		ObjectHelper.notEmpty(userId, "User ID");
-		ObjectHelper.notEmpty(groupId, "Group ID");
-		final ActionResponse response = osV3Client.identity().groups().removeUserFromGroup(groupId, userId);
-		checkFailure(response, msg, String.format("Delete user %s from group %s", userId, groupId));
-	}
-
-	private Group messageToGroup(Message message) {
-		Group group = message.getBody(Group.class);
-
-		if (group == null) {
-			Map headers = message.getHeaders();
-			GroupBuilder builder = Builders.group();
-
-			ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
-
-			if (headers.containsKey(KeystoneConstants.DOMAIN_ID))
-				builder.domainId(message.getHeader(KeystoneConstants.DOMAIN_ID, String.class));
-
-			if (headers.containsKey(KeystoneConstants.DESCRIPTION))
-				builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
-
-			group = builder.build();
-		}
-		return group;
-	}
+    public GroupProducer(KeystoneEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case KeystoneConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case KeystoneConstants.GET:
+            doGet(exchange);
+            break;
+        case KeystoneConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case KeystoneConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case KeystoneConstants.DELETE:
+            doDelete(exchange);
+            break;
+        case KeystoneConstants.ADD_USER_TO_GROUP:
+            doAddUser(exchange);
+            break;
+        case KeystoneConstants.CHECK_GROUP_USER:
+            doCheckUserGroup(exchange);
+            break;
+        case KeystoneConstants.REMOVE_USER_FROM_GROUP:
+            doRemoveUserFromGroup(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final Group in = messageToGroup(exchange.getIn());
+        final Group out = osV3Client.identity().groups().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.GROUP_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Group ID");
+        final Group result = osV3Client.identity().groups().get(id);
+        msg.setBody(result);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Group> out = osV3Client.identity().groups().list();
+        exchange.getIn().setBody(out);
+    }
+
+    private void doUpdate(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final Group group = messageToGroup(msg);
+        final Group updatedGroup = osV3Client.identity().groups().update(group);
+        msg.setBody(updatedGroup);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.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);
+    }
+
+    private void doAddUser(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String userId = msg.getHeader(KeystoneConstants.USER_ID, String.class);
+        final String groupId = msg.getHeader(KeystoneConstants.GROUP_ID, String.class);
+        ObjectHelper.notEmpty(userId, "User ID");
+        ObjectHelper.notEmpty(groupId, "Group ID");
+        final ActionResponse response = osV3Client.identity().groups().addUserToGroup(groupId, userId);
+        checkFailure(response, msg, String.format("Add user %s to group %s", userId, groupId));
+    }
+
+    private void doCheckUserGroup(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String userId = msg.getHeader(KeystoneConstants.USER_ID, String.class);
+        final String groupId = msg.getHeader(KeystoneConstants.GROUP_ID, String.class);
+        ObjectHelper.notEmpty(userId, "User ID");
+        ObjectHelper.notEmpty(groupId, "Group ID");
+        final ActionResponse response = osV3Client.identity().groups().checkGroupUser(groupId, userId);
+        msg.setBody(response.isSuccess());
+    }
+
+    private void doRemoveUserFromGroup(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String userId = msg.getHeader(KeystoneConstants.USER_ID, String.class);
+        final String groupId = msg.getHeader(KeystoneConstants.GROUP_ID, String.class);
+        ObjectHelper.notEmpty(userId, "User ID");
+        ObjectHelper.notEmpty(groupId, "Group ID");
+        final ActionResponse response = osV3Client.identity().groups().removeUserFromGroup(groupId, userId);
+        checkFailure(response, msg, String.format("Delete user %s from group %s", userId, groupId));
+    }
+
+    private Group messageToGroup(Message message) {
+        Group group = message.getBody(Group.class);
+
+        if (group == null) {
+            Map headers = message.getHeaders();
+            GroupBuilder builder = Builders.group();
+
+            ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
+
+            if (headers.containsKey(KeystoneConstants.DOMAIN_ID)) {
+                builder.domainId(message.getHeader(KeystoneConstants.DOMAIN_ID, String.class));
+            }
+
+            if (headers.containsKey(KeystoneConstants.DESCRIPTION)) {
+                builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
+            }
+
+            group = builder.build();
+        }
+        return group;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
index 6dab2bb..5a439c8 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
@@ -16,106 +16,108 @@
  */
 package org.apache.camel.component.openstack.keystone.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.keystone.KeystoneConstants;
 import org.apache.camel.component.openstack.keystone.KeystoneEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
 import org.openstack4j.model.identity.v3.Project;
 import org.openstack4j.model.identity.v3.builder.ProjectBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class ProjectProducer extends AbstractKeystoneProducer {
 
-	public ProjectProducer(KeystoneEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override
-	public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case KeystoneConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case KeystoneConstants.GET:
-				doGet(exchange);
-				break;
-			case KeystoneConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case KeystoneConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case KeystoneConstants.DELETE:
-				doDelete(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final Project in = messageToProject(exchange.getIn());
-		final Project out = osV3Client.identity().projects().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, String.class);
-		ObjectHelper.notEmpty(id, "Project ID");
-		final Project result = osV3Client.identity().projects().get(id);
-		msg.setBody(result);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Project> out = osV3Client.identity().projects().list();
-		exchange.getIn().setBody(out);
-	}
-
-	private void doUpdate(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final Project in = messageToProject(msg);
-		final Project out = osV3Client.identity().projects().update(in);
-		msg.setBody(out);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, String.class);
-		ObjectHelper.notEmpty(id, "Project ID");
-		final ActionResponse response = osV3Client.identity().projects().delete(id);
-		checkFailure(response, msg, "Delete project with ID " + id);
-	}
-
-	private Project messageToProject(Message message) {
-		Project project = message.getBody(Project.class);
-
-		if (project == null) {
-			Map headers = message.getHeaders();
-			ProjectBuilder builder = Builders.project();
-
-			ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
-
-			if (headers.containsKey(KeystoneConstants.DOMAIN_ID))
-				builder.domainId(message.getHeader(KeystoneConstants.DOMAIN_ID, String.class));
-
-			if(headers.containsKey(KeystoneConstants.DESCRIPTION))
-				builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
-
-			if(headers.containsKey(KeystoneConstants.PARENT_ID))
-				builder.parentId(message.getHeader(KeystoneConstants.PARENT_ID, String.class));
-
-			project = builder.build();
-		}
-		return project;
-	}
+    public ProjectProducer(KeystoneEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case KeystoneConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case KeystoneConstants.GET:
+            doGet(exchange);
+            break;
+        case KeystoneConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case KeystoneConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case KeystoneConstants.DELETE:
+            doDelete(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final Project in = messageToProject(exchange.getIn());
+        final Project out = osV3Client.identity().projects().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, String.class);
+        ObjectHelper.notEmpty(id, "Project ID");
+        final Project result = osV3Client.identity().projects().get(id);
+        msg.setBody(result);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Project> out = osV3Client.identity().projects().list();
+        exchange.getIn().setBody(out);
+    }
+
+    private void doUpdate(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final Project in = messageToProject(msg);
+        final Project out = osV3Client.identity().projects().update(in);
+        msg.setBody(out);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, String.class);
+        ObjectHelper.notEmpty(id, "Project ID");
+        final ActionResponse response = osV3Client.identity().projects().delete(id);
+        checkFailure(response, msg, "Delete project with ID " + id);
+    }
+
+    private Project messageToProject(Message message) {
+        Project project = message.getBody(Project.class);
+
+        if (project == null) {
+            Map headers = message.getHeaders();
+            ProjectBuilder builder = Builders.project();
+
+            ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
+
+            if (headers.containsKey(KeystoneConstants.DOMAIN_ID)) {
+                builder.domainId(message.getHeader(KeystoneConstants.DOMAIN_ID, String.class));
+            }
+
+            if (headers.containsKey(KeystoneConstants.DESCRIPTION)) {
+                builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
+            }
+
+            if (headers.containsKey(KeystoneConstants.PARENT_ID)) {
+                builder.parentId(message.getHeader(KeystoneConstants.PARENT_ID, String.class));
+            }
+
+            project = builder.build();
+        }
+        return project;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
index b79c03b..0999752 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
@@ -16,95 +16,96 @@
  */
 package org.apache.camel.component.openstack.keystone.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.keystone.KeystoneConstants;
 import org.apache.camel.component.openstack.keystone.KeystoneEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
 import org.openstack4j.model.identity.v3.Region;
 import org.openstack4j.model.identity.v3.builder.RegionBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class RegionProducer extends AbstractKeystoneProducer {
 
-	public RegionProducer(KeystoneEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
+    public RegionProducer(KeystoneEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
 
-	@Override public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case KeystoneConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case KeystoneConstants.GET:
-				doGet(exchange);
-				break;
-			case KeystoneConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case KeystoneConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case KeystoneConstants.DELETE:
-				doDelete(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case KeystoneConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case KeystoneConstants.GET:
+            doGet(exchange);
+            break;
+        case KeystoneConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case KeystoneConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case KeystoneConstants.DELETE:
+            doDelete(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
 
-	private void doCreate(Exchange exchange) {
-		final Region in = messageToRegion(exchange.getIn());
-		final Region out = osV3Client.identity().regions().create(in);
-		exchange.getIn().setBody(out);
-	}
+    private void doCreate(Exchange exchange) {
+        final Region in = messageToRegion(exchange.getIn());
+        final Region out = osV3Client.identity().regions().create(in);
+        exchange.getIn().setBody(out);
+    }
 
-	private void doGet(Exchange exchange) {
-		final String id = exchange.getIn().getHeader(KeystoneConstants.ID, String.class);
-		ObjectHelper.notEmpty(id, "Region ID");
-		final Region out = osV3Client.identity().regions().get(id);
-		exchange.getIn().setBody(out);
-	}
+    private void doGet(Exchange exchange) {
+        final String id = exchange.getIn().getHeader(KeystoneConstants.ID, String.class);
+        ObjectHelper.notEmpty(id, "Region ID");
+        final Region out = osV3Client.identity().regions().get(id);
+        exchange.getIn().setBody(out);
+    }
 
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Region> out = osV3Client.identity().regions().list();
-		exchange.getIn().setBody(out);
-	}
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Region> out = osV3Client.identity().regions().list();
+        exchange.getIn().setBody(out);
+    }
 
-	private void doUpdate(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final Region in = messageToRegion(msg);
-		final Region out = osV3Client.identity().regions().update(in);
-		msg.setBody(out);
-	}
+    private void doUpdate(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final Region in = messageToRegion(msg);
+        final Region out = osV3Client.identity().regions().update(in);
+        msg.setBody(out);
+    }
 
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, String.class);
-		ObjectHelper.notEmpty(id, "Region ID");
-		final ActionResponse response = osV3Client.identity().regions().delete(id);
-		checkFailure(response, msg, "Delete network" + id);
-	}
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, String.class);
+        ObjectHelper.notEmpty(id, "Region ID");
+        final ActionResponse response = osV3Client.identity().regions().delete(id);
+        checkFailure(response, msg, "Delete network" + id);
+    }
 
-	private Region messageToRegion(Message message) {
-		Region region = message.getBody(Region.class);
-		if(region == null) {
-			Map headers = message.getHeaders();
-			RegionBuilder builder = Builders.region();
+    private Region messageToRegion(Message message) {
+        Region region = message.getBody(Region.class);
+        if (region == null) {
+            Map headers = message.getHeaders();
+            RegionBuilder builder = Builders.region();
 
-			if(headers.containsKey(KeystoneConstants.DESCRIPTION))
-			builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
+            if (headers.containsKey(KeystoneConstants.DESCRIPTION)) {
+                builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
+            }
 
-			region = builder.build();
-		}
+            region = builder.build();
+        }
 
-		return region;
-	}
+        return region;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
index 3273fad..7794cd7 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
@@ -16,110 +16,113 @@
  */
 package org.apache.camel.component.openstack.keystone.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.keystone.KeystoneConstants;
 import org.apache.camel.component.openstack.keystone.KeystoneEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
 import org.openstack4j.model.identity.v3.User;
 import org.openstack4j.model.identity.v3.builder.UserBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class UserProducer extends AbstractKeystoneProducer {
 
-	public UserProducer(KeystoneEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override
-	public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case KeystoneConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case KeystoneConstants.GET:
-				doGet(exchange);
-				break;
-			case KeystoneConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case KeystoneConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case KeystoneConstants.DELETE:
-				doDelete(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final User in = messageToUser(exchange.getIn());
-		final User out = osV3Client.identity().users().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.USER_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "User ID");
-		final User result = osV3Client.identity().users().get(id);
-		msg.setBody(result);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends User> out = osV3Client.identity().users().list();
-		exchange.getIn().setBody(out);
-	}
-
-	private void doUpdate(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final User in = messageToUser(msg);
-		final User out = osV3Client.identity().users().update(in);
-		msg.setBody(out);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.USER_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "User ID");
-		final ActionResponse response = osV3Client.identity().users().delete(id);
-		checkFailure(response, msg, "Delete user with ID " + id);
-	}
-
-	private User messageToUser(Message message) {
-		User project = message.getBody(User.class);
-
-		if (project == null) {
-			Map headers = message.getHeaders();
-			UserBuilder builder = Builders.user();
-
-			ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
-
-			if (headers.containsKey(KeystoneConstants.DOMAIN_ID))
-				builder.domainId(message.getHeader(KeystoneConstants.DOMAIN_ID, String.class));
-
-			if(headers.containsKey(KeystoneConstants.DESCRIPTION))
-				builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
-
-			if(headers.containsKey(KeystoneConstants.PASSWORD))
-				builder.password(message.getHeader(KeystoneConstants.PASSWORD, String.class));
-
-			if(headers.containsKey(KeystoneConstants.EMAIL))
-				builder.email(message.getHeader(KeystoneConstants.EMAIL, String.class));
-
-
-			project = builder.build();
-		}
-		return project;
-	}
+    public UserProducer(KeystoneEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case KeystoneConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case KeystoneConstants.GET:
+            doGet(exchange);
+            break;
+        case KeystoneConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case KeystoneConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case KeystoneConstants.DELETE:
+            doDelete(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final User in = messageToUser(exchange.getIn());
+        final User out = osV3Client.identity().users().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.USER_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "User ID");
+        final User result = osV3Client.identity().users().get(id);
+        msg.setBody(result);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends User> out = osV3Client.identity().users().list();
+        exchange.getIn().setBody(out);
+    }
+
+    private void doUpdate(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final User in = messageToUser(msg);
+        final User out = osV3Client.identity().users().update(in);
+        msg.setBody(out);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(KeystoneConstants.ID, msg.getHeader(KeystoneConstants.USER_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "User ID");
+        final ActionResponse response = osV3Client.identity().users().delete(id);
+        checkFailure(response, msg, "Delete user with ID " + id);
+    }
+
+    private User messageToUser(Message message) {
+        User project = message.getBody(User.class);
+
+        if (project == null) {
+            Map headers = message.getHeaders();
+            UserBuilder builder = Builders.user();
+
+            ObjectHelper.notEmpty(message.getHeader(KeystoneConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(KeystoneConstants.NAME, String.class));
+
+            if (headers.containsKey(KeystoneConstants.DOMAIN_ID)) {
+                builder.domainId(message.getHeader(KeystoneConstants.DOMAIN_ID, String.class));
+            }
+
+            if (headers.containsKey(KeystoneConstants.DESCRIPTION)) {
+                builder.description(message.getHeader(KeystoneConstants.DESCRIPTION, String.class));
+            }
+
+            if (headers.containsKey(KeystoneConstants.PASSWORD)) {
+                builder.password(message.getHeader(KeystoneConstants.PASSWORD, String.class));
+            }
+
+            if (headers.containsKey(KeystoneConstants.EMAIL)) {
+                builder.email(message.getHeader(KeystoneConstants.EMAIL, String.class));
+            }
+
+
+            project = builder.build();
+        }
+        return project;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronComponent.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronComponent.java
index e96865f..3981ac5 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronComponent.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronComponent.java
@@ -16,18 +16,19 @@
  */
 package org.apache.camel.component.openstack.neutron;
 
+import java.util.Map;
+
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
 
-import java.util.Map;
-
 public class NeutronComponent extends DefaultComponent {
 
-	@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-		NeutronEndpoint endpoint = new NeutronEndpoint(uri, this);
-		setProperties(endpoint, parameters);
-		endpoint.setHost(remaining);
-		return endpoint;
-	}
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        NeutronEndpoint endpoint = new NeutronEndpoint(uri, this);
+        setProperties(endpoint, parameters);
+        endpoint.setHost(remaining);
+        return endpoint;
+    }
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronConstants.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronConstants.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronConstants.java
index 8989709..da8df7e 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronConstants.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronConstants.java
@@ -18,42 +18,43 @@ package org.apache.camel.component.openstack.neutron;
 
 import org.apache.camel.component.openstack.common.OpenstackConstants;
 
-public final class  NeutronConstants extends OpenstackConstants{
-
-	public static final String NEUTRON_NETWORK_SUBSYSTEM = "networks";
-	public static final String NEUTRON_SUBNETS_SYSTEM = "subnets";
-	public static final String NEUTRON_PORT_SYSTEM = "ports";
-	public static final String NEUTRON_ROUTER_SYSTEM = "routers";
-	public static final String TENANT_ID = "tenantId";
-	public static final String NETWORK_ID = "networkId";
-
-	//network
-	public static final String ADMIN_STATE_UP = "adminStateUp";
-	public static final String NETWORK_TYPE = "networkType";
-	public static final String PHYSICAL_NETWORK = "physicalNetwork";
-	public static final String SEGMENT_ID = "segmentId";
-	public static final String IS_SHARED = "isShared";
-	public static final String IS_ROUTER_EXTERNAL = "isRouterExternal";
-
-	//subnet
-	public static final String ENABLE_DHCP = "enableDHCP";
-	public static final String GATEWAY = "gateway";
-	public static final String IP_VERSION = "ipVersion";
-	public static final String CIDR = "cidr";
-	public static final String SUBNET_POOL = "subnetPools";
-
-	//port
-	public static final String DEVICE_ID = "deviceId";
-	public static final String MAC_ADDRESS = "macAddress";
-
-	//router
-	public static final String ROUTER_ID = "routerId";
-	public static final String SUBNET_ID = "subnetId";
-	public static final String PORT_ID = "portId";
-	public static final String ITERFACE_TYPE = "interfaceType";
-
-	public static final String ATTACH_INTERFACE = "attachInterface";
-	public static final String DETACH_INTERFACE = "detachInterface";
-
+public final class NeutronConstants extends OpenstackConstants {
+
+    public static final String NEUTRON_NETWORK_SUBSYSTEM = "networks";
+    public static final String NEUTRON_SUBNETS_SYSTEM = "subnets";
+    public static final String NEUTRON_PORT_SYSTEM = "ports";
+    public static final String NEUTRON_ROUTER_SYSTEM = "routers";
+    public static final String TENANT_ID = "tenantId";
+    public static final String NETWORK_ID = "networkId";
+
+    //network
+    public static final String ADMIN_STATE_UP = "adminStateUp";
+    public static final String NETWORK_TYPE = "networkType";
+    public static final String PHYSICAL_NETWORK = "physicalNetwork";
+    public static final String SEGMENT_ID = "segmentId";
+    public static final String IS_SHARED = "isShared";
+    public static final String IS_ROUTER_EXTERNAL = "isRouterExternal";
+
+    //subnet
+    public static final String ENABLE_DHCP = "enableDHCP";
+    public static final String GATEWAY = "gateway";
+    public static final String IP_VERSION = "ipVersion";
+    public static final String CIDR = "cidr";
+    public static final String SUBNET_POOL = "subnetPools";
+
+    //port
+    public static final String DEVICE_ID = "deviceId";
+    public static final String MAC_ADDRESS = "macAddress";
+
+    //router
+    public static final String ROUTER_ID = "routerId";
+    public static final String SUBNET_ID = "subnetId";
+    public static final String PORT_ID = "portId";
+    public static final String ITERFACE_TYPE = "interfaceType";
+
+    public static final String ATTACH_INTERFACE = "attachInterface";
+    public static final String DETACH_INTERFACE = "detachInterface";
+
+    private NeutronConstants() { }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronEndpoint.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronEndpoint.java
index cb69a6f..962e522 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronEndpoint.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/NeutronEndpoint.java
@@ -31,160 +31,158 @@ import org.openstack4j.core.transport.Config;
 @UriEndpoint(scheme = "openstack-neutron", title = "OpenStack-Neutron", syntax = "openstack-neutron:host", label = "cloud, virtualization")
 public class NeutronEndpoint extends AbstractOpenstackEndpoint {
 
-	@UriPath
-	@Metadata(required = "true")
-	private String host;
-
-	@UriParam(enums = "networks, subnets, ports, routers")
-	@Metadata(required = "true")
-	String subsystem;
-
-	@UriParam(defaultValue = "default")
-	private String domain = "default";
-
-	@UriParam
-	@Metadata(required = "true")
-	private String project;
-
-	@UriParam
-	private String operation;
-
-	@UriParam
-	@Metadata(required = "true")
-	private String username;
-
-	@UriParam
-	@Metadata(required = "true")
-	private String password;
-
-	@UriParam
-	private Config config;
-
-	@UriParam(defaultValue = v3, enums = "v2, v3")
-	private String apiVersion = v3;
-
-	public NeutronEndpoint(String uri, NeutronComponent component) {
-		super(uri, component);
-	}
-
-	@Override
-	public Producer createProducer() throws Exception {
-		switch (getSubsystem()) {
-			case NeutronConstants.NEUTRON_NETWORK_SUBSYSTEM:
-				return new NetworkProducer(this, createClient());
-			case NeutronConstants.NEUTRON_SUBNETS_SYSTEM:
-				return new SubnetProducer(this, createClient());
-			case NeutronConstants.NEUTRON_PORT_SYSTEM:
-				return new PortProducer(this, createClient());
-			case NeutronConstants.NEUTRON_ROUTER_SYSTEM:
-				return new RouterProducer(this, createClient());
-			default:
-				throw new IllegalArgumentException("Can't create producer with subsystem " + subsystem);
-		}
-	}
-
-	public String getSubsystem() {
-		return subsystem;
-	}
-
-	/**
-	 * OpenStack Neutron subsystem
-	 */
-	public void setSubsystem(String subsystem) {
-		this.subsystem = subsystem;
-	}
-
-	@Override
-	public String getDomain() {
-		return domain;
-	}
-
-	/**
-	 * Authentication domain
-	 */
-	public void setDomain(String domain) {
-		this.domain = domain;
-	}
-
-	@Override
-	public String getProject() {
-		return project;
-	}
-
-	/**
-	 * The project ID
-	 */
-	public void setProject(String project) {
-		this.project = project;
-	}
-
-	@Override
-	public String getOperation() {
-		return operation;
-	}
-
-	/**
-	 * The operation to do
-	 */
-	public void setOperation(String operation) {
-		this.operation = operation;
-	}
-
-	@Override
-	public String getUsername() {
-		return username;
-	}
-
-	/**
-	 * OpenStack username
-	 */
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	@Override
-	public String getPassword() {
-		return password;
-	}
-
-	/**
-	 * OpenStack password
-	 */
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	@Override
-	public String getHost() {
-		return host;
-	}
-
-	/**
-	 * OpenStack host url
-	 */
-	public void setHost(String host) {
-		this.host = host;
-	}
-
-	public Config getConfig() {
-		return config;
-	}
-
-	/**
-	 *OpenStack configuration
-	 */
-	public void setConfig(Config config) {
-		this.config = config;
-	}
-
-	public String getApiVersion() {
-		return apiVersion;
-	}
-
-	/**
-	 * OpenStack API version
-	 */
-	public void setApiVersion(String apiVersion) {
-		this.apiVersion = apiVersion;
-	}
+    @UriParam(enums = "networks, subnets, ports, routers")
+    @Metadata(required = "true")
+    String subsystem;
+    @UriPath
+    @Metadata(required = "true")
+    private String host;
+    @UriParam(defaultValue = "default")
+    private String domain = "default";
+
+    @UriParam
+    @Metadata(required = "true")
+    private String project;
+
+    @UriParam
+    private String operation;
+
+    @UriParam
+    @Metadata(required = "true")
+    private String username;
+
+    @UriParam
+    @Metadata(required = "true")
+    private String password;
+
+    @UriParam
+    private Config config;
+
+    @UriParam(defaultValue = V3, enums = "V2, V3")
+    private String apiVersion = V3;
+
+    public NeutronEndpoint(String uri, NeutronComponent component) {
+        super(uri, component);
+    }
+
+    @Override
+    public Producer createProducer() throws Exception {
+        switch (getSubsystem()) {
+        case NeutronConstants.NEUTRON_NETWORK_SUBSYSTEM:
+            return new NetworkProducer(this, createClient());
+        case NeutronConstants.NEUTRON_SUBNETS_SYSTEM:
+            return new SubnetProducer(this, createClient());
+        case NeutronConstants.NEUTRON_PORT_SYSTEM:
+            return new PortProducer(this, createClient());
+        case NeutronConstants.NEUTRON_ROUTER_SYSTEM:
+            return new RouterProducer(this, createClient());
+        default:
+            throw new IllegalArgumentException("Can't create producer with subsystem " + subsystem);
+        }
+    }
+
+    public String getSubsystem() {
+        return subsystem;
+    }
+
+    /**
+     * OpenStack Neutron subsystem
+     */
+    public void setSubsystem(String subsystem) {
+        this.subsystem = subsystem;
+    }
+
+    @Override
+    public String getDomain() {
+        return domain;
+    }
+
+    /**
+     * Authentication domain
+     */
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+    @Override
+    public String getProject() {
+        return project;
+    }
+
+    /**
+     * The project ID
+     */
+    public void setProject(String project) {
+        this.project = project;
+    }
+
+    @Override
+    public String getOperation() {
+        return operation;
+    }
+
+    /**
+     * The operation to do
+     */
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    @Override
+    public String getUsername() {
+        return username;
+    }
+
+    /**
+     * OpenStack username
+     */
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    @Override
+    public String getPassword() {
+        return password;
+    }
+
+    /**
+     * OpenStack password
+     */
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @Override
+    public String getHost() {
+        return host;
+    }
+
+    /**
+     * OpenStack host url
+     */
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public Config getConfig() {
+        return config;
+    }
+
+    /**
+     *OpenStack configuration
+     */
+    public void setConfig(Config config) {
+        this.config = config;
+    }
+
+    public String getApiVersion() {
+        return apiVersion;
+    }
+
+    /**
+     * OpenStack API version
+     */
+    public void setApiVersion(String apiVersion) {
+        this.apiVersion = apiVersion;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
index 6e58c7f..afc014d 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
@@ -16,13 +16,15 @@
  */
 package org.apache.camel.component.openstack.neutron.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.common.AbstractOpenstackProducer;
 import org.apache.camel.component.openstack.neutron.NeutronConstants;
 import org.apache.camel.component.openstack.neutron.NeutronEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
@@ -30,95 +32,100 @@ import org.openstack4j.model.network.Network;
 import org.openstack4j.model.network.NetworkType;
 import org.openstack4j.model.network.builder.NetworkBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class NetworkProducer extends AbstractOpenstackProducer {
 
-	public NetworkProducer(NeutronEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case NeutronConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case NeutronConstants.GET:
-				doGet(exchange);
-				break;
-			case NeutronConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case NeutronConstants.DELETE:
-				doDelete(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final Network in = messageToNetwork(exchange.getIn());
-		final Network out = os.networking().network().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.NETWORK_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Network ID");
-		final Network out = os.networking().network().get(id);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Network> out = os.networking().network().list();
-		exchange.getIn().setBody(out);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.NETWORK_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Network ID");
-		final ActionResponse response = os.networking().network().delete(id);
-		checkFailure(response, msg, "Delete network" + id);
-	}
-
-	private Network messageToNetwork(Message message) {
-		Network network = message.getBody(Network.class);
-		if(network == null) {
-			Map headers = message.getHeaders();
-			NetworkBuilder builder = Builders.network();
-
-			ObjectHelper.notEmpty(message.getHeader(NeutronConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(NeutronConstants.NAME, String.class));
-
-			if(headers.containsKey(NeutronConstants.ADMIN_STATE_UP))
-			builder.adminStateUp(message.getHeader(NeutronConstants.ADMIN_STATE_UP, Boolean.class));
-
-			if(headers.containsKey(NeutronConstants.NETWORK_TYPE))
-			builder.networkType(message.getHeader(NeutronConstants.NETWORK_TYPE, NetworkType.class));
-
-			if(headers.containsKey(NeutronConstants.IS_SHARED))
-			builder.isShared(message.getHeader(NeutronConstants.IS_SHARED, Boolean.class));
-
-			if(headers.containsKey(NeutronConstants.IS_ROUTER_EXTERNAL))
-			builder.isRouterExternal(message.getHeader(NeutronConstants.IS_ROUTER_EXTERNAL, Boolean.class));
-
-			if(headers.containsKey(NeutronConstants.TENANT_ID))
-			builder.tenantId(message.getHeader(NeutronConstants.TENANT_ID, String.class));
-
-			if(headers.containsKey(NeutronConstants.PHYSICAL_NETWORK))
-				builder.physicalNetwork(message.getHeader(NeutronConstants.PHYSICAL_NETWORK, String.class));
-
-			if(headers.containsKey(NeutronConstants.SEGMENT_ID))
-				builder.segmentId(message.getHeader(NeutronConstants.SEGMENT_ID, String.class));
-
-			network = builder.build();
-		}
-
-		return network;
-	}
+    public NetworkProducer(NeutronEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case NeutronConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case NeutronConstants.GET:
+            doGet(exchange);
+            break;
+        case NeutronConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case NeutronConstants.DELETE:
+            doDelete(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final Network in = messageToNetwork(exchange.getIn());
+        final Network out = os.networking().network().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.NETWORK_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Network ID");
+        final Network out = os.networking().network().get(id);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Network> out = os.networking().network().list();
+        exchange.getIn().setBody(out);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.NETWORK_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Network ID");
+        final ActionResponse response = os.networking().network().delete(id);
+        checkFailure(response, msg, "Delete network" + id);
+    }
+
+    private Network messageToNetwork(Message message) {
+        Network network = message.getBody(Network.class);
+        if (network == null) {
+            Map headers = message.getHeaders();
+            NetworkBuilder builder = Builders.network();
+
+            ObjectHelper.notEmpty(message.getHeader(NeutronConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(NeutronConstants.NAME, String.class));
+
+            if (headers.containsKey(NeutronConstants.ADMIN_STATE_UP)) {
+                builder.adminStateUp(message.getHeader(NeutronConstants.ADMIN_STATE_UP, Boolean.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.NETWORK_TYPE)) {
+                builder.networkType(message.getHeader(NeutronConstants.NETWORK_TYPE, NetworkType.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.IS_SHARED)) {
+                builder.isShared(message.getHeader(NeutronConstants.IS_SHARED, Boolean.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.IS_ROUTER_EXTERNAL)) {
+                builder.isRouterExternal(message.getHeader(NeutronConstants.IS_ROUTER_EXTERNAL, Boolean.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.TENANT_ID)) {
+                builder.tenantId(message.getHeader(NeutronConstants.TENANT_ID, String.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.PHYSICAL_NETWORK)) {
+                builder.physicalNetwork(message.getHeader(NeutronConstants.PHYSICAL_NETWORK, String.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.SEGMENT_ID)) {
+                builder.segmentId(message.getHeader(NeutronConstants.SEGMENT_ID, String.class));
+            }
+
+            network = builder.build();
+        }
+
+        return network;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
index f7ed65d..e3ccf5a 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
@@ -16,110 +16,113 @@
  */
 package org.apache.camel.component.openstack.neutron.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.common.AbstractOpenstackProducer;
 import org.apache.camel.component.openstack.neutron.NeutronConstants;
 import org.apache.camel.component.openstack.neutron.NeutronEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
 import org.openstack4j.model.network.Port;
 import org.openstack4j.model.network.builder.PortBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class PortProducer extends AbstractOpenstackProducer {
 
-	public PortProducer(NeutronEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override
-	public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case NeutronConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case NeutronConstants.GET:
-				doGet(exchange);
-				break;
-			case NeutronConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case NeutronConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case NeutronConstants.DELETE:
-				doDelete(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final Port in = messageToPort(exchange.getIn());
-		final Port out = os.networking().port().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.PORT_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Port ID");
-		final Port result = os.networking().port().get(id);
-		msg.setBody(result);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Port> out = os.networking().port().list();
-		exchange.getIn().setBody(out);
-	}
-
-	private void doUpdate(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final Port port = messageToPort(msg);
-		final Port updatedPort = os.networking().port().update(port);
-		msg.setBody(updatedPort);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.PORT_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Port ID");
-		final ActionResponse response = os.networking().port().delete(id);
-		checkFailure(response, msg, "Delete port with ID " + id);
-	}
-
-	private Port messageToPort(Message message) {
-		Port port = message.getBody(Port.class);
-
-		if (port == null) {
-			Map headers = message.getHeaders();
-			PortBuilder builder = Builders.port();
-
-			ObjectHelper.notEmpty(message.getHeader(NeutronConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(NeutronConstants.NAME, String.class));
-
-			if (headers.containsKey(NeutronConstants.TENANT_ID))
-				builder.tenantId(message.getHeader(NeutronConstants.TENANT_ID, String.class));
-
-			if (headers.containsKey(NeutronConstants.NETWORK_ID))
-				builder.networkId(message.getHeader(NeutronConstants.NETWORK_ID, String.class));
-
-			if (headers.containsKey(NeutronConstants.DEVICE_ID))
-				builder.deviceId(message.getHeader(NeutronConstants.DEVICE_ID, String.class));
-
-			if (headers.containsKey(NeutronConstants.MAC_ADDRESS))
-				builder.macAddress(message.getHeader(NeutronConstants.MAC_ADDRESS, String.class));
-
-			port = builder.build();
-		}
-		return port;
-	}
+    public PortProducer(NeutronEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case NeutronConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case NeutronConstants.GET:
+            doGet(exchange);
+            break;
+        case NeutronConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case NeutronConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case NeutronConstants.DELETE:
+            doDelete(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final Port in = messageToPort(exchange.getIn());
+        final Port out = os.networking().port().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.PORT_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Port ID");
+        final Port result = os.networking().port().get(id);
+        msg.setBody(result);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Port> out = os.networking().port().list();
+        exchange.getIn().setBody(out);
+    }
+
+    private void doUpdate(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final Port port = messageToPort(msg);
+        final Port updatedPort = os.networking().port().update(port);
+        msg.setBody(updatedPort);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.PORT_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Port ID");
+        final ActionResponse response = os.networking().port().delete(id);
+        checkFailure(response, msg, "Delete port with ID " + id);
+    }
+
+    private Port messageToPort(Message message) {
+        Port port = message.getBody(Port.class);
+
+        if (port == null) {
+            Map headers = message.getHeaders();
+            PortBuilder builder = Builders.port();
+
+            ObjectHelper.notEmpty(message.getHeader(NeutronConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(NeutronConstants.NAME, String.class));
+
+            if (headers.containsKey(NeutronConstants.TENANT_ID)) {
+                builder.tenantId(message.getHeader(NeutronConstants.TENANT_ID, String.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.NETWORK_ID)) {
+                builder.networkId(message.getHeader(NeutronConstants.NETWORK_ID, String.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.DEVICE_ID)) {
+                builder.deviceId(message.getHeader(NeutronConstants.DEVICE_ID, String.class));
+            }
+
+            if (headers.containsKey(NeutronConstants.MAC_ADDRESS)) {
+                builder.macAddress(message.getHeader(NeutronConstants.MAC_ADDRESS, String.class));
+            }
+
+            port = builder.build();
+        }
+        return port;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7d2907d2/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
index 77f8e1f..ef8913b 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
@@ -16,13 +16,15 @@
  */
 package org.apache.camel.component.openstack.neutron.producer;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.common.AbstractOpenstackProducer;
 import org.apache.camel.component.openstack.neutron.NeutronConstants;
 import org.apache.camel.component.openstack.neutron.NeutronEndpoint;
 import org.apache.camel.util.ObjectHelper;
-
 import org.openstack4j.api.Builders;
 import org.openstack4j.api.OSClient;
 import org.openstack4j.model.common.ActionResponse;
@@ -31,116 +33,114 @@ import org.openstack4j.model.network.Router;
 import org.openstack4j.model.network.RouterInterface;
 import org.openstack4j.model.network.builder.RouterBuilder;
 
-import java.util.List;
-import java.util.Map;
-
 public class RouterProducer extends AbstractOpenstackProducer {
 
-	public RouterProducer(NeutronEndpoint endpoint, OSClient client) {
-		super(endpoint, client);
-	}
-
-	@Override
-	public void process(Exchange exchange) throws Exception {
-		final String operation = getOperation(exchange);
-		switch (operation) {
-			case NeutronConstants.CREATE:
-				doCreate(exchange);
-				break;
-			case NeutronConstants.GET:
-				doGet(exchange);
-				break;
-			case NeutronConstants.GET_ALL:
-				doGetAll(exchange);
-				break;
-			case NeutronConstants.UPDATE:
-				doUpdate(exchange);
-				break;
-			case NeutronConstants.DELETE:
-				doDelete(exchange);
-				break;
-			case NeutronConstants.ATTACH_INTERFACE:
-				doAttach(exchange);
-				break;
-			case NeutronConstants.DETACH_INTERFACE:
-				doDetach(exchange);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsuproutered operation " + operation);
-		}
-	}
-
-	private void doCreate(Exchange exchange) {
-		final Router in = messageToRouter(exchange.getIn());
-		final Router out = os.networking().router().create(in);
-		exchange.getIn().setBody(out);
-	}
-
-	private void doGet(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.ROUTER_ID, String.class), String.class);
-		ObjectHelper.notEmpty(id, "Router ID");
-		final Router result = os.networking().router().get(id);
-		msg.setBody(result);
-	}
-
-	private void doGetAll(Exchange exchange) {
-		final List<? extends Router> out = os.networking().router().list();
-		exchange.getIn().setBody(out);
-	}
-
-	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);
-	}
-
-	private void doDelete(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String id = msg.getHeader(NeutronConstants.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);
-	}
-
-	private void doDetach(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String routerId = msg.getHeader(NeutronConstants.ROUTER_ID, String.class);
-		final String subnetId = msg.getHeader(NeutronConstants.SUBNET_ID, String.class);
-		final String portId = msg.getHeader(NeutronConstants.PORT_ID, String.class);
-		ObjectHelper.notEmpty(routerId, "Router ID");
-		RouterInterface iface = os.networking().router().detachInterface(routerId, subnetId, portId);
-		msg.setBody(iface);
-	}
-
-	private void doAttach(Exchange exchange) {
-		final Message msg = exchange.getIn();
-		final String routerId = msg.getHeader(NeutronConstants.ROUTER_ID, String.class);
-		final String subnetPortId = msg.getHeader(NeutronConstants.SUBNET_ID, msg.getHeader(NeutronConstants.PORT_ID), String.class);
-		final AttachInterfaceType type = msg.getHeader(NeutronConstants.ITERFACE_TYPE, AttachInterfaceType.class);
-		ObjectHelper.notEmpty(routerId, "Router ID");
-		ObjectHelper.notEmpty(subnetPortId, "Subnet/Port ID");
-		ObjectHelper.notNull(type, "AttachInterfaceType ");
-		RouterInterface routerInterface = os.networking().router().attachInterface(routerId, type, subnetPortId);
-		msg.setBody(routerInterface);
-	}
-
-	private Router messageToRouter(Message message) {
-		Router router = message.getBody(Router.class);
-
-		if (router == null) {
-			Map headers = message.getHeaders();
-			RouterBuilder builder = Builders.router();
-
-			ObjectHelper.notEmpty(message.getHeader(NeutronConstants.NAME, String.class), "Name");
-			builder.name(message.getHeader(NeutronConstants.NAME, String.class));
-
-			if (headers.containsKey(NeutronConstants.TENANT_ID))
-				builder.tenantId(message.getHeader(NeutronConstants.TENANT_ID, String.class));
-
-			router = builder.build();
-		}
-		return router;
-	}
+    public RouterProducer(NeutronEndpoint endpoint, OSClient client) {
+        super(endpoint, client);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        final String operation = getOperation(exchange);
+        switch (operation) {
+        case NeutronConstants.CREATE:
+            doCreate(exchange);
+            break;
+        case NeutronConstants.GET:
+            doGet(exchange);
+            break;
+        case NeutronConstants.GET_ALL:
+            doGetAll(exchange);
+            break;
+        case NeutronConstants.UPDATE:
+            doUpdate(exchange);
+            break;
+        case NeutronConstants.DELETE:
+            doDelete(exchange);
+            break;
+        case NeutronConstants.ATTACH_INTERFACE:
+            doAttach(exchange);
+            break;
+        case NeutronConstants.DETACH_INTERFACE:
+            doDetach(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsuproutered operation " + operation);
+        }
+    }
+
+    private void doCreate(Exchange exchange) {
+        final Router in = messageToRouter(exchange.getIn());
+        final Router out = os.networking().router().create(in);
+        exchange.getIn().setBody(out);
+    }
+
+    private void doGet(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(NeutronConstants.ID, msg.getHeader(NeutronConstants.ROUTER_ID, String.class), String.class);
+        ObjectHelper.notEmpty(id, "Router ID");
+        final Router result = os.networking().router().get(id);
+        msg.setBody(result);
+    }
+
+    private void doGetAll(Exchange exchange) {
+        final List<? extends Router> out = os.networking().router().list();
+        exchange.getIn().setBody(out);
+    }
+
+    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);
+    }
+
+    private void doDelete(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String id = msg.getHeader(NeutronConstants.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);
+    }
+
+    private void doDetach(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String routerId = msg.getHeader(NeutronConstants.ROUTER_ID, String.class);
+        final String subnetId = msg.getHeader(NeutronConstants.SUBNET_ID, String.class);
+        final String portId = msg.getHeader(NeutronConstants.PORT_ID, String.class);
+        ObjectHelper.notEmpty(routerId, "Router ID");
+        RouterInterface iface = os.networking().router().detachInterface(routerId, subnetId, portId);
+        msg.setBody(iface);
+    }
+
+    private void doAttach(Exchange exchange) {
+        final Message msg = exchange.getIn();
+        final String routerId = msg.getHeader(NeutronConstants.ROUTER_ID, String.class);
+        final String subnetPortId = msg.getHeader(NeutronConstants.SUBNET_ID, msg.getHeader(NeutronConstants.PORT_ID), String.class);
+        final AttachInterfaceType type = msg.getHeader(NeutronConstants.ITERFACE_TYPE, AttachInterfaceType.class);
+        ObjectHelper.notEmpty(routerId, "Router ID");
+        ObjectHelper.notEmpty(subnetPortId, "Subnet/Port ID");
+        ObjectHelper.notNull(type, "AttachInterfaceType ");
+        RouterInterface routerInterface = os.networking().router().attachInterface(routerId, type, subnetPortId);
+        msg.setBody(routerInterface);
+    }
+
+    private Router messageToRouter(Message message) {
+        Router router = message.getBody(Router.class);
+
+        if (router == null) {
+            Map headers = message.getHeaders();
+            RouterBuilder builder = Builders.router();
+
+            ObjectHelper.notEmpty(message.getHeader(NeutronConstants.NAME, String.class), "Name");
+            builder.name(message.getHeader(NeutronConstants.NAME, String.class));
+
+            if (headers.containsKey(NeutronConstants.TENANT_ID)) {
+                builder.tenantId(message.getHeader(NeutronConstants.TENANT_ID, String.class));
+            }
+
+            router = builder.build();
+        }
+        return router;
+    }
 }


Mime
View raw message