Commit Graph

9952 Commits

Author SHA1 Message Date
Reijhanniel Jearl Campos 5e82bbfa46 JCLOUDS-951: Remove inheritance in ProfitBrick's AutoValue classes 2015-10-27 13:12:23 -05:00
Andrew Gaul 592a4e7cce JCLOUDS-786: Remove legacy swift provider
The modern openstack-swift provider obsoletes this.
2015-10-25 20:39:39 -07:00
Andrew Gaul b4eeb6393a JCLOUDS-790: Remove hpcloud-objectstorage
HP will sunset this service on 31 Jan 2016:

http://h30499.www3.hp.com/t5/Grounded-in-the-Cloud/A-new-model-to-deliver-public-cloud/ba-p/6804409
2015-10-25 20:39:39 -07:00
Nikolay Sokolov 060b66a4f7 Close connection during ExecChannel 2015-10-25 23:02:33 +01:00
Aled Sage 502d96d22b 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:02:31 +01:00
Stuart Hendren ada17d3e47 [elasticstack] fix for incorrect logging message
Was logging when it was present rather than when it had failed to find it.
2015-10-24 21:39:40 -07:00
Ignasi Barrera 4596471bb2 JCLOUDS-1025: Add support for metadata and tags in the ComputeService 2015-10-23 00:18:45 +02:00
Ignasi Barrera 200e0e12ba JCLOUDS-1024: ImageExtension can take snapshots of stopped droplets 2015-10-22 15:53:06 +02:00
Ignasi Barrera 6254526296 JCLOUDS-1023: Fix DigitalOcean getImage() method 2015-10-22 11:13:30 +02:00
Ignasi Barrera 0a27a04888 Added RateLimit exception 2015-10-21 23:12:01 +02:00
Josef Cacek 746038e8b2 [JCLOUDS-1021] Add JavaDoc to cover behavior of repoTags() method in org.jclouds.docker.domain.Image 2015-10-21 17:16:27 +02:00
Josef Cacek 3260fa5803 Add LiveTest to cover loginPort (SSH) customization in Docker. 2015-10-21 16:10:29 +02:00
Josef Cacek f0fc31e299 [JCLOUDS-1020] fix query parameter name in Docker's BuildOptions 2015-10-21 16:10:25 +02:00
Josef Cacek 3342e88f80 [JCLOUDS-1017] add tagImage() method to ImageApi 2015-10-21 16:10:21 +02:00
Josef Cacek 9271c11b67 [JCLOUDS-1010] use a lightweight image as a base for Docker build test 2015-10-21 16:10:18 +02:00
Timur Alperovich 5bbcb8342f JCLOUDS-1008: Add @Encoded to @QueryParam.
Adds support for the @Encoded option for the @QueryParam annotation.
The @Encoded params are not encoded, while all parameters that don't
have it are encoded. The change applies to the @QueryParam annotation
on a single parameter. There is no way to express @Encoded on the list
of parameters and their values in @QueryParams.

The big change is that query parameter encoding is now handled within
the annotation processor, as opposed to relying on the UriBuilder to
perform the encoding. This is required since the UriBuilder does not
have any information about additional annotations associated with each
of the query parameters.

Also, adds unit tests for making sure keys and values are properly
encoded when using the @QueryParams option.
2015-10-21 00:06:23 +02:00
Timur Alperovich 94b3cba6c2 JCLOUDS-1008: Add @Encoded annotation.
Certain providers (e.g. Google Cloud Storage) place tokens that should
be encoded in the request path (e.g. GET
http://<host>/b/<bucket>/o/<object>) and expect them to be
percent-encoded. In the above example a GET request for "foo/bar"
should be translated to http://<host>/b/<bucket>/o/foo%2Fbar.
Currently, there is no way to express this in jclouds, as the entire
request path is encoded exactly once and there is no control over
whether a request parameter should be handled specially. In the
example above, "/" are not encoded in the path and the URL is
submitted as "http://<host>/b/<bucket>/o/foo/bar", which may be wrong.

This patch extends the annotation processor to support @Encoded for
the individual parameters of the request. However, this means that the
entire path is _NOT_ URL encoded. The caller *must* make sure that the
appropriate parameters are encoded -- ones that are marked with the
@Encoded annotation. Parameters not marked with the @Encoded
annotation are URI encoded prior to being added to the path. This
means that "/" characters will also be URI encoded in this case (i.e.
"foo/bar" is turned into "foo%2Fbar").

For the Google Storage provider, we will annotate the parameters that
are going to be pre-encoded (object names) and ensure the provider
encodes them prior to calling the API (separate patch in
jclouds-labs-google).
2015-10-21 00:06:15 +02:00
Andrew Gaul e0c959c212 Pagination for listing LocalBlobStore MPU parts 2015-10-20 14:01:32 -07:00
Ignasi Barrera 01d43f503b JCLOUDS-1014: Make the login port lookup function configurable 2015-10-19 16:14:05 +02:00
Andrew Gaul 4829bbbd2c JCLOUDS-964: S3 multipart copy 2015-10-14 23:17:40 -07:00
Ignasi Barrera 0c1de23a9a Fix line endings. Use Unix line endings everywhere 2015-10-13 17:05:59 +02:00
John McDonnell ef816119b1 AS per JCLOUDS-1012 project and projectId parameters are not supported. This commits adds the 2 parameters to the usage response. 2015-10-13 10:35:13 +02:00
olivierlemasle 99c5b9ace7 Add .gitattributes to avoid line endings issues
Since commit 56e687f497, Linux line endings (LF) are enforced. But on
Windows, a common practice is to set core.autocrlf to 'auto', wich mean
that the local copy of the file has Windows line endings, whereas the
remote copy has Linux line endings (cf. https://help.github.com/articles/dealing-with-line-endings/#platform-windows).

With core.autoclrf=auto, Checkstyle will throw an error because local
files will have Windows line endings.

This setting will set Linux line endings for all text files, except
.cmd files.
2015-10-07 20:43:55 +02:00
John McDonnell c73b82b58b As in JCLOUDS-991 it appears size is missing as a UsageResponse parameter, particularily for Volume usages. This commit adds it into the UsageRecord class. 2015-10-07 20:42:47 +02:00
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