Commit Graph

9878 Commits

Author SHA1 Message Date
Andrew Kennedy cf0e659ccf Add new Softlayer API method to return arbitrary VirtualGuest fields 2015-10-07 20:40:51 +02:00
Stuart Hendren c3f1775123 Adding elastichosts Dallas and Miami providers 2015-10-07 20:39:36 +02:00
googlielmo 8ca3a326c8 Fix dnsSearch type
- dnsSearch declared as String, corrected to List<String>
2015-10-05 12:36:43 +02:00
Josef Cacek f6ad2cc380 [JCLOUDS-1007] Implemented Docker Exec support in MiscApi 2015-10-02 16:29:50 +02:00
Josef Cacek d7b3f5d98f [JCLOUDS-1011] force closing HTTP client connection after using Docker build REST API method 2015-10-02 15:58:42 +02:00
Ignasi Barrera 07e64a2d07 Allow to globally configure the 'Connection: close' header 2015-10-02 15:44:24 +02:00
Andrew Gaul f832ad00a7 Upgrade to error-prone 2.0.5
Release notes:

https://groups.google.com/forum/#!topic/error-prone-announce/vHvZx2MOpvg
2015-09-28 19:57:41 -07:00
Josef Cacek 288d387610 Format code of DockerUntrustedSSLContextSupplier to fit jclouds code conventions and checkstyle settings 2015-09-28 11:20:30 +02:00
Josef Cacek 4e308868bd [JCLOUDS-1006] Fix DockerUntrustedSSLContextSupplier to allow tests runs against endpoints without TLS configured 2015-09-28 11:19:02 +02:00
Stuart Hendren 26df7e3c9e Fix for Go2Cloud provider endpoint
See JCLOUDS-1004 - Update the Go2Cloud endpoint

https://issues.apache.org/jira/browse/JCLOUDS-1004
2015-09-23 12:31:38 +02:00
Ignasi Barrera ed425c202a Remove accidentally committed file 2015-09-21 23:22:29 +02:00
Michael Wilson 962980cd9d JCLOUDS-1001. Add preemptible support to the Google Compute provider.
The Google Compute provider should support preemptible instances.
2015-09-21 22:17:18 +02:00
Josef Cacek e21767dbde JCLOUDS-997 Allow nullable docker configuration - the null has another meaning than empty list/map (e.g. CMD: null=default, emptyList=no-command) 2015-09-18 10:28:37 +02:00
Ignasi Barrera 042222b647 GCE hardware profiles might not have volumes 2015-09-18 10:05:34 +02:00
Timur Alperovich f8eff7e00e JCLOUDS-217: AWS-S3: Remove special encoding.
AWS-S3 provider should not pre-encode parameters that are passed to
the jclouds request. This comes up in the AWSS3BlobRequestSigner as
the only place where a parameter is pre-encoded.
2015-09-17 13:08:44 -07:00
Timur Alperovich 2c2b498066 JCLOUDS-217: Old Swift should encode blob names.
When constructing the URI from the blob names, the deprecated Swift
provider should encode the blob names.
2015-09-17 13:08:44 -07:00
Timur Alperovich 7151a3875b JCLOUDS-217: Cloudstack: avoid encoded strings.
jclouds should not use encoded strings in tests for Cloudstack.
2015-09-17 13:08:44 -07:00
Timur Alperovich 075c912d87 JCLOUDS-217: Do not decode query strings.
jclouds should not decode query strings that are passed to create HTTP
requests. This is problematic because in some cases a wrong request
may be generated. The most obvious example is if one passes the "+"
character. For example, the following query parameter: "users=me+you"
is stored by the URI builder as "me you" and subsequently appears in
the request as "users=me%20you", as opposed to "users=me%2Byou" (%2b
is percent encoding for "+").

This is not currently a problem because jclouds relies on the
isUrlEncoded() method to check if a query parameter should be decoded
and the situation above is avoided.

