Commit Graph

9380 Commits

Author SHA1 Message Date
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
Timur Alperovich 669feb4d0c LocalBlobStore: list marker blobs with delimiters.
When the delimiter option is specified, local blob store should behave
similarly to swift and return the directory marker blobs (directory
blobs) and the common prefix. This undoes the filtering we were
previously doing.
2015-07-07 18:00:31 -07:00
Timur Alperovich 6d27fbb18a JCLOUDS-930: Handle subdir entries correctly.
When listing blobs, Swift returns an array of "subdir" entries for
every common prefix. The openstack-swift provider needs to process
such entries and add them to the result set. The subdir array is an
array of strings, so additional metadata needs to be added to the
objects (bogus ETag, bogus LastModifiedDate, and so on).

When directory marker blobs are used, this means that potential _two_
entries are generated for every directory if:
1. the delimiter is set and matches the directory blob (e.g. dir/ and
   delimiter /)
2. there are objects under the directory name (e.g. dir/blob), which
   will result in results that include common prefixes (subdir)

In the above example, we should expect two results: "dir" and "dir/"
representing the directory marker blob and the common prefix,
respectively.

This is caught in the testDirectory integration test.

The patch changes the behavior of the Swift provider to correctly
handle the results in the subdir stanza and changes the test to expect
the directory marker to be returned in the list.
2015-07-07 17:55:50 -07:00
Andrew Gaul 1c1cfffd5d JCLOUDS-857: remove spurious annotation
Multiple constructors annotated with @SerializedNames confuses
NamingStrategies.translateName and causes failures with newer JDK.
Since the second constructor does not need this annotation we remote
it.
2015-07-07 16:59:58 -07:00
Timur Alperovich 841a184898 Azure Blob: do not filter out prefixes.
We should not filter out prefixes when listing containers, similarly
to the way swift behaves. This makes the marker blobs apparently to
the user.
2015-07-07 16:33:44 -07:00
Timur Alperovich 03248b4c94 JCLOUDS-930: LocalStore -- fixup for prefixes.
When filtering results, we have to consider that a result was added to
the common prefixes list in its entirety (i.e. a directory). Such
results should be filtered out from the delimiter test.

An example that demonstrates this problem is if one creates a
directory "foo" and an object within it called "file". When listing
the results, they will include the directory object "foo" and the
object under "foo/file". During a non-recursive listing, we create a
list of common prefixes ("foo"). Subsequently, jclouds should remove
all objects that include the delimiter ("/"), however, that would not
apply to "foo". With the change to include the delimiter in the
listing, we need to be careful not to return two values "foo" and
"foo/".

A unit test for the local blob store to highlight this problem is
included. An integration test "testDirectory" also catches this issue.
2015-07-07 16:31:04 +02:00
Timur Alperovich 3009da3761 JCLOUDS-930: Expect a trailing "/" in tests.
We should expect a trailing prefix in delimiter tests, as the object
stores will return common prefixes up to and including the delimiter
character.
2015-07-07 16:30:59 +02:00
Timur Alperovich 14087e56bd Relax membership assertion for the prefix test.
Relaxes the membership check in prefix testing. The check is no longer
sensitive to ordering of the results, as different providers may
append, prepend, or insert in sorted order the relative prefixes.
2015-07-06 15:10:29 -07:00
Andrea Turli 82da165fdd [JCLOUDS-956] synchronizing allocateFloatingIPForNode helps 2015-07-03 13:29:54 +02:00
Andrew Gaul 41d598b03f JCLOUDS-894: Skip multipart tests on Atmos 2015-07-02 22:28:42 -07:00
Andrew Gaul bf93cadec6 Use correct default in testPublicAccess
Regression from d57b6e7b8f.
2015-07-02 16:25:49 -07:00
Andrew Gaul bc9cda2e37 JCLOUDS-930: Remove bogus dependsOnMethods 2015-07-02 16:21:03 -07:00
Andrew Gaul d109dd6326 Use prefix instead of marker to list MPU parts 2015-06-30 13:43:01 -07:00
Timur Alperovich aade18b76d JCLOUDS-930: LocalBlobStore -- marker regression.
We should not append a "/" to the marker when returning list results
in the case of directories (RELATIVE_PATH), as the names will already
include the delimiter.

