21 Commits

Author SHA1 Message Date
Jenkins
1e82305f18 Merge "Added Server-side filtering for swift UI" 2017-03-29 05:24:49 +00:00
Akihiro Motoki
baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
Luis Daniel Castellanos
277d15abff Added Server-side filtering for swift UI
Added server-side filtering for containers in swift UI using the
magic search directive.

Change-Id: Id0eaa818fab8b2c7d7a0ab40c1a943c2e7342f10
Partial-Implements: blueprint server-side-filtering
2017-02-06 15:28:58 -06:00
Richard Jones
053d0a669e Implement file update (edit) in Swift UI
The ability to update (edit contents of) an object was
never present in the previous Swift UI. It was
explicitly blocked due to code in the swift_upload_object()
function, which has been removed in this patch. To
replace that "upload would replace existing contents"
check, this patch implements a client-side check to warn
the user if the upload would do so.

Partially-Implements: blueprint swift-ui-functionality
Change-Id: I9fb57dda59322907f0661372f9ee223551ff8a6e
2016-08-22 14:47:23 +10:00
Richard Jones
2481d2b1ac Remove memoize that holds connections open
This memoize usage holds on to connection objects for a very long
time, resulting in exhaustion of file descriptors.

Change-Id: If7367819b050a65562b3e05175ab15bd93d0d398
Fixes-Bug: 1584109
2016-05-27 05:55:34 +00:00
Ryan Peters
5693109901 Fixed getting success msg on failing swift operation
Show error message instead of success message when attempting to
create a duplicate object or pseudo-folder. Added tests for
creating and creating duplicate pseudo-folders.

Change-Id: I875d471921d9a37bb6706a17d4fbca5e9428ae93
Closes-Bug: #1478126
2015-07-24 19:27:24 +00:00
Victor Stinner
674a45ffe0 Replace mox with mox3
mox doesn't work on Python 3, whereas mox3 works on Python 2 and Python
3. Cinder, Nova and many other projects already replaced mox with mox3.
mox3 is now maintained by OpenStack.

Partial-Implements: blueprint porting-python3
Change-Id: I10e6a9754ebd58a2640d73ec8966527c3aa1fe9a
2015-07-13 15:02:10 +02:00
Paul Karikh
8201d65cf9 Add missing content-length header
This patch adds missing content-length header
param into swift_upload_object() method.
Without it object upload handling could be failed
with "411 Length Required" error if Ceph is used
as an object storage.

Change-Id: Id0813806abb36a6f015efd13ec987492a3701476
Closes-Bug: #1352256
2015-06-18 09:41:22 +00:00
Timur Sufiev
46405d456d Fix web-server memory overrun when downloading objects from Swift
To prevent memory overrun when downloading large objects from Swift
* `resp_chunk_size` keyword should be passed to swiftclient
* `obj.data` iterator returned from swiftclient is passed to HttpResponse
  (or StreamingHttpResponse for Django>=1.5) as usual since both response
  classes work with iterators/files/byte strings (yet StreamingHttpResponse
  does it better).

The commit introduces new setting SWIFT_FILE_TRANSFER_CHUNK_SIZE that
defines the size of chunk in bytes for Swift objects downloading.

DocImpact

Change-Id: I18e5809b86bfa24948dc642da2a55dffaa1a4ce1
Closes-Bug: #1427819
2015-03-31 14:30:23 -07:00
Akihiro Motoki
69e0d812f2 Reuse API client object in a request
Previously API client object like novaclient are created
every time methods in openstack_dashboard/api.
It leads to regeneration of API HTTP connections.
This commit caches API client object for a WSGI request
to reduce the number of HTTP connection to backends.
As WSGI request object is recreated, a cached API client
object will live in a single request to Horizon.

Change-Id: I66620b3b0a2737c7232d91006e65d0fabbd3090b
Closes-Bug: #1352144
2014-09-17 14:19:10 +09:00
ChenZheng
c7d5371b47 Fix order of arguments in assertEqual
Some tests used incorrect order assertEqual(observed, expected).

The correct order expected by testtools is
assertEqual(expected, observed).

Change-Id: Iabf6e55146412b57b6a6544f312f9510f762566a
Partial-Bug: #1259292
2014-09-01 10:41:52 +08:00
He Yongli
e790ac070e Remove extraneous vim configuration comments
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4

at the top of source code files, except for files in
openstack/common.

Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
2014-05-06 15:30:10 +08:00
Cristian A Sanchez
ccc0f7290f Allows the user to create an object without file
Now the user can create an Object without providing an actual file
in the containers view. This will submit an object with 0 bytes size.
Additionally, the 'Download' button will not be available for objects
with 0 bytes size.

Implements: blueprint metadata-only-object
Change-Id: Ib2ff2462b73d16c971ad0dfc60aaae1b0bbf0924
2013-12-14 11:05:18 -08:00
Lin Hua Cheng
22ab3e0f87 Add ability to configure read access of container
Allow the user to set the container access to private or public.

For public containers, the public URL for accessing it is also provided
to the user.

List containers does not include the metadata of the container. Used ajax
to load the container metadata in the Container table to be able to render
the Container table immediately.

Change-Id: If1e848ad49f522eab8f1b264d54611615481848c
Implements: blueprint swift-container-public-access
2013-12-02 02:00:07 -08:00
Jenkins
510eb5a5fc Merge "Use HEAD when retrieving Container details" 2013-10-14 19:09:28 +00:00
Lin Hua Cheng
22e8f839d1 Use HEAD when retrieving Container details
Change-Id: I0bb41bbf2ec8b0a515aa8a9ee9eba63761a60122
Closes-bug: 1236677
2013-10-08 14:08:38 -07:00
Lin Hua Cheng
2b36515e14 Use HEAD when viewing Object details
GET operation downloads the whole object, replaced the call
with HEAD which already contains the object metadata.

Change-Id: I87e1145d9571013db3dd87c3386d0dd66da3f012
Closes-bug: 1236681
2013-10-08 12:05:14 -07:00
Tatiana Mazur
953d1b9793 Enable H302 check
This patch replaces some method imports with module imports and
makes H302 test enabled.

Fixes bug 1188531

Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
2013-08-22 17:39:09 +04:00
Matthias Runge
cea720e793 Sort imports alphabetically
This patch also re-organizes imports to import one per line.

Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
2013-06-14 12:05:55 +02:00
Akihiro MOTOKI
12faaa5c30 Ensure to use api.<category>.<method>
In the current code both api.<method> and api.<category>.<method> are used.
Using api.<method> directly makes it difficult to identify which module
defined a method and forces developers to use unique method names among
projects. This commit removes api.<method> style method calls.

Change-Id: Iaefa1061f99b7865e02541df87c112a6b2868ec0
2013-01-22 20:37:12 +09:00
Gabriel Hurley
cb8e7c1f8f Splits OpenStack Dashboard bits from framework app code.
Moves everything OpenStack-specific (dashboards, apis, etc.)
into the openstack_dashboard project, achieving a much
cleaner separation between the project-specific code and
the generic Horizon framework code.

Change-Id: I7235b41d449b26c980668fc3eb4360b24508717b
2012-10-11 11:47:50 -07:00