From fa11dcfc1b6f250daf2ec983cf1d99f1a564667a Mon Sep 17 00:00:00 2001 From: Andrea Turli Date: Fri, 3 Mar 2017 15:22:15 +0000 Subject: [PATCH] Misc of improvements to karaf project - re-organize feature.xml - add missing API features installation tests - bump osgi and karaf versions - add new maven module `modern-itests` that will replace `itests` - add feature-labs.xml file - add drivers features - add allcompute and allblobstore feature - add FeatureLabsInstallationTest - add providers - bump karaf version in itests - fix karaf-maven-plugin - use sshj 0.20.0 - remove old itests; rename modern-itests to itests - add javax.ws.rs.api deps - split feature-labs into a separate module - remove resolver=(obr) from features as not used --- bundles/jsch-agentproxy-jsch/pom.xml | 1 + cache/pom.xml | 2 +- chef/cache/pom.xml | 2 +- chef/commands/pom.xml | 2 +- chef/services/pom.xml | 2 +- commands/pom.xml | 9 +- .../commands/compute/NodeCreateCommand.java | 2 +- .../support/GenericCompleterSupport.java | 11 +- core/pom.xml | 5 +- feature-labs/pom.xml | 45 ++ feature-labs/src/main/feature/feature.xml | 85 +++ feature-labs/src/main/resources/.gitignore | 0 feature/pom.xml | 136 +---- .../main/{resources => feature}/feature.xml | 503 +++++++++++------- itests/pom.xml | 361 ++++++------- .../itests/ApisFeaturesInstallationTest.java | 102 ---- .../itests/AwsFeaturesInstallationTest.java | 72 --- .../jclouds/karaf/itests/BasePaxExamTest.java | 46 ++ .../itests/ChefFeaturesInstallationTest.java | 51 -- .../CloudSigma2FeaturesInstallationTest.java | 66 --- .../ElasticHostsFeaturesInstallationTest.java | 56 -- .../karaf/itests/FeatureInstallationTest.java | 415 +++++++++++++++ .../itests/FeatureLabsInstallationTest.java | 122 +++++ .../itests/JcloudsFeaturesTestSupport.java | 64 --- .../karaf/itests/JcloudsKarafTestSupport.java | 302 ----------- .../itests/MiscFeaturesInstallationTest.java | 126 ----- .../jclouds/karaf/itests/ObrResolverTest.java | 113 ---- .../RackspaceFeaturesInstallationTest.java | 92 ---- .../org/jclouds/karaf/itests/ServiceTest.java | 93 ++++ .../karaf/itests/live/AwsEc2LiveTest.java | 95 ---- .../karaf/itests/live/AwsS3LiveTest.java | 168 ------ .../itests/live/CloudFilesUsLiveTest.java | 168 ------ .../itests/live/JcloudsLiveTestSupport.java | 103 ---- .../karaf/itests/live/RackspaceLiveTest.java | 96 ---- .../JcloudsCamelCxfFeaturesTestSupport.java | 68 --- itests/src/test/resources/jre.properties.cxf | 472 ---------------- pom.xml | 16 +- recipe/pom.xml | 2 +- 38 files changed, 1320 insertions(+), 2754 deletions(-) create mode 100644 feature-labs/pom.xml create mode 100644 feature-labs/src/main/feature/feature.xml create mode 100644 feature-labs/src/main/resources/.gitignore rename feature/src/main/{resources => feature}/feature.xml (62%) delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/ApisFeaturesInstallationTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/AwsFeaturesInstallationTest.java create mode 100644 itests/src/test/java/org/jclouds/karaf/itests/BasePaxExamTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/ChefFeaturesInstallationTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/CloudSigma2FeaturesInstallationTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/ElasticHostsFeaturesInstallationTest.java create mode 100644 itests/src/test/java/org/jclouds/karaf/itests/FeatureInstallationTest.java create mode 100644 itests/src/test/java/org/jclouds/karaf/itests/FeatureLabsInstallationTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/JcloudsFeaturesTestSupport.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/JcloudsKarafTestSupport.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/MiscFeaturesInstallationTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/ObrResolverTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/RackspaceFeaturesInstallationTest.java create mode 100644 itests/src/test/java/org/jclouds/karaf/itests/ServiceTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/live/AwsEc2LiveTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/live/AwsS3LiveTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/live/CloudFilesUsLiveTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/live/JcloudsLiveTestSupport.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/live/RackspaceLiveTest.java delete mode 100644 itests/src/test/java/org/jclouds/karaf/itests/special/JcloudsCamelCxfFeaturesTestSupport.java delete mode 100644 itests/src/test/resources/jre.properties.cxf diff --git a/bundles/jsch-agentproxy-jsch/pom.xml b/bundles/jsch-agentproxy-jsch/pom.xml index 74cbfe4e..62b66daf 100644 --- a/bundles/jsch-agentproxy-jsch/pom.xml +++ b/bundles/jsch-agentproxy-jsch/pom.xml @@ -83,6 +83,7 @@ limitations under the License. ${project.build.directory}/dependency-reduced-pom.xml + false org.apache.servicemix.bundles:org.apache.servicemix.bundles.jsch-agentproxy-jsch diff --git a/cache/pom.xml b/cache/pom.xml index b33fb01f..035f2fd4 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -56,7 +56,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn org.apache.jclouds diff --git a/chef/cache/pom.xml b/chef/cache/pom.xml index 2451757a..83190a99 100644 --- a/chef/cache/pom.xml +++ b/chef/cache/pom.xml @@ -52,7 +52,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn org.apache.jclouds.karaf diff --git a/chef/commands/pom.xml b/chef/commands/pom.xml index 7f0acd2d..845f92ad 100644 --- a/chef/commands/pom.xml +++ b/chef/commands/pom.xml @@ -101,7 +101,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn org.apache.karaf.shell diff --git a/chef/services/pom.xml b/chef/services/pom.xml index 7e6fa42b..cbad01f6 100644 --- a/chef/services/pom.xml +++ b/chef/services/pom.xml @@ -70,7 +70,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn diff --git a/commands/pom.xml b/commands/pom.xml index 94bee66b..dbce81ce 100644 --- a/commands/pom.xml +++ b/commands/pom.xml @@ -124,7 +124,7 @@ limitations under the License. org.apache.jclouds.driver - jclouds-jsch + jclouds-slf4j org.apache.jclouds.driver @@ -136,7 +136,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn org.apache.karaf.shell @@ -154,5 +154,10 @@ limitations under the License. org.slf4j slf4j-api + + org.apache.jclouds.api + ec2 + 2.1.0-SNAPSHOT + diff --git a/commands/src/main/java/org/jclouds/karaf/commands/compute/NodeCreateCommand.java b/commands/src/main/java/org/jclouds/karaf/commands/compute/NodeCreateCommand.java index 5451e6f1..91c69a82 100644 --- a/commands/src/main/java/org/jclouds/karaf/commands/compute/NodeCreateCommand.java +++ b/commands/src/main/java/org/jclouds/karaf/commands/compute/NodeCreateCommand.java @@ -25,9 +25,9 @@ import org.jclouds.compute.RunNodesException; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.OsFamily; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; import org.jclouds.compute.domain.TemplateBuilder; import org.jclouds.compute.options.TemplateOptions; -import org.jclouds.ec2.compute.options.EC2TemplateOptions; import org.jclouds.karaf.core.Constants; import org.jclouds.karaf.recipe.RecipeManager; import org.jclouds.karaf.recipe.RecipeManagerImpl; diff --git a/commands/src/main/java/org/jclouds/karaf/commands/support/GenericCompleterSupport.java b/commands/src/main/java/org/jclouds/karaf/commands/support/GenericCompleterSupport.java index 21721053..9a39feac 100644 --- a/commands/src/main/java/org/jclouds/karaf/commands/support/GenericCompleterSupport.java +++ b/commands/src/main/java/org/jclouds/karaf/commands/support/GenericCompleterSupport.java @@ -17,18 +17,19 @@ package org.jclouds.karaf.commands.support; -import com.google.common.collect.Multimap; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + import org.apache.felix.service.command.CommandSession; +import org.apache.karaf.shell.console.CommandSessionHolder; import org.apache.karaf.shell.console.Completer; import org.apache.karaf.shell.console.completer.ArgumentCompleter; import org.apache.karaf.shell.console.completer.StringsCompleter; -import org.apache.karaf.shell.console.jline.CommandSessionHolder; import org.jclouds.karaf.cache.CacheProvider; import org.jclouds.karaf.cache.Cacheable; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; +import com.google.common.collect.Multimap; public abstract class GenericCompleterSupport implements Completer, Cacheable { diff --git a/core/pom.xml b/core/pom.xml index c8a02f2b..beb051b7 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -18,10 +18,9 @@ limitations under the License. - jclouds-karaf org.apache.jclouds + jclouds-karaf 2.1.0-SNAPSHOT - .. 4.0.0 @@ -49,7 +48,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn com.google.inject diff --git a/feature-labs/pom.xml b/feature-labs/pom.xml new file mode 100644 index 00000000..fa2a66be --- /dev/null +++ b/feature-labs/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + + org.apache.jclouds + jclouds-karaf + 2.1.0-SNAPSHOT + .. + + + org.apache.jclouds.karaf + jclouds-karaf-labs + feature + jclouds :: Karaf :: Feature Labs + + + + + org.apache.karaf.tooling + karaf-maven-plugin + ${karaf.version} + true + + + + diff --git a/feature-labs/src/main/feature/feature.xml b/feature-labs/src/main/feature/feature.xml new file mode 100644 index 00000000..c4c4ae3a --- /dev/null +++ b/feature-labs/src/main/feature/feature.xml @@ -0,0 +1,85 @@ + + + + mvn:org.apache.jclouds.karaf/jclouds-karaf/${jclouds.version}/xml/features + + + + jclouds-compute + jclouds-azureblob + mvn:org.apache.jclouds.api/oauth/${jclouds.version} + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/${okio.bundle.version} + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/${okhttp.bundle.version} + mvn:org.apache.jclouds.driver/jclouds-okhttp/${jclouds.version} + mvn:org.apache.jclouds.labs/azurecompute-arm/${jclouds.version} + + + + jclouds-blobstore + mvn:org.apache.jclouds.labs/b2/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} + mvn:org.apache.jclouds.labs/cloudsigma2-hnl/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} + mvn:org.apache.jclouds.labs/cloudsigma2-lvs/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} + mvn:org.apache.jclouds.labs/cloudsigma2-sjc/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} + mvn:org.apache.jclouds.labs/cloudsigma2-wdc/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} + mvn:org.apache.jclouds.labs/cloudsigma2-zrh/${jclouds.version} + + + + jclouds-blobstore + mvn:org.apache.jclouds.api/oauth/${jclouds.version} + mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} + mvn:org.apache.jclouds.labs/google-cloud-storage/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.labs/packet/${jclouds.version} + + + + jclouds-compute + mvn:name.neykov/vagrant-java-bindings/${vagrant-java-bindings.version} + mvn:org.apache.jclouds.labs/vagrant/${jclouds.version} + + + diff --git a/feature-labs/src/main/resources/.gitignore b/feature-labs/src/main/resources/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/feature/pom.xml b/feature/pom.xml index ef5e1f16..01e8e699 100644 --- a/feature/pom.xml +++ b/feature/pom.xml @@ -26,146 +26,16 @@ limitations under the License. org.apache.jclouds.karaf jclouds-karaf - pom + feature jclouds :: Karaf :: Feature - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} - false - - - attach-artifacts - generate-resources - - attach-artifact - - - - - target/feature.xml - xml - features - - - target/credentials.cfg - cfg - credentials - - - target/shell.cfg - cfg - shell - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - ${maven-resources-plugin.version} - false - - - copy-resources - validate - - copy-resources - - - ${project.basedir}/target - - - src/main/resources - true - - - - - - org.apache.karaf.tooling - features-maven-plugin + karaf-maven-plugin ${karaf.version} - - - add-features-to-repo - generate-resources - - add-features-to-repo - - - - file:${basedir}/target/feature.xml - - - jclouds - jclouds-blobstore - jclouds-compute - jclouds-api-atmos - jclouds-api-byon - jclouds-api-cloudsigma2 - jclouds-api-cloudstack - jclouds-api-elasticstack - jclouds-api-filesystem - jclouds-api-openstack-nova - jclouds-api-openstack-keystone - jclouds-api-openstack-cinder - jclouds-api-openstack-swift - jclouds-aws-cloudwatch - jclouds-aws-ec2 - jclouds-aws-route53 - jclouds-aws-s3 - jclouds-aws-sqs - jclouds-aws-sts - jclouds-azureblob - jclouds-azurecompute-arm - jclouds-b2 - jclouds-cloudsigma2-hnl - jclouds-cloudsigma2-lvs - jclouds-cloudsigma2-sjc - jclouds-cloudsigma2-wdc - jclouds-cloudsigma2-zrh - jclouds-digitalocean2 - jclouds-dynect - jclouds-elastichosts-lon-b - jclouds-elastichosts-lon-p - jclouds-elastichosts-sat-p - jclouds-elastichosts-lax-p - jclouds-elastichosts-tor-p - jclouds-gogrid - jclouds-go2cloud-jhb1 - jclouds-google-compute-engine - jclouds-google-cloud-storage - jclouds-glesys - jclouds-openhosting-east1 - jclouds-packet - jclouds-profitbricks - jclouds-rackspace-cloudfiles-us - jclouds-rackspace-cloudfiles-uk - jclouds-rackspace-cloudloadbalancers-us - jclouds-rackspace-cloudloadbalancers-uk - jclouds-rackspace-cloudservers-us - jclouds-rackspace-cloudservers-uk - jclouds-rackspace-clouddns-us - jclouds-rackspace-clouddns-uk - jclouds-rackspace-cloudblockstorage-us - jclouds-rackspace-cloudblockstorage-uk - jclouds-serverlove-z1-man - jclouds-skalicloud-sdg-my - jclouds-softlayer - jclouds-vagrant - - target/features-repo - - - + true diff --git a/feature/src/main/resources/feature.xml b/feature/src/main/feature/feature.xml similarity index 62% rename from feature/src/main/resources/feature.xml rename to feature/src/main/feature/feature.xml index ff8c3b7d..1e990ccf 100644 --- a/feature/src/main/resources/feature.xml +++ b/feature/src/main/feature/feature.xml @@ -17,7 +17,42 @@ limitations under the License. --> - + + jclouds-api-s3 + jclouds-aws-s3 + jclouds-azureblob + jclouds-api-atmos + jclouds-api-openstack-swift + jclouds-rackspace-cloudfiles-uk + jclouds-rackspace-cloudfiles-us + + + + jclouds-aws-ec2 + jclouds-api-openstack-nova + jclouds-api-openstack-nova-ec2 + jclouds-api-byon + jclouds-api-ec2 + jclouds-gogrid + jclouds-api-elasticstack + jclouds-elastichosts-lon-p + jclouds-elastichosts-sat-p + jclouds-elastichosts-lon-b + jclouds-openhosting-east1 + jclouds-serverlove-z1-man + jclouds-skalicloud-sdg-my + jclouds-go2cloud-jhb1 + jclouds-softlayer + jclouds-api-cloudstack + jclouds-rackspace-cloudservers-us + jclouds-rackspace-cloudservers-uk + jclouds-google-compute-engine + jclouds-digitalocean2 + jclouds-profitbricks + jclouds-api-docker + + + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/${javax.inject.bundle.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version} mvn:com.google.inject/guice/${guice.version} @@ -25,8 +60,9 @@ limitations under the License. mvn:com.google.inject.extensions/guice-multibindings/${guice.version} - + jclouds-guice + mvn:javax.ws.rs/javax.ws.rs-api/${javax.ws.rs.api.version} mvn:com.google.guava/guava/${guava.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oauth-commons/${net.oauth.bundle.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jersey-core/${jersey.bundle.version} @@ -34,176 +70,287 @@ limitations under the License. mvn:org.apache.jclouds/jclouds-core/${jclouds.version} - + jclouds mvn:org.apache.jclouds/jclouds-blobstore/${jclouds.version} - + jclouds - mvn:org.apache.jclouds.driver/jclouds-log4j/${jclouds.version} - mvn:org.apache.jclouds/jclouds-scriptbuilder/${jclouds.version} + jclouds-scriptbuilder mvn:org.apache.jclouds/jclouds-compute/${jclouds.version} + + jclouds + mvn:org.apache.jclouds/jclouds-loadbalancer/${jclouds.version} + + + + jclouds + mvn:org.apache.jclouds/jclouds-scriptbuilder/${jclouds.version} + + - + jclouds-blobstore mvn:org.apache.jclouds.api/atmos/${jclouds.version} - - jclouds-blobstore - mvn:org.apache.jclouds.api/filesystem/${jclouds.version} + + jclouds-compute + mvn:org.yaml/snakeyaml/${snakeyaml.version} + mvn:org.apache.jclouds.api/byon/${jclouds.version} - + jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} + mvn:org.apache.jclouds.api/chef/${jclouds.chef.version} - + jclouds-compute - mvn:org.yaml/snakeyaml/${snakeyaml.version} - mvn:org.apache.jclouds.api/byon/${jclouds.version} + mvn:org.apache.jclouds.api/cloudstack/${jclouds.version} + + + + jclouds-compute + jclouds-api-sts + mvn:org.apache.jclouds.api/cloudwatch/${jclouds.version} + + + + jclouds-compute + jclouds-driver-bouncycastle + jclouds-driver-okhttp + jclouds-api-oauth + mvn:org.apache.jclouds.api/docker/${jclouds.version} - + + jclouds-compute + jclouds-api-sts + mvn:org.apache.jclouds.api/ec2/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} + + + jclouds-blobstore - jclouds-api-openstack-keystone - mvn:org.apache.jclouds.api/openstack-swift/${jclouds.version} + mvn:org.apache.jclouds.api/filesystem/${jclouds.version} - + + jclouds-compute + mvn:org.apache.jclouds.api/oauth/${jclouds.version} + + + jclouds-compute jclouds-api-openstack-keystone mvn:org.apache.jclouds.common/openstack-common/${jclouds.version} - mvn:org.apache.jclouds.api/openstack-nova/${jclouds.version} + mvn:org.apache.jclouds.api/openstack-cinder/${jclouds.version} - + jclouds mvn:org.apache.jclouds.api/openstack-keystone/${jclouds.version} - + jclouds-compute jclouds-api-openstack-keystone mvn:org.apache.jclouds.common/openstack-common/${jclouds.version} - mvn:org.apache.jclouds.api/openstack-cinder/${jclouds.version} + mvn:org.apache.jclouds.api/openstack-nova/${jclouds.version} - - jclouds-blobstore - jclouds-api-sts - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.java-xmlbuilder/${java-xmlbuilder.bundle.version} - mvn:org.apache.jclouds.api/s3/${jclouds.version} + + jclouds-api-openstack-nova + jclouds-api-ec2 + mvn:org.apache.jclouds.common/openstack-common/${jclouds.version} + mvn:org.apache.jclouds.api/openstack-nova-ec2/${jclouds.version} - - jclouds-api-sts - mvn:org.apache.jclouds.api/sqs/${jclouds.version} + + jclouds-blobstore + jclouds-api-openstack-keystone + mvn:org.apache.jclouds.api/openstack-swift/${jclouds.version} - + jclouds-compute - jclouds-api-sts - mvn:org.apache.jclouds.api/ec2/${jclouds.version} + jclouds-api-openstack-keystone + mvn:org.apache.jclouds.common/openstack-common/${jclouds.version} + mvn:org.apache.jclouds.api/openstack-trove/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.api/cloudstack/${jclouds.version} + + jclouds-api-rackspace-cloudidentity + mvn:org.apache.jclouds.api/rackspace-clouddns/${jclouds.version} - + + jclouds-blobstore + jclouds-api-openstack-swift + jclouds-api-rackspace-cloudidentity + mvn:org.apache.jclouds.api/rackspace-cloudfiles/${jclouds.version} + + + jclouds-compute jclouds-api-openstack-keystone mvn:org.apache.jclouds.api/rackspace-cloudidentity/${jclouds.version} - - jclouds-api-rackspace-cloudidentity - mvn:org.apache.jclouds.api/rackspace-clouddns/${jclouds.version} + + jclouds-compute + jclouds-loadbalancer + jclouds-api-openstack-keystone + mvn:org.apache.jclouds.api/rackspace-cloudloadbalancers/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.api/chef/${jclouds.chef.version} + + jclouds-api-sts + mvn:org.apache.jclouds.api/route53/${jclouds.version} - - jclouds - mvn:org.apache.jclouds.api/sts/${jclouds.version} + + jclouds-blobstore + jclouds-api-sts + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.java-xmlbuilder/${java-xmlbuilder.bundle.version} + mvn:org.apache.jclouds.api/s3/${jclouds.version} - + jclouds-api-sts - mvn:org.apache.jclouds.api/route53/${jclouds.version} + mvn:org.apache.jclouds.api/sqs/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} + + jclouds + mvn:org.apache.jclouds.api/sts/${jclouds.version} - - jclouds-api-sts - mvn:org.apache.jclouds.api/cloudwatch/${jclouds.version} + + + jclouds-api-cloudwatch mvn:org.apache.jclouds.provider/aws-cloudwatch/${jclouds.version} - + jclouds-api-ec2 mvn:org.apache.jclouds.provider/aws-ec2/${jclouds.version} - + jclouds-api-route53 mvn:org.apache.jclouds.provider/aws-route53/${jclouds.version} - + jclouds-api-s3 - mvn:org.bouncycastle/bcprov-ext-jdk15on/${bcprov.version} - mvn:org.apache.jclouds.driver/jclouds-bouncycastle/${jclouds.version} - mvn:io.netty/netty/${netty.bundle.version} - mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore.version} - mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version} - mvn:joda-time/joda-time/${joda.version} - mvn:org.apache.jclouds.driver/jclouds-joda/${jclouds.version} - mvn:org.apache.jclouds.driver/jclouds-netty/${jclouds.version} - mvn:org.apache.jclouds.driver/jclouds-enterprise/${jclouds.version} - mvn:org.apache.jclouds.driver/jclouds-apachehc/${jclouds.version} mvn:org.apache.jclouds.provider/aws-s3/${jclouds.version} - + jclouds-api-sqs mvn:org.apache.jclouds.provider/aws-sqs/${jclouds.version} - + jclouds-api-sts mvn:org.apache.jclouds.provider/aws-sts/${jclouds.version} - + jclouds-blobstore mvn:org.apache.jclouds.provider/azureblob/${jclouds.version} - - jclouds-blobstore - mvn:org.apache.jclouds.labs/b2/${jclouds.version} + + jclouds-compute + jclouds-api-oauth + mvn:org.apache.jclouds.provider/digitalocean2/${jclouds.version} - + jclouds mvn:org.apache.jclouds.provider/dynect/${jclouds.version} - + + jclouds-api-elasticstack + mvn:org.apache.jclouds.provider/elastichosts-lon-b/${jclouds.version} + + + + jclouds-api-elasticstack + mvn:org.apache.jclouds.provider/elastichosts-lon-p/${jclouds.version} + + + + jclouds-api-elasticstack + mvn:org.apache.jclouds.provider/elastichosts-sat-p/${jclouds.version} + + + + jclouds-api-elasticstack + mvn:org.apache.jclouds.provider/elastichosts-lax-p/${jclouds.version} + + + + jclouds-api-elasticstack + mvn:org.apache.jclouds.provider/elastichosts-tor-p/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.provider/glesys/${jclouds.version} + + + + jclouds-api-elasticstack + mvn:org.apache.jclouds.provider/go2cloud-jhb1/${jclouds.version} + + + jclouds-compute + mvn:org.apache.jclouds.provider/gogrid/${jclouds.version} + + + + jclouds-compute + jclouds-api-oauth + mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} + mvn:org.apache.jclouds.provider/google-compute-engine/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} + mvn:org.apache.jclouds.provider/openhosting-east1/${jclouds.version} + + + + jclouds-compute + mvn:org.apache.jclouds.provider/profitbricks/${jclouds.version} + + + + jclouds-api-openstack-cinder + jclouds-api-rackspace-cloudidentity + mvn:org.apache.jclouds.provider/rackspace-cloudblockstorage-uk/${jclouds.version} + + + + jclouds-api-openstack-cinder + jclouds-api-rackspace-cloudidentity + mvn:org.apache.jclouds.provider/rackspace-cloudblockstorage-us/${jclouds.version} + + + jclouds jclouds-api-rackspace-cloudidentity mvn:org.apache.jclouds.common/openstack-common/${jclouds.version} @@ -214,212 +361,199 @@ limitations under the License. mvn:org.apache.jclouds.provider/rackspace-cloudloadbalancers-us/${jclouds.version} - + jclouds jclouds-api-rackspace-cloudidentity mvn:org.apache.jclouds.common/openstack-common/${jclouds.version} mvn:org.apache.jclouds/jclouds-loadbalancer/${jclouds.version} mvn:org.apache.jclouds/jclouds-scriptbuilder/${jclouds.version} - mvn:org.apache.jclouds/jclouds-compute/${jclouds.version} mvn:org.apache.jclouds.api/rackspace-cloudloadbalancers/${jclouds.version} mvn:org.apache.jclouds.provider/rackspace-cloudloadbalancers-uk/${jclouds.version} - + jclouds-compute jclouds-api-openstack-nova jclouds-api-rackspace-cloudidentity mvn:org.apache.jclouds.provider/rackspace-cloudservers-us/${jclouds.version} - + jclouds-compute jclouds-api-openstack-nova jclouds-api-rackspace-cloudidentity mvn:org.apache.jclouds.provider/rackspace-cloudservers-uk/${jclouds.version} - + jclouds-api-rackspace-clouddns mvn:org.apache.jclouds.provider/rackspace-clouddns-us/${jclouds.version} - + jclouds-api-rackspace-clouddns mvn:org.apache.jclouds.provider/rackspace-clouddns-uk/${jclouds.version} - - jclouds-api-openstack-cinder - jclouds-api-rackspace-cloudidentity - mvn:org.apache.jclouds.provider/rackspace-cloudblockstorage-us/${jclouds.version} - - - - jclouds-api-openstack-cinder - jclouds-api-rackspace-cloudidentity - mvn:org.apache.jclouds.provider/rackspace-cloudblockstorage-uk/${jclouds.version} - - - - jclouds-api-openstack-swift - jclouds-api-rackspace-cloudidentity - mvn:org.apache.jclouds.api/rackspace-cloudfiles/${jclouds.version} + + jclouds-api-rackspace-cloudfiles mvn:org.apache.jclouds.provider/rackspace-cloudfiles-uk/${jclouds.version} - - jclouds-api-openstack-swift + + jclouds-api-rackspace-cloudfiles jclouds-api-rackspace-cloudidentity - mvn:org.apache.jclouds.api/rackspace-cloudfiles/${jclouds.version} mvn:org.apache.jclouds.provider/rackspace-cloudfiles-us/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/elastichosts-lon-b/${jclouds.version} - - - - jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/elastichosts-lon-p/${jclouds.version} - - - + jclouds-compute mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/elastichosts-sat-p/${jclouds.version} + mvn:org.apache.jclouds.provider/serverlove-z1-man/${jclouds.version} - + jclouds-compute mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/elastichosts-lax-p/${jclouds.version} + mvn:org.apache.jclouds.provider/skalicloud-sdg-my/${jclouds.version} - + jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/elastichosts-tor-p/${jclouds.version} + mvn:org.apache.jclouds.provider/softlayer/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.provider/gogrid/${jclouds.version} + + + jclouds + mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore.version} + mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version} + mvn:org.apache.jclouds.driver/jclouds-apachehc/${jclouds.version} - - jclouds-api-elasticstack - mvn:org.apache.jclouds.provider/go2cloud-jhb1/${jclouds.version} + + jclouds + mvn:org.bouncycastle/bcprov-ext-jdk15on/${bcprov.version} + mvn:org.bouncycastle/bcpkix-jdk15on/${bcprov.version} + mvn:org.apache.jclouds.driver/jclouds-bouncycastle/${jclouds.version} - - jclouds-blobstore - mvn:org.apache.jclouds.api/oauth/${jclouds.version} - mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} - mvn:org.apache.jclouds.labs/google-cloud-storage/${jclouds.version} + + jclouds + jclouds-driver-bouncycastle + jclouds-driver-netty + jclouds-driver-joda + mvn:org.apache.jclouds.driver/jclouds-enterprise/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.provider/glesys/${jclouds.version} + + jclouds + mvn:joda-time/joda-time/2.1 + mvn:org.apache.jclouds.driver/jclouds-joda/${jclouds.version} - + jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/openhosting-east1/${jclouds.version} + jclouds-driver-bouncycastle + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/${jsch.bundle.version} + mvn:org.apache.jclouds.karaf.bundles/jsch-agentproxy-jsch/${project.version} + mvn:com.jcraft/jsch.agentproxy.connector-factory/${jsch.agentproxy.version} + mvn:com.jcraft/jsch.agentproxy.usocket-nc/${jsch.agentproxy.version} + mvn:com.jcraft/jsch.agentproxy.sshagent/${jsch.agentproxy.version} + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/${jzlib.bundle.version} + mvn:org.apache.jclouds.driver/jclouds-jsch/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.api/oauth/${jclouds.version} - mvn:org.apache.jclouds.provider/digitalocean2/${jclouds.version} + + jclouds + mvn:org.apache.jclouds.driver/jclouds-log4j/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.api/oauth/${jclouds.version} - mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} - mvn:org.apache.jclouds.provider/google-compute-engine/${jclouds.version} + + jclouds + mvn:io.netty/netty/${netty.bundle.version} + mvn:org.apache.jclouds.driver/jclouds-netty/${jclouds.version} - - jclouds-compute - jclouds-azureblob - mvn:org.apache.jclouds.api/oauth/${jclouds.version} + + jclouds mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/${okio.bundle.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/${okhttp.bundle.version} - mvn:org.apache.jclouds.driver/jclouds-okhttp/${jclouds.version} - mvn:org.apache.jclouds.labs/azurecompute-arm/${jclouds.version} - - - - jclouds-compute - mvn:name.neykov/vagrant-java-bindings/${vagrant-java-bindings.version} - mvn:org.apache.jclouds.labs/vagrant/${jclouds.version} - - - - jclouds-compute - mvn:org.apache.jclouds.labs/packet/${jclouds.version} + mvn:org.apache.jclouds.driver/jclouds-okhttp/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.provider/profitbricks/${jclouds.version} + + jclouds + mvn:org.apache.jclouds.driver/jclouds-slf4j/${jclouds.version} - + jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/serverlove-z1-man/${jclouds.version} + jclouds-driver-bouncycastle + + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2 + mvn:com.jcraft/jsch.agentproxy.core/0.0.9 + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch-agentproxy-sshj/0.0.9_1 + mvn:net.i2p.crypto/eddsa/0.1.0 + mvn:com.hierynomus/sshj/0.20.0 + mvn:org.apache.jclouds.driver/jclouds-sshj/${jclouds.version} - + + jclouds-compute - mvn:org.apache.jclouds.api/elasticstack/${jclouds.version} - mvn:org.apache.jclouds.provider/skalicloud-sdg-my/${jclouds.version} + jclouds-azureblob + jclouds-api-oauth + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/${okio.bundle.version} + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/${okhttp.bundle.version} + mvn:org.apache.jclouds.driver/jclouds-okhttp/${jclouds.version} + mvn:org.apache.jclouds.labs/azurecompute-arm/${jclouds.version} - - jclouds-compute - mvn:org.apache.jclouds.provider/softlayer/${jclouds.version} + + jclouds-blobstore + mvn:org.apache.jclouds.labs/b2/${jclouds.version} - + jclouds-compute mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} mvn:org.apache.jclouds.labs/cloudsigma2-hnl/${jclouds.version} - + jclouds-compute mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} mvn:org.apache.jclouds.labs/cloudsigma2-lvs/${jclouds.version} - + jclouds-compute mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} mvn:org.apache.jclouds.labs/cloudsigma2-sjc/${jclouds.version} - + jclouds-compute mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} mvn:org.apache.jclouds.labs/cloudsigma2-wdc/${jclouds.version} - + jclouds-compute mvn:org.apache.jclouds.labs/cloudsigma2/${jclouds.version} mvn:org.apache.jclouds.labs/cloudsigma2-zrh/${jclouds.version} - + + jclouds-blobstore + jclouds-api-oauth + mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} + mvn:org.apache.jclouds.labs/google-cloud-storage/${jclouds.version} + + + + mvn:org.apache.jclouds.karaf/jclouds-karaf/${project.version}/cfg/credentials jclouds-compute jclouds-blobstore @@ -441,7 +575,7 @@ limitations under the License. mvn:org.apache.jclouds.karaf/services/${project.version} - + mvn:org.apache.jclouds.karaf/jclouds-karaf/${project.version}/cfg/shell jclouds-services mvn:org.codehaus.groovy/groovy/${groovy.version} @@ -451,8 +585,7 @@ limitations under the License. mvn:org.apache.jclouds.karaf/commands/${project.version} - - + jclouds-api-chef jclouds-commands mvn:org.apache.jclouds.driver/jclouds-slf4j/${jclouds.version} @@ -461,7 +594,7 @@ limitations under the License. mvn:org.apache.jclouds.karaf.chef/commands/${project.version} - + jclouds mvn:org.apache.jclouds.karaf/urlhandler/${project.version} diff --git a/itests/pom.xml b/itests/pom.xml index 19a1f326..8381ac5b 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -1,204 +1,167 @@ - - - - jclouds-karaf - org.apache.jclouds - 2.1.0-SNAPSHOT - .. - - 4.0.0 - - org.apache.jclouds.karaf - itests - jclouds :: Karaf :: Integration Tests - - - 2.9.0 - - - - - org.ops4j.pax.url - pax-url-mvn - - - - org.ops4j.pax.url - pax-url-aether - - - - org.apache.karaf - apache-karaf - tar.gz - - - - org.apache.camel.karaf - apache-camel - ${camel.version} - features - xml - - - - org.apache.servicemix.specs - org.apache.servicemix.specs.jsr250-1.0 - - - - org.apache.jclouds.karaf - jclouds-karaf - xml - features - - - - org.apache.jclouds.karaf - core - test - - - - org.apache.jclouds - jclouds-core - test - - - - org.apache.jclouds.driver - jclouds-log4j - test - - - - org.apache.jclouds - jclouds-compute - test - - - - org.apache.jclouds - jclouds-blobstore - test - - - - org.apache.jclouds.api - ec2 - test - - - - - org.apache.karaf.tooling.exam - org.apache.karaf.tooling.exam.options - - - - org.apache.karaf.tooling.exam - org.apache.karaf.tooling.exam.container - - - - - org.ops4j.pax.exam - pax-exam-junit4 - test - - - - - com.google.guava - guava - ${guava.test.version} - test - - - - junit - junit - test - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - ${maven-dependency-plugin.version} - - - org.apache.servicemix.tooling - depends-maven-plugin - ${depends-maven-plugin.version} - - - generate-depends-file - - generate-depends-file - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - once - true - false - - **/*Test.* - - - **/live/*Test.* - **/special/*Test.* - - - - ${maven.repo.local} - - ${jclouds.aws.identity} - ${jclouds.aws.credential} - ${jclouds.aws.region} - ${jclouds.aws.image} - ${jclouds.aws.location} - ${jclouds.aws.user} - - - ${jclouds.rackspace.identity} - ${jclouds.rackspace.credential} - ${jclouds.rackspace.region} - ${jclouds.rackspace.image} - ${jclouds.rackspace.location} - ${jclouds.rackspace.user} - - - - - - + + + 4.0.0 + + org.apache.jclouds + jclouds-karaf + 2.1.0-SNAPSHOT + .. + + + org.apache.jclouds.karaf + itests + jclouds :: Karaf :: Integration Tests + + + + 4.0.8 + 6.0.0 + 4.9.1 + 3.1.0 + 1.1.0.Final + + + + + org.apache.jclouds + jclouds-compute + ${project.parent.version} + + + + org.osgi + org.osgi.core + ${osgi.version} + test + + + + org.apache.karaf.itests + itests + ${karaf.version} + test-jar + test + + + + org.apache.karaf + apache-karaf-minimal + ${karaf.version} + test + tar.gz + + + org.apache.karaf.client + org.apache.karaf + + + + + + org.ops4j.pax.exam + pax-exam-container-karaf + ${pax.exam.version} + test + + + + org.ops4j.pax.exam + pax-exam-junit4 + ${pax.exam.version} + test + + + + org.apache.geronimo.specs + geronimo-atinject_1.0_spec + 1.0 + test + + + + + + + org.apache.servicemix.tooling + depends-maven-plugin + 1.3 + + + generate-depends-file + + generate-depends-file + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-features-xml + process-test-resources + + copy + + + + + org.apache.jclouds.karaf + jclouds-karaf + ${project.version} + features + xml + ${project.build.directory}/ + features.xml + + + org.apache.jclouds.karaf + jclouds-karaf-labs + ${project.version} + features + xml + ${project.build.directory}/ + features-labs.xml + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${project.build.directory}/features.xml + ${project.build.directory}/features-repo + ${project.build.directory}/features-labs.xml + ${project.build.directory}/features-labs-repo + + + + + - - diff --git a/itests/src/test/java/org/jclouds/karaf/itests/ApisFeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/ApisFeaturesInstallationTest.java deleted file mode 100644 index 56abae70..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/ApisFeaturesInstallationTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class ApisFeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testAtmosFeature() throws Exception { - installAndCheckFeature("jclouds-api-atmos"); - } - - @Test - public void testFileSystemFeature() throws Exception { - installAndCheckFeature("jclouds-api-filesystem"); - } - - @Test - public void testOpenstackNova() throws Exception { - installAndCheckFeature("jclouds-api-openstack-nova"); - } - - @Test - public void testOpenstackCinder() throws Exception { - installAndCheckFeature("jclouds-api-openstack-cinder"); - } - - @Test - public void testOpenstackSwift() throws Exception { - installAndCheckFeature("jclouds-api-openstack-swift"); - } - - @Test - public void testCloudStackFeature() throws Exception { - installAndCheckFeature("jclouds-api-cloudstack"); - } - - @Test - public void testRackspaceCloudIdentityFeature() throws Exception { - installAndCheckFeature("jclouds-api-rackspace-cloudidentity"); - } - - @Test - public void testRackspaceCloudDnsFeature() throws Exception { - installAndCheckFeature("jclouds-api-rackspace-clouddns"); - } - - @Test - public void testElasticStackFeature() throws Exception { - installAndCheckFeature("jclouds-api-elasticstack"); - } - - @Test - public void testStsFeature() throws Exception { - installAndCheckFeature("jclouds-api-sts"); - } - - @Test - public void testCloudSigma2Feature() throws Exception { - installAndCheckFeature("jclouds-api-cloudsigma2"); - } - - @Test - public void testVagrant() throws Exception { - installAndCheckFeature("jclouds-vagrant"); - } - -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/AwsFeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/AwsFeaturesInstallationTest.java deleted file mode 100644 index f2829988..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/AwsFeaturesInstallationTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class AwsFeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testAwsRoute53Feature() throws Exception { - installAndCheckFeature("jclouds-aws-route53"); - } - - @Test - public void testAwsSqsFeature() throws Exception { - installAndCheckFeature("jclouds-aws-sqs"); - } - - @Test - public void testAwsStsFeature() throws Exception { - installAndCheckFeature("jclouds-aws-sts"); - } - - @Test - public void testAwsS3Feature() throws Exception { - installAndCheckFeature("jclouds-aws-s3"); - } - - @Test - public void testAwsEc2Feature() throws Exception { - installAndCheckFeature("jclouds-aws-ec2"); - } - - @Test - public void testAwsCloudwatchFeature() throws Exception { - installAndCheckFeature("jclouds-aws-cloudwatch"); - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/BasePaxExamTest.java b/itests/src/test/java/org/jclouds/karaf/itests/BasePaxExamTest.java new file mode 100644 index 00000000..8e098060 --- /dev/null +++ b/itests/src/test/java/org/jclouds/karaf/itests/BasePaxExamTest.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.karaf.itests; + +import static org.ops4j.pax.exam.CoreOptions.maven; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFileExtend; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; + +import java.io.File; +import java.net.URISyntaxException; + +import org.junit.Assert; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.karaf.options.LogLevelOption; +import org.ops4j.pax.exam.options.MavenArtifactUrlReference; + +public class BasePaxExamTest { + + static File getFeaturesFile(String feature) throws URISyntaxException { + String featuresXml = System.getProperty(feature); + Assert.assertNotNull(featuresXml); + File featuresFile = new File(featuresXml); + Assert.assertNotNull(featuresFile.exists()); + return featuresFile; + } + +} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/ChefFeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/ChefFeaturesInstallationTest.java deleted file mode 100644 index 2396deee..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/ChefFeaturesInstallationTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class ChefFeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testChefApi() throws Exception { - installAndCheckFeature("jclouds-api-chef"); - } - - @Test - public void testJcloudsChef() throws Exception { - installAndCheckFeature("jclouds-chef"); - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/CloudSigma2FeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/CloudSigma2FeaturesInstallationTest.java deleted file mode 100644 index f9d848a7..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/CloudSigma2FeaturesInstallationTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class CloudSigma2FeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testCloudSigma2Honolulu() throws Exception { - installAndCheckFeature("jclouds-cloudsigma2-hnl"); - } - - @Test - public void testCloudSigma2LasVegas() throws Exception { - installAndCheckFeature("jclouds-cloudsigma2-lvs"); - } - - @Test - public void testCloudSigma2SanJose() throws Exception { - installAndCheckFeature("jclouds-cloudsigma2-sjc"); - } - - @Test - public void testCloudSigma2Washington() throws Exception { - installAndCheckFeature("jclouds-cloudsigma2-wdc"); - } - - @Test - public void testCloudSigma2Zurich() throws Exception { - installAndCheckFeature("jclouds-cloudsigma2-zrh"); - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/ElasticHostsFeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/ElasticHostsFeaturesInstallationTest.java deleted file mode 100644 index ccec4599..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/ElasticHostsFeaturesInstallationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class ElasticHostsFeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testElasticHostsLonBFeature() throws Exception { - installAndCheckFeature("jclouds-elastichosts-lon-b"); - } - - @Test - public void testElasticHostsLonPFeature() throws Exception { - installAndCheckFeature("jclouds-elastichosts-lon-p"); - } - - @Test - public void testElasticHostsSatPFeature() throws Exception { - installAndCheckFeature("jclouds-elastichosts-sat-p"); - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/FeatureInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/FeatureInstallationTest.java new file mode 100644 index 00000000..4a490ac7 --- /dev/null +++ b/itests/src/test/java/org/jclouds/karaf/itests/FeatureInstallationTest.java @@ -0,0 +1,415 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.karaf.itests; + +import static org.ops4j.pax.exam.CoreOptions.maven; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFileExtend; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; + +import java.io.File; + +import javax.inject.Inject; + +import org.apache.karaf.features.FeaturesService; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; +import org.ops4j.pax.exam.karaf.options.LogLevelOption; +import org.ops4j.pax.exam.options.MavenArtifactUrlReference; +import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; +import org.ops4j.pax.exam.spi.reactors.PerMethod; + +@RunWith(PaxExam.class) +@ExamReactorStrategy(PerMethod.class) +public class FeatureInstallationTest extends BasePaxExamTest { + + @Inject + FeaturesService featuresService; + + @Before + public void setUp() throws Exception { + featuresService.addRepository(getFeaturesFile("features.xml").toURI()); + } + + @Test + public void testJcloudsFeature() throws Exception { + featuresService.installFeature("jclouds"); + } + + @Test + public void testJcloudsComputeFeature() throws Exception { + featuresService.installFeature("jclouds-compute"); + } + + @Test + public void testJcloudsBlobstoreFeature() throws Exception { + featuresService.installFeature("jclouds-blobstore"); + } + + @Test + public void testJcloudsAllBlobstoreFeature() throws Exception { + featuresService.installFeature("jclouds-all-blobstore"); + } + + @Test + public void testJcloudsAllComputeFeature() throws Exception { + featuresService.installFeature("jclouds-all-compute"); + } + + // Drivers + @Test + public void testDriverApachehcFeature() throws Exception { + featuresService.installFeature("jclouds-driver-apachehc"); + } + + @Test + public void testDriverBouncycastleFeature() throws Exception { + featuresService.installFeature("jclouds-driver-bouncycastle"); + } + + @Test + public void testDriverEnterpriseFeature() throws Exception { + featuresService.installFeature("jclouds-driver-enterprise"); + } + + @Test + public void testDriverJodaFeature() throws Exception { + featuresService.installFeature("jclouds-driver-joda"); + } + + @Test + public void testDriverJschFeature() throws Exception { + featuresService.installFeature("jclouds-driver-jsch"); + } + + @Test + public void testDriverLog4jFeature() throws Exception { + featuresService.installFeature("jclouds-driver-log4j"); + } + + @Test + public void testDriverNettyClientFeature() throws Exception { + featuresService.installFeature("jclouds-driver-netty"); + } + + @Test + public void testDriverOkHttpClientFeature() throws Exception { + featuresService.installFeature("jclouds-driver-okhttp"); + } + + @Test + public void testDriverSlf4jFeature() throws Exception { + featuresService.installFeature("jclouds-driver-slf4j"); + } + + @Test + public void testDriverSshjFeature() throws Exception { + featuresService.installFeature("jclouds-driver-sshj"); + } + + // SCRIPTBUILDER + @Test + public void testJcloudsScriptbuilderFeature() throws Exception { + featuresService.installFeature("jclouds-scriptbuilder"); + } + + // APIS + @Test + public void testApiAtmosCoreFeature() throws Exception { + featuresService.installFeature("jclouds-api-atmos"); + } + + @Test + public void testApiByonFeature() throws Exception { + featuresService.installFeature("jclouds-api-byon"); + } + + @Test + public void testApiCloudstackFeature() throws Exception { + featuresService.installFeature("jclouds-api-cloudstack"); + } + + @Test + public void testApiCloudwatchFeature() throws Exception { + featuresService.installFeature("jclouds-api-cloudwatch"); + } + + @Test + public void testApiDockerFeature() throws Exception { + featuresService.installFeature("jclouds-api-docker"); + } + + @Test + public void testApiElasticStackFeature() throws Exception { + featuresService.installFeature("jclouds-api-elasticstack"); + } + + @Test + public void testApiFileSystemFeature() throws Exception { + featuresService.installFeature("jclouds-api-filesystem"); + } + + @Test + public void testApiOauthFeature() throws Exception { + featuresService.installFeature("jclouds-api-oauth"); + } + + @Test + public void testApiOpenstackCinderFeature() throws Exception { + featuresService.installFeature("jclouds-api-openstack-cinder"); + } + + @Test + public void testApiOpenstackKeystoneFeature() throws Exception { + featuresService.installFeature("jclouds-api-openstack-keystone"); + } + + @Test + public void testApiOpenstackNovaFeature() throws Exception { + featuresService.installFeature("jclouds-api-openstack-nova"); + } + + @Test + public void testApiOpenstackNovaEc2Feature() throws Exception { + featuresService.installFeature("jclouds-api-openstack-nova-ec2"); + } + + @Test + public void testApiOpenstackSwiftFeature() throws Exception { + featuresService.installFeature("jclouds-api-openstack-swift"); + } + + @Test + public void testApiOpenstackTroveFeature() throws Exception { + featuresService.installFeature("jclouds-api-openstack-trove"); + } + + @Test + public void testApiRackspaceCloudDnsFeature() throws Exception { + featuresService.installFeature("jclouds-api-rackspace-clouddns"); + } + + @Test + public void testApiRackspaceCloudFilesFeature() throws Exception { + featuresService.installFeature("jclouds-api-rackspace-cloudfiles"); + } + + @Test + public void testApiRackspaceCloudIdentityFeature() throws Exception { + featuresService.installFeature("jclouds-api-rackspace-cloudidentity"); + } + + @Test + public void testApiRackspaceCloudLoadbalancersFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudloadbalancers-us"); + } + + @Test + public void testStsFeature() throws Exception { + featuresService.installFeature("jclouds-api-sts"); + } + + // PROVIDERS + @Test + public void testAwsCloudwatchFeature() throws Exception { + featuresService.installFeature("jclouds-aws-cloudwatch"); + } + + @Test + public void testAwsEc2Feature() throws Exception { + featuresService.installFeature("jclouds-aws-ec2"); + } + + @Test + public void testAwsRoute53Feature() throws Exception { + featuresService.installFeature("jclouds-aws-route53"); + } + + @Test + public void testAwsS3Feature() throws Exception { + featuresService.installFeature("jclouds-aws-s3"); + } + + @Test + public void testAwsSqsFeature() throws Exception { + featuresService.installFeature("jclouds-aws-sqs"); + } + + @Test + public void testAwsStsFeature() throws Exception { + featuresService.installFeature("jclouds-aws-sts"); + } + + @Test + public void testAzureBlobFeature() throws Exception { + featuresService.installFeature("jclouds-azureblob"); + } + + @Test + public void testDigitalOcean2Feature() throws Exception { + featuresService.installFeature("jclouds-digitalocean2"); + } + + @Test + public void testDynectFeature() throws Exception { + featuresService.installFeature("jclouds-dynect"); + } + + @Test + public void testElasticaHostsLonBFeature() throws Exception { + featuresService.installFeature("jclouds-elastichosts-lon-b"); + } + + @Test + public void testElasticaHostsLonPFeature() throws Exception { + featuresService.installFeature("jclouds-elastichosts-lon-p"); + } + + @Test + public void testElasticaHostsSatPtestStsFeature() throws Exception { + featuresService.installFeature("jclouds-elastichosts-sat-p"); + } + + @Test + public void testElasticaHostsLaxPFeature() throws Exception { + featuresService.installFeature("jclouds-elastichosts-lax-p"); + } + + @Test + public void testElasticaHostsTorPFeature() throws Exception { + featuresService.installFeature("jclouds-elastichosts-tor-p"); + } + + @Test + public void testGlesysFeature() throws Exception { + featuresService.installFeature("jclouds-glesys"); + } + + @Test + public void testGo2cloudJhb1Feature() throws Exception { + featuresService.installFeature("jclouds-go2cloud-jhb1"); + } + + @Test + public void testGogridFeature() throws Exception { + featuresService.installFeature("jclouds-gogrid"); + } + + @Test + public void testGoogleComputeEngineFeature() throws Exception { + featuresService.installFeature("jclouds-google-compute-engine"); + } + + @Test + public void testOpenhostingEast1Feature() throws Exception { + featuresService.installFeature("jclouds-openhosting-east1"); + } + + @Test + public void testProfitbricksFeature() throws Exception { + featuresService.installFeature("jclouds-profitbricks"); + } + + @Test + public void testRackaspaceCloudstorageUkFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudblockstorage-uk"); + } + + @Test + public void testRackaspaceCloudstorageUsFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudblockstorage-us"); + } + + @Test + public void testRackaspaceCloudloadbalancerUsFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudloadbalancers-us"); + } + + @Test + public void testRackaspaceCloudloadbalancerUkFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudloadbalancers-uk"); + } + + @Test + public void testRackaspaceCloudserversUsFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudservers-us"); + } + + @Test + public void testRackaspaceCloudserversUkFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudservers-uk"); + } + + @Test + public void testRackaspaceCloudDnsUsFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-clouddns-us"); + } + + @Test + public void testRackaspaceCloudDnsUkFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-clouddns-uk"); + } + + @Test + public void testRackaspaceCloudfilesUkFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudfiles-uk"); + } + + @Test + public void testRackaspaceCloudfilesUsFeature() throws Exception { + featuresService.installFeature("jclouds-rackspace-cloudfiles-us"); + } + + @Test + public void testServerloveZ1ManFeature() throws Exception { + featuresService.installFeature("jclouds-serverlove-z1-man"); + } + + @Test + public void testSkalicloudSdgMyFeature() throws Exception { + featuresService.installFeature("jclouds-skalicloud-sdg-my"); + } + + @Test + public void testSoftlayerFeature() throws Exception { + featuresService.installFeature("jclouds-softlayer"); + } + + + @Configuration + public Option[] config() { + MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").versionAsInProject().type("tar.gz"); + return new Option[]{ + karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")), + configureSecurity().disableKarafMBeanServerBuilder(), + keepRuntimeFolder(), + editConfigurationFilePut("etc/system.properties", "features.xml", System.getProperty("features.xml")), + editConfigurationFileExtend( + "etc/org.ops4j.pax.url.mvn.cfg", + "org.ops4j.pax.url.mvn.repositories", + "file:" + System.getProperty("features-repo") + "@id=local@snapshots@releases"), + logLevel(LogLevelOption.LogLevel.INFO), + }; + } +} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/FeatureLabsInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/FeatureLabsInstallationTest.java new file mode 100644 index 00000000..577bd166 --- /dev/null +++ b/itests/src/test/java/org/jclouds/karaf/itests/FeatureLabsInstallationTest.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.karaf.itests; + +import static org.ops4j.pax.exam.CoreOptions.maven; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFileExtend; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; + +import java.io.File; + +import javax.inject.Inject; + +import org.apache.karaf.features.FeaturesService; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; +import org.ops4j.pax.exam.karaf.options.LogLevelOption; +import org.ops4j.pax.exam.options.MavenArtifactUrlReference; +import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; +import org.ops4j.pax.exam.spi.reactors.PerMethod; + +@RunWith(PaxExam.class) +@ExamReactorStrategy(PerMethod.class) +public class FeatureLabsInstallationTest extends BasePaxExamTest { + + @Inject + FeaturesService featuresService; + + @Before + public void setUp() throws Exception { + featuresService.addRepository(getFeaturesFile("features-labs.xml").toURI()); + } + + @Test + public void testLabsAzureComputeArmFeature() throws Exception { + featuresService.installFeature("jclouds-azurecompute-arm"); + } + + @Test + public void testLabsB2Feature() throws Exception { + featuresService.installFeature("jclouds-b2"); + } + + @Test + public void testLabsCloudsigma2HnlFeature() throws Exception { + featuresService.installFeature("jclouds-cloudsigma2-hnl"); + } + + @Test + public void testLabsCloudsigma2LvsFeature() throws Exception { + featuresService.installFeature("jclouds-cloudsigma2-lvs"); + } + + @Test + public void testLabsCloudsigma2SjcFeature() throws Exception { + featuresService.installFeature("jclouds-cloudsigma2-sjc"); + } + + @Test + public void testLabsCloudsigma2WdcFeature() throws Exception { + featuresService.installFeature("jclouds-cloudsigma2-wdc"); + } + + @Test + public void testLabsCloudsigma2ZrhFeature() throws Exception { + featuresService.installFeature("jclouds-cloudsigma2-zrh"); + } + + @Test + public void testLabsGoogleCloudStorageFeature() throws Exception { + featuresService.installFeature("jclouds-google-cloud-storage"); + } + + @Test + public void testLabsPacketFeature() throws Exception { + featuresService.installFeature("jclouds-packet"); + } + + @Test + public void testLabsVagrantFeature() throws Exception { + featuresService.installFeature("jclouds-vagrant"); + } + + + @Configuration + public Option[] config() { + MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").versionAsInProject().type("tar.gz"); + return new Option[]{ + karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")), + configureSecurity().disableKarafMBeanServerBuilder(), + keepRuntimeFolder(), + editConfigurationFilePut("etc/system.properties", "features-labs.xml", System.getProperty("features-labs.xml")), + editConfigurationFileExtend( + "etc/org.ops4j.pax.url.mvn.cfg", + "org.ops4j.pax.url.mvn.repositories", + "file:" + System.getProperty("features-repo") + "@id=local@snapshots@releases"), + logLevel(LogLevelOption.LogLevel.INFO), + }; + } + +} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/JcloudsFeaturesTestSupport.java b/itests/src/test/java/org/jclouds/karaf/itests/JcloudsFeaturesTestSupport.java deleted file mode 100644 index 19757b9e..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/JcloudsFeaturesTestSupport.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import static junit.framework.Assert.assertTrue; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.keepRuntimeFolder; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel; - -import org.apache.karaf.features.FeaturesService; -import org.apache.karaf.tooling.exam.options.LogLevelOption; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; - -public class JcloudsFeaturesTestSupport extends JcloudsKarafTestSupport { - - public static final String JCLOUDS_FEATURE_FORMAT = "mvn:org.apache.jclouds.karaf/jclouds-karaf/%s/xml/features"; - public static final String JCLOUDS_FEATURE_VERSION_PROPERTY = "jclouds.feature.version"; - - /** - * Returns the URL of the jclouds-karaf feature. - *

Note: This method is intended to be invoked inside the test container

- * @return - */ - public String getJcloudsKarafFeatureURL() { - return String.format(JCLOUDS_FEATURE_FORMAT, System.getProperty(JCLOUDS_FEATURE_VERSION_PROPERTY)); - } - - /** - * Installs a feature and checks that feature is properly installed. - * @param feature - * @throws Exception - */ - public void installAndCheckFeature(String feature) throws Exception { - System.err.println(executeCommand("features:install " + feature)); - FeaturesService featuresService = getOsgiService(FeaturesService.class); - System.err.println(executeCommand("osgi:list -t 0")); - assertTrue("Expected " + feature + " feature to be installed.", featuresService.isInstalled(featuresService.getFeature(feature))); - } - - - @Configuration - public Option[] config() { - return new Option[]{ - jcloudsDistributionConfiguration(), keepRuntimeFolder(), - systemProperty(JCLOUDS_FEATURE_VERSION_PROPERTY, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)), - logLevel(LogLevelOption.LogLevel.ERROR)}; - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/JcloudsKarafTestSupport.java b/itests/src/test/java/org/jclouds/karaf/itests/JcloudsKarafTestSupport.java deleted file mode 100644 index b8705a64..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/JcloudsKarafTestSupport.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.karafDistributionConfiguration; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.editConfigurationFileExtend; -import static org.ops4j.pax.exam.CoreOptions.maven; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.PrintStream; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Dictionary; -import java.util.Enumeration; - -import javax.inject.Inject; - -import org.apache.felix.service.command.CommandProcessor; -import org.apache.felix.service.command.CommandSession; -import org.ops4j.pax.exam.CoreOptions; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.TestProbeBuilder; -import org.ops4j.pax.exam.junit.ProbeBuilder; -import org.ops4j.pax.exam.options.DefaultCompositeOption; -import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.Filter; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.InvalidSyntaxException; -import org.osgi.framework.ServiceReference; -import org.osgi.util.tracker.ServiceTracker; - -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.editConfigurationFileExtend; - -public class JcloudsKarafTestSupport { - - public static final Long DEFAULT_TIMEOUT = 10000L; - public static final Long DEFAULT_WAIT = 10000L; - - public static final String KARAF_GROUP_ID = "org.apache.karaf"; - public static final String KARAF_ARTIFACT_ID = "apache-karaf"; - - public static final String JCLOUDS_KARAF_GROUP_ID = "org.apache.jclouds.karaf"; - public static final String JCLOUDS_KARAF_ARTIFACT_ID = "jclouds-karaf"; - - public static final String JCLOUDS_GROUP_ID = "org.apache.jclouds"; - public static final String JCLOUDS_ARTIFACT_ID = "jclouds-core"; - - @Inject - protected BundleContext bundleContext; - - - /** - * This is used to customize the Probe that will contain the test. - * We need to enable dynamic import of provisional bundles, to use the Console. - * - * @param probe - * @return - */ - @ProbeBuilder - public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) { - probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional"); - return probe; - } - - /** - * Create an {@link Option} for using Apache Karaf distribution. - * - * @return - */ - protected Option jcloudsDistributionConfiguration() { - return new DefaultCompositeOption(karafDistributionConfiguration() - .frameworkUrl(maven() - .groupId(KARAF_GROUP_ID) - .artifactId(KARAF_ARTIFACT_ID) - .versionAsInProject().type("tar.gz")) - .karafVersion(getKarafVersion()).name("Apache Karaf Distro") - .unpackDirectory(new File("target/paxexam/unpack/")), - //We use this option to allow the container to use artifacts found in a private repo. - editConfigurationFileExtend("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories",", file:${maven.local.repo}@id=mavenlocalrepo@snapshots") - ); - } - - /** - * Sets a System property. - * @param propertyName - * @return - */ - public static Option systemProperty(String propertyName, String propertyValue) { - return editConfigurationFileExtend("etc/system.properties", propertyName, propertyValue != null ? propertyValue : ""); - } - - /** - * Copies the actual System property to the container properties. - * @param propertyName - * @return - */ - public static Option systemProperty(String propertyName) { - return systemProperty(propertyName, System.getProperty(propertyName)); - } - - - /** - * Executes the command and returns the output as a String. - * - * @param command - * @return - */ - protected String executeCommand(String command) { - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - PrintStream printStream = new PrintStream(byteArrayOutputStream); - CommandProcessor commandProcessor = getOsgiService(CommandProcessor.class); - CommandSession commandSession = commandProcessor.createSession(System.in, printStream, System.err); - //This is required in order to run scripts that use those session variables. - commandSession.put("APPLICATION", System.getProperty("karaf.name", "root")); - commandSession.put("USER", "karaf"); - - try { - System.err.println(command); - commandSession.execute(command); - } catch (Exception e) { - e.printStackTrace(System.err); - } - return byteArrayOutputStream.toString(); - } - - - /** - * Executes multiple commands inside a Single Session. - * Commands have a default timeout of 10 seconds. - * @param commands - * @return - */ - protected String executeCommands(final String ...commands) { - final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - final PrintStream printStream = new PrintStream(byteArrayOutputStream); - final CommandProcessor commandProcessor = getOsgiService(CommandProcessor.class); - final CommandSession commandSession = commandProcessor.createSession(System.in, printStream, System.err); - commandSession.put("APPLICATION", System.getProperty("karaf.name", "root")); - commandSession.put("USER", "karaf"); - - for (String command : commands) { - try { - System.err.println(command); - commandSession.execute(command); - } catch (Exception e) { - e.printStackTrace(System.err); - } - } - - return byteArrayOutputStream.toString(); - } - - protected Bundle installBundle(String groupId, String artifactId) throws Exception { - MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId); - return bundleContext.installBundle(mvnUrl.getURL()); - } - - - protected Bundle getInstalledBundle(String symbolicName) { - for (Bundle b : bundleContext.getBundles()) { - if (b.getSymbolicName().equals(symbolicName)) { - return b; - } - } - for (Bundle b : bundleContext.getBundles()) { - System.err.println("Bundle: " + b.getSymbolicName()); - } - throw new RuntimeException("Bundle " + symbolicName + " does not exist"); - } - - /* - * Explode the dictionary into a ,-delimited list of key=value pairs - */ - private static String explode(Dictionary dictionary) { - Enumeration keys = dictionary.keys(); - StringBuffer result = new StringBuffer(); - while (keys.hasMoreElements()) { - Object key = keys.nextElement(); - result.append(String.format("%s=%s", key, dictionary.get(key))); - if (keys.hasMoreElements()) { - result.append(", "); - } - } - return result.toString(); - } - - protected T getOsgiService(Class type, long timeout) { - return getOsgiService(type, null, timeout); - } - - protected T getOsgiService(Class type) { - return getOsgiService(type, null, DEFAULT_TIMEOUT); - } - - protected T getOsgiService(Class type, String filter, long timeout) { - ServiceTracker tracker = null; - try { - String flt; - if (filter != null) { - if (filter.startsWith("(")) { - flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")" + filter + ")"; - } else { - flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")(" + filter + "))"; - } - } else { - flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")"; - } - Filter osgiFilter = FrameworkUtil.createFilter(flt); - tracker = new ServiceTracker(bundleContext, osgiFilter, null); - tracker.open(true); - // Note that the tracker is not closed to keep the reference - // This is buggy, as the service reference may change i think - Object svc = type.cast(tracker.waitForService(timeout)); - if (svc == null) { - Dictionary dic = bundleContext.getBundle().getHeaders(); - System.err.println("Test bundle headers: " + explode(dic)); - - for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, null))) { - System.err.println("ServiceReference: " + ref); - } - - for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, flt))) { - System.err.println("Filtered ServiceReference: " + ref); - } - - throw new RuntimeException("Gave up waiting for service " + flt); - } - return type.cast(svc); - } catch (InvalidSyntaxException e) { - throw new IllegalArgumentException("Invalid filter", e); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - - - /* - * Provides an iterable collection of references, even if the original array is null - */ - private static Collection asCollection(ServiceReference[] references) { - return references != null ? Arrays.asList(references) : Collections.emptyList(); - } - - /** - * Create an provisioning option for the specified maven artifact - * (groupId and artifactId), using the version found in the list - * of dependencies of this maven project. - * - * @param groupId the groupId of the maven bundle - * @param artifactId the artifactId of the maven bundle - * @return the provisioning option for the given bundle - */ - protected static MavenArtifactProvisionOption mavenBundle(String groupId, String artifactId) { - return CoreOptions.mavenBundle(groupId, artifactId).versionAsInProject(); - } - - /** - * Create an provisioning option for the specified maven artifact - * (groupId and artifactId), using the version found in the list - * of dependencies of this maven project. - * - * @param groupId the groupId of the maven bundle - * @param artifactId the artifactId of the maven bundle - * @param version the version of the maven bundle - * @return the provisioning option for the given bundle - */ - protected static MavenArtifactProvisionOption mavenBundle(String groupId, String artifactId, String version) { - return CoreOptions.mavenBundle(groupId, artifactId).version(version); - } - - /** - * Returns the Version of Karaf to be used. - * - * @return - */ - protected String getKarafVersion() { - return MavenUtils.getArtifactVersion(KARAF_GROUP_ID, KARAF_ARTIFACT_ID); - } -} - - diff --git a/itests/src/test/java/org/jclouds/karaf/itests/MiscFeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/MiscFeaturesInstallationTest.java deleted file mode 100644 index e0081484..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/MiscFeaturesInstallationTest.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class MiscFeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testBasicFeaturesInstallation() throws Exception { - installAndCheckFeature("jclouds-commands"); - } - - @Test - public void testGoGridFeature() throws Exception { - installAndCheckFeature("jclouds-gogrid"); - } - - @Test - public void testGo2CloudFeature() throws Exception { - installAndCheckFeature("jclouds-go2cloud-jhb1"); - } - - @Test - public void testOpenHostingEast1Feature() throws Exception { - installAndCheckFeature("jclouds-openhosting-east1"); - } - - @Test - public void testServerloveZ1ManFeature() throws Exception { - installAndCheckFeature("jclouds-serverlove-z1-man"); - } - - @Test - public void testSkalicloudSdgMyFeature() throws Exception { - installAndCheckFeature("jclouds-skalicloud-sdg-my"); - } - - @Test - public void testSoftlayerFeature() throws Exception { - installAndCheckFeature("jclouds-softlayer"); - } - - @Test - public void testAzureBlobFeature() throws Exception { - installAndCheckFeature("jclouds-azureblob"); - } - - @Test - public void testB2Feature() throws Exception { - installAndCheckFeature("jclouds-b2"); - } - - @Test - public void testAzureComputeArmFeature() throws Exception { - installAndCheckFeature("jclouds-azurecompute-arm"); - } - - @Test - public void testDynectFeature() throws Exception { - installAndCheckFeature("jclouds-dynect"); - } - - @Test - public void testGlesysFeature() throws Exception { - installAndCheckFeature("jclouds-glesys"); - } - - @Test - public void testDigitalOcean2Feature() throws Exception { - installAndCheckFeature("jclouds-digitalocean2"); - } - - @Test - public void testGoogleComputeEngineFeature() throws Exception { - installAndCheckFeature("jclouds-google-compute-engine"); - } - - @Test - public void testGoogleCloudStorageFeature() throws Exception { - installAndCheckFeature("jclouds-google-cloud-storage"); - } - - @Test - public void testProfitBricksFeature() throws Exception { - installAndCheckFeature("jclouds-profitbricks"); - } - - @Test - public void testPacketFeature() throws Exception { - installAndCheckFeature("jclouds-packet"); - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/ObrResolverTest.java b/itests/src/test/java/org/jclouds/karaf/itests/ObrResolverTest.java deleted file mode 100644 index bc6632f1..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/ObrResolverTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class ObrResolverTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - /** - * This test checks that when the obr resolver is installed, jclouds-services feature can be properly installed. - * @throws Exception - */ - @Test - public void testJcloudsKarafServicesResolution() throws Exception { - installAndCheckFeature("obr"); - installAndCheckFeature("jclouds-services"); - String jcloudsServicesBundles = executeCommand("osgi:list -s | grep -i -c org.apache.jclouds.karaf.services"); - assertNotNull(jcloudsServicesBundles); - int jcloudsServicesBundlesCount = Integer.parseInt(jcloudsServicesBundles.trim()); - assertEquals("Expected only one jclouds-services bundle", 1, jcloudsServicesBundlesCount); - } - - /** - * This test checks that when the obr resolver is installed, jclouds-commands feature can be properly installed. - * @throws Exception - */ - @Test - public void testJcloudsKarafCommandsResolution() throws Exception { - installAndCheckFeature("obr"); - installAndCheckFeature("jclouds-commands"); - String jcloudsCommandsBundles = executeCommand("osgi:list -s | grep -i -c org.apache.jclouds.karaf.commands"); - assertNotNull(jcloudsCommandsBundles); - int jcloudsCommandsBundlesCount = Integer.parseInt(jcloudsCommandsBundles.trim()); - assertEquals("Expected one jclouds-commands bundle", 1, jcloudsCommandsBundlesCount); - - String jcloudsServicesBundles = executeCommand("osgi:list -s | grep -i -c org.apache.jclouds.karaf.services"); - assertNotNull(jcloudsServicesBundles); - int jcloudsServicesBundlesCount = Integer.parseInt(jcloudsServicesBundles.trim()); - assertEquals("Expected one jclouds-services bundle", 1, jcloudsServicesBundlesCount); - } - - /** - * This test checks that when the obr resolver is installed, jclouds-chef feature can be properly installed. - * @throws Exception - */ - @Test - public void testJcloudsKarafChefResolution() throws Exception { - installAndCheckFeature("obr"); - installAndCheckFeature("jclouds-chef"); - String jcloudsChefCommandsBundles = executeCommand("osgi:list -s | grep -i -c org.apache.jclouds.karaf.chef.commands"); - assertNotNull(jcloudsChefCommandsBundles); - int jcloudsCommandsBundlesCount = Integer.parseInt(jcloudsChefCommandsBundles.trim()); - assertEquals("Expected one chef commands bundle", 1, jcloudsCommandsBundlesCount); - - String jcloudsChefServicesBundles = executeCommand("osgi:list -s | grep -i -c org.apache.jclouds.karaf.chef.services"); - assertNotNull(jcloudsChefServicesBundles); - int jcloudsServicesBundlesCount = Integer.parseInt(jcloudsChefServicesBundles.trim()); - assertEquals("Expected one chef services bundle", 1, jcloudsServicesBundlesCount); - } - - /** - * This test checks that when the obr resolver is installed, we don't have multiple jersey bundles. - * @throws Exception - */ - @Ignore - @Test - public void testJerseyResolution() throws Exception { - installAndCheckFeature("obr"); - executeCommand("osgi:install -s mvn:com.sun.jersey/jersey-core/1.6"); - installAndCheckFeature("jclouds-aws-ec2"); - String jerseyBundles = executeCommand("osgi:list | grep -i -c jersey"); - assertNotNull(jerseyBundles); - int jerseyBundleCount = Integer.parseInt(jerseyBundles.trim()); - assertEquals("Expected only one jersey bundle",1,jerseyBundleCount); - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/RackspaceFeaturesInstallationTest.java b/itests/src/test/java/org/jclouds/karaf/itests/RackspaceFeaturesInstallationTest.java deleted file mode 100644 index 1b768a8c..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/RackspaceFeaturesInstallationTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class RackspaceFeaturesInstallationTest extends JcloudsFeaturesTestSupport { - - @Before - public void setUp() { - System.err.println(executeCommand("features:addurl " + getJcloudsKarafFeatureURL())); - } - - @After - public void tearDown() { - - } - - @Test - public void testRackspaceCloudServersUsFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudservers-us"); - } - - @Test - public void testRackspaceCloudServersUkFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudservers-uk"); - } - - @Test - public void testCloudDnsUsFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-clouddns-us"); - } - - @Test - public void testCloudDnsUkFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-clouddns-uk"); - } - - @Test - public void testCloudLoadBalancersUsFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudloadbalancers-us"); - } - - @Test - public void testCloudLoadBalancersUkFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudloadbalancers-uk"); - } - - @Test - public void testCloudBlockStorageUsFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudblockstorage-us"); - } - - @Test - public void testCloudBlockStorageUkFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudblockstorage-uk"); - } - - @Test - public void testRackspaceCloudFilesUkFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudfiles-uk"); - } - - @Test - public void testRackspaceCloudFilesUsFeature() throws Exception { - installAndCheckFeature("jclouds-rackspace-cloudfiles-us"); - } - -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/ServiceTest.java b/itests/src/test/java/org/jclouds/karaf/itests/ServiceTest.java new file mode 100644 index 00000000..feca9b05 --- /dev/null +++ b/itests/src/test/java/org/jclouds/karaf/itests/ServiceTest.java @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.karaf.itests; + +import static org.junit.Assert.assertNotNull; +import static org.ops4j.pax.exam.CoreOptions.maven; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFileExtend; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; + +import java.io.File; + +import javax.inject.Inject; + +import org.jclouds.compute.ComputeService; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.ProbeBuilder; +import org.ops4j.pax.exam.TestProbeBuilder; +import org.ops4j.pax.exam.junit.PaxExam; +import org.ops4j.pax.exam.karaf.options.LogLevelOption; +import org.ops4j.pax.exam.options.MavenArtifactUrlReference; +import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; +import org.ops4j.pax.exam.spi.reactors.PerClass; +import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; + +@RunWith(PaxExam.class) +@ExamReactorStrategy(PerClass.class) +public class ServiceTest extends BasePaxExamTest { + + @Inject + protected BundleContext bundleContext; + + @Inject + ComputeService computeService; + + @Test + @Ignore("not ready yet") + public void testServiceAvailability() throws Exception { + assertNotNull(computeService); + } + + //Need to check this for class loading errors + @Test + @Ignore("not ready yet") + public void testComputeService() throws Exception { + assertNotNull(computeService); + assertNotNull(computeService.listAssignableLocations()); + } + + @ProbeBuilder + public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) { + probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional"); + return probe; + } + + @Configuration + public Option[] config() { + MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").versionAsInProject().type("tar.gz"); + return new Option[]{ + karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")), + configureSecurity().disableKarafMBeanServerBuilder(), + keepRuntimeFolder(), + editConfigurationFilePut("etc/system.properties", "features.xml", System.getProperty("features.xml")), + editConfigurationFileExtend( + "etc/org.ops4j.pax.url.mvn.cfg", + "org.ops4j.pax.url.mvn.repositories", + "file:" + System.getProperty("features-repo") + "@id=local@snapshots@releases"), + logLevel(LogLevelOption.LogLevel.INFO), + }; + } +} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/live/AwsEc2LiveTest.java b/itests/src/test/java/org/jclouds/karaf/itests/live/AwsEc2LiveTest.java deleted file mode 100644 index b4b9cb12..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/live/AwsEc2LiveTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests.live; - -import static org.junit.Assert.assertTrue; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.keepRuntimeFolder; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel; -import static org.ops4j.pax.exam.CoreOptions.scanFeatures; - -import org.jclouds.compute.ComputeService; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.apache.karaf.tooling.exam.options.LogLevelOption; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class AwsEc2LiveTest extends JcloudsLiveTestSupport { - - String group = "karaf"; - - @Before - public void setUp() throws Exception { - identity = System.getProperty("jclouds.aws.identity"); - credential = System.getProperty("jclouds.aws.credential"); - regions = System.getProperty("jclouds.aws.region"); - image = System.getProperty("jclouds.aws.image"); - location = System.getProperty("jclouds.aws.location"); - user = System.getProperty("jclouds.aws.user"); - - if (isComputeLiveConfigured()) { - installAndCheckFeature("jclouds-commands"); - Thread.sleep(DEFAULT_TIMEOUT); - } else { - System.err.println("Aborting test."); - System.err.flush(); - } - } - - @After - public void tearDown() { - if (isComputeLiveConfigured()) { - executeCommand("jclouds:node-destroy-all "); - } - } - - @Test - public void testCreateNodeLive() throws InterruptedException { - if (isComputeLiveConfigured()) { - createManagedComputeService("aws-ec2", false); - ComputeService computeService = getOsgiService(ComputeService.class,1000000L); - - System.err.println(executeCommand("jclouds:image-list")); - System.err.println(executeCommand("jclouds:node-create --imageId " + image + " --locationId " + location + " " + group)); - System.err.println(executeCommand("jclouds:group-runscript -d ls -u " + user + " " + group)); - assertTrue("Expected at least one node", computeService.listNodes().size() >= 1); - } - } - - @Configuration - public Option[] config() { - return new Option[]{ - jcloudsDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR), - systemProperty("jclouds.aws.identity"), - systemProperty("jclouds.aws.credential"), - systemProperty("jclouds.aws.region"), - systemProperty("jclouds.aws.image"), - systemProperty("jclouds.aws.location"), - systemProperty("jclouds.aws.user"), - scanFeatures(String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),"jclouds", "jclouds-compute", "jclouds-aws-ec2").start() - }; - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/live/AwsS3LiveTest.java b/itests/src/test/java/org/jclouds/karaf/itests/live/AwsS3LiveTest.java deleted file mode 100644 index cd4e5834..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/live/AwsS3LiveTest.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests.live; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.keepRuntimeFolder; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel; -import static org.ops4j.pax.exam.CoreOptions.scanFeatures; - -import java.io.File; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URL; -import java.util.LinkedHashSet; -import java.util.Set; - -import com.google.common.io.ByteStreams; -import org.apache.karaf.features.FeaturesService; -import org.jclouds.blobstore.BlobStore; -import org.jclouds.util.Closeables2; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.apache.karaf.tooling.exam.options.LogLevelOption; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; -import org.osgi.framework.BundleEvent; -import org.osgi.framework.BundleListener; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class AwsS3LiveTest extends JcloudsLiveTestSupport { - - String group = "karaf"; - - @Before - public void setUp() throws Exception { - identity = System.getProperty("jclouds.aws.identity"); - credential = System.getProperty("jclouds.aws.credential"); - - if (isBlobStoreLiveConfigured()) { - installAndCheckFeature("jclouds-commands"); - Thread.sleep(DEFAULT_TIMEOUT); - } else { - System.err.println("Aborting test."); - System.err.flush(); - } - } - - @After - public void tearDown() { - if (isBlobStoreLiveConfigured()) { - System.err.println(executeCommand("jclouds:blobstore-container-delete itest-container")); - } - } - - @Test - public void testBlobStoreReadWrite() throws InterruptedException { - if (isBlobStoreLiveConfigured()) { - createManagedBlobStoreService("aws-s3"); - BlobStore blobStoreService = getOsgiService(BlobStore.class); - Thread.sleep(DEFAULT_TIMEOUT); - - String featureURL = System.getProperty("jclouds.featureURL"); - System.err.println(executeCommand("jclouds:blobstore-list")); - System.err.println(executeCommand("jclouds:blobstore-container-create itest-container")); - - System.err.println(executeCommand("jclouds:blobstore-write itest-container myfolder/myfile "+ featureURL )); - System.err.println(executeCommand("jclouds:blobstore-write --url-payload itest-container testblob "+ System.getProperty("jclouds.featureURL"))); - System.err.println(executeCommand("jclouds:blobstore-read --display itest-container testblob ")); - } - } - - - @Test - public void testUrlHandler() throws Exception { - if (isBlobStoreLiveConfigured()) { - createManagedBlobStoreService("aws-s3"); - BlobStore blobStoreService = getOsgiService(BlobStore.class); - Thread.sleep(DEFAULT_TIMEOUT); - - FeaturesService featuresService = getOsgiService(FeaturesService.class); - featuresService.installFeature("jclouds-url-handler"); - - //Let's add a bundle to S3 - String groupId = "org.jclouds.api"; - String artifactId = "byon"; - String version = System.getProperty("jclouds.version"); - - System.err.println(executeCommand("jclouds:blobstore-list")); - System.err.println(executeCommand("jclouds:blobstore-container-create itest-container")); - - URL artifactUrl = new URL("mvn:"+groupId+"/"+artifactId+"/"+version); - URL blobUrl = new URL("blob:aws-s3/itest-container/maven2/org/jclouds/api/byon/" +version+"/"+artifactId+"-"+version+".jar" ); - InputStream is = artifactUrl.openConnection().getInputStream(); - OutputStream os = blobUrl.openConnection().getOutputStream(); - try { - ByteStreams.copy(is, os); - os.flush(); - } finally { - Closeables2.closeQuietly(is); - Closeables2.closeQuietly(os); - } - //Make sure that only S3 is available as a repo. - System.err.println(executeCommands("config:edit org.ops4j.pax.url.mvn", - "config:propset org.ops4j.pax.url.mvn.localRepository " + System.getProperty("karaf.base") + File.separatorChar + "none", - "config:propset org.ops4j.pax.url.mvn.repositories blob:aws-s3/itest-container/maven2@snapshots ", - "config:update")); - Thread.sleep(DEFAULT_TIMEOUT); - - final Set installedSymbolicNames = new LinkedHashSet(); - - //Add a Bundle Listener - bundleContext.addBundleListener(new BundleListener(){ - @Override - public void bundleChanged(BundleEvent event) { - if (event.getType() == BundleEvent.INSTALLED) { - installedSymbolicNames.add(event.getBundle().getSymbolicName()); - } - } - }); - - //Install the bundle the from S3. - System.err.println(executeCommand("osgi:install mvn:org.jclouds.api/byon/" + version)); - - //Verify that no other bundle can be installed. - System.err.println(executeCommand("osgi:install mvn:org.jclouds.api/nova/" + version)); - assertTrue(installedSymbolicNames.contains("byon")); - assertFalse(installedSymbolicNames.contains("nova")); - - - } - } - - @Configuration - public Option[] config() { - return new Option[]{ - jcloudsDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR), - systemProperty("jclouds.aws.identity"), - systemProperty("jclouds.aws.credential"), - systemProperty("jclouds.karaf.version",MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)), - systemProperty("jclouds.version",MavenUtils.getArtifactVersion(JCLOUDS_GROUP_ID, JCLOUDS_ARTIFACT_ID)), - systemProperty("jclouds.featureURL",String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID))), - scanFeatures(String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),"jclouds", "jclouds-commands", "jclouds-aws-s3").start() - }; - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/live/CloudFilesUsLiveTest.java b/itests/src/test/java/org/jclouds/karaf/itests/live/CloudFilesUsLiveTest.java deleted file mode 100644 index 19fb057f..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/live/CloudFilesUsLiveTest.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests.live; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.keepRuntimeFolder; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel; -import static org.ops4j.pax.exam.CoreOptions.scanFeatures; - -import java.io.File; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URL; -import java.util.LinkedHashSet; -import java.util.Set; - -import com.google.common.io.ByteStreams; -import org.apache.karaf.features.FeaturesService; -import org.jclouds.blobstore.BlobStore; -import org.jclouds.util.Closeables2; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.apache.karaf.tooling.exam.options.LogLevelOption; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; -import org.osgi.framework.BundleEvent; -import org.osgi.framework.BundleListener; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class CloudFilesUsLiveTest extends JcloudsLiveTestSupport { - - String group = "karaf"; - - @Before - public void setUp() throws Exception { - identity = System.getProperty("jclouds.rackspace.identity"); - credential = System.getProperty("jclouds.rackspace.credential"); - - if (isBlobStoreLiveConfigured()) { - installAndCheckFeature("jclouds-commands"); - Thread.sleep(DEFAULT_TIMEOUT); - } else { - System.err.println("Aborting test."); - System.err.flush(); - } - } - - @After - public void tearDown() { - if (isBlobStoreLiveConfigured()) { - System.err.println(executeCommand("jclouds:blobstore-container-delete itest-container")); - } - } - - @Test - public void testBlobStoreReadWrite() throws InterruptedException { - if (isBlobStoreLiveConfigured()) { - createManagedBlobStoreService("rackspace-cloudfiles-us"); - BlobStore blobStoreService = getOsgiService(BlobStore.class); - Thread.sleep(DEFAULT_TIMEOUT); - - String featureURL = System.getProperty("jclouds.featureURL"); - System.err.println(executeCommand("jclouds:blobstore-list")); - System.err.println(executeCommand("jclouds:blobstore-container-create itest-container")); - - System.err.println(executeCommand("jclouds:blobstore-write itest-container myfolder/myfile "+ featureURL )); - System.err.println(executeCommand("jclouds:blobstore-write --url-payload itest-container "+ System.getProperty("jclouds.featureURL"))); - System.err.println(executeCommand("jclouds:blobstore-read --display itest-container testblob ")); - } - } - - - @Test - public void testUrlHandler() throws Exception { - if (isBlobStoreLiveConfigured()) { - createManagedBlobStoreService("rackspace-cloudfiles-us"); - BlobStore blobStoreService = getOsgiService(BlobStore.class); - Thread.sleep(DEFAULT_TIMEOUT); - - FeaturesService featuresService = getOsgiService(FeaturesService.class); - featuresService.installFeature("jclouds-url-handler"); - - //Let's add a bundle to S3 - String groupId = "org.jclouds.api"; - String artifactId = "byon"; - String version = System.getProperty("jclouds.version"); - - System.err.println(executeCommand("jclouds:blobstore-list")); - System.err.println(executeCommand("jclouds:blobstore-container-create itest-container")); - - URL artifactUrl = new URL("mvn:"+groupId+"/"+artifactId+"/"+version); - URL blobUrl = new URL("blob:aws-s3/itest-container/maven2/org/jclouds/api/byon/" +version+"/"+artifactId+"-"+version+".jar" ); - InputStream is = artifactUrl.openConnection().getInputStream(); - OutputStream os = blobUrl.openConnection().getOutputStream(); - try { - ByteStreams.copy(is, os); - } finally { - Closeables2.closeQuietly(is); - Closeables2.closeQuietly(os); - } - - //Make sure that only S3 is available as a repo. - System.err.println(executeCommands("config:edit org.ops4j.pax.url.mvn", - "config:propset org.ops4j.pax.url.mvn.localRepository " + System.getProperty("karaf.base") + File.separatorChar + "none", - "config:propset org.ops4j.pax.url.mvn.repositories blob:rackspace-cloudfiles-us/itest-container/maven2@snapshots ", - "config:update")); - Thread.sleep(DEFAULT_TIMEOUT); - - final Set installedSymbolicNames = new LinkedHashSet(); - - //Add a Bundle Listener - bundleContext.addBundleListener(new BundleListener(){ - @Override - public void bundleChanged(BundleEvent event) { - if (event.getType() == BundleEvent.INSTALLED) { - installedSymbolicNames.add(event.getBundle().getSymbolicName()); - } - } - }); - - //Install the bundle the from S3. - System.err.println(executeCommand("osgi:install mvn:org.jclouds.api/byon/" + version)); - - //Verify that no other bundle can be installed. - System.err.println(executeCommand("osgi:install mvn:org.jclouds.api/nova/" + version)); - assertTrue(installedSymbolicNames.contains("byon")); - assertFalse(installedSymbolicNames.contains("nova")); - - - } - } - - @Configuration - public Option[] config() { - return new Option[]{ - jcloudsDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR), - systemProperty("jclouds.rackspace.identity"), - systemProperty("jclouds.rackspace.credential"), - systemProperty("jclouds.karaf.version",MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)), - systemProperty("jclouds.version",MavenUtils.getArtifactVersion(JCLOUDS_GROUP_ID, JCLOUDS_ARTIFACT_ID)), - systemProperty("jclouds.featureURL",String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID))), - scanFeatures(String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),"jclouds", "jclouds-commands", "jclouds-rackspace-cloudfiles-us").start() - }; - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/live/JcloudsLiveTestSupport.java b/itests/src/test/java/org/jclouds/karaf/itests/live/JcloudsLiveTestSupport.java deleted file mode 100644 index f67a339c..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/live/JcloudsLiveTestSupport.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests.live; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.LinkedList; -import java.util.List; - -import com.google.common.io.CharStreams; -import org.jclouds.karaf.itests.JcloudsFeaturesTestSupport; - -public class JcloudsLiveTestSupport extends JcloudsFeaturesTestSupport { - - String identity; - String credential; - String image; - String location; - String user; - String regions; - - - /** - * Checks if Live Test parameters are properly configured for compute tests. - * - * @return - */ - public boolean isComputeLiveConfigured() { - return - identity != null && credential != null && image != null && location != null - && !identity.isEmpty() && !credential.isEmpty() && !image.isEmpty() && !location.isEmpty(); - } - - /** - * Checks if Live Test parameters are properly configured for blobstore tests. - * - * @return - */ - public boolean isBlobStoreLiveConfigured() { - return - identity != null && credential != null - && !identity.isEmpty() && !credential.isEmpty(); - } - - /** - * Creates a Managed Compute Service using the configured system properties. - */ - public void createManagedComputeService(String provider, boolean eventSupport) { - List options = new LinkedList(); - if (regions != null && !regions.isEmpty()) { - options.add("jclouds.regions=" + regions); - } - String cmd = "jclouds:compute-service-create --provider " + provider + " --identity " + identity + " --credential " + credential; - for (String option : options) { - cmd += " --add-option " + option; - } - executeCommand(cmd); - } - - - /** - * Creates a Managed Compute Service using the configured system properties. - */ - public void createManagedBlobStoreService(String provider) { - String cmd = "jclouds:blobstore-service-create --provider " + provider + " --identity " + identity + " --credential " + credential; - executeCommand(cmd); - } - - /** - * @return the IP address of the client on which this code is running. - * @throws java.io.IOException - */ - protected String getOriginatingIp() throws IOException { - URL url = new URL("http://checkip.amazonaws.com/"); - HttpURLConnection connection = (HttpURLConnection) url.openConnection(); - connection.connect(); - InputStream in = connection.getInputStream(); - try { - return CharStreams.toString(new InputStreamReader(in)).trim() + "/32"; - } finally { - in.close(); - } - } - -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/live/RackspaceLiveTest.java b/itests/src/test/java/org/jclouds/karaf/itests/live/RackspaceLiveTest.java deleted file mode 100644 index 074e2daf..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/live/RackspaceLiveTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests.live; - -import static org.junit.Assert.assertTrue; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.debugConfiguration; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.keepRuntimeFolder; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel; -import static org.ops4j.pax.exam.CoreOptions.scanFeatures; - -import org.jclouds.compute.ComputeService; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.apache.karaf.tooling.exam.options.LogLevelOption; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.ExamReactorStrategy; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; - -@RunWith(JUnit4TestRunner.class) -@ExamReactorStrategy(AllConfinedStagedReactorFactory.class) -public class RackspaceLiveTest extends JcloudsLiveTestSupport { - - String group = "karaf"; - - @Before - public void setUp() throws Exception { - identity = System.getProperty("jclouds.rackspace.identity"); - credential = System.getProperty("jclouds.rackspace.credential"); - regions = System.getProperty("jclouds.rackspace.region"); - image = System.getProperty("jclouds.rackspace.image"); - location = System.getProperty("jclouds.rackspace.location"); - user = System.getProperty("jclouds.rackspace.user"); - - if (isComputeLiveConfigured()) { - installAndCheckFeature("jclouds-commands"); - Thread.sleep(DEFAULT_TIMEOUT); - } else { - System.err.println("Aborting test."); - System.err.flush(); - } - } - - @After - public void tearDown() { - if (isComputeLiveConfigured()) { - executeCommand("jclouds:node-destroy-all "); - } - } - - @Test - public void testNodeCreateLive() throws InterruptedException { - if (isComputeLiveConfigured()) { - createManagedComputeService("rackspace-cloudservers-us", false); - ComputeService computeService = getOsgiService(ComputeService.class, 1000000L); - Thread.sleep(DEFAULT_TIMEOUT); - System.err.println(executeCommand("jclouds:image-list")); - System.err.println(executeCommand("jclouds:node-create --imageId " + image + " --locationId " + location + " " + group)); - System.err.println(executeCommand("jclouds:group-runscript -d ls -u " + user + " " + group)); - assertTrue("Expected at least one node", computeService.listNodes().size() >= 1); - } - } - - @Configuration - public Option[] config() { - return new Option[]{ - jcloudsDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR), - systemProperty("jclouds.rackspace.identity"), - systemProperty("jclouds.rackspace.credential"), - systemProperty("jclouds.rackspace.region"), - systemProperty("jclouds.rackspace.image"), - systemProperty("jclouds.rackspace.location"), - systemProperty("jclouds.rackspace.user"), - scanFeatures(String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)), "jclouds", "jclouds-compute", "jclouds-rackspace-cloudserver-us").start() - }; - } -} diff --git a/itests/src/test/java/org/jclouds/karaf/itests/special/JcloudsCamelCxfFeaturesTestSupport.java b/itests/src/test/java/org/jclouds/karaf/itests/special/JcloudsCamelCxfFeaturesTestSupport.java deleted file mode 100644 index 4d80827e..00000000 --- a/itests/src/test/java/org/jclouds/karaf/itests/special/JcloudsCamelCxfFeaturesTestSupport.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jclouds.karaf.itests.special; - -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.keepRuntimeFolder; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel; -import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.replaceConfigurationFile; - -import java.io.File; - -import org.jclouds.karaf.itests.live.AwsEc2LiveTest; -import org.junit.Before; -import org.apache.karaf.tooling.exam.options.LogLevelOption; -import org.ops4j.pax.exam.MavenUtils; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; - -public class JcloudsCamelCxfFeaturesTestSupport extends AwsEc2LiveTest { - - public static final String CAMEL_GROUP_ID = "org.apache.camel.karaf"; - public static final String CAMEL_ARTIFACT_ID = "apache-camel"; - public static final String CAMEL_FEATURE_FORMAT = "mvn:org.apache.camel.karaf/apache-camel/%s/xml/features"; - public static final String CAMEL_FEATURE_VERSION_PROPERTY = "camel.feature.version"; - - @Before - public void setUp() throws Exception { - System.err.println(executeCommand("features:addurl " + String.format(CAMEL_FEATURE_FORMAT,System.getProperty(CAMEL_FEATURE_VERSION_PROPERTY)))); - System.err.println(executeCommand("features:removeurl " + String.format(JCLOUDS_FEATURE_FORMAT, "1.3.1"))); - System.err.println(executeCommand("features:addurl " + String.format(JCLOUDS_FEATURE_FORMAT,System.getProperty(JCLOUDS_FEATURE_VERSION_PROPERTY)))); - System.err.println(executeCommand("features:install xml-specs-api")); - System.err.println(executeCommand("osgi:install mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr250-1.0/1.9.0")); - System.err.println(executeCommand("features:install camel-cxf")); - System.err.println(executeCommand("features:install jclouds-aws-ec2")); - System.err.println(executeCommand("features:install jclouds-services")); - super.setUp(); - } - - @Configuration - public Option[] config() { - return new Option[]{ - jcloudsDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR), - systemProperty("jclouds.aws.identity"), - systemProperty("jclouds.aws.credential"), - systemProperty("jclouds.aws.region"), - systemProperty("jclouds.aws.image"), - systemProperty("jclouds.aws.location"), - systemProperty("jclouds.aws.user"), - systemProperty(JCLOUDS_FEATURE_VERSION_PROPERTY, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)), - systemProperty(CAMEL_FEATURE_VERSION_PROPERTY, MavenUtils.getArtifactVersion(CAMEL_GROUP_ID, CAMEL_ARTIFACT_ID)), - replaceConfigurationFile("etc/jre.properties", new File("target/test-classes/jre.properties.cxf")), - }; - } -} diff --git a/itests/src/test/resources/jre.properties.cxf b/itests/src/test/resources/jre.properties.cxf deleted file mode 100644 index cb8c207d..00000000 --- a/itests/src/test/resources/jre.properties.cxf +++ /dev/null @@ -1,472 +0,0 @@ -################################################################################ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ - -# -# Java platform package export properties. -# - -# Standard package set. Note that: -# - javax.transaction* is exported with a mandatory attribute -jre-1.5= \ - javax.accessibility, \ - javax.activity, \ - javax.crypto, \ - javax.crypto.interfaces, \ - javax.crypto.spec, \ - javax.imageio, \ - javax.imageio.event, \ - javax.imageio.metadata, \ - javax.imageio.plugins.bmp, \ - javax.imageio.plugins.jpeg, \ - javax.imageio.spi, \ - javax.imageio.stream, \ - javax.management, \ - javax.management.loading, \ - javax.management.modelmbean, \ - javax.management.monitor, \ - javax.management.openmbean, \ - javax.management.relation, \ - javax.management.remote, \ - javax.management.remote.rmi, \ - javax.management.timer, \ - javax.naming, \ - javax.naming.directory, \ - javax.naming.event, \ - javax.naming.ldap, \ - javax.naming.spi, \ - javax.net, \ - javax.net.ssl, \ - javax.print, \ - javax.print.attribute, \ - javax.print.attribute.standard, \ - javax.print.event, \ - javax.rmi, \ - javax.rmi.CORBA, \ - javax.rmi.ssl, \ - javax.security.auth, \ - javax.security.auth.callback, \ - javax.security.auth.kerberos, \ - javax.security.auth.login, \ - javax.security.auth.spi, \ - javax.security.auth.x500, \ - javax.security.cert, \ - javax.security.sasl, \ - javax.sound.midi, \ - javax.sound.midi.spi, \ - javax.sound.sampled, \ - javax.sound.sampled.spi, \ - javax.sql, \ - javax.sql.rowset, \ - javax.sql.rowset.serial, \ - javax.sql.rowset.spi, \ - javax.swing, \ - javax.swing.border, \ - javax.swing.colorchooser, \ - javax.swing.event, \ - javax.swing.filechooser, \ - javax.swing.plaf, \ - javax.swing.plaf.basic, \ - javax.swing.plaf.metal, \ - javax.swing.plaf.multi, \ - javax.swing.plaf.synth, \ - javax.swing.table, \ - javax.swing.text, \ - javax.swing.text.html, \ - javax.swing.text.html.parser, \ - javax.swing.text.rtf, \ - javax.swing.tree, \ - javax.swing.undo, \ - javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \ - javax.xml, \ - javax.xml.datatype, \ - javax.xml.namespace, \ - javax.xml.parsers, \ - javax.xml.transform, \ - javax.xml.transform.dom, \ - javax.xml.transform.sax, \ - javax.xml.transform.stream, \ - javax.xml.validation, \ - javax.xml.xpath, \ - org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ - org.w3c.dom, \ - org.w3c.dom.bootstrap, \ - org.w3c.dom.css, \ - org.w3c.dom.events, \ - org.w3c.dom.html, \ - org.w3c.dom.ls, \ - org.w3c.dom.ranges, \ - org.w3c.dom.stylesheets, \ - org.w3c.dom.traversal, \ - org.w3c.dom.views, \ - org.xml.sax, \ - org.xml.sax.ext, \ - org.xml.sax.helpers - -# Standard package set. Note that: -# - javax.transaction* is exported with a mandatory attribute -jre-1.6= \ - javax.accessibility, \ -# javax.activation, \ - javax.activity, \ -# javax.annotation;version="1.1", \ - javax.annotation.processing;version="1.1", \ - javax.crypto, \ - javax.crypto.interfaces, \ - javax.crypto.spec, \ - javax.imageio, \ - javax.imageio.event, \ - javax.imageio.metadata, \ - javax.imageio.plugins.bmp, \ - javax.imageio.plugins.jpeg, \ - javax.imageio.spi, \ - javax.imageio.stream, \ -# javax.jws, \ -# javax.jws.soap, \ - javax.lang.model, \ - javax.lang.model.element, \ - javax.lang.model.type, \ - javax.lang.model.util, \ - javax.management, \ - javax.management.loading, \ - javax.management.modelmbean, \ - javax.management.monitor, \ - javax.management.openmbean, \ - javax.management.relation, \ - javax.management.remote, \ - javax.management.remote.rmi, \ - javax.management.timer, \ - javax.naming, \ - javax.naming.directory, \ - javax.naming.event, \ - javax.naming.ldap, \ - javax.naming.spi, \ - javax.net, \ - javax.net.ssl, \ - javax.print, \ - javax.print.attribute, \ - javax.print.attribute.standard, \ - javax.print.event, \ - javax.rmi, \ - javax.rmi.CORBA, \ - javax.rmi.ssl, \ - javax.script, \ - javax.security.auth, \ - javax.security.auth.callback, \ - javax.security.auth.kerberos, \ - javax.security.auth.login, \ - javax.security.auth.spi, \ - javax.security.auth.x500, \ - javax.security.cert, \ - javax.security.sasl, \ - javax.sound.midi, \ - javax.sound.midi.spi, \ - javax.sound.sampled, \ - javax.sound.sampled.spi, \ - javax.sql, \ - javax.sql.rowset, \ - javax.sql.rowset.serial, \ - javax.sql.rowset.spi, \ - javax.swing, \ - javax.swing.border, \ - javax.swing.colorchooser, \ - javax.swing.event, \ - javax.swing.filechooser, \ - javax.swing.plaf, \ - javax.swing.plaf.basic, \ - javax.swing.plaf.metal, \ - javax.swing.plaf.multi, \ - javax.swing.plaf.synth, \ - javax.swing.table, \ - javax.swing.text, \ - javax.swing.text.html, \ - javax.swing.text.html.parser, \ - javax.swing.text.rtf, \ - javax.swing.tree, \ - javax.swing.undo, \ - javax.tools, \ - javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \ - javax.xml, \ -# javax.xml.bind, \ -# javax.xml.bind.annotation, \ -# javax.xml.bind.annotation.adapters, \ -# javax.xml.bind.attachment, \ -# javax.xml.bind.helpers, \ -# javax.xml.bind.util, \ - javax.xml.crypto, \ - javax.xml.crypto.dom, \ - javax.xml.crypto.dsig, \ - javax.xml.crypto.dsig.dom, \ - javax.xml.crypto.dsig.keyinfo, \ - javax.xml.crypto.dsig.spec, \ - javax.xml.datatype, \ - javax.xml.namespace, \ - javax.xml.parsers, \ -# javax.xml.soap, \ -# javax.xml.stream, \ -# javax.xml.stream.events, \ -# javax.xml.stream.util, \ - javax.xml.transform, \ - javax.xml.transform.dom, \ - javax.xml.transform.sax, \ - javax.xml.transform.stax, \ - javax.xml.transform.stream, \ - javax.xml.validation, \ -# javax.xml.ws, \ -# javax.xml.ws.handler, \ -# javax.xml.ws.handler.soap, \ -# javax.xml.ws.http, \ -# javax.xml.ws.soap, \ -# javax.xml.ws.spi, \ - javax.xml.ws.wsaddressing, \ - javax.xml.xpath, \ - org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ - org.w3c.dom, \ - org.w3c.dom.bootstrap, \ - org.w3c.dom.css, \ - org.w3c.dom.events, \ - org.w3c.dom.html, \ - org.w3c.dom.ls, \ - org.w3c.dom.ranges, \ - org.w3c.dom.stylesheets, \ - org.w3c.dom.traversal, \ - org.w3c.dom.views, \ - org.w3c.dom.xpath, \ - org.xml.sax, \ - org.xml.sax.ext, \ - org.xml.sax.helpers - -# Standard package set. Note that: -# - javax.transaction* is exported with a mandatory attribute -jre-1.7= \ - javax.accessibility, \ -# javax.activation, \ - javax.activity, \ -# javax.annotation;version="1.1", \ - javax.annotation.processing;version="1.1", \ - javax.crypto, \ - javax.crypto.interfaces, \ - javax.crypto.spec, \ - javax.imageio, \ - javax.imageio.event, \ - javax.imageio.metadata, \ - javax.imageio.plugins.bmp, \ - javax.imageio.plugins.jpeg, \ - javax.imageio.spi, \ - javax.imageio.stream, \ -# javax.jws, \ -# javax.jws.soap, \ - javax.lang.model, \ - javax.lang.model.element, \ - javax.lang.model.type, \ - javax.lang.model.util, \ - javax.management, \ - javax.management.loading, \ - javax.management.modelmbean, \ - javax.management.monitor, \ - javax.management.openmbean, \ - javax.management.relation, \ - javax.management.remote, \ - javax.management.remote.rmi, \ - javax.management.timer, \ - javax.naming, \ - javax.naming.directory, \ - javax.naming.event, \ - javax.naming.ldap, \ - javax.naming.spi, \ - javax.net, \ - javax.net.ssl, \ - javax.print, \ - javax.print.attribute, \ - javax.print.attribute.standard, \ - javax.print.event, \ - javax.rmi, \ - javax.rmi.CORBA, \ - javax.rmi.ssl, \ - javax.script, \ - javax.security.auth, \ - javax.security.auth.callback, \ - javax.security.auth.kerberos, \ - javax.security.auth.login, \ - javax.security.auth.spi, \ - javax.security.auth.x500, \ - javax.security.cert, \ - javax.security.sasl, \ - javax.sound.midi, \ - javax.sound.midi.spi, \ - javax.sound.sampled, \ - javax.sound.sampled.spi, \ - javax.sql, \ - javax.sql.rowset, \ - javax.sql.rowset.serial, \ - javax.sql.rowset.spi, \ - javax.swing, \ - javax.swing.border, \ - javax.swing.colorchooser, \ - javax.swing.event, \ - javax.swing.filechooser, \ - javax.swing.plaf, \ - javax.swing.plaf.basic, \ - javax.swing.plaf.metal, \ - javax.swing.plaf.multi, \ - javax.swing.plaf.synth, \ - javax.swing.table, \ - javax.swing.text, \ - javax.swing.text.html, \ - javax.swing.text.html.parser, \ - javax.swing.text.rtf, \ - javax.swing.tree, \ - javax.swing.undo, \ - javax.tools, \ - javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \ - javax.xml, \ -# javax.xml.bind, \ -# javax.xml.bind.annotation, \ -# javax.xml.bind.annotation.adapters, \ -# javax.xml.bind.attachment, \ -# javax.xml.bind.helpers, \ -# javax.xml.bind.util, \ - javax.xml.crypto, \ - javax.xml.crypto.dom, \ - javax.xml.crypto.dsig, \ - javax.xml.crypto.dsig.dom, \ - javax.xml.crypto.dsig.keyinfo, \ - javax.xml.crypto.dsig.spec, \ - javax.xml.datatype, \ - javax.xml.namespace, \ - javax.xml.parsers, \ -# javax.xml.soap, \ -# javax.xml.stream, \ -# javax.xml.stream.events, \ -# javax.xml.stream.util, \ - javax.xml.transform, \ - javax.xml.transform.dom, \ - javax.xml.transform.sax, \ - javax.xml.transform.stax, \ - javax.xml.transform.stream, \ - javax.xml.validation, \ -# javax.xml.ws, \ -# javax.xml.ws.handler, \ -# javax.xml.ws.handler.soap, \ -# javax.xml.ws.http, \ -# javax.xml.ws.soap, \ -# javax.xml.ws.spi, \ - javax.xml.ws.wsaddressing, \ - javax.xml.xpath, \ - org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ - org.w3c.dom, \ - org.w3c.dom.bootstrap, \ - org.w3c.dom.css, \ - org.w3c.dom.events, \ - org.w3c.dom.html, \ - org.w3c.dom.ls, \ - org.w3c.dom.ranges, \ - org.w3c.dom.stylesheets, \ - org.w3c.dom.traversal, \ - org.w3c.dom.views, \ - org.w3c.dom.xpath, \ - org.xml.sax, \ - org.xml.sax.ext, \ - org.xml.sax.helpers diff --git a/pom.xml b/pom.xml index 7252df7e..4e36f837 100644 --- a/pom.xml +++ b/pom.xml @@ -177,8 +177,9 @@ limitations under the License. urlhandler chef feature - itests + feature-labs recipe + itests @@ -191,10 +192,11 @@ limitations under the License. 16.0.1 10.0 3.0 - 4.1.1 - 4.1 + 4.3.4 + 4.3.2 1.1_1 1_1 + 2.0.1 2.1.0-SNAPSHOT ${jclouds.version} 1.11 @@ -209,15 +211,15 @@ limitations under the License. 4.8.2 1.0.7_1 1.0.7 - 2.3.11 + 4.0.8 20100527_1 3.5.9.Final - 4.3.0 + 6.0.0 2.6.0 1.3.5 1.4.0.RC1 1.5.8 - 1.11 + 1.17 2.2.0 1.2.0 ${okhttp.version}_1 @@ -305,7 +307,7 @@ limitations under the License.
org.osgi - org.osgi.compendium + osgi.cmpn ${osgi.version} diff --git a/recipe/pom.xml b/recipe/pom.xml index 73ad13cf..df1c72e2 100644 --- a/recipe/pom.xml +++ b/recipe/pom.xml @@ -51,7 +51,7 @@ limitations under the License. org.osgi - org.osgi.compendium + osgi.cmpn org.apache.jclouds