Commit Graph

289 Commits

Author SHA1 Message Date
Nikolay Sokolov 060b66a4f7 Close connection during ExecChannel 2015-10-25 23:02:33 +01:00
Oliver Gondža edde721937 JCLOUDS-962: Make all @Provider methods final 2015-09-02 23:54:44 +02:00
Stuart Hendren 4f649b43f4 JCLOUDS-827: Upgrading sshj to 0.12.0 (new group ID too)
Also upgraded jsch.agentproxy.* to 0.0.9 and bouncycastle
to 1.51 - required for the sshj change.
2015-08-12 13:47:41 -04:00
Ignasi Barrera 8859eaeb68 JCLOUDS-921 prioritise key over password in SessionConnection 2015-06-11 13:48:25 +02:00
Stuart Hendren f6a97139c9 JCLOUDS-921 prioritise key over password in SSHClientConnection
From ticket:
If keyboard interactive login is not allowed on the box but the user also requires a sudo password the ssh fails as it prioritises the password.
If you remove the password then the sudo fails in the SudoAwareInitManager.
It would seem better to prioritise the key over the password in SSHClientConnection or possibly try both if they are both present, and the first fails.

This commit swaps the order of the if else check to use the ssh key if present.
2015-06-11 13:48:19 +02:00
Huy TA f646b84c9e Use ssh agent if privatekey and password are not set 2015-06-11 12:37:06 +02:00
Andrew Phillips 7f38520314 JCLOUDS-884: Only try netcat over ssh-agent as an agentproxy
See http://markmail.org/thread/oto47qk2kzcdtebb
2015-04-09 09:48:40 -04:00
Ignasi Barrera f469cf8b51 Next development version 2.0.0-SNAPSHOT 2015-03-24 10:52:01 +01:00
Ignasi Barrera bb41ed4341 Apache jclouds 1.9.0 release 2015-03-24 10:35:42 +01:00
Jeremy Daggett d3c1e2eab4 Use AutoService to generate service loader metadata 2015-01-09 11:22:12 -08:00
Ignasi Barrera 958d09ecbd JCLOUDS-753: Make ConnectionSpec configurable in the OkHttp driver 2014-12-02 18:17:17 +01:00
Ignasi Barrera 902f1b4105 JCLOUDS-744: Upgrade to OkHttp 2.1.0 and use its native API 2014-11-27 18:44:08 +01:00
Adrian Cole 0012e6f950 JCLOUDS-534 Avoid runtime incompatibility introduced by Guava's closeQuietly. 2014-10-29 17:01:26 -07:00
Adrian Cole 1702bddffa Revert "Replace uses of ByteArrayPayload"
This reverts commit bd5b6853ee.
2014-10-29 10:20:38 -07:00
Andrew Phillips 58bd4da793 Cleaning up jsch dependencies
- Moving jsch dep to the driver
- Updating jsch.agentproxy version in conflicting dep list
  Follow-up to b3882cb
2014-10-28 23:15:39 -04:00
Adrian Cole 3980cd791b Revert "JCLOUDS-653: Address Guava 18 deprecations"
This reverts commit 95cfc0d950.

Many conflicts due to duration between above commit and now
2014-10-24 10:45:58 -07:00
Andrew Phillips ad66752811 Minor code cleanup in Apache HC config module
* Renaming provider
* Removing duplicate code
2014-10-21 09:40:46 -04:00
Andrew Phillips b3882cbfed Updating jsch.agentproxy 0.0.7 -> 0.0.8
New version uses net.java.dev.jna:jna 4.1.0. The old version uses 3.4.0,
which is only LGPL-licensed.
2014-10-18 16:23:18 -04:00
Adrian Cole d735a9fa21 JCLOUDS-40 clear remaining references to Async. 2014-10-12 09:05:35 -07:00
Andrew Phillips 53fc568743 Using net.java.dev.jna:jna 4.0.0 for jsch.agentproxy
The default version 3.4.0 is only LGPL-licensed.

