Commit Graph

5 Commits

Author SHA1 Message Date
Kevin Carter 034228e754
Update monitorstack to use updated openstacksdk and es
This change updates the functions so that they work with the most up to date
OpenStack SDK, and adds an elasticsearch output format.

Tests have been udpated to pass newer versions of flake8 and py3

Zuul project config has been added

Change-Id: If46d3fb8e2b2e4aa5e21bf7da470945b05d216cf
Signed-off-by: cloudnull <kevin@cloudnull.com>
2019-02-17 09:27:36 -06:00
Matt Thompson 98cb350edc Only import os_utils when plugin is called
Currently, if a dependency of one of the os_ plugins is missing,
running monitorstack with no args returns (for example):

```
OpenStack plugins require access to the OpenStackSDK. \
    Please install "python-openstacksdk". \
    ERROR: No module named keystoneauth1.loading
```

This commit moves the os_utils import in the os_ plugins to within cli,
similar to what is being done in the kvm module.  This allows the
monitorstack cli to operate normally even if a plugin cannot be loaded.

Change-Id: I2ff1ad8c6365f6592191f09ea9c0d543f81e16ba
2017-06-23 11:56:24 -04:00
Kevin Carter 775f034a78 More complete testing of the os plugins/utils (#24)
The change implements several fixes so that monitor stack can be run in
OpenStack environments supporting both V2 and V3 authentication.

All of the plugins now have a proper name lookup and will pull from a local
cache instead of hammering the API on every request.

The Local caching functionlaity used to be tied to the python shelve
module. Due to issues with Python 3.5 and shelves the library was
replaced with the diskcache lib which implements a caching interface
supporting both py2.7+.

Tests have been added in support of all additions.

Tests have been added for the os_utils module which should bring it
within ~98% of completeness.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-14 11:34:10 -05:00
Major Hayden c3a396daba Add PEP257 checks (#15)
Check for docstrings.
2017-03-09 15:48:18 -06:00
Kevin Carter 37a9950ab2 Added VM instances used and quotas (#6)
The following plugins add a basic OpenStack API framework which is used
to pull metrics for nova vm quotas and usage for RAM, vCPUs, disk, and
instance count.

added codecov.yml

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-09 09:48:17 -06:00