Commit Graph

27 Commits

Author SHA1 Message Date
OpenDev Sysadmins 4f97f41e86 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:56 +00:00
Huang Rui 18e211d307 Use https with CA conf
CA file is a new added config introduced to be used by
Ceilometer-zvm. When zvm inspector needs to communicate with xcat,
it will add the CA file into https communication so it can verify
the xcat is the one that zvm inspector wants to communicate with.

See following link for more info:
https://bugs.launchpad.net/ossn/+bug/1188189

Change-Id: Ib7f1ce2d621f6dd2b5d3b9a63a004abffbc3f223
(cherry picked from commit 44f02e7848)
2016-11-15 06:14:25 +00:00
Huang Rui 12e69277f9 run unittest with ceilometer stable/newton branch
Change-Id: Id0fc549c2b95d0a132919ab803182c20f8e3153f
2016-11-15 14:04:01 +08:00
Huang Rui 85c4ed3395 Add quiet option in xdsh call
Add quiet option in xdsh call to ignore warnings and ssh banner message.

To fix the defect that xdsh call failed when ssh banner enabled.

Change-Id: Ifbc13e9868a968afe6f66ed7383eee9961a9201d
2016-04-26 16:02:33 +08:00
Jenkins 2f95254b70 Merge "zvm inspector can not get instance data in shutdown stat" 2016-01-22 10:42:32 +00:00
Huang Rui dddf5f281b zvm inspector can not get instance data in shutdown stat
There's no performance data return from zvm management tool if the
virtual machine in shutdown stat.

In current implementation, InstanceNotFoundException would be
raised in this case.

With this change integrated, zvm inspector will check instance's
power_state at first, then try to get the data.

Also did some change to ignore invalid data format exception that
in case of all virtual machines on the compute node are in shutdow
state.

Change-Id: I02b69adc6e818a69d1e6887a3344f6bf0b344aa7
2016-01-22 10:26:53 +08:00
zhangguoqing 97dfd88dfc Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I86fc4a80bf853e76374f7d6a06f954bad614c795
Closes-bug: #1280522
2016-01-12 03:22:56 +00:00
Jenkins 87c4f80972 Merge "Change LOG.warn to LOG.warning" 2016-01-08 07:45:33 +00:00
Huang Rui a2f452b5ee update instance data cache structure
This change is adapte for the polling agent changes between kilo
and liberty.

Change-Id: If01b586004ca37351dcd0bfdb8ee370ebc47c4b2
2016-01-07 09:26:08 +08:00
zhangguoqing b2bc9dde6f Change LOG.warn to LOG.warning
Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning
so we prefer to use warning to avoid DeprecationWarning.

Change-Id: I5130cd6d620881c190297f6fe300def7d6037fce
Closes-Bug: #1530742
2016-01-04 12:58:07 +00:00
Jeremy Stanley 9513a2ac92 Update .gitreview for new namespace
Change-Id: I0b747b9c446bf087455394222c8832caa07f48a8
2015-10-17 21:56:26 +00:00
Huang Rui 21e51e2b18 Implement inspector method - inspect_vnics
Implement inspector method - inspect_vnics, return vnic name,
rx_bytes, tx_bytes, rx_packets and tx_packets.

Change-Id: Idb97937d9c841a271b408dc6fd47303ccf0d8c4b
2015-09-17 10:47:39 +08:00
Huang Rui 02c4ba9fde Add zvm inspector helper method to update cached nic data
inspector method _update_inst_nic_stats is used to get nic data
from zvmutils.virtual_network_vswitch_query_iuo_stats, and deal
with the data then update the nic data into inspector cache.

Change-Id: I7ff6f273535442a5dd5f50db7b5f9f36dd5d3fd9
2015-09-17 10:45:28 +08:00
Huang Rui 732c635363 Add helper function to get nic stat that connected to vswitches
The new function virtual_network_vswitch_query_iuo_stats is used
to get all nic stats that connected to all vswitches.

Change-Id: Ic1536f379f1c16dfcb21fd2c37c9d1d889aa8a90
2015-09-17 10:43:36 +08:00
Huang Rui 8838e435ec Implement inspector method - inspect_memory_usage
zvm inspector method inspect_memory_usage will return memory usage
to ceilometer memory pollster.

