Change sub_plugin check to completely ignore napalm (#59298)
This also fixes cases where sub_plugin might not be loaded in executor
This commit is contained in:
parent
98df8e01db
commit
80d8058f5c
2 changed files with 2 additions and 2 deletions
|
@ -942,7 +942,7 @@ class TaskExecutor:
|
|||
|
||||
option_vars = C.config.get_plugin_vars('connection', connection._load_name)
|
||||
plugin = connection._sub_plugin
|
||||
if plugin['type'] != 'external':
|
||||
if plugin.get('type'):
|
||||
option_vars.extend(C.config.get_plugin_vars(plugin['type'], plugin['name']))
|
||||
|
||||
options = {}
|
||||
|
|
|
@ -183,7 +183,7 @@ class Connection(NetworkConnectionBase):
|
|||
|
||||
self.napalm.open()
|
||||
|
||||
self._sub_plugin = {'type': 'external', 'name': 'napalm', 'obj': self.napalm}
|
||||
self._sub_plugin = {'name': 'napalm', 'obj': self.napalm}
|
||||
self.queue_message('vvvv', 'created napalm device for network_os %s' % self._network_os)
|
||||
self._connected = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue