* 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,11 +149,14 @@ def get_vtp_config(module):
|
|||
def get_vtp_password(module):
|
||||
command = 'show vtp password'
|
||||
body = execute_show_command(command, module)[0]
|
||||
try:
|
||||
password = body['passwd']
|
||||
if password:
|
||||
return str(password)
|
||||
else:
|
||||
return ""
|
||||
except TypeError:
|
||||
return ""
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -180,11 +180,14 @@ def get_vtp_config(module):
|
|||
def get_vtp_password(module):
|
||||
command = 'show vtp password'
|
||||
body = execute_show_command(command, module)[0]
|
||||
try:
|
||||
password = body['passwd']
|
||||
if password:
|
||||
return str(password)
|
||||
else:
|
||||
return ""
|
||||
except TypeError:
|
||||
return ""
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -147,11 +147,14 @@ def get_vtp_config(module):
|
|||
def get_vtp_password(module):
|
||||
command = 'show vtp password'
|
||||
body = execute_show_command(command, module)[0]
|
||||
try:
|
||||
password = body['passwd']
|
||||
if password:
|
||||
return str(password)
|
||||
else:
|
||||
return ""
|
||||
except TypeError:
|
||||
return ""
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue