Commit Graph

18 Commits

Author SHA1 Message Date
Martin Chacon Piza 9dbfe8056e Remove project content on master branch
This is step 2b of repository deprecation process as described in [1].

[1] https://docs.openstack.org/project-team-guide/repository.html#step-2b-remove-project-content

Change-Id: I210c2fe3bbe2a702f42ec1df95f328b8011d8014
2021-02-22 15:16:37 +01:00
Zuul 6487f4510c Merge "Use unittest.mock instead of third party mock" 2020-05-28 18:21:31 +00:00
Ghanshyam Mann ed1e01537a Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I4d54bfabc2faabd302b613378e49326de9a1cc8f
2020-05-12 19:29:42 -05:00
Sean McGinnis 2fe47c29c9
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I8ac5e339700316b07b7c548f24ffc8dd83110df3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:54:45 -05:00
Andreas Jaeger a0c6625d20 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: Ica99c9a4affd2b693ef74f1e3ef7c8ea2c6a46d6
2020-03-31 06:49:19 +00:00
Joseph Davis 8b0fb6d048 Refactor out Ceilometer V2 API related code
As of Queens the Ceilometer V2 API has been removed.  Storage
driver related code in monasca-ceilometer can thus be removed.

Backport some refactoring that came up in creating
https://review.openstack.org/#/c/562400/
Realized some class names could be clearer and fit better with
Ceilometer.

Update test-requirements.txt with Rocky release of
python-monascaclient.  Also include more license info.

Specify py35 instead of py34 in tox.ini (gates already using py35).

Include updates to devstack configuration to keep up with master
ceilometer.  These include adding values for the [monasca] section
in ceilometer.conf and refreshing setup.cfg as well as updating
how the connection url to Monasca API is configured.

Also include some testing notes in devstack/README.md

Change-Id: I9291dfc06d67f18109a0ff66184bd418c6361977
2018-08-09 10:11:28 -07:00
Witold Bedyk 6ebd2dc1c2 Fix README.rst and add syntax check
Change-Id: I2e2ec99b643475fa64a4b5b67201ff38c10e52a8
Story: 2002163
Task: 24400
2018-08-08 18:07:03 +02:00
Vu Cong Tuan f892dae29f Remove testrepository and .testr.conf
This commit is a follow-up of "switch to using stestr"
which was merged already [1].
After switch to using stestr, testrepository and .testr.conf
are unnecessary and should be removed.

[1] https://review.openstack.org/576862

Change-Id: I9f35e4f1341848a62a143b7f7150f2b845575861
2018-07-12 08:48:19 +07:00
Ashwin Agate 4a2c73685f Monasca Ceilometer in sync with Ceilometer master
Following changes are necessary to keep monasca-ceilometer
in sync with Ceilometer upstream

* Remove api/health.py (since ceilometer v2 api was removed)
* Remove storage/impl_monasca.py (since ceilometer storage drivers were removed)
* Updated opts.py and service.py (to keep in sync with ceilometer master)
* removed api, storage driver tests
* updated /etc/ceilometer/ceilometer.conf with new [monasca] options

Change-Id: I044f3e512db52a128bac8d5c5dcac76549a3b1c2
2018-02-09 13:21:53 -08:00
Ashwin Agate 8cff9c154b Remove oslo config global conf dependency
Ceilometer in Ocata made several changes to
move away from  oslo config's global conf.
Instead ceilometer/service.py now creates a
oslo config object that gets passed to the
publisher.

To keep up with the changes had to make
the following changes in monasca-ceilometer
1.) Monasca Publisher now extends
ConfigPublisherBase, with conf as argument
2.) monasca_client now takes conf as an
argument during intialization.
3.) Added monasca_ceilometer_opts to
intialize all ConfigOpts. This will have
to be regiested in ceilometer/opts.py.
(will need a additional line in opts.py)
4.) Introduced three new properties
service_username, service_password and
service_auth_url since username, password
and auth_url were removed from
[service_credentials] section.
5.) Added api/health.py, service.py
and opts.py from ceilometer code base
which were modified to read
monasca ceilometer options via
monasca_ceilometer_opts.py
6.) Added ostestr to test requirements
and updated tox.ini to run tests in
serial (to avoid problems with
singleton mapping classes, stepping
on each other test values  when
run in parallel)

List of Ceilometer changes to remove
global conf
[1] https://review.openstack.org/#/c/384834
[2] https://review.openstack.org/#/c/384624
[3] https://review.openstack.org/#/c/386025

