Advertisement
Guest User

Untitled

a guest
Aug 10th, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1.         mas_ip = mas_details.get('ip')
  2.         mas_username = mas_details.get('username', 'nsroot')
  3.         mas_password = mas_details.get('password', 'nsroot')
  4.         mas_timeout = mas_details.get('timeout', 120)
  5.         mas_protocol = mas_details.get('protocol', 'http')
  6.  
  7.         # Extract device details
  8.         device_ip = device_details.get('ip')
  9.         device_username = device_details.get('username', 'nsroot')
  10.         device_password = device_details.get('password', 'nsroot')
  11.         device_type = device_details.get('type')
  12.  
  13.         if not device_ip or not mas_ip or not device_type:
  14.             logger_object.critical("Details not provided - MAS IP: " + str(mas_ip) + ", Device IP: " + str(device_ip) + ", Device Type: " + str(device_type))
  15.             return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement