Commit Graph

22 Commits

Author SHA1 Message Date
Andreas Jaeger 754d7b048c Retire repository
Fuel (from openstack namespace) and fuel-ccp (in x namespace)
repositories are unused and ready to retire.

This change removes all content from the repository and adds the usual
README file to point out that the repository is retired following the
process from
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

See also
http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011647.html

Depends-On: https://review.opendev.org/699362
Change-Id: I6a9128d5c87d7d4a2ca77db96ba6c8d9d2d91b17
2019-12-18 09:50:44 +01:00
gengchc2 99ad4fba53 Replaces yaml.load() with yaml.safe_load()
Yaml.load() return Python object may be dangerous if you receive
a YAML document from an untrusted source such as the Internet.
The function yaml.safe_load() limits this ability to simple Python
objects like integers or lists.

Reference:
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html

Change-Id: I9841e688e16e9bebef5eb278ee2f3a12f2ca61f4
2017-02-04 11:50:24 +08:00
gengchc2 a6ad471636 Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I8432a85b025a46d20484a0d8a3ec72dca54d23cb
2016-12-09 10:41:06 +08:00
Nam Nguyen Hoai b2f25e97a4 TrivialFix: Using assertEqual instead of assertEquals
Following OpenStack Style Guidelines[1]: http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H234] assertEquals() logs a DeprecationWarning in Python 3.x,
use assertEqual() instead. The same goes for assertNotEquals().

Change-Id: Iaa4b2fd04d2aa661bb196c4b9f2494a281a9294a
2016-09-28 11:54:37 +07:00
Alexander Kislitsky 78abf5f70c Files permmission are fixed
Some files were committed or created with executable permissions 755.
Theese permissions changed to 644.

Change-Id: Ic7a99eda0518de89ff72f13936f0d131fd1eb121
Closes-Bug: #1598746
2016-07-06 09:11:01 +00:00
Ji-Wei a3102f6fc6 Make xrange py3 compatible
In py3 ,
Xrange is renamed to range,
so it needs to be modified to make it compatible.
the code:
print (xrange(5))
Traceback (most recent call last):
  File "code", line 4, in <module>
    print (xrange(5))
NameError: name 'xrange' is not defined.

Change-Id: I3a0e22876c35ced5c961c092fcda25db33d1c599
Closes-Bug: #1596127
2016-07-01 03:15:46 +00:00
Alexander Kislitsky e200196347 Connection hanging issue fixed
On huge reports data we can have 500 HTTP error by timeout limitation.
In case of streaming data from the DB cursor we had hanged
DB operation inside the open transaction. For fix the issue releasing of
SQLAlchemy session was added to collector and analytics apps.

Additional changes:

- We stop to migrate action logs data to Elasticsearch due to
  no one UI report uses this data.
- Parameters fixed in OSWLs 'export' call in 'all_reports'.

Change-Id: I009081a2304b36fb4ab3705b6fa09a8a3df5710b
Closes-Bug: #1564427
2016-04-11 13:00:49 +03:00
Alexander Kislitsky db1fb068b8 Fuel-stats prepared for OpenStack CI
We have 3 services: analytics, collector, migration.
Migration is frozen and going to be removed. Also
migration requires Elasticsearch server for tests,
thus it can't be tested on OpenStack CI.

Pep8 checked on all services.

Project works only on python2.7, thus
gate-fuel-stats-python26 should be removed.

Change-Id: Ic5b6f15903918b4b0850ce0cdc12543925de0cfa
Closes-Bug: #1500073
2015-10-21 14:40:44 +03:00
Alexander Kislitsky 59f945ee66 We shouldn't show filtered stats in the web UI
Filtered by application stats is marked through is_filtered
field in the installation_structure.
Filtering by is_filtered added into UI queriesto Elasticsearch. Queries
tested in migration unit tests.
Queries to Elasticsearch creation in migration tests refactored.

Change-Id: Icdaa65f856aa7ea8349c39aa1bc5b8aca7368aca
Closes-Bug: #1443347
2015-06-29 17:00:49 +03:00
Alexander Kislitsky d60bf4e852 Network configuration info added to stats
Change-Id: Ieffcdd66e1b1adf36ba375aeb2398216eba93b42
Closes-Bug: #1410274
2015-02-06 18:41:59 +03:00
Alexander Kislitsky 2f4eb79233 Http hander for fetching clusters stats as CSV
Flask application added for export clusters statstics in CSV format.
Export process streams data by the generators.