This PR attempts to suggest an alternative (and what I believe is
simpler) approach: on the path of crafting requests, jclouds should
only *encode*, not decode strings. Specifically, jclouds should
_never_ be in a situation where it relies on the isUrlEncoded()
method.
2015-09-17 13:08:44 -07:00
Andrew Kennedy 3901403379 Added ExtraHosts option to template 2015-09-17 14:48:30 +02:00
Josef Cacek 15651822be JCLOUDS-996 fix location of NetworkMode parameter from Docker Remote API and make it configurable from DockerTemplateOptions 2015-09-17 12:01:34 +02:00
Timur Alperovich 4bc4564900 Skip broken Azure test. 2015-09-11 14:27:24 -07:00
Timur Alperovich 85357cf92a JCLOUDS-217: Filesystem: avoid trailing spaces.
On Windows, we need to avoid trailing spaces, as the test fails to
create the required blob. Specifically, we should not test blobs named
" " and "%20 ".
2015-09-08 15:19:03 -07:00
Timur Alperovich cbea1b64ef JCLOUDS-217: AWS EC2: Do not use encoded params.
AWS EC2 tests should not pre-encode HTTP parameters.
2015-09-08 15:19:03 -07:00
Timur Alperovich f7370d2b12 JCLOUDS-217: Nova: do encode form parameters.
OpenStack Nova tests should not pre-encode parameters before passing
them to generate the HTTP requests, as they end up encoded twice.
2015-09-08 15:19:03 -07:00
Timur Alperovich 9b15fdfde8 JCLOUDS-217: SQS: Do not encode parameters.
SQS API tests should not encode parameters when constructing the
expected HTTP requests.
2015-09-08 15:19:03 -07:00
Timur Alperovich d70127f126 JCLOUDS-217: EC2: Do not encode form parameters.
EC2 tests should not pre-encode form parameters when constructing the
expected HTTP responses.
2015-09-08 15:19:03 -07:00
Timur Alperovich b87ca1b33a JCLOUDS-217: CloudStack do not encode parameters.
Parameters when creating an HTTP request should not be encoded in the
CloudStack tests, as they end up being doubly encoded.
2015-09-08 15:19:03 -07:00
Timur Alperovich 6df2233867 JCLOUDS-217: Do not encode strings in STS tests.
When constructing the expected HTTP requests in STS tests, STS API
should not pre-encode the strings. The form parameters are already
encoded and are otherwise encoded twice.
2015-09-08 15:19:02 -07:00
Timur Alperovich cdabc59ad8 JCLOUDS-217: Azure: Handle blobs with % correctly.
When constructing a URI path for a blob in the listing results, the
Azure provider should re-encode any "bad" characters. Azure provider
also should not call trim() on the blob name, as that will remove any
leading or trailing space characters (which the provider supports). In
fact, the trim() call is only required because of the fact that when
parsing the XML document in the Azure tests, the white space between
the tags was also included in the values. Changing when the character
array is reset eliminates the need to do so.
2015-09-08 15:19:02 -07:00
Timur Alperovich a0b95ea7a3 JCLOUDS-217: Fix encoding handling in S3.
When constructing the query path, S3 does not properly handle encoded
paths. For example, if a blob named %20 is to be placed into the blob
store, S3 would end up placing blob named " " (what %20 represents).
This occurs because the S3 provider examines the URI's path portion
(which is presented in a decoded fasion to the caller). After
examining the path, it is not encoded again. Instead, we should call
getRawPath() to avoid this issue.

There are two issues on the decoding path:
1. Given a blob named " ", S3 API will throw a RuntimeException due to
a NULL check -- the key that it uses is NULL to represent the XML
content " " corresponding to the blob name.
2. Given a blob named "%20 ", S3 API will generate a URI for a blob
named "%20%20", which is also incorrect. The correct URI would be
"%2520%20" (escaping the first "%" and " " characters).

The first issue is due to the currentOrNull() helper, which calls
trim() on the string and then compares the string to an empty string.
This means that a blob named " " will be parsed as "" and then
converted to NULL as the result of that method. Passing "null" as the
key then fails in a number of places (notably, appendPath()).

