30 Commits

Author SHA1 Message Date
zhu.rong
4636bf18d7 Delete the unused LOG configure code
Delete the unused LOG configure code and import code

Change-Id: I5e42a3b25aae89e62e20e8061b39c7be700aba33
2015-12-09 02:04:29 -05:00
Masco Kaliyamoorthy
4e8549ee9a Replace SortedDict with OrderedDict
From django V1.9 django.utils.datastructures.SortedDict
will be removed and it is deprecated in V1.7.

The similar functionality is added in collections.OrderedDict
from python 2.7.

Horizon code also should avoid the SortedDict class and
start using the OrderedDict class.

This patch replacing the SortedDict with OrderedDict.

Change-Id: I8dfcf7c29fc49b6215451f160cf7a951bf11b5ad
Closes-Bug: #1492270
2015-09-04 18:39:15 +00:00
Jenkins
d644088631 Merge "Optimize getting unit in "metering" dashboard" 2015-06-24 03:45:42 +00:00
XinXiaohui
bbbdb3ba08 Change an IPMI meter name
Change "hardware.ipmi.node.inlet.temperature"
meter name to "harware.ipmi.node.temperature".
The change is according to ceilometer service.
Please reference:
https://review.openstack.org/#/c/170379.

Closes-Bug: #1455335
Change-Id: I6192993775a36fd6081ba91de14a6a940130fa87
2015-05-15 13:32:19 +08:00
Ilya Tyaptin
aa75b68307 Optimize getting unit in "metering" dashboard
Currently we using a meter-list for getting a "unit" for metric.
Meter list get all available metric on environment,
it's may be a thousands of records.
It's better to use sample-list for this metric with "limit" 1.
This request gets a 1 sample for queried metric.

Change-Id: I4bf0ab7ebcbcae1ddc90d8ee01d5f5a84ed4fbba
Related-bug: #1444456
2015-04-22 12:40:22 +03:00
XinXiaohui
f75a52d2b3 Add 7 missed meters in Resource Usage Panel.
We have made the ipmi meters visible in "Resource Usage" panel.
Now a meter should be removed and other 7 meters missed need to
be added in. All these meters are under IPMI protocol.

Change-Id: I34ed7187347ff4a4cfac7c572f16e03f1fe15b39
Closes-Bug: #1436635
2015-03-31 07:42:19 +08:00
keshy
aed603d618 Fix typo errors in comments for api modules
Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>

Change-Id: I55327c2e7d44d01c8bc832c1a5228a6b3dc3184f
Closes-Bug: #1268253
2015-02-25 10:50:27 -08:00
Kamil Rykowski
e77db390f9 Fixing Ceilometer measurements descriptions and comment typos
On file ceilometer.py some changes were made regarding with
units and clarifying some other descriptions.

Additionally few minor improvements have been applied for existing
comments and redundant conditional parentheses have been removed.

Change-Id: I379033bf40a86a624605ae8f0f39654bfd15cd4d
Closes-Bug: #1288487
Co-Authored-By: Facundo Farias <facundo.farias@intel.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
2015-02-16 16:58:22 +01:00
XinXiaohui
e9fc6e893d Make ipmi meters be visible in Horizon
To implement blueprint: ipmi-meters-in-horizon
We know Horizon has already implemented
the blueprint which the name is
admin-resource-usage-page. See Change-Id:
I21342d595ee08da45707e909f3d9802707d912cc.
It includes most of the meters at that time.

IPMI meters has already been implemented now,
so just add the ipmi meters into this structure.

This change-Id adds 6 ipmi meters exported
from ceilometer. It adds "list_ipmi" and
"_get_ipmi_meters_info" methods to get meter datas.

See this blueprint at:
https://blueprints.launchpad.net/horizon/+spec/ipmi-meters-in-horizon

Change-Id: I7e3a76ed032090f89f2a51c56c620cbeb7560412
Implements: blueprint ipmi-meters-in-horizon
2015-01-14 15:05:40 +08:00
liyingjun
2ec0d62306 Add missing nova meters for metering
There are some missing meters(network.*.rate, disk.*.rate, memory.usage)
not included.
http://docs.openstack.org/developer/ceilometer/measurements.html
This patch adds these missing meters.

Change-Id: I4e96f00f40c9d45ddbf6c21cf6bfb5e9b50aa646
Closes-bug: 1348895
2014-12-24 06:58:59 +00:00
ZHU ZHU
8164075f5b Fix incorrect ca arguments for calling ceilometer client
With ceilometer configured with SSL, Horizon fail to connect to
ceilometer to load the meters(usage data) due to it passed a wrong
of ca argument for ceilometer client. Should use 'cacert' instead
of 'ca_file'.