Change-Id: Ibbe1030516fd960211d009d4bfa863bad99227af
2015-09-17 10:41:21 +08:00
Huang Rui 4836e860e2 Implement inspector method - inspect_cpus
zvm inspector method inspect_cpus will return vcpu number and
used cpu time to the pollster.

Change-Id: I81d2f09b05220f19664f20d7328c6ed653ce3ea2
2015-09-17 09:49:11 +08:00
Huang Rui f4c3964e35 Implement zvm inspector helper function - _get_inst_stat
In _get_inst_stat, would check cache data expir or not, then update
cache if needed, at last, return instance data per latest cache.

Change-Id: Iaa499622f1f4e38182a50249f8c63b02e7a36465
2015-09-17 09:47:27 +08:00
Huang Rui 05efac6ac8 add zvm inspector method _update_cache
if instances is {}, then update all instance cache data, else
update instance performance cache data.

Change-Id: I52cdc82878749bf08077aab3be8f5db6007903aa
2015-09-17 09:45:14 +08:00
Huang Rui 647e053f8e add inspector method - _update_inst_cpu_mem_stat
_update_inst_cpu_mem_stat will call zvm utils.image_performance_
query to get instance performance data and deal with the data,
then update it in inspector cache.

Change-Id: I448dcee055b52a5a4e7194fd94eae7670ec5a525
2015-09-17 09:30:46 +08:00
Huang Rui 0501a089f7 add zvm utils function image_performance_query
The function image_performance_query call zvm SMAPI to get instance
performance data, includes cpu number, cpu times and memory usage.

The function will be used to inspect instance cpu and memory usage.

Change-Id: Iba99caf845498f5f794736a003c5f8cff6bb0730
2015-09-17 09:26:36 +08:00
Huang Rui d313c5341a implement zvm utils function list_instances
utils.list_instances is used to get instance list from the zvm
host that same with ceilometer compute agent.

This method query all nodes from zvm table in xcat database, then
exclude xcat master, zhcp and zvm host nodes.

Change-Id: I7b4dd17d4bcb60d9ba272cb474c9c5baf37e1391
2015-09-16 19:35:01 +08:00
Huang Rui aec0a62d3b implement zvm inspector init method
In zvm inspector init method, initialize cache, instance list and
zhcp info.

Change-Id: I7432490ff48378cf60f44ba6920901b246a54d3d
2015-09-16 19:16:59 +08:00
Huang Rui 907ecc0a53 implement cache data for zvm inspector
CacheData class is used in zvm inspector to cache instance data
when getting instance performance info.

Change-Id: Icc3422d8322d7246840841fbde7bb3abb6ce7213
2015-09-16 18:54:40 +08:00
Huang Rui fdc488f33f import zvm utils.py
import zvm utils.py from nova-zvm-virt-driver.

utils.py in ceilometer-zvm is a subset of utils.py in
nova-zvm-virt-driver. Mainly includes xcaturl, xcatconnection and
other utilities.

Change-Id: I3487762f73e3f9cbf025856ba94a4a90bc2d83ee
2015-09-16 18:37:34 +08:00
Huang Rui b374cf720d add inspector.py
Add ceilometer_zvm/compute/virt/zvm/inspector.py, ZVMInspector
is inherit from ceilometer.compute.virt.inspector:Inspector.

Change-Id: I413b7d0ef2adb3f5e7851dbe27608826d3a24e0d
2015-09-16 18:16:49 +08:00
Huang Rui 9882374a4c Init commit of ceilometer-zvm
Build project infrastructure, including:
- project source tree
- init sphinx doc
- testr config file
- .gitignore
- requirement and test-requirement file
- setup.py and setup.cfg
- tox config file
- empty README.rst

Change-Id: Ia4c1b03aa1dc871b9e41d56bf7c4a160eff4e1e1
2015-08-28 14:02:13 +08:00
OpenStack Project Creator 4f2d8d4c41 Added .gitreview 2015-08-27 18:09:19 +00:00