816 Commits

Author SHA1 Message Date
Aled Sage
680ab59316 Fix TemplateOptions.clone; adds RunScriptOptions.copyTo
Previously not all fields of RunScriptOptions were included in copyTo
(e.g. runAsRoot and initScript).

Also options.equals(options.clone()) failed if options.loginPassword
was originally null - in the cloned object, it would be Optional.absent.

Fixes RunScriptOptions.toString, to only say “loginPasswordPresent”
if optional.isPresent().
2016-03-08 21:50:06 +01:00
Ignasi Barrera
28b63e0c40 Next development version 1.9.3-SNAPSHOT 2016-01-12 16:08:02 +01:00
Ignasi Barrera
3b9b981d37 Apache jclouds 1.9.2 release 2016-01-12 16:04:18 +01:00
Nikolay Sokolov
c6f47ca904 Close connection during ExecChannel 2015-10-26 00:12:38 +01:00
Aled Sage
bdbed1ced5 UserAdd: guard groupadd with check if group exists
On SUSE, the “-f” force option is not available for groupadd,
so `groupadd -f wheel` returns exit code 9 if the group already
exists. To avoid this, first check if the group exists.

In normal usage, this doesn’t matter: the script continues with the
next command anyway.

However, if the statements generated by UserAdd or AdminAccess are
used outside of that context (e.g. by code external to jclouds), then
this can cause them to fail.
2015-10-25 22:31:33 +01:00
Yavor Yanchev
c6f2d84611 JCLOUDS-973 Extending the sudo's configuration
- Adding env_reset to the default configuration in /etc/sudoers
- Adding secure_path to the default configuration in /etc/sudoers
- secure_path value is
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2015-10-16 11:13:19 +02:00
Ignasi Barrera
a585440e70 Fix line endings. Use Unix line endings everywhere 2015-10-13 17:07:04 +02:00
Ignasi Barrera
559f7adb6c GCE hardware profiles might not have volumes 2015-09-21 11:03:14 +02:00
Ignasi Barrera
30aca7d833 Next development version 1.9.2-SNAPSHOT 2015-08-02 11:56:20 +02:00
Ignasi Barrera
547f827e18 Apache jclouds 1.9.1 release 2015-08-02 11:52:31 +02:00
Ignasi Barrera
569c07b982 Fix AWS and EC2 TemplateBuilder live tests 2015-07-29 11:58:47 +02:00
Alex Heneveld
cc88d99bb1 add deprecated flag to Hardware and prefer non-deprecated hardware types
deprecated hardware types in EC2 are flagged using this, according to latest AWS advice,
to fix situations where deprecated hardware types would be chosen when a non-deprecated alternative exists.
we also deprecate T2 because it requires a VPC.

also fixes semantics of ImagesToRegionAndIdMap to match the logic used in the TemplateBuilderImpl;
RegionAndName should contain the ID not the ProviderID.  this is only really used in tests so no external impact.
(previously the cache only worked if provider ID matched the non-location segment of the image ID.)
however this does now assert that image id's are in the right format for AWS, as suggested by @nacx.
2015-07-20 23:13:49 +02:00
Zack Shoylev
3445f00a88 Updates live tests and template builder settings for compute 2015-07-14 10:23:08 -05:00
Reijhanniel Jearl Campos
17c51c356e Fix template equals assertion to consider location scope 2015-06-25 15:42:05 +02:00
Ignasi Barrera
6b3aed3c89 Improve image check in the BaseImageExtensionLiveTest 2015-06-15 23:13:17 +02:00
Ignasi Barrera
352644876f Added CoreOS to the OSFamily enum 2015-06-11 10:35:19 +02:00
Svetoslav Neykov
caae63b93e Make home folder globally accessible when creating a user
Certain hardened images will have "umask 0077" set for the root user, making the newly created /home/users folder inaccessible to non-root. This results in a failure when trying to ssh with the new account. Explicitly set permissions to be independent of default umask.
2015-05-13 22:44:18 +02:00
Ignasi Barrera
b8cb9cd35b Properly clone the login credentials 2015-04-08 16:01:30 +02:00
Ignasi Barrera
9c92487c29 Next development version 1.9.1-SNAPSHOT 2015-03-29 22:44:17 +02:00
Ignasi Barrera
bb41ed4341 Apache jclouds 1.9.0 release 2015-03-24 10:35:42 +01:00
Hugo Viejo
b54c788e7c Update setupPublicCurl.sh
Add the fqdn to /etc/hosts file becouse if you only add the hostname then it is posible to lose the fqdn
changed expected script adding  "`hostname -f` "
Added "-s" option to ensure to get the short name
Added "-s" option to ensure search using the short name
2015-03-11 22:51:49 +01:00
Zack Shoylev
07f1fb69a7 Fixes more tests with timing problems 2015-02-18 03:46:37 -06:00
Zack Shoylev
66457ff8f8 fix jclouds live tests failing when a keypair is missing. 2015-02-05 17:00:49 -06:00
Zack Shoylev
c64470e0b1 Fixes flavor and template tests to be more robust. 2015-01-30 15:19:55 -06:00
Aled Sage
bdfd1facb9 JCLOUDS-529: fix aws-ec2 cleanupIncidentalResources
- Some users get a DependencyVioloation, rather than InvalidGroup.InUse,
  when attempting to delete the security group. This caused
  cleanupIncidentalResources to propagate an exception.
