mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
update nxos_facts to handle n3k power table (#28891)
* handle power table for n3k
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user