[3/3] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6cefe5ee Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6cefe5ee Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6cefe5ee Branch: refs/heads/master Commit: 6cefe5eebfe4907116a84067e2c4b522e9d28ed4 Parents: f712e16 Author: Andrea CosentinoAuthored: Thu Oct 29 17:12:49 2015 +0100 Committer: Andrea Cosentino Committed: Thu Oct 29 17:12:49 2015 +0100 -- .../kubernetes/KubernetesConfiguration.java | 51 ++--- .../kubernetes/KubernetesConstants.java | 4 +- .../kubernetes/KubernetesEndpoint.java | 64 +++--- .../consumer/KubernetesPodsConsumer.java| 178 ...ubernetesReplicationControllersConsumer.java | 177 .../consumer/KubernetesSecretsConsumer.java | 169 --- .../consumer/KubernetesServicesConsumer.java| 175 .../kubernetes/consumer/common/PodEvent.java| 52 +++-- .../common/ReplicationControllerEvent.java | 52 +++-- .../kubernetes/consumer/common/SecretEvent.java | 52 +++-- .../consumer/common/ServiceEvent.java | 52 +++-- .../KubernetesBuildConfigsProducer.java | 51 ++--- .../producer/KubernetesBuildsProducer.java | 55 ++--- .../producer/KubernetesNodesProducer.java | 49 ++--- .../kubernetes/KubernetesTestSupport.java | 2 +- .../consumer/KubernetesPodsConsumerTest.java| 79 +++ ...netesReplicationControllersConsumerTest.java | 210 --- .../consumer/KubernetesSecretsConsumerTest.java | 127 +-- .../KubernetesServicesConsumerTest.java | 189 - 19 files changed, 842 insertions(+), 946 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6cefe5ee/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java -- diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java index 9c5696f..0d3cda4 100644 --- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java +++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java @@ -45,9 +45,9 @@ public class KubernetesConfiguration { @UriParam(label = "producer", enums = "listNamespaces,listNamespacesByLabels,getNamespace,createNamespace,deleteNamespace,listServices,listServicesByLabels,getService,createService," + "deleteService,listReplicationControllers,listReplicationControllersByLabels,getReplicationController,createReplicationController,deleteReplicationController,listPods," - + "listPodsByLabels,getPod,createPod,deletePod,listPersistentVolumes,listPersistentVolumesByLabels,getPersistentVolume,listPersistentVolumesClaims,listPersistentVolumesClaimsByLabels," -+ "getPersistentVolumeClaim,createPersistentVolumeClaim,deletePersistentVolumeClaim,listSecrets,listSecretsByLabels,getSecret,createSecret,deleteSecret,listResourcesQuota," - + "listResourcesQuotaByLabels,getResourceQuota,createResourceQuota,deleteResourceQuota,listServiceAccounts,listServiceAccountsByLabels,getServiceAccount,createServiceAccount," ++ "listPodsByLabels,getPod,createPod,deletePod,listPersistentVolumes,listPersistentVolumesByLabels,getPersistentVolume,listPersistentVolumesClaims,listPersistentVolumesClaimsByLabels," ++ "getPersistentVolumeClaim,createPersistentVolumeClaim,deletePersistentVolumeClaim,listSecrets,listSecretsByLabels,getSecret,createSecret,deleteSecret,listResourcesQuota," ++ "listResourcesQuotaByLabels,getResourceQuota,createResourceQuota,deleteResourceQuota,listServiceAccounts,listServiceAccountsByLabels,getServiceAccount,createServiceAccount," + "deleteServiceAccount,listNodes,listNodesByLabels,getNode,listBuilds,listBuildsByLabels,getBuild,listBuildConfigs,listBuildConfigsByLabels,getBuildConfig") private String operation; @@ -83,7 +83,7 @@ public class KubernetesConfiguration { @UriParam private Boolean trustCerts; - + @UriParam(label = "consumer") private String namespaceName; @@ -253,7 +253,7 @@ public class KubernetesConfiguration { } /** - * The Auth Token + * The Auth Token */ public String getOauthToken() { return oauthToken; @@ -277,27 +277,22 @@ public class KubernetesConfiguration { /** * The namespace name */ -
[2/3] camel git commit: Fixed CS
http://git-wip-us.apache.org/repos/asf/camel/blob/6cefe5ee/components/camel-kubernetes/src/test/java/org/apache/camel/component/kubernetes/consumer/KubernetesReplicationControllersConsumerTest.java -- diff --git a/components/camel-kubernetes/src/test/java/org/apache/camel/component/kubernetes/consumer/KubernetesReplicationControllersConsumerTest.java b/components/camel-kubernetes/src/test/java/org/apache/camel/component/kubernetes/consumer/KubernetesReplicationControllersConsumerTest.java index e9df6dc..2c6cf6d 100644 --- a/components/camel-kubernetes/src/test/java/org/apache/camel/component/kubernetes/consumer/KubernetesReplicationControllersConsumerTest.java +++ b/components/camel-kubernetes/src/test/java/org/apache/camel/component/kubernetes/consumer/KubernetesReplicationControllersConsumerTest.java @@ -16,19 +16,13 @@ */ package org.apache.camel.component.kubernetes.consumer; +import java.util.HashMap; +import java.util.Map; + import io.fabric8.kubernetes.api.model.EditablePodTemplateSpec; -import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder; import io.fabric8.kubernetes.api.model.ReplicationController; import io.fabric8.kubernetes.api.model.ReplicationControllerSpec; -import io.fabric8.kubernetes.api.model.Service; -import io.fabric8.kubernetes.api.model.ServicePort; -import io.fabric8.kubernetes.api.model.ServiceSpec; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import org.apache.camel.EndpointInject; import org.apache.camel.Exchange; @@ -38,128 +32,100 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.kubernetes.KubernetesConstants; import org.apache.camel.component.kubernetes.KubernetesTestSupport; import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.test.junit4.CamelTestSupport; import org.apache.camel.util.ObjectHelper; import org.junit.Test; -public class KubernetesReplicationControllersConsumerTest extends - KubernetesTestSupport { - - @EndpointInject(uri = "mock:result") - protected MockEndpoint mockResultEndpoint; - - @Test - public void createAndDeleteReplicationController() throws Exception { - if (ObjectHelper.isEmpty(authToken)) { - return; - } - - mockResultEndpoint - .expectedHeaderValuesReceivedInAnyOrder( - KubernetesConstants.KUBERNETES_EVENT_ACTION, "ADDED", - "DELETED", "MODIFIED", "MODIFIED", "MODIFIED"); -Exchange ex = template.request("direct:createReplicationController", -new Processor() { - -@Override -public void process(Exchange exchange) throws Exception { -exchange.getIn().setHeader( -KubernetesConstants.KUBERNETES_NAMESPACE_NAME, -"default"); -exchange.getIn() -.setHeader( - KubernetesConstants.KUBERNETES_REPLICATION_CONTROLLER_NAME, -"test"); -Maplabels = new HashMap (); -labels.put("this", "rocks"); -exchange.getIn() -.setHeader( - KubernetesConstants.KUBERNETES_REPLICATION_CONTROLLERS_LABELS, -labels); -ReplicationControllerSpec rcSpec = new ReplicationControllerSpec(); -rcSpec.setReplicas(2); -PodTemplateSpecBuilder builder = new PodTemplateSpecBuilder(); -EditablePodTemplateSpec t = builder.withNewMetadata() -.withName("nginx-template") -.addToLabels("server", "nginx").endMetadata() -.withNewSpec().addNewContainer() -.withName("wildfly").withImage("jboss/wildfly") -.addNewPort().withContainerPort(80).endPort() -.endContainer().endSpec().build(); -rcSpec.setTemplate(t); -Map selectorMap = new HashMap (); -selectorMap.put("server", "nginx"); -rcSpec.setSelector(selectorMap); -exchange.getIn() -.setHeader( - KubernetesConstants.KUBERNETES_REPLICATION_CONTROLLER_SPEC, -
[1/3] camel git commit: Upgrade Kubernetes/Openshift client to version 1.3.56 and Kubernetes-model to version 1.0.33
Repository: camel Updated Branches: refs/heads/master 62b2042b2 -> 6cefe5eeb Upgrade Kubernetes/Openshift client to version 1.3.56 and Kubernetes-model to version 1.0.33 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f712e16a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f712e16a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f712e16a Branch: refs/heads/master Commit: f712e16a5fb7913d9b0e912294dccd03dc4b2fb7 Parents: 62b2042 Author: Andrea CosentinoAuthored: Thu Oct 29 17:12:42 2015 +0100 Committer: Andrea Cosentino Committed: Thu Oct 29 17:12:42 2015 +0100 -- parent/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f712e16a/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 042b493..1c6120a 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -326,8 +326,8 @@ 3.0.2 6.3.0.Final 0.4.9 -1.3.55 -1.0.32 +1.3.56 +1.0.33 2.3.0_2 1.8 @@ -396,7 +396,7 @@ 4.7.2 2.4.0 2.7.0.Final -1.3.55 +1.3.56 6.3.0.Final 2.0.8_6 2.4_5
camel git commit: CAMEL-9272. Add appid param as the user key is required since 9/10/2015 to access the openweathermap service
Repository: camel Updated Branches: refs/heads/master 6cefe5eeb -> a7c8c5c97 CAMEL-9272. Add appid param as the user key is required since 9/10/2015 to access the openweathermap service Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a7c8c5c9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a7c8c5c9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a7c8c5c9 Branch: refs/heads/master Commit: a7c8c5c971dfa293ff0cd9ba39284aaf24a69fa4 Parents: 6cefe5e Author: Charles MoulliardAuthored: Thu Oct 29 17:52:28 2015 +0100 Committer: Charles Moulliard Committed: Thu Oct 29 17:52:28 2015 +0100 -- .../component/weather/WeatherConfiguration.java | 20 +++- .../CurrentWeatherMadridProducerTest.java | 4 +++- 2 files changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a7c8c5c9/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java -- diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java index c77f5f1..e0c87d6 100644 --- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java +++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java @@ -52,6 +52,8 @@ public class WeatherConfiguration { private WeatherUnits units = METRIC; @UriParam private String headerName; +@UriParam +private String appid; public WeatherConfiguration(WeatherComponent component) { this.component = notNull(component, "component"); @@ -155,6 +157,18 @@ public class WeatherConfiguration { public void setLon(String lon) { this.lon = lon; } + +/** + * APPID ID used to authenticate the user connected to the API Server + */ +public void setAppid(String appid) { +this.appid = appid; +} + +public String getAppid() { +return appid; +} + public String getQuery() throws Exception { return getQuery(getLocation()); @@ -171,7 +185,7 @@ public class WeatherConfiguration { // assuming the location is a town or country location = "q=" + location; } - + if (isEmpty(getPeriod())) { answer += "weather?" + location; } else { @@ -188,6 +202,10 @@ public class WeatherConfiguration { answer += "=" + getMode().name().toLowerCase(); } +if (getAppid() != null) { +answer += "=" + getAppid(); +} + return answer; } http://git-wip-us.apache.org/repos/asf/camel/blob/a7c8c5c9/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java -- diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java index 9592513..61b7dc6 100644 --- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java +++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java @@ -86,8 +86,10 @@ public class CurrentWeatherMadridProducerTest extends BaseWeatherConsumerTest { return new RouteBuilder() { @Override public void configure() throws Exception { + +/* The Camel Route uses the apache-camel appid to access the openweathermap service */ from("direct:start") -.to("weather:foo?location=Madrid,Spain") + .to("weather:foo?location=Madrid,Spain=9162755b2efa555823cfe0451d7fff38") .to("mock:result"); } };
svn commit: r970673 - in /websites/production/camel/content: cache/main.pageCache weather.html
Author: buildbot Date: Thu Oct 29 19:24:04 2015 New Revision: 970673 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/weather.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/weather.html == --- websites/production/camel/content/weather.html (original) +++ websites/production/camel/content/weather.html Thu Oct 29 19:24:04 2015 @@ -85,86 +85,32 @@ -Weather Component -Available as of Camel 2.12 - -The weather: component is used for polling weather information from http://openweathermap.org; rel="nofollow">Open Weather Map - a site that provides free global weather and forecast information. The information is returned as a json String object. - -Camel will poll for updates to the current weather and forecasts once per hour by default. - -Maven users will need to add the following dependency to their pom.xml for this component: - -Weather Component
Available as of Camel 2.12
The weather: component is used for polling weather information from http://openweathermap.org" rel="nofollow">Open Weather Map - a site that provides free global weather and forecast information. The information is returned as a json String object.
Camel will poll for updates to the current weather and forecasts once per hour by default. It can also be used to query the weather api based on the parameters defined on the endpoint which is used as producer.
Maven users will need to add the following dependency to their
pom.xml
for this component:+