def get_contact(self): """ Get contacts from alignak_backend :return: None """ backend = Backend() all_contacts = backend.method_get(self.endpoint('contact?embedded={"use":1,' '"contactgroups":1,' '"host_notification_period":1,' '"service_notification_period":1,' '"host_notification_commands":1,' '"service_notification_commands":1}')) for contact in all_contacts: contact['imported_from'] = 'alignakbackend' # use self.single_relation(contact, 'use', 'name') # host_notification_period self.single_relation(contact, 'host_notification_period', 'timeperiod_name') # service_notification_period self.single_relation(contact, 'service_notification_period', 'timeperiod_name') # contactgroups self.multiple_relation(contact, 'contactgroups', 'contactgroup_name') # host_notification_commands self.multiple_relation(contact, 'host_notification_commands', 'command_name') # service_notification_commands self.multiple_relation(contact, 'service_notification_commands', 'command_name') self.backend_ids['contacts'][contact['_id']] = contact['contact_name'] self.clean_unusable_keys(contact) self.config['contacts'].append(contact)
def hook_load_retention(self, scheduler): """ Load retention data from alignak-backend :param scheduler: scheduler instance of alignak :type scheduler: object :return: None """ backend = Backend() all_data = {'hosts': {}, 'services': {}} response = backend.method_get(self.endpoint('retentionhost')) for host in response: all_data['hosts'][host['host']] = host response = backend.method_get(self.endpoint('retentionservice')) for service in response: all_data['services'][(service['service'][0], service['service'][1])] = service scheduler.restore_retention_data(all_data)
def get_services(self): """ Get services from alignak_backend :return: None """ backend = Backend() all_services = backend.method_get(self.endpoint('service?embedded={"use":1,"host_name":1,' '"servicegroups":1,"check_command":1,' '"check_period":1,"notification_period":1,' '"contacts":1,"contact_groups":1,' '"escalations":1,"maintenance_period":1,' '"service_dependencies":1}')) logger.warning("[Alignak Backend Arbit] Got %d services", len(all_services)) for service in all_services: service['imported_from'] = 'alignakbackend' # check_command if 'check_command' in service: if service['check_command'] is None: del service['check_command'] elif 'command_name' in service['check_command']: service['check_command'] = service['check_command']['command_name'] else: del service['check_command'] if 'check_command_args' in service: if 'check_command' not in service: service['check_command'] = '' else: service['check_command'] += '!' service['check_command'] += service['check_command_args'] del service['check_command_args'] # use self.single_relation(service, 'use', 'name') # host_name self.single_relation(service, 'host_name', 'host_name') # check_period self.single_relation(service, 'check_period', 'timeperiod_name') # notification_period self.single_relation(service, 'notification_period', 'timeperiod_name') # maintenance_period self.single_relation(service, 'maintenance_period', 'timeperiod_name') # servicegroups self.multiple_relation(service, 'servicegroups', 'servicegroup_name') # contacts self.multiple_relation(service, 'contacts', 'contact_name') # contact_groups self.multiple_relation(service, 'contact_groups', 'contactgroup_name') # escalations self.multiple_relation(service, 'escalations', 'escalation_name') # service_dependencies self.multiple_relation(service, 'service_dependencies', 'service_name') self.clean_unusable_keys(service) self.config['services'].append(service)
def test_get_single(self): """ Get single data (get on object to get properties) :return: None """ backend = Backend() with HTTMock(response_get_simple): resp = backend.method_get('http://alignakbackend.local/host/55d113586376e9835e1b2fe6?projection={"host_name":1}') self.assertEqual({u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d113586376e9835e1b2fe6', u'title': u'Host'}, u'parent': {u'href': u'/', u'title': u'home'}, u'collection': {u'href': u'host', u'title': u'host'}}, u'host_name': u'alix', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d113586376e9835e1b2fe6', u'_etag': u'694909e730bf5da80f10ee386eea03d73ab9ec76'}, resp)
def get_hosts(self): """ Get hosts from alignak_backend :return: None """ backend = Backend() all_hosts = backend.method_get(self.endpoint('host?embedded={"use":1,"parents":1,' '"hostgroups":1,"check_command":1,' '"contacts":1,"contact_groups":1,' '"escalations":1,"check_period":1,' '"notification_period":1}')) logger.warning("[Alignak Backend Arbit] Got %d hosts", len(all_hosts)) for host in all_hosts: host['imported_from'] = 'alignakbackend' # use self.single_relation(host, 'use', 'name') # check_command if 'check_command' in host: if host['check_command'] is None: host['check_command'] = '' elif 'command_name' in host['check_command']: host['check_command'] = host['check_command']['command_name'] else: host['check_command'] = '' if 'check_command_args' in host: if 'check_command' not in host: host['check_command'] = '' else: host['check_command'] += '!' host['check_command'] += host['check_command_args'] del host['check_command_args'] # check_period self.single_relation(host, 'check_period', 'timeperiod_name') # notification_period self.single_relation(host, 'notification_period', 'timeperiod_name') # parents self.multiple_relation(host, 'parents', 'host_name') # hostgroups self.multiple_relation(host, 'hostgroups', 'hostgroup_name') # contacts self.multiple_relation(host, 'contacts', 'contact_name') # contact_groups self.multiple_relation(host, 'contact_groups', 'contactgroup_name') # escalations self.multiple_relation(host, 'escalations', 'escalation_name') if host['realm'] is None: del host['realm'] self.backend_ids['hosts'][host['_id']] = host['host_name'] self.clean_unusable_keys(host) self.config['hosts'].append(host)
def get_commands(self): """ Get commands from alignak_backend :return: None """ backend = Backend() all_commands = backend.method_get(self.endpoint('command?embedded={"use":1}')) logger.warning("[Alignak Backend Arbit] Got %d commands", len(all_commands)) for command in all_commands: command['imported_from'] = 'alignakbackend' # use self.single_relation(command, 'use', 'name') self.backend_ids['commands'][command['_id']] = command['command_name'] self.clean_unusable_keys(command) self.config['commands'].append(command)
def get_timeperiods(self): """ Get timeperiods from alignak_backend :return: None """ backend = Backend() all_timeperiods = backend.method_get(self.endpoint('timeperiod?embedded={"use":1}')) for timeperiod in all_timeperiods: timeperiod['imported_from'] = 'alignakbackend' # use self.single_relation(timeperiod, 'use', 'name') for daterange in timeperiod['dateranges']: timeperiod.update(daterange) del timeperiod['dateranges'] self.backend_ids['timeperiods'][timeperiod['_id']] = timeperiod['timeperiod_name'] self.clean_unusable_keys(timeperiod) self.config['timeperiods'].append(timeperiod)
def get_hostgroups(self): """ Get hostgroups from alignak_backend :return: None """ backend = Backend() all_hostgroups = backend.method_get(self.endpoint('hostgroup?embedded=' '{"hostgroup_members":1,"members":1}')) logger.info("[Alignak Backend Arbit] Got %d hostgroups", len(all_hostgroups)) for hostgroup in all_hostgroups: hostgroup['imported_from'] = 'alignakbackend' # members self.multiple_relation(hostgroup, 'members', 'host_name') # hostgroup_members self.multiple_relation(hostgroup, 'hostgroup_members', 'hostgroup_name') # realm if hostgroup['realm'] is None: del hostgroup['realm'] self.backend_ids['hostgroups'][hostgroup['_id']] = hostgroup['hostgroup_name'] self.clean_unusable_keys(hostgroup) self.config['hostgroups'].append(hostgroup)
def get_refs(self, type_data): """ Get the _id in the backend for hosts and services :param type_data: livestate type to get: livehost or liveservice :type type_data: str :return: None """ backend = Backend() if type_data == 'livehost': content = backend.method_get(self.endpoint('host?projection={"host_name":1}' '&where={"register":true}')) hosts = {} for item in content: hosts[item['_id']] = item['host_name'] self.mapping['host'][item['host_name']] = item['_id'] # get all livehost contentlh = backend.method_get(self.endpoint('livehost?embedded={"host_name":1}' '&projection={"host_name":1}')) for item in contentlh: self.ref_live['host'][item['host_name']['_id']] = { '_id': item['_id'], '_etag': item['_etag'] } del hosts[item['host_name']['_id']] # create livehost for hosts not added for key_id in hosts: data = {'host_name': key_id} headers = {'Content-Type': 'application/json'} contentadd = backend.method_post(self.endpoint('livehost'), ujson.dumps(data), headers=headers) self.ref_live['host'][key_id] = { '_id': contentadd['_id'], '_etag': contentadd['_etag'] } elif type_data == 'liveservice': content = backend.method_get(self.endpoint('service?projection={' '"service_description":1,"host_name":1}' '&embedded={"host_name":1}' '&where={"register":true}')) services = {} for item in content: services[item['_id']] = item['service_description'] self.mapping['service'][''.join([item['host_name']['host_name'], item['service_description']])] = item['_id'] # get all liveservice contentls = backend.method_get(self.endpoint('liveservice?' 'embedded={"service_description":1}' '&projection={"service_description":1}')) for item in contentls: self.ref_live['service'][item['service_description']['_id']] = { '_id': item['_id'], '_etag': item['_etag'] } del services[item['service_description']['_id']] # create liveservice for services not added for key_id in services: data = {'service_description': key_id} headers = {'Content-Type': 'application/json'} contentadd = backend.method_post(self.endpoint('liveservice'), ujson.dumps(data), headers=headers) self.ref_live['service'][key_id] = { '_id': contentadd['_id'], '_etag': contentadd['_etag'] }
def test_get_all(self): """ Test to get all data (like all hosts). It manage the pagination :return: none """ backend = Backend() with HTTMock(response_get_all): resp = backend.method_get('http://alignakbackend.local/host?projection={"host_name":1}', ) self.assertEqual([{u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46cf26376e91e92122256', u'title': u'Host'}}, u'host_name': u'server2', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46cf26376e91e92122256', u'_etag': u'f4433b9dfd4fce9b07bc3ad8e64708d7013b9b0b'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46cf66376e91e92122257', u'title': u'Host'}}, u'host_name': u'server3', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46cf66376e91e92122257', u'_etag': u'f9cd8d7f09d8e1343d5c6717aa96cbe20077f1fa'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46cfa6376e91e92122258', u'title': u'Host'}}, u'host_name': u'server4', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46cfa6376e91e92122258', u'_etag': u'928b0e11c389843851984353a77b9b5d0f91c331'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d113586376e9835e1b2fe6', u'title': u'Host'}}, u'host_name': u'alix', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d113586376e9835e1b2fe6', u'_etag': u'694909e730bf5da80f10ee386eea03d73ab9ec76'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d113616376e9835e1b2fe7', u'title': u'Host'}}, u'host_name': u'charnay', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d113616376e9835e1b2fe7', u'_etag': u'0f47f7ae688f68e62b412cdf41bd1e20439f15c5'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d113666376e9835e1b2fe8', u'title': u'Host'}}, u'host_name': u'localhost', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d113666376e9835e1b2fe8', u'_etag': u'5b3c959511085ac1eed5b8c934a4639dd72adc8c'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46cee6376e91e92122255', u'title': u'Host'}}, u'host_name': u'server1', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46cee6376e91e92122255', u'_etag': u'296d463c81e05a813fd16d901445aceea21b4beb'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46cfe6376e91e92122259', u'title': u'Host'}}, u'host_name': u'server5', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46cfe6376e91e92122259', u'_etag': u'0cd36fce7a570b5f6521f5527baac895a1b88856'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d016376e91e9212225a', u'title': u'Host'}}, u'host_name': u'server6', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d016376e91e9212225a', u'_etag': u'd0519006726c2fec2134da50bec17d425455a2d8'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d056376e91e9212225b', u'title': u'Host'}}, u'host_name': u'server7', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d056376e91e9212225b', u'_etag': u'5adb41be14f654126ed10b6d4c4118512afd1018'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d116376e91e9212225c', u'title': u'Host'}}, u'host_name': u'server8', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d116376e91e9212225c', u'_etag': u'b0f232121b3d9c39462e30eb86ac14a1b8359f04'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d156376e91e9212225d', u'title': u'Host'}}, u'host_name': u'server9', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d156376e91e9212225d', u'_etag': u'a9cbf4a11b3aad90e513e95cf8fb43d9b19ca703'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d196376e91e9212225e', u'title': u'Host'}}, u'host_name': u'server10', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d196376e91e9212225e', u'_etag': u'035606a6809bbe5ab850bffc707e31d5f9f2a92e'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d1d6376e91e9212225f', u'title': u'Host'}}, u'host_name': u'server11', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d1d6376e91e9212225f', u'_etag': u'e9fb82a8b31f61f532d494085c11e0a11d091ccc'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d206376e91e92122260', u'title': u'Host'}}, u'host_name': u'server12', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d206376e91e92122260', u'_etag': u'908884beef70ab411dcab27f9c90d462cfb7e28d'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d236376e91e92122261', u'title': u'Host'}}, u'host_name': u'server13', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d236376e91e92122261', u'_etag': u'afd02f7e58a623394ded8a614616ed2f4d346487'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d266376e91e92122262', u'title': u'Host'}}, u'host_name': u'server14', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d266376e91e92122262', u'_etag': u'd11555491b14a4b22ac8f5e67229aced12e716c1'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d296376e91e92122263', u'title': u'Host'}}, u'host_name': u'server15', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d296376e91e92122263', u'_etag': u'b797745641f488e7ca3da0c5d51aac31d36facc6'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d426376e91e92122264', u'title': u'Host'}}, u'host_name': u'server16', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d426376e91e92122264', u'_etag': u'0e2dac8de36579b7b61a0d0d365a3fa9faccc6db'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d456376e91e92122265', u'title': u'Host'}}, u'host_name': u'server17', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d456376e91e92122265', u'_etag': u'884a23470eb052e612df725a54b63064c8ca9fe7'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d486376e91e92122266', u'title': u'Host'}}, u'host_name': u'server18', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d486376e91e92122266', u'_etag': u'78662a6072789a6982287d58039bf15c54b5739b'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d516376e91e92122267', u'title': u'Host'}}, u'host_name': u'server19', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d516376e91e92122267', u'_etag': u'04f6f13e381fc82ed4018e3484e545ff165934fc'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d546376e91e92122268', u'title': u'Host'}}, u'host_name': u'server20', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d546376e91e92122268', u'_etag': u'a00f93873ec96dfaf3e45b851acbc5c82108f90d'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d596376e91e92122269', u'title': u'Host'}}, u'host_name': u'server21', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d596376e91e92122269', u'_etag': u'84027fc4a76e8d8d50fe69d0a49bcf34f5dd42f3'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d5b6376e91e9212226a', u'title': u'Host'}}, u'host_name': u'server22', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d5b6376e91e9212226a', u'_etag': u'4a4adadb580c94636c8943312a04d20cabc70471'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d5e6376e91e9212226b', u'title': u'Host'}}, u'host_name': u'server23', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d5e6376e91e9212226b', u'_etag': u'ec85cdca4528ad2657df327b0058cfc68aa7c6fa'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d616376e91e9212226c', u'title': u'Host'}}, u'host_name': u'server24', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d616376e91e9212226c', u'_etag': u'cda5b137acfd300f675963bdb6ac8b46b5fe8d59'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d46d646376e91e9212226d', u'title': u'Host'}}, u'host_name': u'server25', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d46d646376e91e9212226d', u'_etag': u'32fc9289abd81fa345883b44ac117237519f5a91'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47cfe6376e91e9212226e', u'title': u'Host'}}, u'host_name': u'server26', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47cfe6376e91e9212226e', u'_etag': u'bfc5f9da6336d8e8a1c17ae5f228264b2062d565'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d016376e91e9212226f', u'title': u'Host'}}, u'host_name': u'server27', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d016376e91e9212226f', u'_etag': u'0a4996bf381d3be0ae61ea0c455a265abe7a9960'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d056376e91e92122270', u'title': u'Host'}}, u'host_name': u'server28', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d056376e91e92122270', u'_etag': u'ef89a0be3a45988caeb68e32dd0ae21a7d00b1d8'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d086376e91e92122271', u'title': u'Host'}}, u'host_name': u'server29', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d086376e91e92122271', u'_etag': u'81608b4ae41afbb836c7d9cd8650a8fd50587201'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d0c6376e91e92122272', u'title': u'Host'}}, u'host_name': u'server30', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d0c6376e91e92122272', u'_etag': u'aa919f8d5afcf0c3d7a638479a59e1eb809c2f10'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d0f6376e91e92122273', u'title': u'Host'}}, u'host_name': u'server31', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d0f6376e91e92122273', u'_etag': u'cfe25f480a904d05eae1cbd0a6b0f9cdfa9c6443'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d126376e91e92122274', u'title': u'Host'}}, u'host_name': u'server32', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d126376e91e92122274', u'_etag': u'9a27a68d51fbc84b0443a59ee07e26395cad722d'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d156376e91e92122275', u'title': u'Host'}}, u'host_name': u'server33', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d156376e91e92122275', u'_etag': u'764407415bb9b87d509d66d6142dcb428dad4ea3'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d186376e91e92122276', u'title': u'Host'}}, u'host_name': u'server34', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d186376e91e92122276', u'_etag': u'84ffb5738f819c4a381d9c12784c0e6032cea74c'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d1b6376e91e92122277', u'title': u'Host'}}, u'host_name': u'server35', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d1b6376e91e92122277', u'_etag': u'9521ab30c0e565bbf4543c85a22439e816f6830b'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d1d6376e91e92122278', u'title': u'Host'}}, u'host_name': u'server36', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d1d6376e91e92122278', u'_etag': u'55af38bd28e1289c91634215006aee785765e662'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d206376e91e92122279', u'title': u'Host'}}, u'host_name': u'server37', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d206376e91e92122279', u'_etag': u'225de7e80b085999951d8b86adfe9b01ea683770'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d246376e91e9212227a', u'title': u'Host'}}, u'host_name': u'server38', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d246376e91e9212227a', u'_etag': u'720c0f01d2d454d0962c0a17f18e583d69b03c0f'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d276376e91e9212227b', u'title': u'Host'}}, u'host_name': u'server39', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d276376e91e9212227b', u'_etag': u'3abe3f2d07499f565019b0826d383521970961b0'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d2b6376e91e9212227c', u'title': u'Host'}}, u'host_name': u'server40', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d2b6376e91e9212227c', u'_etag': u'6cdc05a513aeaeba8a89b9ab97cafcdb3b91c5e9'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d2e6376e91e9212227d', u'title': u'Host'}}, u'host_name': u'server41', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d2e6376e91e9212227d', u'_etag': u'fe357b1b97523d020ca16c5643051cacc988308e'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d316376e91e9212227e', u'title': u'Host'}}, u'host_name': u'server42', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d316376e91e9212227e', u'_etag': u'8cc3200148fef2e053c94a2e6b3d8ea03a7dd613'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d346376e91e9212227f', u'title': u'Host'}}, u'host_name': u'server43', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d346376e91e9212227f', u'_etag': u'f0a036e10318450a32a71710c7005fd32982170f'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d386376e91e92122280', u'title': u'Host'}}, u'host_name': u'server44', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d386376e91e92122280', u'_etag': u'566d4dd11200b9f20253d7af87141b6790a21d83'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d3b6376e91e92122281', u'title': u'Host'}}, u'host_name': u'server45', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d3b6376e91e92122281', u'_etag': u'31871f63eeb39bf959341655509298e7ca18e686'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d3e6376e91e92122282', u'title': u'Host'}}, u'host_name': u'server46', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d3e6376e91e92122282', u'_etag': u'0779793b441b124b091442ae4d1ff9b239ee1f72'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d416376e91e92122283', u'title': u'Host'}}, u'host_name': u'server47', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d416376e91e92122283', u'_etag': u'7c5b90f1b17355f6314ffd8d2f3cd0a542ac6b66'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d446376e91e92122284', u'title': u'Host'}}, u'host_name': u'server48', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d446376e91e92122284', u'_etag': u'6f34c822f611d67381630f3bdf5649a4c3299c89'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d466376e91e92122285', u'title': u'Host'}}, u'host_name': u'server49', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d466376e91e92122285', u'_etag': u'7b5b44f5396b123983e032ee1ef34482b0201099'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d4a6376e91e92122286', u'title': u'Host'}}, u'host_name': u'server50', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d4a6376e91e92122286', u'_etag': u'23c4ca0c74a16e9e3ada2a03161440afb1ada8c6'}, {u'_updated': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_links': {u'self': {u'href': u'host/55d47d4d6376e91e92122287', u'title': u'Host'}}, u'host_name': u'server51', u'_created': u'Thu, 01 Jan 1970 00:00:00 GMT', u'_id': u'55d47d4d6376e91e92122287', u'_etag': u'6d9263cf5917bc9a40495820fd1dac245e9243c7'} ], resp)