diff --git a/osc_tui/nicsGrid.py b/osc_tui/nicsGrid.py index c7c07f3..e9164cb 100644 --- a/osc_tui/nicsGrid.py +++ b/osc_tui/nicsGrid.py @@ -5,15 +5,20 @@ class nicsGrid(selectableGrid.SelectableGrid): def __init__(self, screen, *args, **keywords): super().__init__(screen, *args, **keywords) - self.col_titles = ["Id", "State"] + self.col_titles = ["Id", "State", "SubnetId", "NetId", "Description", "MacAddress"] def refresh_call(self, name_filter=None): groups = main.GATEWAY.ReadNics(form=self.form)['Nics'] return groups def refresh(self): - groups = main.do_search(self.data.copy(), ["NicId", "State"]) + nics = main.do_search(self.data.copy(), ["NicId", "State", "SubnetId", "NetId", "Description", "MacAddress"]) values = list() - for g in groups: - values.append([g['NicId'], g["State"]]) + for n in nics: + subnet_id = n["SubnetId"] if "SubnetId" in n else "Unlinked" + net_id = n["NetId"] if "NetId" in n else "Unlinked" + description = n["Description"] if "Description" in n else "???" + mac_address = n["MacAddress"] if "MacAddress" in n else "???" + + values.append([n['NicId'], n["State"]], subnet_id, net_id, description, mac_address) self.values = values