This change also modifies test-requirements.txt
to bring this master branch up to the stable/pike
version of ceilometer, and python-monascaclient
up to 1.7.1 (pike).

Change-Id: Ieb7962a50fdb5d12ea6238c96ed116e8b2c83c48
2018-01-21 14:40:54 -08:00
Joseph Davis 031a8b6c87 Ceilometer newton-eol
Change the test-requirements to use the newton-eol branch, as
the stable/newton branch no longer exists in Ceilometer.
Also limit the oslotest to < 2.0.0 to avoid a mockpatch issue
in ceilometer's db.py unit test.

Note this change should soon be replaced by a move to Pike, but
want to update this as a solid starting point before further work.

Change-Id: I06b860bb72c3397e276311bd57291e9c3164a7e4
2017-11-27 16:23:41 -08:00
ricolin c802c7467f [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: Ib4989b9494ee8a4f2087f6986ee2dc0f798c1073
2017-03-03 11:47:41 +08:00
Atul Aggarwal a0f873f413 Adding query metric mappings, dimensions, futurist, paging
Adding capabilities to ceilosca to be able to query metrics that
are already being collected by monasca using mappings files
there are two types of mappings:
  1. Static Mapping: Currently it is used to map any static info
     about ceilometer meters like the type of meter or unit
  2. Extensive monasca mapping: currently it is used to map any
     monasca metric to a ceilometer meter example:
     meter_metric_map:
       - name: "disk.device.write.requests"
            monasca_metric_name: "vm.io.write_ops"
            resource_id: $.dimensions.resource_id
            project_id: $.dimensions.tenant_id
            user_id: $.dimensions.user_id
            region: "NA"
            type: "cumulative"
            unit: "request"
            source: "NA"
            resource_metadata: $.measurement[0][2]
     As you can see for this mapping fields on left side of ":"
     are used to map ceilometer fields and fields on right side
     for referring to monasca fields

Both of these mapping files are configurable and can be set in
ceilometer configuration file

cloud_name, cluster_name, and control plane fields
are now added as dimensions by monasca publisher when
publishing metrics to monasca api which is necessary
in multi-region deployment of notification agent.

monasca publisher does not use oslo.service LoopingCall
but instead uses futurist periodics library to enable
batching.

monasca client now pages through monasca api results
if enable_api_pagination is enabled in configuration.
This flag is disabled by default but should be enabled
if monasca api supports paging using "offsets"
parameter.

Tox testing is now targeting stable/newton branch of
ceilometer.

DocImpact

Change-Id: I83b96325cb79d82858cf529935e5d699a509f6c3
2017-03-01 16:26:44 -08:00
Srinivas Sakhamuri 02ca4e80fe Uses devstack plugins to deploy ceilosca in devstack
- Leverages monsaca devstack and uses new devstack plugin model
to setup ceilosca.
- Also some refactoring in directory structure

Change-Id: I097c86f92e1ec09ceeb3d0d4831ff8c51c3aa1a3
2016-05-31 14:36:12 +00:00
Rohit Jaiswal 865dab02b7 Migrate monasca-ceilometer to be liberty compatible
List of changes:
* Changed oslo-incubator imports to oslo-service
* Refactored tests to functional and unit packages
* Upgraded test requirement versions
* Added py34 test capability
* Upgraded hacking(pep8) version
* Added devstack plugin and settings to deploy Ceilosca
* Modified setup.cfg to use liberty entry points
* Refactored storage driver to compatible with v2 api liberty changes

Change-Id: Id6711e6661cde14df3decba6f56e52d391981f42
2015-11-18 16:52:53 +00:00
Srinivas Sakhamuri f38c9f6c4a Improve unit tests
- Force pep8 to use correct python interpreter
- Add py27 checks
- Use smaller requirements file for pep8 checks

Change-Id: I4a2a642f60c17986739355187c67f403febb79fc
2015-07-23 17:15:50 +00:00
Christian Berendt 111fab60b4 Add hacking as test requirement
Change-Id: I8e162785abb153bacf06cebc42b8035f6a0176fc
2014-07-24 10:52:29 +02:00
Craig Bryant 59be51266d Get initial build to work.
Set up tox.

Fixed pep8 warnings

Change-Id: Ia1cce729d1c0360321a66e8da41190a627f43cfe
2014-07-18 13:21:16 -06:00