cocluto v1.02 : adapted code to the recent addition of the guaranteed_util field in the machines table

fixes [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3792]
This commit is contained in:
Guillaume Raffy 2024-03-13 15:50:47 +01:00
parent 1ddf7270d4
commit f36b2d9d9c
2 changed files with 5 additions and 5 deletions

View File

@ -72,7 +72,7 @@ def get_flops_price_over_time(inventory, time_value):
flops_prices = [] flops_prices = []
for row in rows: for row in rows:
(name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number) = row (name, _serial_number, _affectation, _machine_spec_id, _command_id, price_ex_vat, _pos_x, _pos_y, _pos_z, _inv_number, _guaranteed_until) = row
is_cluster_node = is_cluster_node_name(name) is_cluster_node = is_cluster_node_name(name)
if is_cluster_node and not is_test_machine(name): if is_cluster_node and not is_test_machine(name):
purchase_date = inventory.get_machine_purchase_date(name) purchase_date = inventory.get_machine_purchase_date(name)
@ -205,7 +205,7 @@ def draw_cluster_value_over_time_graph(inventory, from_date, to_date, graph_type
rows = inventory.query("SELECT * FROM machines") rows = inventory.query("SELECT * FROM machines")
for row in rows: for row in rows:
(name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number) = row (name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number, _guaranteed_until) = row
is_cluster_node = is_cluster_node_name(name) is_cluster_node = is_cluster_node_name(name)
if is_cluster_node and not is_test_machine(name): if is_cluster_node and not is_test_machine(name):
purchase_date = inventory.get_machine_purchase_date(name) purchase_date = inventory.get_machine_purchase_date(name)
@ -321,7 +321,7 @@ def draw_machine_age_pyramid_graph(inventory):
rows = inventory.query("SELECT * FROM machines") rows = inventory.query("SELECT * FROM machines")
for row in rows: for row in rows:
(name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number) = row (name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number, _guaranteed_until) = row
is_cluster_node = is_cluster_node_name(name) is_cluster_node = is_cluster_node_name(name)
if is_cluster_node and not is_test_machine(name): if is_cluster_node and not is_test_machine(name):
purchase_date = inventory.get_machine_purchase_date(name) purchase_date = inventory.get_machine_purchase_date(name)
@ -355,7 +355,7 @@ def draw_core_age_pyramid_graph(inventory):
rows = inventory.query("SELECT * FROM machines") rows = inventory.query("SELECT * FROM machines")
for row in rows: for row in rows:
(name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number) = row (name, serial_number, affectation, machine_spec_id, command_id, price_ex_vat, pos_x, pos_y, pos_z, inv_number, _guaranteed_until) = row
is_cluster_node = is_cluster_node_name(name) is_cluster_node = is_cluster_node_name(name)
if is_cluster_node and not is_test_machine(name): if is_cluster_node and not is_test_machine(name):
purchase_date = inventory.get_machine_purchase_date(name) purchase_date = inventory.get_machine_purchase_date(name)

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup( setup(
name='cocluto', name='cocluto',
version=1.01, version=1.02,
description='compute cluster utility tools', description='compute cluster utility tools',
url='https://git.ipr.univ-rennes1.fr/graffy/cocluto', url='https://git.ipr.univ-rennes1.fr/graffy/cocluto',
author='Guillaume Raffy', author='Guillaume Raffy',