@@ -2085,7 +2085,7 @@ def get_config(self, retrieve="all", full=False, sanitized=False, format="text")
20852085 startup_cfg = str (output [0 ]["output" ]) if get_startup else ""
20862086 if sanitized and startup_cfg :
20872087 startup_cfg = napalm .base .helpers .sanitize_config (
2088- startup_cfg , c .CISCO_SANITIZE_FILTERS
2088+ startup_cfg , c .EOS_SANITIZE_FILTERS
20892089 )
20902090 return {
20912091 "startup" : startup_cfg ,
@@ -2094,17 +2094,28 @@ def get_config(self, retrieve="all", full=False, sanitized=False, format="text")
20942094 }
20952095 elif get_startup or get_running :
20962096 if retrieve == "running" :
2097- commands = ["show {}-config{}" .format (retrieve , run_full )]
2097+ commands = [
2098+ "show {}-config{}{}" .format (retrieve , run_full , run_sanitized )
2099+ ]
20982100 elif retrieve == "startup" :
20992101 commands = ["show {}-config" .format (retrieve )]
21002102 output = self ._run_commands (commands , encoding = "text" )
2103+ startup_cfg = str (output [0 ]["output" ]) if get_startup else ""
2104+ if sanitized and get_startup and startup_cfg :
2105+ startup_cfg = napalm .base .helpers .sanitize_config (
2106+ startup_cfg , c .EOS_SANITIZE_FILTERS
2107+ )
21012108 return {
2102- "startup" : str ( output [ 0 ][ "output" ]) if get_startup else "" ,
2109+ "startup" : startup_cfg ,
21032110 "running" : str (output [0 ]["output" ]) if get_running else "" ,
21042111 "candidate" : "" ,
21052112 }
21062113 elif get_candidate :
2107- commands = ["show session-config named {}" .format (self .config_session )]
2114+ commands = [
2115+ "show session-config named {}{}" .format (
2116+ self .config_session , run_sanitized
2117+ )
2118+ ]
21082119 output = self ._run_commands (commands , encoding = "text" )
21092120 return {"startup" : "" , "running" : "" , "candidate" : str (output [0 ]["output" ])}
21102121 elif retrieve == "candidate" :
0 commit comments