Closes-Bug: #1410262
Blueprint: export-stats-to-csv
Change-Id: I265b617e78de142f8f10f22e85f734d0df7979c2
2015-01-22 13:18:53 +03:00
Vitaly Kramskikh f8c6723b85 Filtering stats by release
Change-Id: I238a5596052542395dd09aec66d7934edcb4fdf1
2014-12-30 17:28:26 +03:00
Alexander Kislitsky d664f61780 Example for filtering data by release
Example of request for fetching releases added.
Exapmle of request for filtering by releases added.

Change-Id: Ide31a9166c7f1fc4eb1f8d3f314097de0722dc39
Closes-Bug: #1405748
2014-12-30 09:41:56 +03:00
Alexander Kislitsky 31f75bd5c6 Indexing of request_data, response_data disabled
In old style action logs we have mixing of
field types in the lists inside request_data and response_data.
Format of action_logs is already changed. So we should just
migrate old-style action_logs into Elasticsearch.

Closes-Bug: #1401120
Change-Id: I416e9815b8b4ace7b14c671b643d033e334b8326
2014-12-10 17:22:27 +03:00
Alexander Kislitsky bcf5e0a736 Fix for migrator logging configuration
Closes-Bug: #1398897
Change-Id: I12d1454f826a307a45a0b6fdee70bd81d91a03ce
2014-12-04 13:33:57 +03:00
Alexander Kislitsky 77bdc11b22 Fix for action_logs migration
DB model fixed
Action logs JSON schema fixed
Tasks generation added into tests
Fixed Elasticsearch mapping scheme
Fixed collector manager running script
Set of fields for es id generation is used

Closes-Bug: #1397326
Change-Id: Ifdb47d5af6a75d4306711e3929146a9a82406dcc
2014-12-01 12:54:07 +03:00
Alexander Kislitsky 6201c2bf17 Config params substitution handled in managers
Loading from external configs is required for auto deployment
fuel-stats packages by the DevOps team.

For collector COLLECTOR_SETTINGS environment param is used.
Value of COLLECTOR_SETTINGS should be path to external config.
Config is regular python file. For collector standard Flask
external config file feature is used.

From collector config removed unused HOST and PORT params

For migrator parameter '--config' is added to manage_migration.py.
External config is yaml config file.

Blueprint: send-anon-usage
Change-Id: I3667d22d55b6edbbaa8f81e14dcd3d199e7a87a6
2014-11-25 16:13:56 +03:00
Alexander Kislitsky c584b27b9d Filtering by environment statuses added
Tests improved
Test data generation added
Checking of aggregation requests added

Blueprint: send-anon-usage
Change-Id: I0b76ff368a8d6e5a2bb8d598195257d052151f45
2014-11-19 17:24:50 +03:00
Alexander Kislitsky 5314bf60e9 Fix for migrating installation structures
Sync strategy changed for installation structures: modification_date
field is used as migration db sync field.
Field db_sync_field_name added into migration data.
Migration algorithm is refactored.

Change-Id: I070546ad39922008b213ec58a740cddc745c9b07
Blueprint: send-anon-usage
2014-11-14 19:22:13 +04:00
Aleksey Kasatkin b148903113 Add nodes' manufacturers to statistics snapshot
Blueprint: send-anon-usage

Change-Id: I161599955e4fdc7523bedf85f320da6242e3d857
2014-11-12 18:26:12 +02:00
Alexander Kislitsky 89f2de0802 Tests for reports on the generated data added
Change-Id: I7be569e77a639cb92a9dc21c8f06792376c9f45f
Blueprint: send-anon-usage
2014-10-30 15:29:11 +03:00
Alexander Kislitsky 52a79a8182 Migration from PostgreSQL to Elasticsearch
* migration status saved into Elasticsearch
* tox handled for migration
* JSON field added into migration
* reports tests moved into migration
* migration run script implemented
* manager for migration run implemented
* production wsgi application added for collector
* logging error in collector fixed
* installation struct model and table renamed

Change-Id: I001010a13f4798505b4d806728b3376da57c90fb
Blueprint: send-anon-usage
2014-10-28 14:44:20 +03:00