Pull request for temp/bgp_61761 (#62469)

* Make *_bgp modules collection safe (#61761)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add changelog entry

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-09-18 10:02:42 -04:00 committed by Toshio Kuratomi
parent 4e323de7ef
commit 37c64b3eb3
5 changed files with 7 additions and 4 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- Make EOS / FRR / IOS / IOSXR bgp modules collection safe

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