'Initializor for the LogicMonitor host object'

def __init__(self, params, module=None):

    self.change = False
    self.params = params
    self.collector = None
    LogicMonitor.__init__(self, module, **self.params)
    self.module.debug('Instantiating    Host    object')
    if self.params['hostname']:
        self.module.debug(('Hostname    is    ' + self.params['hostname']))
        self.hostname = self.params['hostname']
    else:
        self.module.debug(('No    hostname    specified.    Using    ' + self.fqdn))
        self.hostname = self.fqdn
    if self.params['displayname']:
        self.module.debug(('Display    name    is    ' + self.params['displayname']))
        self.displayname = self.params['displayname']
    else:
        self.module.debug(('No    display    name    specified.    Using    ' + self.fqdn))
        self.displayname = self.fqdn
    self.module.debug(('Attempting    to    find    host    by    displayname    ' + self.displayname))
    info = self.get_host_by_displayname(self.displayname)
    if (info is not None):
        self.module.debug('Host    found    by    displayname')
        if ((not hasattr(self.params, 'collector')) and ('agentDescription' in info)):
            self.module.debug((('Setting    collector    from    host    response.    ' + 'Collector    ') + info['agentDescription']))
            self.params['collector'] = info['agentDescription']
    else:
        self.module.debug('Host    not    found    by    displayname')
    if self.params['collector']:
        self.module.debug(('Collector    specified    is    ' + self.params['collector']))
        self.collector = self.get_collector_by_description(self.params['collector'])
    else:
        self.fail(msg='No    collector    specified.')
    if (info is None):
        self.module.debug(('Attempting    to    find    host    by    hostname    ' + self.hostname))
        info = self.get_host_by_hostname(self.hostname, self.collector)
    self.info = info