This commit can be reverted once SMX4-1859 is published and we can
update to 0.0.8 agentproxy versions.
2014-10-06 18:26:24 -04:00
Adrian Cole 0a236f59ad JCLOUDS-153 remove IO Executor and usage of it. 2014-10-06 07:56:31 -07:00
Adrian Cole 9d77a06a5f JCLOUDS-40 one last Async reference in GAE driver. 2014-10-05 22:32:37 -07:00
Andrew Gaul dc3011469b Prefer Charsets.UTF_8 over string literal
Found with modernizer-maven-plugin.
2014-09-20 18:31:24 -07:00
Andrew Gaul bd5b6853ee Replace uses of ByteArrayPayload
Prefer ByteSourcePayload which offers a superset of its functionality.
Note that ByteArrayPayload implicitly set the contentLength while
users of ByteSourcePayload must do so explicitly.
2014-09-07 07:43:14 -07:00
Andrew Gaul 0b89b1fd10 Ensure that Content-MD5 has 128 bits
Update many tests Content-MD5 headers and ETag responses.
2014-09-04 16:57:48 -07:00
Andrew Gaul 74fb8f0183 Add whitespace after semicolons
Also correct some bad line-wrapping.
2014-08-26 11:06:00 -07: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 Phillips e3d9851216 Up to 2.0.0-SNAPSHOT after the 1.8.0 release 2014-08-05 09:10:24 +02:00
Andrew Phillips eba727fef7 'iso8601DateParseWithOptionalTZ' -> 'iso8601DateOrSecondsDateParse' in DateService
Follow-up to d57bbebe
2014-07-28 12:20:49 -04:00
Shri Javadekar d57bbebe7e Try iso8601SecondsDateParse if iso8601DateParse fails.
S3 compatible blobStores sometimes return date in the format:
"2014-07-23T20:53:17+0000" instead of the more common
"2014-07-23T18:09:39.944Z". This caused jclouds to barf with an
IllegalArgumentException.

This commit tries to parse both the formats for S3. The exception
is thrown if both fail.

