pull/30352/head
rahushen 7 years ago committed by Trishna Guha
parent 578ae3b238
commit bc6e015a86

@ -209,7 +209,7 @@ class FactsBase(object):
class Default(FactsBase):
VERSION_MAP = frozenset([
VERSION_MAP_7K = frozenset([
('sys_ver_str', 'version'),
('proc_board_id', 'serialnum'),
('chassis_id', 'model'),
@ -217,9 +217,20 @@ class Default(FactsBase):
('host_name', 'hostname')
])
VERSION_MAP = frozenset([
('kickstart_ver_str', 'version'),
('proc_board_id', 'serialnum'),
('chassis_id', 'model'),
('kick_file_name', 'image'),
('host_name', 'hostname')
])
def populate(self):
data = self.run('show version', 'json')
if data:
if data.get('sys_ver_str'):
self.facts.update(self.transform_dict(data, self.VERSION_MAP_7K))
else:
self.facts.update(self.transform_dict(data, self.VERSION_MAP))

Loading…
Cancel
Save