'Joins a slave into a XenServer resource pool.'

def _join_slave(self, aggregate_id, host, compute_uuid, url, user, passwd):

    try:
        args = {'compute_uuid': compute_uuid, 'url': url, 'user': user, 'password': passwd, 'force': jsonutils.dumps(CONF.xenserver.use_join_force), 'master_addr': self._host_addr, 'master_user': CONF.xenserver.connection_username, 'master_pass': CONF.xenserver.connection_password}
        self._session.call_plugin('xenhost.py', 'host_join', args)
    except self._session.XenAPI.Failure as e:
        LOG.error('Pool-Join    failed:    %s', e)
        raise exception.AggregateError(aggregate_id=aggregate_id, action='add_to_aggregate', reason=(_('Unable    to    join    %s    in    the    pool') % host))
