mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Fixes #30769 * add the same fix for 2 more vtp modules
This commit is contained in:
parent
17fbeeb2f0
commit
a12a05c219
3 changed files with 21 additions and 12 deletions
|
@ -149,10 +149,13 @@ def get_vtp_config(module):
|
||||||
def get_vtp_password(module):
|
def get_vtp_password(module):
|
||||||
command = 'show vtp password'
|
command = 'show vtp password'
|
||||||
body = execute_show_command(command, module)[0]
|
body = execute_show_command(command, module)[0]
|
||||||
password = body['passwd']
|
try:
|
||||||
if password:
|
password = body['passwd']
|
||||||
return str(password)
|
if password:
|
||||||
else:
|
return str(password)
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
except TypeError:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -180,10 +180,13 @@ def get_vtp_config(module):
|
||||||
def get_vtp_password(module):
|
def get_vtp_password(module):
|
||||||
command = 'show vtp password'
|
command = 'show vtp password'
|
||||||
body = execute_show_command(command, module)[0]
|
body = execute_show_command(command, module)[0]
|
||||||
password = body['passwd']
|
try:
|
||||||
if password:
|
password = body['passwd']
|
||||||
return str(password)
|
if password:
|
||||||
else:
|
return str(password)
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
except TypeError:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -147,10 +147,13 @@ def get_vtp_config(module):
|
||||||
def get_vtp_password(module):
|
def get_vtp_password(module):
|
||||||
command = 'show vtp password'
|
command = 'show vtp password'
|
||||||
body = execute_show_command(command, module)[0]
|
body = execute_show_command(command, module)[0]
|
||||||
password = body['passwd']
|
try:
|
||||||
if password:
|
password = body['passwd']
|
||||||
return str(password)
|
if password:
|
||||||
else:
|
return str(password)
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
except TypeError:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue