def action_detail(self, name): """[EXTERNAL]""" zbx_name = ZabbixActionContainer.action_name_factory( self.dc.name, name) zac = ZabbixActionContainer.from_zabbix_name(self.ezx.zapi, zbx_name) return zac.as_mgmt_data
def action_delete(self, name): """[EXTERNAL]""" zbx_name = ZabbixActionContainer.action_name_factory( self.dc.name, name) zac = ZabbixActionContainer.from_zabbix_name(self.ezx.zapi, zbx_name) zac.delete() return None
def action_update(self, name, data): """[EXTERNAL]""" data.pop('name', None) # Action name cannot be changed zbx_name = ZabbixActionContainer.action_name_factory( self.dc.name, name) zac = ZabbixActionContainer.from_zabbix_name( self.ezx.zapi, zbx_name, # we don't need to fetch hostgroups when we are replacing them resolve_hostgroups='hostgroups' not in data, # we don't need to fetch usergroups when we are replacing them resolve_usergroups='usergroups' not in data) zac.update(self.dc.name, data) return zac.as_mgmt_data