sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #04207
[Merge] ~ack/maas:machine-listing-drop-unused-fields into maas:master
Alberto Donato has proposed merging ~ack/maas:machine-listing-drop-unused-fields into maas:master.
Commit message:
machine listing: drop unused testing_start_time, installation_start_time
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~ack/maas/+git/maas/+merge/435129
--
Your team MAAS Committers is subscribed to branch maas:master.
diff --git a/src/maasserver/websockets/handlers/node.py b/src/maasserver/websockets/handlers/node.py
index 0e8bbb7..cba41c1 100644
--- a/src/maasserver/websockets/handlers/node.py
+++ b/src/maasserver/websockets/handlers/node.py
@@ -304,19 +304,10 @@ class NodeHandler(TimestampedModelHandler):
commissioning_script_results = []
testing_script_results = []
commissioning_start_time = None
- testing_start_time = None
- installation_start_time = None
log_results = set()
for hw_type in self._script_results.get(obj.id, {}).values():
for script_result in hw_type:
- if (
- script_result.script_set.result_type
- == RESULT_TYPE.INSTALLATION
- ):
- # Don't include installation results in the health
- # status but record the start time
- installation_start_time = script_result.started
- elif script_result.status == SCRIPT_STATUS.ABORTED:
+ if script_result.status == SCRIPT_STATUS.ABORTED:
# LP: #1724235 - Ignore aborted scripts.
continue
elif (
@@ -340,11 +331,6 @@ class NodeHandler(TimestampedModelHandler):
== RESULT_TYPE.TESTING
):
testing_script_results.append(script_result)
- if testing_start_time is None or (
- script_result.started is not None
- and script_result.started < testing_start_time
- ):
- testing_start_time = script_result.started
if not for_list:
data["commissioning_status"] = self.dehydrate_test_statuses(
commissioning_script_results
@@ -355,10 +341,6 @@ class NodeHandler(TimestampedModelHandler):
data["testing_status"] = self.dehydrate_test_statuses(
testing_script_results
)
- data["testing_start_time"] = dehydrate_datetime(testing_start_time)
- data["installation_start_time"] = dehydrate_datetime(
- installation_start_time
- )
if not for_list:
data["has_logs"] = (
log_results.difference(script_output_nsmap.keys()) == set()
diff --git a/src/maasserver/websockets/handlers/tests/test_machine.py b/src/maasserver/websockets/handlers/tests/test_machine.py
index 0c026ae..cdd2019 100644
--- a/src/maasserver/websockets/handlers/tests/test_machine.py
+++ b/src/maasserver/websockets/handlers/tests/test_machine.py
@@ -208,20 +208,6 @@ class TestMachineHandler(MAASServerTestCase):
commissioning_start_time = script_result.started
testing_scripts = node.get_latest_testing_script_results
testing_scripts = testing_scripts.exclude(status=SCRIPT_STATUS.ABORTED)
- testing_start_time = None
- for script_result in testing_scripts:
- if testing_start_time is None or (
- script_result.started
- and script_result.started < testing_start_time
- ):
- testing_start_time = script_result.started
- installation_script_result = (
- node.get_latest_installation_script_results.first()
- )
- if installation_script_result:
- installation_start_time = installation_script_result.started
- else:
- installation_start_time = None
log_results = set()
for script_result in commissioning_scripts:
if (
@@ -253,7 +239,6 @@ class TestMachineHandler(MAASServerTestCase):
),
"current_testing_script_set": node.current_testing_script_set_id,
"testing_status": handler.dehydrate_test_statuses(testing_scripts),
- "testing_start_time": dehydrate_datetime(testing_start_time),
"current_installation_script_set": (
node.current_installation_script_set_id
),
@@ -262,9 +247,6 @@ class TestMachineHandler(MAASServerTestCase):
node.current_installation_script_set
)
),
- "installation_start_time": dehydrate_datetime(
- installation_start_time
- ),
"has_logs": (
log_results.difference(script_output_nsmap.keys()) == set()
),
@@ -413,7 +395,6 @@ class TestMachineHandler(MAASServerTestCase):
"extra_macs",
"fabrics",
"fqdn",
- "installation_start_time",
"ip_addresses",
"link_type",
"metadata",
@@ -431,7 +412,6 @@ class TestMachineHandler(MAASServerTestCase):
"storage",
"tags",
"testing_script_count",
- "testing_start_time",
"testing_status",
"vlan",
}
Follow ups