Surface node_type on all node list websocket handlers

Bug #1951893 reported by Caleb Ellis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Incomplete
Medium
Unassigned

Bug Description

In order to identify what type a node is in the UI, we currently use the node's "link_type" which translates a node's type to a URL slug. It would be better to use the actual "NODE_TYPE" enum value, but we currently only receive that data for the detailed websocket node objects and not the list objects.

Ideally we should have "node_type" available for all node list objects.

Revision history for this message
Björn Tillenius (bjornt) wrote :

Would be easy to do, but I'm interested in why this is needed? I think for lists, we only deal with one type of nodes, no?

Changed in maas:
status: New → Incomplete
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

It's true we only deal with one type of node at a time, but it's useful to know what type that is when we're dealing with them. This is true regardless of whether we're in the list or details pages.

Right now I'm in the process of refactoring some of our machine list UI code to be able to work for all node types, but for some things (particularly regarding node actions) we need to know the node type. For example the machine "clone" action which works inverse to the rest - we need to know that the node is a machine before we can check that it has the correct status (Ready or Failed testing).

To be clear this is something we're already doing, just using "link_type" instead of "node_type".

Changed in maas:
status: Incomplete → New
Revision history for this message
Björn Tillenius (bjornt) wrote :

Fair enough.

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → next
Changed in maas:
milestone: next → 3.3.0
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

Is this issue still relevant after implementation of server-side filtering?

Changed in maas:
importance: High → Medium
milestone: 3.3.0 → 3.4.0
status: Triaged → Incomplete
Revision history for this message
Peter Makowski (petermakowski) wrote :
Revision history for this message
Alberto Donato (ack) wrote :

I'm confused, there seem to be two different things here:

 1) the spec says that "we decided against machine_type". Has this changed?

 2) this bug is about surfacing "node_type" (which is a field on the Node model). which basically says if the node is a machine, a device or a MAAS controller (possible values are here https://github.com/maas/maas/blob/master/src/maasserver/enum.py#L233) The machine listing page only shows machines, which brings back to the original question from comment #1, on why do we need to report the type.

Changed in maas:
status: Incomplete → New
status: New → Incomplete
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Changed in maas:
milestone: 3.4.x → 3.5.x
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.