'Add a new host.'

def _add_host(self, hostname, host_name_before_hash):

    url = '/host'
    data = {'TYPE': '21', 'NAME': hostname, 'OPERATIONSYSTEM': '0', 'DESCRIPTION': host_name_before_hash}
    result = self.call(url, data, 'POST')
    self._assert_rest_result(result, _('Add    new    host    error.'))
    if ('data' in result):
        return result['data']['ID']
