def get_device_info_for_agent(self, context, hosting_device_db):
template = hosting_device_db.template<EOL>mgmt_port = hosting_device_db.management_port<EOL>mgmt_ip = (mgmt_port['<STR_LIT>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>if mgmt_port else hosting_device_db.management_ip_address)<EOL>return {'<STR_LIT:id>': hosting_device_db.id,<EOL>'<STR_LIT:name>': template.name,<EOL>'<STR_LIT>': template.id,<EOL>'<STR_LIT>': self._get_credentials(hosting_device_db),<EOL>'<STR_LIT>': template.host_category,<EOL>'<STR_LIT>': hosting_device_db.admin_state_up,<EOL>'<STR_LIT>': template.service_types,<EOL>'<STR_LIT>': mgmt_ip,<EOL>'<STR_LIT>': hosting_device_db.protocol_port,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': str(hosting_device_db.created_at),<EOL>'<STR_LIT:status>': hosting_device_db.status,<EOL>'<STR_LIT>': template.booting_time}<EOL>
Returns information about <hosting_device> needed by config agent.

           Convenience function that service plugins can use to populate
           their resources with information about the device hosting their
           logical resource.