ios_static_route idempotence fix (#35912)

* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate
This commit is contained in:
Nathaniel Case 2018-03-05 09:28:37 -05:00 committed by GitHub
parent 0feea66988
commit 7016b3b9ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 121 additions and 87 deletions

View file

@ -61,8 +61,7 @@ class Cliconf(CliconfBase):
else:
cmd = 'show startup-config'
flags = [] if flags is None else flags
cmd += ' '.join(flags)
cmd += ' '.join(to_list(flags))
cmd = cmd.strip()
return self.send_command(cmd)