Unclear how to get the effective distro series for a node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
[lp:~andreserl/maas/distro_series_support was merged moments before my
review landed; this bug documents one of the points that still needs
addressing.]
In src/maasserver/
+ if node is None or node.status == NODE_STATUS.
+ series = Config.
+ else:
+ series = node.get_
In src/maasserver/
+ def get_distro_
+ """Return the distro series to install that node."""
+ if not self.distro_series or self.distro_series == DISTRO_
+ return Config.
+ else:
+ return self.distro_series
There's two levels of overriding here: get_distro_series() can return
something other than node.distro_series, and then the code in the API
view can return something else again.
I suggest putting the logic that's in the API view into
get_distro_series, and renaming the method:
def get_effective_
"""Return the distro series to install that node."""
if node is None or node.status == NODE_STATUS.
return Config.
elif not self.distro_series or self.distro_series == DISTRO_
return Config.
else:
return self.distro_series
Changed in maas: | |
importance: | High → Medium |
Changed in maas: | |
status: | Triaged → Won't Fix |