The second issue is due to the appendPath() method in the jclouds Uris
class. The issue here is that appendPath() calls urlDecode() and
passes the result to path(). The path() method, in turn, also calls
urlDecode(). After these transformations, a properly encoded blob of
the form %2520%20 turns into "%20 " and then "  " (two spaces). After
these transformations the path is encoded again, resulting in "%20%20"
(which is wrong).
2015-09-08 15:19:02 -07:00
Timur Alperovich aaa164179c JCLOUDS-217: Percent encoding changes.
jclouds should not check if the string is encoded, but rather expect
that all strings would be encoded prior to transmission. As part of
that change, we must make sure that no code relies on such behavior
within jclouds. This commit adds a blobstore test to check encoding
pattern for blobs. It also removes the encoding check in the Strings2
class and the related test.
2015-09-08 15:12:14 -07:00
Irmo Manie 9be7339c32 JCLOUDS-993 - Add missing parameters to `VirtualMachineApi`
- `serviceOfferingId` at `#changeServiceForVirtualMachine`
- `options` of type `UpdateVirtualMachineOptions` at
  `#updateVirtualMachine`
2015-09-06 23:59:15 +02:00
Irmo Manie 89f81840d2 JCLOUDS-995 - Add `userData` property to `CloudStackTemplateOptions` and map it in the underlying adapter. 2015-09-06 23:58:21 +02:00
Oliver Gondža edde721937 JCLOUDS-962: Make all @Provider methods final 2015-09-02 23:54:44 +02:00
Oliver Gondža 6cd716f1ea JCLOUDS-962: Do not override provider methods 2015-09-02 23:54:44 +02:00
Yavor Yanchev d45f08e82e 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-09-01 00:29:17 +02:00
Nate Rosenblum 496e27f1af Always return ETag from filesystem object store
If the Content-MD5 extended attribute is missing for an object,
recompute it and return as the ETag. Primarily affects OS X.
2015-08-20 14:46:17 -07:00
Timur Alperovich 3757a64abf JCLOUDS-992: LocalBlobStore - use FOLDER for DIR.
Changed the LocalBlobStore to use FOLDER, as opposed to RELATIVE_PATH
when creating directories. Changed the delete keys strategy to treat
FOLDER blobs as regular blobs.
2015-08-20 12:42:11 -07:00
Timur Alperovich 0c5a3db9df JCLOUDS-992: remove special directory handling. 2015-08-20 12:42:11 -07:00
Timur Alperovich 5fcfcf3afe JCLOUDS-992: Handle directories as blobs in HPCS. 2015-08-20 12:42:11 -07:00
Timur Alperovich 04ba8905f8 JCLOUDS-992: Handle directories as blobs in Azure. 2015-08-20 12:42:11 -07:00
Timur Alperovich 238cc525f9 JCLOUDS-992: Old Swift: treat directories as blobs 2015-08-20 12:42:11 -07:00
Timur Alperovich a2d8dfcb27 JCLOUDS-992: Handle directories as blobs in S3. 2015-08-20 12:42:11 -07:00
Timur Alperovich 2c417c83a6 JCLOUDS-992: Handle directories as blobs in Swift. 2015-08-20 12:42:10 -07:00
Timur Alperovich 42bfeccdfd Remove last marker test from ListContainerMarker.
Azure does not allow arbitrary marker specification and the generic
testListContainerMarker test should not assume that the behavior is
possible. There is already a separate test for such scenario that is
skipped on Azure.
2015-08-19 16:03:33 -07:00
Josef Cacek 644541a2f4 JCLOUDS-990: fix condition DockerTemplateOptions.copyTo() method 2015-08-19 14:15:25 +02:00
Zack Shoylev 92ccea8c4f Adds a mock test for a much longer token format for Rackspace identity 2015-08-17 18:01:28 -05:00
Ignasi Barrera 586e31805a [JCLOUDS-898] Allow insecure connection in Docker.
Original author was @andreaturli and the original patch was #172.
2015-08-14 10:56:07 +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
Andrew Gaul e2b6950462 JCLOUDS-872: Swift copy object and append metadata
The existing method replaces metadata.
2015-08-11 13:26:56 -07:00