'Return details of VPSA\'s active controller.'

def _get_active_controller_details(self):

    xml_tree = self.vpsa.send_cmd('list_controllers')
    ctrl = self._xml_parse_helper(xml_tree, 'vcontrollers', ('state', 'active'))
    if (ctrl is not None):
        return dict(target=ctrl.findtext('target'), ip=ctrl.findtext('iscsi-ip'), chap_user=ctrl.findtext('vpsa-chap-user'), chap_passwd=ctrl.findtext('vpsa-chap-secret'))
    return None
