Commit Graph

9511 Commits

Author SHA1 Message Date
Andrew Gaul 06e379d7a5 Remove @Nullable from methods returning primitives
Found via error-prone.
2015-12-12 08:53:07 +08:00
Graeme-Miller 75e2c6999c Instead of setting up static NAT for all networks, we setup static NAT for default network only 2015-12-11 16:39:20 +01:00
Andrew Gaul 4abd5dd16f Revert "Delete parts when removing Swift multipart objects"
This reverts commit 3c1588527d.
2015-12-08 10:08:22 +08:00
Josef Cacek 0fb1b459a6 JCLOUDS-1044 fix handling NULL JsonTokens in adapters under NullFilteringTypeAdapterFactories class 2015-12-05 22:45:24 +01:00
Josef Cacek 4d899cacae JCLOUDS-1045 remove swift dependency from allblobstore module 2015-12-03 02:18:22 +01:00
Ignasi Barrera 90423d7b9b Fix filesystem api in OSX 2015-11-24 15:38:10 +01:00
Ignasi Barrera 86dadc3a75 JCLOUDS-1038: Fix date deserialization in EC2 apis 2015-11-24 14:53:18 +01:00
Zack Shoylev 02b79106c3 Fixes tenantId when using the keystone admin extension 2015-11-23 16:03:02 -06:00
Zack Shoylev ab25fc7259 putblob fails when file exists 2015-11-23 16:01:46 -06:00
Ka-Hing Cheung ca70d44143 don't remove directory if it's a blob
the filesystem blob store was always removing a/ when a/b was
removed, even if the client explicitly created a/. this patch
fixes that
2015-11-20 17:27:19 -08:00
Andrew Gaul 2dd231b02b Filter out folders when listing a container
These folders represent directories in the filesystem blobstore which
real blobstores do not have.  Their presence complicates providing the
correct marker for paginated listing.  Future commits will remove
folders entirely.
2015-11-20 16:27:53 -08:00
Andrew Gaul f706d9c13a JCLOUDS-835: Atomically put filesystem blobs
Write to a temporary file and rename to the desired destination to
better match object store semantics.
2015-11-20 14:44:02 -08:00
Andrew Gaul 4ce357ba69 Consistently quote ETags in comparisons
Addresses integration test regression in
25f4807df8.
2015-11-19 19:00:34 -08:00
Andrew Gaul 25f4807df8 Tolerate missing or extra quotes in ETags
References andrewgaul/s3proxy#77.
2015-11-19 17:40:48 -08:00
Andrew Gaul 8d87bfc61b Avoid buffering ByteSource when not needed
This allows range requests of large files to work.  Regression from
79fe91bd03.
2015-11-19 15:10:23 -08:00
Zack Shoylev 2efcb2c5a9 Fixes a windows locale bug with the "Everyone" principal 2015-11-19 11:50:15 -06:00
Andrew Gaul 3c1588527d Delete parts when removing Swift multipart objects
Swift implements multi-part upload with user-visible parts and an
explicit manifest.  When deleting an MPU blob it can delete only the
manifest or both the manifest and parts.  For consistency with other
providers, we now do the latter in the portable abstraction.  Swift
ignores the multipart-manifest=delete parameter for single-part
objects.  Fixes andrewgaul/s3proxy#92.
2015-11-17 23:06:33 -08:00
Andrew Gaul 721a0dbd3c Add support for standard_ia storage class
This enables storage with lower at-rest prices, higher request prices,
and lower availability.  Also rework existing reduced redundancy
parsing into a more generic storage class.  More background on
standard_ia:

https://aws.amazon.com/blogs/aws/aws-storage-update-new-lower-cost-s3-storage-option-glacier-price-reduction/
2015-11-16 14:04:51 -08:00
Andrew Gaul df48540cb7 Enable FindBugs CheckRelaxingNullnessAnnotation
Also fix up warnings.
2015-11-13 17:44:55 -08:00
Andrew Gaul 22c789da9e JCLOUDS-894: Use prefix when listing MPU on Swift
Previously we only used the blob name and not the blob
name/slo/timestamp/part size cookie which yield extra parts when
listing an MPU with parts from a previous MPU.  Listing using the
stricter prefix gives the expected results.
Fixes andrewgaul/s3proxy#91.
2015-11-13 12:15:29 -08:00
Zack Shoylev 41ce90ec36 Fixes tests failing on windows filesystems Makes windows behavior more consistent, especially for deletes 2015-11-11 21:01:13 -06:00
Ignasi Barrera fb63b0ee61 Remove HPCloud from the aggregator poms 2015-11-10 10:17:30 +01:00
Chris Custine 5d82b40d78 JCLOUDS-1026: Remove public HP cloud compute providers
https://issues.apache.org/jira/browse/JCLOUDS-1026
2015-11-09 19:04:59 -07:00
Ignasi Barrera 34f6d6c7f3 Fix aggregator poms 2015-11-08 23:04:21 +01:00
Andrew Gaul 14e566e151 Upgrade to modernizer-maven-plugin 1.4.0
Release notes:

https://github.com/andrewgaul/modernizer-maven-plugin/releases/tag/modernizer-maven-plugin-1.4.0
2015-11-05 17:09:48 -08:00
Ignasi Barrera 667252d9e8 Fix Google Compute Engine live tests 2015-11-03 00:16:40 +01:00
Timur Alperovich 1fc9b0e259 Move QueryParam encoding to a separate class.
The patch implements a QueryValue class, which encodes the underlying
value based on whether the "encoded" flag is set. This class is used
by the RestAnnotationProcessor to propagate the @Encoded value set on
any parameters.

Since the encoding is now handled by the QueryValue instances, we
should no longer call encodeQueryLine() in the URI builder and instead
call buildQueryLine(). The caveat is that we need to make sure all of
the parameters that may need to be encoded are converted to QueryValue
objects. This is done by converting Object instances to QueryValue by
an instance of the TransformObjectToQueryValue when adding any query
parameters to the URI.
2015-11-02 17:11:42 +01:00
Ignasi Barrera 9df30c5a09 JCLOUDS-717: Join Enterprise and OpenSource Chef 2015-10-30 01:02:53 +01:00
Ignasi Barrera c9306c1fc8 Fix a bunch of aws-ec2 live tests 2015-10-29 01:54:09 +01:00
Ignasi Barrera 985d45122b JCLOUDS-987: Create security groups in AWS if subnetId is specified 2015-10-29 01:54:03 +01:00
Ignasi Barrera afd3c322a9 JCLOUDS-1030: Ignore synthetic members in serialization strategies 2015-10-28 23:15:41 +01:00
Ignasi Barrera 0e7283e191 Convert logback.xml to unix format 2015-10-28 23:15:28 +01: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 0a27a04888 Added RateLimit exception 2015-10-21 23:12:01 +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
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
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