Added unit tests for the same.
2014-07-26 22:19:54 -07:00
Jeremy Daggett 957f6f16c7 JCLOUDS-567: Upgrade Apache HttpClient to 4.3.4 2014-07-24 08:40:12 -07: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
Andrew Gaul 086fb9c728 JCLOUDS-629: SshjSshClient Payload without length
sshj treats -1 as an unknown length and uses a less efficient copying
mechanism.
2014-07-15 13:11:37 -07:00
Andrew Gaul a8b106c2bb JCLOUDS-622: remove calls to InputSupplier methods
Guava 16 deprecated these methods and Guava 18 will remove them.
2014-07-15 03:09:58 -07:00
Tom Manville afc0ca557d JCLOUDS-417: Remove ConsumeOnCloseInputStream
ConsumeOnCloseInputStream can potentially perform a copy in finalize()
if the stream was not closed properly.
2014-07-10 20:59:09 -07:00
Andrew Gaul 9cdd53b0b7 JCLOUDS-546: Remove Javadoc @author annotations
Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'
2014-06-07 21:44:54 -07:00
Andrew Gaul bae4377dca Prefer File.delete over File.deleteOnExit
The former has deterministic behavior and avoids resource leaks.
2014-05-23 16:17:10 -07:00
Andrew Gaul 8d51ad6f87 Prefer Guava HttpHeaders over JAX-RS
jclouds code contains more instances of the former and Guava has
additional constants like CONTENT_MD5.
2014-05-15 01:55:51 -07:00
Andrew Gaul 67c2b5f6b9 Enable whitespace around Checkstyle rule 2014-05-08 18:31:47 -07:00
Andrew Gaul 2d88f5164e Enforce that all commas have trailing whitespace 2014-05-08 18:28:08 -07:00
Ignasi Barrera aef9fc8d83 JCLOUDS-561: Properly populate the ssh agent connection in the builder methods 2014-05-08 08:52:58 +02:00
Pasi Niemi 85a1a8c1dd JCLOUDS-516: Add ssh agent support via sch agentproxy 2014-03-27 09:04:34 +01:00
Andrew Gaul d7e0b3b10c Remove WriteTo
Guava helpers capture this functionality in a more idiomatic way.
2014-02-21 17:13:31 -08:00
Andrew Phillips 4330eaec57 JCLOUDS-452: Adding bcpkix to the jclouds-sshj driver. Required by sshj.
Thanks to Andrea Turli and Ignasi Barrera for research and testing!
2014-02-05 17:02:15 +00:00
Andrew Phillips 32a2a7c59b JCLOUDS-440: Upgrading Bouncy Castle to 1.49 (1.50 has issues with OSGi)
Artifact ID has also changed: bcprov-jdk16 -> bcprov-ext-jdk15on
2014-01-29 18:41:33 -05:00
Ignasi Barrera 09a430744a Added OkHttp driver to support modern HTTP verbs 2014-01-13 10:47:39 +01:00
Andrew Gaul c7b0f66544 Replace calls to Closeables.closeQuietly
Guava 16 removes this API.  Replace with Closeables2.closeQuietly.
References JCLOUDS-413 and JCLOUDS-415.
2013-12-21 12:30:59 -08:00
Andrew Bayer c1ee11d9bd Updating to 1.8.0-SNAPSHOT 2013-12-17 11:31:56 -08:00
Andrew Gaul f3dcd3fe86 JCLOUDS-410. Deprecate Payload.getInput
We plan to transition Payload to ByteSource in the next major release.
Unfortunately Payload.getInput masks its checked exception and
ByteSource.getInput is final so we cannot continue to mask the
exceptions.  Deprecation of getInput and addition openStream allows us
to transition callers from the former to the latter.
2013-12-16 13:02:37 -08:00
Andrew Gaul ac1f05ffac Remove unneeded calls to ByteSources.asByteSource 2013-12-15 22:57:32 -08:00
Andrew Gaul 0398276be3 Remove redundant imports
Also enforce no new ones via Checkstyle
2013-12-12 18:23:43 -08:00
Andrew Gaul 828d8790c2 Enforce no unused imports via Checkstyle
Removed with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done
2013-12-11 17:27:43 -08:00
Andrew Gaul 4cef85d1cd Address Checkstyle violations in tests 2013-12-09 14:40:07 -08:00
Andrew Gaul 17ce72794c Enable RedundantModifier for Checkstyle 2013-10-31 10:23:30 -07:00
Andrew Gaul f1fc63ab76 Add whitespace around keywords and braces 2013-09-30 09:39:29 -07:00
adriancole ed2f18a1af JCLOUDS-31. updated to ASF headers via mvn com.mycila.maven-license-plugin:maven-license-plugin:format 2013-05-16 21:30:37 -07:00
adriancole fa10fc4838 JCLOUDS-31. remove malformed, duplicate, or unnecessary headers 2013-05-16 21:30:32 -07:00
Andrew Bayer 7923009eb5 JCLOUDS-37. Fix RAT violations in incubator-jclouds, master branch 2013-05-13 19:17:50 -07:00
Andrew Bayer 446ac67884 JCLOUDS-30. Switch to 2 space indents for POM files. 2013-05-13 12:04:43 -07:00
Andrew Bayer 259b04ff1c JCLOUDS-16. Switch groupId to org.apache.jclouds, change parent POM, remove old distributionManagement content, add ASF repos. 2013-05-13 12:04:42 -07:00
Andrew Gaul fff2fa6e05 Address Checkstyle violations
This commit requires temporarily disabling some checks.
2013-04-17 16:21:21 -07:00
Andrew Gaul 04fad88fd3 Remove duplicate Utils getters
Rename callers as required.
2013-04-12 16:24:37 -07:00
Adrian Cole fb69ae0fa9 bump master to 1.7.0-SNAPSHOT 2013-03-08 23:02:40 -08:00
adriancole c31145e42e [maven-release-plugin] prepare for next development iteration 2013-03-04 06:13:59 -08:00
adriancole 0eb3ee8091 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.4 2013-03-04 06:13:57 -08:00
Adrian Cole fd42b450af Merge pull request #1349 from barakm/bouncy-test
Test decryption with bouncy castle crypto module.
2013-02-26 09:34:11 -08:00
barakm 6688f5aa30 override bRSA algorithm identifier with string the BouncyCastle expects 2013-02-26 12:46:27 +02:00
barakm 1d3ee50aad Test decryption with bouncy castle crypto module. 2013-02-24 00:41:41 +02:00
Andrew Gaul 1f995879d6 Address FindBugs errors 2013-02-22 20:59:29 -08:00
adriancole 89fda8ee28 [maven-release-plugin] prepare for next development iteration 2013-02-04 17:30:46 -08:00
adriancole 2b0ad28f26 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.2 2013-02-04 17:30:44 -08:00
adriancole 267069755e [maven-release-plugin] prepare for next development iteration 2013-02-02 08:41:53 -08:00
adriancole 7c924b312f [maven-release-plugin] prepare release jclouds-1.6.0-alpha.1 2013-02-02 08:41:51 -08:00
Adrian Cole ecbf2b1808 rollback bouncycastle 1.47 as we aren't using it and it causes havok in maven 2013-01-31 18:54:24 -08:00
adriancole 40d9f8bfe7 changes that facilitate synchronous fallbacks and http invocation 2013-01-29 04:09:45 -08:00
Andrew Gaul af963df92d Use Map.entrySet where possible
Improves run-time efficiency and addresses FindBugs warnings.
2013-01-21 23:59:42 -08:00
Adrian Cole 3afdc3550e add support for jsch proxy 2013-01-19 20:06:18 -08:00
Adrian Cole c5e3b24d3e decoupled ProxyConfig and introduced PROPERTY_PROXY_TYPE 2013-01-19 20:06:18 -08:00
adriancole dc4ca1efbd removed deprecated methods which were easy to do 2013-01-19 08:32:45 -08:00
Adrian Cole 3ac6f475e7 unwound dependencies relating to ssh keys and crypt 2013-01-13 20:53:59 -08:00
Adrian Cole 3962b30808 updated to use standard guava Futures and ListenableFuture 2013-01-13 09:31:10 -08:00
Adrian Cole 547f574eea got rid of custom MoreExecutors.sameThreadExecutor 2013-01-12 15:47:58 -08:00
Adrian Cole afc070ac07 First wave of RestAnnotationParser refactoring introduces Invokable, removes SeedAnnotationCache and associated race conditions 2013-01-04 13:51:46 -08:00
Adrian Cole 42c7037a59 removed unused code or duplicated code; moved code only used once to where its used 2013-01-01 00:08:34 -08:00
Adrian Cole bb953c981e fix issue #1101: Move to Guava 14 BaseEncoding and Hashing 2012-12-31 14:48:31 -08:00
Adrian Cole cddd35bc51 removed unnecessary generic types and made RestAnnotationProcessor immutable 2012-12-30 23:18:59 -08:00
Andrea Turli ac0e5f5e67 added support for vbox 4.2.6;
added hostname support;
added generic md5 support;
dralves`s comments addressed
adrian`s comments addressed
dralver`s comments addressed
second round of comments addressed
fix CreateAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest
formatting
swept check*
updated jclouds-sshj pom.xml with latest bouncycastle version
2012-12-31 01:33:43 +01:00
Adrian Cole 023b549e20 Remove explicit dependency on bouncycastle for PEM parsing 2012-12-28 23:11:42 -08:00
Adrian Cole 207b3db41f remove dependency on bcpkix-jdk15on 2012-12-27 23:23:28 -08:00
Adrian Cole e5e26e223d update to latest version of bouncycastle including moving off deprecated stuff 2012-12-20 12:04:32 -08:00
Adrian Cole b8eb49f0a9 added rfc822 + iso8601Seconds to DateCodecFactory and simplified ctor 2012-12-09 02:47:09 -08:00
Adrian Cole 1a0e0e3594 cleaned up clutter in base http tests and converted known failures to skip exceptions 2012-12-01 14:01:18 -08:00
Adrian Cole 1b1bb39deb ensure UTC can be used where GMT is 2012-11-27 11:22:28 -08:00
Adrian Cole 878ec1bcab undid Serializable and added checkstyle InterfaceIsType:allowMarkerInterfaces=false 2012-11-18 09:23:44 -08:00
Andrew Gaul 3ad36d25d5 Enforce no unnecessary parentheses via Checkstyle 2012-11-10 13:22:12 -08:00
Andrew Gaul 3d191253ec Enforce use of Collection helpers via Checkstyle
This ensures that we do not repeat the type name.  Some instances remain
due to auto-generated code in dmtf/cim/Cim*.
2012-11-04 20:45:49 -08:00
Adrian Cole 14c056a077 Merge pull request #944 from andrewgaul/sshj-remove-commons-io
Remove commons-io dependency from sshj
2012-11-04 07:30:29 -08:00
Andrew Gaul 981b0d047f Remove commons-io dependency from jsch
FilterInputStream suffices since we only override close and we can get
away with using java.io.ByteArrayOutputStream.
2012-11-03 10:29:48 -07:00
Andrew Gaul f94ee03626 Remove commons-io dependency from sshj
FilterInputStream suffices since we only override close.
2012-11-02 16:07:36 -07:00