From 920a19542ad86d034657581a59d5a929da40d35e Mon Sep 17 00:00:00 2001 From: Mateusz Kurek Date: Wed, 28 May 2014 14:50:42 +0200 Subject: [PATCH 1/5] version bumped, changelog updated --- CHANGES.rst | 22 ++++++++++++++++++++++ src/ralph_pricing/__init__.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index a263db50..58c34b43 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,28 @@ Change Log ---------- +2.4.0 +~~~~~ + +* New devices report + +* Devices ventures changes report + +* New ceilometer report plugin logic and logging tweakups + +* Fixed asset collect plugin (replacing to None) + +* Ceilometer collect plugin bugfixes + +* Added venture tree rebuild when venture plugin job is finished + +* Fixed extra costs - add more than 5 rows (with dynamic adding) + +* Fixed header in csv statement + +* Improved gitignore and manifest + + 2.3.0 ~~~~~ diff --git a/src/ralph_pricing/__init__.py b/src/ralph_pricing/__init__.py index af316806..7d11e273 100644 --- a/src/ralph_pricing/__init__.py +++ b/src/ralph_pricing/__init__.py @@ -1 +1 @@ -VERSION = (2, 3, 0) +VERSION = (2, 4, 0) From f90aeedc81b4189443b9186319586e9a89658c79 Mon Sep 17 00:00:00 2001 From: Kula Date: Fri, 30 May 2014 13:16:34 +0200 Subject: [PATCH 2/5] Update readme --- README.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 738340b5..3433bbe7 100644 --- a/README.rst +++ b/README.rst @@ -2,13 +2,13 @@ Pricing module for Ralph ===== -.. image:: https://pypip.in/v/ralph_pricing/badge.png - :target: https://crate.io/packages/ralph_pricing/ +.. image:: https://pypip.in/v/scrooge/badge.png + :target: https://crate.io/packages/scrooge/ :alt: Latest PyPI version -.. image:: https://pypip.in/d/ralph_pricing/badge.svg - :target: https://crate.io/packages/ralph_pricing/ +.. image:: https://pypip.in/d/scrooge/badge.svg + :target: https://crate.io/packages/scrooge/ :alt: Number of PyPI downloads @@ -20,8 +20,8 @@ Pricing module for Ralph :target: https://coveralls.io/r/allegro/ralph_pricing?branch=develop -.. image:: https://pypip.in/license/ralph_pricing/badge.svg - :target: https://crate.io/packages/ralph_pricing/ +.. image:: https://pypip.in/license/scrooge/badge.svg + :target: https://crate.io/packages/scrooge/ The pricing module aggregates data from Ralph and from Ralph Assets to generate reports showing the prices of the servers in inventory per their owners daily. From f7927bdecce46b4c4fef11e17e4fd263df62fe63 Mon Sep 17 00:00:00 2001 From: Kula Date: Fri, 30 May 2014 14:27:19 +0200 Subject: [PATCH 3/5] fix share plugin --- src/ralph_pricing/plugins/collects/shares.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ralph_pricing/plugins/collects/shares.py b/src/ralph_pricing/plugins/collects/shares.py index ce0f4d85..4aed26f0 100644 --- a/src/ralph_pricing/plugins/collects/shares.py +++ b/src/ralph_pricing/plugins/collects/shares.py @@ -28,9 +28,9 @@ def update_usage(device, venture, usage_name, date, value): def update(data, date): - if data.get('mount_device_id') is not None: + if data.get('device_id') is not None: device, created = Device.objects.get_or_create( - device_id=data['mount_device_id'], + device_id=data['device_id'], ) else: return @@ -39,9 +39,8 @@ def update(data, date): venture = daily_device.pricing_venture except DailyDevice.DoesNotExist: venture = None - size = data['size'] / data['share_mount_count'] usage_name = 'Disk Share {0} MB'.format(data['model']) - update_usage(device, venture, usage_name, date, size) + update_usage(device, venture, usage_name, date, data['size']) @plugin.register(chain='pricing', requires=['assets']) From 6c5b277fbae59acf23792edb2a9a83356914671b Mon Sep 17 00:00:00 2001 From: Kula Date: Tue, 3 Jun 2014 15:53:58 +0200 Subject: [PATCH 4/5] When venture have no parent then set venture parent as none --- src/ralph_pricing/plugins/collects/ventures.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ralph_pricing/plugins/collects/ventures.py b/src/ralph_pricing/plugins/collects/ventures.py index 4f56e263..0c01cd34 100644 --- a/src/ralph_pricing/plugins/collects/ventures.py +++ b/src/ralph_pricing/plugins/collects/ventures.py @@ -25,6 +25,7 @@ def update_venture(data): ) venture.parent = parent else: + venture.parent = None parent_created = False venture.save() return created + parent_created From b9ddf2891cfaac3b0d4b016c37fabe40e510c445 Mon Sep 17 00:00:00 2001 From: Kula Date: Tue, 3 Jun 2014 15:56:19 +0200 Subject: [PATCH 5/5] fix changes rst --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 58c34b43..72bfaab7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -22,6 +22,8 @@ Change Log * Improved gitignore and manifest +* When venture have no parent set venture parent as none + 2.3.0 ~~~~~