'openstack object save' is critically slow to download big objects. While
we 'stream' (chunked download) the data, the default chunks_size
is 1 byte [1], which is terribly inefficient.
[1] : http://docs.python-requests.org/en/master/api/#requests.Response.iter_content
Closes-Bug: 1654645
Change-Id: I2223e5897346acd2f2c1fae638d1193cff833c19
Option "--name" can be used to set as the object name of
the file to be uploaded in the container. Similar to option
"--object-name" in command "swift upload". Added unit test case
to ensure an exception is raised when using option "--name" for
uploading multiple objects.
Change-Id: Ied7827841f6ca1cf9d4b48e304cbe5d62eda38ab
Closes-Bug: #1607972
six.moves.urllib already covers the py2 and py3 compatibility issues
of urlparse module, use six.moves.urllib.parse.urlparse is enough.
Change-Id: I785f4f872850e5d770fdcf4c0d3392be3978cc4a
All dict.iteritems in osc are replaced with six.iteritems
except this one.
So fix it to add py3 compatibility.
Change-Id: I1aa51399a36e650d262d839ce2b4ec04d3f91db2
`dict.get()` returns `None` by default, if a key wasn't found.
Removing `None` as second argument to avoid redundancy.
Change-Id: Ia82f7469cd019509bbeccbfe54b15eeedc7bb6ea
sometimes properties within object store concepts are stored with
mixed case depending on the client used to store said properties.
when retrieving properties to 'show' the user, always call lower()
on the property in question when comparing it to the reserved
values of the swift API.
Change-Id: I97ffc715788ca3cd021413124b6945a399465c99
Closes-Bug: 1525805
skip properties that are non-ascii values, but proceed
with properties that work. log these failed values back
to the user.
Change-Id: Iaca8909f4465a01c8aebfd290b1a322823702359
Closes-Bug: 1503898
1) Change metadata to appear under a common 'properties' key, and
use the utility to format them, this applied to object, account
and container.
2) Clean up container and object output, which were setting the
x-container-meta-owner property, but this is metadata only for
the container, so it's pointless to have, removed it.
3) Container show was showing read/write ACLs and sync stuff, but
these are not being returned by my swift by default, so I moved
these to be checks, so we don't clutter the output.
Change-Id: Ife7521fe9c2724035b06963c118bd6016ba2f5b5
add docs and command support to set and unset metadata of objects
that are stored in an object store (swift).
Closes-Bug: #1501945
Change-Id: If838a4b3343b6ddb97cd4bd1cb63f0ba1c1a00a1
use a common function to determine account ID instead of different
ways - depending on the response and command
Change-Id: I95adc5dc7d5a82a2cffc570d1ded24d1fc754a11
add the command `openstack account show` that lists details
about the object store account that the user authenticated
against.
Partial-Bug: #1501943
Change-Id: I1246dafee812b63a41d43be4e3598224364a2c11
this patch adds support for creating/updating and removing
properties (nee: metadata) for object store accounts.
Partial-Bug: #1501943
Change-Id: I3ed70a5d8bd8920fedb79adc60cdc602261d5eef
* Switch to use io.open() for py3 compatibility and simpler testing.
* Open files in 'rb' mode to avoid translation on Windows
Previously tests simply relied on files that were present in the
repository to run tests using open(). Change the filenames to ensure
that no longer happens.
requests_mock doesn't have a way to match against the request body for
PUT/POST; an attempt to add a new Matcher to do that worked but it
needs to subclass the currently private adapter._Matcher class or
duplicate most of its functionality.
Change-Id: I8c30b41db20af8ecafe67e760e872fc08adec905
1) Can't create instance of swiftclient. Since we now create
an API instance, creating a swiftclient instance won't work.
Trying to do any object related command fails.
2) Listing objects in a container fails, we depend on the
data returned in a specific way, during the API transition
this must have slipped through.
Needs regression/funcitonal tests to mame sure this doesn't
happen again.
Change-Id: I69079a0dc9f32b84e6f9307729d3dbbba549ac5e
api.object_store.APIv1 now contains the formerly top-level functions
implementing the object-store REST client. This replaces the old-style
ObjectClientv1 that is no longer necessary.
Change-Id: I7d8fea326b214481e7d6b24119bd41777c6aa968