new_mcm_group.py get_domains function not assigning members
Closed this issue · 0 comments
an0wak commented
Hi,
Noticed that script new_mcm_group.py is not assigning a member for backup chassis.
function assign_backup_lead calls function get_domains
members array never gets populated.
def get_domains(session_manager):
members = []
session = session_manager.get_session()
url = '{0}/ManagementDomainService/Domains'.format(session_manager.get_base_url())
response = session.get(url, verify=False)
if response.status_code == 200:
response = response.json()
member_devices = response.get('value')
member_devices = list(filter(lambda x: x.get(
'DomainRoleTypeValue') == 'MEMBER', member_devices))
else:
print('Failed to get domains and status code returned is %s', response.status_code)
return members