See ceilometer client:
https://github.com/openstack/python-ceilometerclient/blob/master/ceilometerclient/v2/client.py#L53

Change-Id: I296c61119e07cd2e19079ef62054c5837fa13114
Closes-Bug: #1388764
2014-11-05 04:15:14 +00:00
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
Akihiro Motoki
832a741c88 Fix E128 errors in remaining openstack_dashboard/
E128 continuation line under-indented for visual indent

Closes-Bug: #1375929
Change-Id: I2a72313d359bdfe2e2667eba5d3bf9744ec8f60a
2014-10-16 16:53:52 +09: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
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
Ladislav Smola
8f2ebe66d6 Introduce safer access to resource meters
Storing of meters in the wrapper object attributes is bad. It
can lead to name conflicts, which can theoretically result
in weird bugs.

Change-Id: I7b1a248be52721b0401fba7bf976b9c4e63f71ba
Implements: blueprint ceilometer-api-enhancements
2014-06-05 10:57:28 +02:00
Alex Gaynor
c1b4269443 Fixed several typos in comments
Change-Id: I230414c703cf47d7ec727362c20f1814324a2447
2014-05-24 14:42:14 -05: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
Rob Raymond
39098ff203 Clarify description string for image metric
This metric seems to have an existential crisis.
Change to more succinct "Image existence check"

Change-Id: I953c55214e73bb93c452b25f97960e9637f1008c
Closes-Bug: #1292937
2014-03-25 08:59:18 -06:00
zhang-jinnan
898ccff4c9 Fix typo
Ceiloemter --> Ceilometer
that are not --> that is not

Change-Id: I76d3b6dc27c01c2b11b88549d5c677c23dde3942
2014-03-03 13:23:23 +08:00
Cindy Lu
0cf5a43457 Fix typo in ceilometer.py
Change-Id: I15222ef630f3caac206da5522dc3e7615c3f61a4
Closes-Bug: #1278343
2014-02-10 09:33:36 -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
Ala Rezmerita
8488cc7d93 Fix typo error
Fixed error in the code responsible for retrieving the
list of meters tied to glance

Change-Id: I911288e944f4f573d1f1d40a756f548663202515
Closes-Bug: #1265762
2014-01-03 11:30:54 +01:00
Ladislav Smola
44b302f6b5 Abstraction of Ceilometer meters information
- Extract the metadata of the meters to a class (label,
  description)
- The list operation support (only, except) filter
- It supports listing meters by their service e.g. .list_nova(),
  .list_neutron()

- Tests for meters list written.

Fixes bug 1226479

Change-Id: Ifa366fd2de3e8f4e31347962630f96344ebba974
2013-11-28 12:40:05 +01:00
Ladislav Smola
09677c0de8 Deleting statistics tables from resource usage page
The tables were interpreting the stats in a wrong way, for some stats
it's not even easily possible to get those stats. We need to go through
each statistic separately and document it in the Ceilometer docs first.

Then it's more likely that these table stats will be distributed in
various tables in dashboard in the form of sparklines so these pages
won't be needed.

Fixes bug 1249279

Change-Id: Ib8c110f5d66fae50df12f8f0beeb99c2b2d00bf6
2013-11-27 13:48:22 +01: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
Jenkins
960e6e2c58 Merge "Optimization of ceilometer API" 2013-10-02 06:39:26 +00:00
Ladislav Smola
b7c4b6b9ce Optimization of ceilometer API
- optimizing requests for resource by multithreading on resource level
  (each resource is obtaining stats in separate thread)
- fix last comment addressed in review
  https://review.openstack.org/#/c/35589/
- fixing typos and misleading comments

Fixes bug 1218407
Change-Id: I24826bac7679bd075792691e3ed9a342aa1659fb
2013-09-24 14:27:22 +02: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
Ladislav Smola
69d67c08ab Add ceilometer api and the tests for it
Adding ceilometer api basic function wrappers.
Adding Class wrapper of each ceilometer object.

Adding ceilometer general usage wrappers for common statistics over
list of Resources and ResourceAggregates.

Adding specific table statistics wrappers.

Adding tests and test data for Ceilometer API.

Best to be tested with commit for resource usage panel at:
https://review.openstack.org/#/c/35590/ - this commit is for the
test purpose only.

Link to bp: https://blueprints.launchpad.net/horizon/+spec/ceilometer

Implements bp ceilometer.
Change-Id: I5b3392de8bae2be8cbcba7a580af669676e54052
2013-08-28 19:21:37 +02:00