Class: ZabbixManager::Actions
- Defined in:
- lib/zabbix_manager/classes/actions.rb
Instance Method Summary collapse
-
#get_full_data(data) ⇒ Object
从 API 获取完整/扩展的 Action 对象数据.
-
#identify ⇒ Object
用于通过 Zabbix API 标识特定 Action 对象的 id 字段名称.
-
#method_name ⇒ Object
用于与 Zabbix API 交互的方法名称.
Methods inherited from Basic
#add, #all, #create, #create_or_update, #default_options, #delete, #destroy, #dump_by_id, #get, #get_id, #get_ids, #get_ids_by_identify, #get_key_ids, #get_key_ids_by_identify, #get_or_create, #get_or_create_keys, #get_raw, #hash_equals?, #initialize, #key, #keys, #log, #merge_hashes, #normalize_array, #normalize_hash, #parse_keys, #request_raw, #symbolize_keys, #update
Constructor Details
This class inherits a constructor from ZabbixManager::Basic
Instance Method Details
#get_full_data(data) ⇒ Object
从 API 获取完整/扩展的 Action 对象数据
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/zabbix_manager/classes/actions.rb', line 16 def get_full_data(data) log "[DEBUG] 调用 get_full_data,参数为:#{data.inspect}" get_raw( { filter: { identify.to_sym => data[identify.to_sym] }, output: "extend", selectOperations: "extend", selectRecoveryOperations: "extend", selectAcknowledgeOperations: "extend", selectFilter: "extend" } ) end |
#identify ⇒ Object
用于通过 Zabbix API 标识特定 Action 对象的 id 字段名称
11 12 13 |
# File 'lib/zabbix_manager/classes/actions.rb', line 11 def identify "name" end |
#method_name ⇒ Object
用于与 Zabbix API 交互的方法名称
6 7 8 |
# File 'lib/zabbix_manager/classes/actions.rb', line 6 def method_name "action" end |