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:
Nathaniel Case 2019-07-31 08:46:17 -04:00 committed by GitHub
parent 98df8e01db
commit 80d8058f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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 = {}

View file

@ -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