31 Commits

Author SHA1 Message Date
lin-hua-cheng
0e95eb0441 Switch from oslo.utils to oslo_utils
oslo_utils moved out of the oslo namespace.

Partially Implements: blueprint drop-namespace-packages

Change-Id: I3c38426142de535b5474676b1214ea72b231ce76
2015-01-18 14:23:32 -08:00
Jenkins
8f2903ed2c Merge "wrong message while deleting non empty pseudo folder" 2014-12-09 09:37:28 +00:00
Masco Kaliyamoorthy
1565819d59 wrong message while deleting non empty pseudo folder
while try to delete a pseudo folder which contains some objects is
showing the success message but the folder is not actually deleted

added a check similar to delete container, the new check will
verify the pseudo folder is empty before call the swift client
call. if the folder is not empty it will throw a exception
with a appropriate error message and the message will be shown to
the user in the pop up message box.

Change-Id: I0bbea6ef6ac26ef357240610535b9d84053a89c2
Closes-Bug: #1347598
2014-10-30 15:18:04 +05:30
Akihiro Motoki
47f1d49690 Do not log keystone token
Previously token values are logged as DEBUG level when a new client
object is instantiated. In other project and clients, token values
are now not logged and is output as *REDACTED* instead.
In Horizon these log lines do not have much meaning and
we can simply remove them.

Change-Id: I67617ac6424907574d79ec2a57b513a548e220d2
Closes-Bug: #1380642
2014-10-17 16:10:41 +09:00
Jenkins
79df5b42ed Merge "Fix an encoding exception when creating a public_url" 2014-10-16 07:22:14 +00:00
Akihiro Motoki
26da6ed48c Fix E127 errors in remaining openstack_dashboard/
E127 continuation line over-indented for visual indent

Also fixes E127 introduces by other reviews
after other E127 fixes were merged.

Closes-Bug: #1375931
Change-Id: I0a09f1c2f74c707fc8a347f0ea5975bf2679976e
2014-10-15 13:50:07 +09:00
lin-hua-cheng
258ea5a172 Use timeutils from oslo.utils
Rather than sync'ing with oslo-incubator, let's use the library
oslo.utils instead. Removing the local copy of timeutils.

Change-Id: I4fbc7e7637577fcad8281897f4286690b1bbd14d
Partially-Implements: blueprint improve-oslo-usage
2014-10-13 12:08:00 -07:00
George Peristerakis
2e4ae8f05d Fix an encoding exception when creating a public_url
When using urlparse.quote, the string needs to be utf8 encoded,
or an exception is thrown.

Change-Id: I1e3d4abc136fbbbd03a54789f3df0855ceea98e1
Closes-Bug: 1346386
Co-Authored-By: Cédric Soulas <cedric.soulas@cloudwatt.com>
2014-10-08 15:00:52 -04: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
Chuck Short
456c69e0b3 swift: Respect the OPENSTACK_SSL_NO_VERIFY setting
The swift API client connection does not respect the
OPENSTACK_SSL_NO_VERIFY setting in the local_settings.py.

As a result a SSL verfication error happens with a
self-signed certificate.

Closes-Bug: #1311357.

Change-Id: I907a8f7c5c631adfaf2ca66385749bb8e86734f2
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2014-09-16 10:38:21 +01: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
Fengqian Gao
b7d5a6e749 Keep py3.X compatibility for urllib
Use six.moves.urllib.parse instead of urllib

Partial-Bug: #1280105

Change-Id: Ie10e9fd8ff42b65b1610839eaeee09e3c56f2de7
2014-02-24 13:46:29 +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
Radomir Dopieralski
028332da4a Remove #noqa from most common imports and add them to import_exceptions
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.

I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.

I also removed a few unused imports that were revealed in the process.

Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
2014-01-07 12:26:35 +01:00
Jenkins
cdb06a48de Merge "Show success msg when container deletion succeeds" 2013-12-03 03:51:45 +00: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
Lin Hua Cheng
52957cc7d9 Show success msg when container deletion succeeds
When user tries to delete non-empty container, the success messsage
should not be displayed.

Change-Id: I02ba1e4bad8dbe2b52f06f2a8e079b5812cd5544
Closes-bug: 1214842
2013-11-27 20:32:59 -08:00
Jenkins
2d06e1b23f Merge "Adds pseudo-folder creation" 2013-11-26 20:30:04 +00:00
Paul Belanger
da8c69afa6 Gate on H4xx docstrings for pep8
In an effort to help horizon more friendly to OpenStack hacking
guidelines, we now gate on H40* violations.

Change-Id: Id07294543660368d2f7f5ac363710176ab23b874
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-11-23 12:51:07 -05:00
Laura Athanasiou
56ae1e84e4 Adds pseudo-folder creation
Users can create pseudo-folders independent of object upload

Implements: blueprint swift-pseudo-directory
Change-Id: I5797ae9aab83135643680a410b2394165dc55271
2013-10-16 13:15:16 -06: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
Jasper Capel
12ab09a994 Custom CA certificate for verifying SSL connections
The various OpenStack client libaries support specifying a SSL
certificate that should be used to verify the SSL-connection, but
this option was not exposed in the horizon options. This patch
implements that. Note that although some clients do implement a
cacert-parameter, they do not necessarily actually verify the
certificate (Swift).

Change-Id: I9dfbd48a0d96103421da7d884e839d591a90cab1
Implements: blueprint ssl-cacert
2013-09-03 11:24:41 +02: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
Lin Hua Cheng
7f51d55401 Display the container and object metadata
Display some of the useful metadata information from swift:
Container Details - Container Name, Object Count, Size
Object Details - Name, Hash, Content Type, Last Modified, Size

Change-Id: I6611cab08946a81624176c1836ceadaf16a68e45
Implements: blueprint swift-display-metadata
2013-08-20 11:08:43 -07: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
Brooklyn Chen
eae19c1a7c Shows a warning message when deleting a container that contains data.
We cannot delete objects in the container since there may be millions
of objects in that. The batch deletion should be done in swift instead
of Horizon. The batch remove of objects function is only in swift CLI
command now. This commit replace the unclear message with a warning
message that tells the user the container is not empy.

Related bug: https://bugs.launchpad.net/horizon/+bug/1034890

Fixes bug: #1096084

Change-Id: I59b46a3535b8654734c3dae4eec916ab1b53c716
2013-05-19 18:39:42 +08:00
Brian Waldon
b36a285938 Remove placeholder objects for subfolders
A subfolder in a container is now represented solely by the prefix of
an object name delimited by a forward-slash (/). If an object exists
in a container that matches the implied subfolder of another object,
each will be displayed in the objects table.

Implements bp swift-folder-prefix

Change-Id: I05252c1db34fdf6584a71e8827ff6f8363bf0488
2013-02-15 12:01:06 -08:00
Tihomir Trifonov
4b1fc16789 Fixed unicode for object copy
Removed deprecated check for unicode symbols
in object names, fixed the reverse() for success_url,
which expects "/" to be included in path arguments.

Fixes bug 1008940

Change-Id: I1122437c40f8e31b64a82b39cd326141842ca519
2012-12-29 17:51:20 +02: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