update nxos_facts to handle n3k power table (#28891)
* handle power table for n3k
This commit is contained in:
parent
c7c30c6760
commit
07c1d7e1ca
1 changed files with 4 additions and 1 deletions
|
@ -431,7 +431,10 @@ class Legacy(FactsBase):
|
|||
return objects
|
||||
|
||||
def parse_power_supply_info(self, data):
|
||||
data = data['powersup']['TABLE_psinfo']['ROW_psinfo']
|
||||
if data.get('powersup').get('TABLE_psinfo_n3k'):
|
||||
data = data['powersup']['TABLE_psinfo_n3k']['ROW_psinfo_n3k']
|
||||
else:
|
||||
data = data['powersup']['TABLE_psinfo']['ROW_psinfo']
|
||||
objects = list(self.transform_iterable(data, self.POWERSUP_MAP))
|
||||
return objects
|
||||
|
||||
|
|
Loading…
Reference in a new issue