Make *_bgp modules collection safe (#61761)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
This commit is contained in:
Nilashish Chakraborty 2019-09-04 19:59:00 +05:30 committed by Paul Belanger
parent 9ee0deea24
commit a795f6941e
4 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ class NetworkModule(AnsibleModule):
if network_api == 'cliconf':
connection_type = 'network_cli'
cls = providers.get(network_os, self._name, connection_type)
cls = providers.get(network_os, self._name.split('.')[-1], connection_type)
if not cls:
msg = 'unable to find suitable provider for network os %s' % network_os

View file

@ -31,7 +31,7 @@ class NetworkModule(AnsibleModule):
if network_api == 'cliconf':
connection_type = 'network_cli'
cls = providers.get(network_os, self._name, connection_type)
cls = providers.get(network_os, self._name.split('.')[-1], connection_type)
if not cls:
msg = 'unable to find suitable provider for network os %s' % network_os

View file

@ -31,7 +31,7 @@ class NetworkModule(AnsibleModule):
if network_api == 'cliconf':
connection_type = 'network_cli'
cls = providers.get(network_os, self._name, connection_type)
cls = providers.get(network_os, self._name.split('.')[-1], connection_type)
if not cls:
msg = 'unable to find suitable provider for network os %s' % network_os

View file

@ -31,7 +31,7 @@ class NetworkModule(AnsibleModule):
if network_api == 'cliconf':
connection_type = 'network_cli'
cls = providers.get(network_os, self._name, connection_type)
cls = providers.get(network_os, self._name.split('.')[-1], connection_type)
if not cls:
msg = 'unable to find suitable provider for network os %s' % network_os