Added a jclouds test to catch such regressions in the local store in
the future.
2015-06-30 08:46:46 -07:00
Timur Alperovich 8c9344b501 JCLOUDS-930: Regression in a File System test.
Fix a regression in the file system blob store, where a test does not
expect the trailing delimiter character.
2015-06-29 21:41:33 -07:00
Andrew Gaul 1dcd4500ea JCLOUDS-930: disable testListDirectoryBlobsS3FS
Regression from 8677ffcb21.
2015-06-29 19:36:20 -07:00
Timur Alperovich 1cb0822972 JCLOUDS-930: Add prefix option to OpenStack Swift.
Plumbs the prefix option to the openstack-swift provider. In the
process, the support for the recursive option is modified to avoid
setting the _path_ parameter, but rather use the delimiter if required
(setting the delimiter is sufficient for a non-recursive listing).
2015-06-29 17:31:56 -07:00
Timur Alperovich c409c19ff3 JCLOUDS-930: Plumb prefix support down to S3.
Plumbs the ListContainerOptions.prefix setting down to the S3 API.
2015-06-29 17:31:56 -07:00
Timur Alperovich 497a013c8a JCLOUDS-930: Plumb prefix support down to Azure.
Plumbs support for the prefix query option in the Azure provider. This
option is not compatible with the "directory" list option and an
exception is thrown if both are set.
2015-06-29 17:31:56 -07:00
Timur Alperovich 8677ffcb21 JCLOUDS-930: Implement prefix for LocalBlobStore.
Implements prefix support for the local blob store. The patch allows
for correctly parsing prefixes that may not terminate with a delimiter
(i.e. foo with delimiter "/" and a key foobar/key, should return
foobar/ as the common path) and ones that do (i.e. foo/).

