Skip to content

Commit

Permalink
change update_host_inventory to generate feedback after update
Browse files Browse the repository at this point in the history
  • Loading branch information
Mélissa BERTIN committed May 31, 2022
1 parent e722e28 commit d52609d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zabbix_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,9 @@ def do_update_host_inventory(self, args):
#

try:
self.zapi.host.update(**query)
result = self.zapi.host.update(**query)
logger.info('Command update_host_inventory executed [%s] [%s] [%s].', host, inventory_key, inventory_value)
self.generate_feedback('Done', 'Inventory of host (' + host + ') with ID: ' + str(result['hostids'][0]) + ' updated')
except Exception as e:
logger.error('Problems updating host inventory information - %s', e)
self.generate_feedback('Error', 'Problems updating host inventory information')
Expand Down

0 comments on commit d52609d

Please sign in to comment.