Commit Graph

2278 Commits

Author SHA1 Message Date
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
Andrew Gaul 4829bbbd2c JCLOUDS-964: S3 multipart copy 2015-10-14 23:17:40 -07: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
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
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 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 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 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
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
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 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
Zack Shoylev 92ccea8c4f Adds a mock test for a much longer token format for Rackspace identity 2015-08-17 18:01:28 -05: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
Andrew Gaul 4f32e863ad JCLOUDS-883: Replace metadata during Swift copy
Previously Swift copy would append metadata instead of replacing it.
2015-08-06 11:26:45 -07:00
Adrian Bravo eafdeb5266 JCLOUDS-967: Chef Client Model update with public key attribute
JCLOUDS-967: Made PubKey nullable and added tests to verify serialization works with and without it
2015-08-05 09:40:28 +02:00
Andrew Gaul d86a6c9ee1 Correct Checkstyle violations 2015-07-31 15:28:25 -07:00
Andrew Gaul 86f47394bf Correct FindBugs violations 2015-07-31 14:53:58 -07:00
Andrew Gaul 98b3105669 Address error-prone errors
Mostly of the form, Collection.size() >= 0.
2015-07-30 15:40:03 -07:00
Arvind Nadendla ba55ab4b12 Fix bug where password information is printed in logs in case of exceptions 2015-07-30 12:16:16 -05:00
Ignasi Barrera 5d30f859aa Fix AWS and EC2 TemplateBuilder live tests 2015-07-29 11:58:19 +02:00
Zack Shoylev 632e0c3f66 Fixes an error caused by not using an assert by @CheckReturnValue. Also see jsr305 2015-07-28 12:01:57 -05:00
Marcus Wanner 35b71c5728 Add awareness of Manila and SHARED_FILESYSTEM openstack projects to keystone 2015-07-27 07:22:43 -05:00
Arvind Nadendla d7c4867752 add os-hypervisors extension for openstack-nova 2015-07-27 07:05:06 -05:00
Ka-Hing Cheung 2c578d7bcb marker should be null when there are no more items 2015-07-21 15:46:58 -07:00
Ignasi Barrera ed1149141d Added missing virtualization types after rebasing on top of 1fe90b0 2015-07-20 18:23:11 +02:00
Alex Heneveld a6aff306e7 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 17:40:07 +02:00
Alex Heneveld 04a4095ca6 indicate virtualization type for all ec2 instance types 2015-07-20 17:40:06 +02:00
Arvind Nadendla a38ee21207 Split availability Zone API to return Basic Info and Detailed info 2015-07-16 13:11:52 -05:00
Zack Shoylev ca3c2622ff Adds missing floating-ip-pool expect test
Fixes broken namespace for the ip pool extension
2015-07-15 16:25:01 +02:00
Zack Shoylev dcba6fe51a Fixes missing @Deprecated annotation 2015-07-15 16:11:12 +02:00
Ka-Hing Cheung ad38e48205 range get of manifest object has no etag 2015-07-14 17:20:14 -07:00
Arvind Nadendla 537f411ebd Adding missing "hosts" field to OpenStack Nova AvailabilityZone 2015-07-14 18:54:40 -05:00
Timur Alperovich e4161a59bb Move tests to test the file system API.
Move the prefix and delimiter tests from BaseContainerLiveTest to
BaseContainerIntegrationTest, as that class is subclassed in
Filesystem integration tests. This will make sure the file system blob
store will not regress.

The ListContainerTest is updated to _not_ use a file separator
character, as that leads to a possible creation of directories.
Instead, "-" is used as the delimiter for the delimiter option tests.
2015-07-14 14:11:34 -07:00
Timur Alperovich fe13b07233 JCLOUDS-929: Implement delimiter support in S3.
Plumb the delimiter option to the S3 API.
2015-07-13 14:34:59 -07:00
Timur Alperovich 6ec11fd6ec JCLOUDS-929: Implement delimiter support in Swift.
The patch adds the delimiter support in the openstack-swift API. As
part of the change, the subdirectory support in results is introduced.
This occurs when a prefix and delimiter options are set and there are
subdirectories present in the listing (i.e. multiple objects under the
same prefix/delimiter). In this case, Swift will return a list of
"subdir" objects (similar to CommonPrefixes in S3), which need to be
treated differently.
2015-07-13 14:34:59 -07:00
Timur Alperovich a29d75a5d1 JCLOUDS-929: Implement generic delimiter support.
The patch adds delimiter option support in the generic blob store
interface. A live integration test is added to verify that jclouds
correctly lists objects separated by a delimiter.
2015-07-13 14:34:58 -07:00
Andrew Bayer 1fe90b03c9 JCLOUDS-961 - Add d2, m4, t2 instance types for EC2 2015-07-13 16:10:58 +02:00
Zack Shoylev 65b7bdf282 Removes CopyObjectException in favor of jclouds-standard blobstore exceptions 2015-07-09 18:28:14 -05:00
Zack Shoylev 6945b04243 Fixes a small test bug on windows 2015-07-08 20:19:33 -05:00
Timur Alperovich 86af0753bf Swift: do not assume only 1 container in tests.
Openstack Swift ContainerApiLiveTest testListWithOptions assumes that
there are no other containers and that ContainerApiLiveTest container
will _always_ be the first container.

The patch changes the behavior of the test to instead pull out the
container from the returned list.
2015-07-07 18:05:20 -07:00
Timur Alperovich 5383148d9e Filesystem: disable directory integration test.
There is no notion of marker blobs in the file system blob store,
which means that when listing results after issuing the
"createDirectory" request, the marker blob will not be in the result
set.
2015-07-07 18:00:32 -07:00