NOTE: there is a small change in behavior in this patch.
LocalBlobStore used to return the common prefixes without the
delimiter character ("/"). However, other providers do include the
delimiter (I checked S3 and Google Cloud Storage) and LocalBlobStore
should include it as well.
2015-06-29 17:31:55 -07:00
Timur Alperovich db4e4e5ba7 Factor out the common prefixes method.
Refactoring the code in the list() method to create a common
extractCommonPrefixes method.
2015-06-29 17:31:55 -07:00
Timur Alperovich 7c7d2e2df6 JCLOUDS-930: Add the prefix option.
Add a prefix option to the ListContainerOptions class.
2015-06-29 17:31:55 -07:00
Andrea Turli 61b06329d8 create java-xmlbuilder.version property for maven
add java-xmlbuilder to dependencyManagement so downstream project don't need to specify the version
2015-06-29 08:47:54 +02:00
Timur Alperovich e63474a824 JCLOUDS-931: Sleep only after creating containers.
jclouds should issue the requests to create all of the containers in
the container pool before sleeping. The patch modifies the
createContainerAndEnsureEmpty() method to take an additional
parameter, which specifies whether awaitConsistency() should be called
or not.
2015-06-26 14:04:43 -07:00
Andrea Turli aa64e0d3e2 [NOVA] change some access modifiers to simplify the downstream provider impl
modify the BasicAuthenticator in Keystone
destroy node if creation timeouts
2015-06-26 15:05:06 +02:00
Ignasi Barrera 647df25d90 Update Maven coordinates to the promoted naming 2015-06-26 11:32:01 +02:00
Ignasi Barrera 05fb3222bb Promote Google Compute Engine 2015-06-26 11:30:30 +02:00
Zack Shoylev 87b885306b Remove old cloudfiles providers 2015-06-26 02:32:16 -05:00
Andrew Gaul 7787b50067 Enforce no illegal testng imports
Follow on to 46493ed3b5.
2015-06-25 13:34:10 -07:00
Andrew Gaul 46493ed3b5 Avoid using internal testng methods 2015-06-25 11:43:17 -07:00
Reijhanniel Jearl Campos 107c9d0d55 Fix template equals assertion to consider location scope 2015-06-25 14:25:47 +02:00
Andrea Turli b7f27e7f76 [SoftLayer] fix SoftLayerTemplateBuilderLiveTest
add more iso3166Codes
fix DatacenterApiLiveTest
2015-06-25 00:10:45 +02:00
Ka-Hing Cheung 8b325d585e object stores typically sort the list of containers 2015-06-24 15:08:23 -07:00
Andrea Turli 7480d6e363 replace ExpectTests with MockWebServerTests
refactor AccountApiExpectedTest to AccountApiMockTest
refactor DatacenterApiExpectTest to DatacenterApiMockTest
refactor SoftwareDescriptionApiExpectTest to SoftwareDescriptionApiMockTest
refactor VirtualGuestApiExpectTest to VirtualGuestApiMockTest
refactor VirtualGuestBlockDeviceTemplateGroupApiExpectTest to VirtualGuestBlockDeviceTemplateGroupApiMockTest
2015-06-25 00:03:47 +02:00
Andrew Gaul d57b6e7b8f Use correct port in testPublicAccess
Also reduce timeout from 20 minutes to 1.
2015-06-24 14:51:16 -07:00
Ka-Hing Cheung e0bafd4c10 list MPU parts with prefix listing instead of marker
we now use segment conventions that allow us to do more
efficient listing
2015-06-23 20:06:10 -07:00
Andrew Gaul 38fa41d056 JCLOUDS-941: Ignore metadata tests on Mac OS X
Also make testOverwriteBlobMetadata consistent with other tests.
2015-06-22 11:50:20 -07:00
Daniel Broudy 70da397237 Update ComposeObjectTemplate and update MockTests 2015-06-22 09:37:42 -07:00
Iván López 37a014ae00 JCLOUDS-941: Auto-detect filesystem Content-Type
When a filesystem blob does not have content metadata and when users
set jclouds.filesystem.auto-detect-content-type to tru, probe the file
type to return to clients.  This is useful when using jclouds to serve
an existing filesystem.
2015-06-21 22:55:57 -07:00
Ka-Hing Cheung b8b20c16f5 use segment names similar to those created by python-swiftclient
Currently swift creates blob-1, blob-2... blob-n for multipart
upload segments, which are very common names that can easily
collide with normal objects. This changes the naming convention
to that of python-swiftclient (the `swift' command line).

python-swiftclient also uses a different segment container by
default, that's not implemented by this patch
2015-06-19 17:34:40 -07:00
Iván López f155242838 Add missing value in Content-Range header
This is related with #776. It's necessary to add
the 'bytes' string before the bytes.
2015-06-19 08:24:18 +02:00
Andrew Bayer db6f6efaba JCLOUDS-936: Switch to LoadingCache for disk->image 2015-06-18 11:44:11 +02:00
Andrew Gaul 3a410a25a8 Test for Content-Range header in single range get
Also emit this header in LocalBlobStore.
2015-06-17 11:43:17 -07:00
Andrew Gaul 1f7f8c8c86 Refine HTTP 416 into IllegalArgumentException
Providers yield different messages so remove parsing from test.  Also
narrow exception handling scope.TTP 416 into IllegalArgumentException

Providers yield different messages so remove parsing from test.  Also
narrow exception handling scope.
2015-06-16 21:47:30 -07:00
Andrew Bayer f3555cba1b JCLOUDS-934. Add support for specifying boot disk type in compute service 2015-06-15 15:55:03 -07:00
Andrew Gaul b0dfae1092 Use a configurable timeout for awaitConsistency
This allows setting to zero for strongly-consistency implementations
of s3 and swift stores.
2015-06-15 15:45:17 -07:00
Daniel Broudy c1b1cfbbea Add running GoogleComputeEngineTemplateBuilderLiveTest with Json key 2015-06-15 22:44:47 +02:00
Ignasi Barrera 8182f8c4ae Improve image check in the BaseImageExtensionLiveTest 2015-06-15 22:18:07 +02:00