- Fixes it by converting this to an IllegalStateException (in same
  way as is done for “InUse”)
- Adds tests (using MockWebServer) for happy-path and for failing
  to delete the security group with each of InUse and DependencyViolation
  responses.
- Adds Timeouts.cleanupIncidentalResources
- Use that timeout in EC2, when retrying the deletion of security group
  on VM deletion (previously hard-coded as 3 seconds).
- Configure that timeout in the tests, so deterministic number of retries
2015-01-30 11:07:25 +01:00
Jeremy Daggett
d3c1e2eab4 Use AutoService to generate service loader metadata 2015-01-09 11:22:12 -08:00
Andrea Turli
9128448de0 add support for recent centos and ubuntu versions 2014-11-19 17:31:42 +01:00
Adrian Cole
278a735272 JCLOUDS-778 Remove OS support tests from TemplateBuilderLiveTest, as people are ignoring failures, 2014-11-17 09:42:06 -08:00
Adrian Cole
6f974f34b5 JCLOUDS-780 Remove vcloud. 2014-11-17 08:18:39 -08:00
Adrian Cole
5641efa0c2 Make TemplateBuilderImplTest less brittle. 2014-10-29 17:01:27 -07:00
Adrian Cole
3980cd791b Revert "JCLOUDS-653: Address Guava 18 deprecations"
This reverts commit 95cfc0d950861e5bc753ee3b0669aa5c59c217e8.

Many conflicts due to duration between above commit and now
2014-10-24 10:45:58 -07:00
Andrew Phillips
024009f211 Updating Javadoc for exclusion CIDR blocks
Follow-up to e5fb0b6
2014-10-12 19:02:34 -04:00
Andrew Phillips
3e082c8945 Minor formatting cleanup
Follow-up to e5fb0b6
2014-10-11 21:44:22 -04:00
Ignasi Barrera
e5fb0b607d Allow to configure CIDR exclusion blocks 2014-10-11 14:04:00 +02:00
Adrian Cole
0a236f59ad JCLOUDS-153 remove IO Executor and usage of it. 2014-10-06 07:56:31 -07:00
Adrian Cole
d190040018 fix checkstyle 2014-10-05 16:16:29 -07:00
Adrian Cole
1a54f0fb09 JCLOUDS-153 Remove deprecated ExecutorService and HttpAsyncClient accessors. 2014-10-05 16:16:28 -07:00
Andrew Gaul
34cfdbe266 Enforce Override annotation via Checkstyle
Also remove bogus inheritDoc on base and static methods.
2014-08-31 19:37:50 -07:00
Andrew Gaul
195998b3b6 Miscellaneous FindBugs fixes 2014-08-30 14:33:10 -07:00
Andrew Gaul
5399cb6877 Avoid unnecessary boxing
Found with FindBugs.
2014-08-30 14:30:47 -07:00
Andrew Gaul
480f0e883d Prevent instantiation of utility classes
Also prevent extension.
2014-08-26 12:23:36 -07:00
Andrew Gaul
967f55c2e4 Enforce type naming via Checkstyle 2014-08-26 11:29:25 -07:00
Andrew Gaul
9c2c2e0c44 Remove spurious whitespace
Also remove spurious unary operator plus.
2014-08-26 11:15:55 -07:00
Jeremy Daggett
e711275fb1 Prefer isEmpty() for collections rather than size() 2014-08-20 11:07:48 -07:00
Stuart Hendren
f3778b6cbd JCLOUDS-661: Adding a test for single-port firewall rules 2014-08-14 12:49:06 -04:00
Andrew Gaul
95cfc0d950 JCLOUDS-653: Address Guava 18 deprecations
Mostly renaming Objects.toStringHelper to MoreObjects.toStringHelper.
2014-08-08 11:12:21 -07:00
Andrew Gaul
59462747e7 Reset StringBuilder instead of creating new ones
This avoids unneeded garbage, especially during XML parsing.  Replaced
with:

find -name \*.java | xargs sed -i 's/^\( *[^ ]*\) = new StringBuilder();$/\1.setLength(0);/'
2014-08-06 11:22:49 -07:00
Andrew Phillips
e3d9851216 Up to 2.0.0-SNAPSHOT after the 1.8.0 release 2014-08-05 09:10:24 +02:00
Aled Sage
1fb286809e JCLOUDS-549: Fix NPE in LoginCredentials.toString
- also deprecates LoginCredentails.get(Password|PrivateKey)
- use getOptionalPassword and getOptionalPrivateKey instead
2014-07-18 14:09:18 +01:00
Andrew Gaul
fb60d76704 JCLOUDS-622: Remove most vestiges of InputSupplier
Guava 16 deprecated InputSupplier and a future release will remove it.
2014-07-16 16:07:59 -07:00