Remove superfluous include on iosxr filesystems fact gathering (#21775)

The regex will catch only lines that start with 'Directory of' regardless.
Also, fixing unit tests while at it.
This commit is contained in:
Ricardo Carrillo Cruz 2017-02-22 15:44:17 +01:00 committed by GitHub
commit ab4e83f288
4 changed files with 9 additions and 5 deletions

View file

@ -166,11 +166,11 @@ class Default(FactsBase):
class Hardware(FactsBase):
def commands(self):
return(['dir /all | include Directory', 'show memory summary'])
return(['dir /all', 'show memory summary'])
def populate(self, results):
self.facts['filesystems'] = self.parse_filesystems(
results['dir /all | include Directory'])
results['dir /all'])
match = re.search(r'Physical Memory (\d+)M total \((\d+)',
results['show memory summary'])