Class: ZabbixManager::HttpTests
- Defined in:
- lib/zabbix_manager/classes/httptests.rb
Instance Method Summary collapse
-
#default_options ⇒ Hash
返回创建 Web 场景时使用的默认步骤列表。.
-
#identify ⇒ String
返回 Web 场景用于业务识别的字段名。.
-
#identity_filter(data) ⇒ Hash
生成由 Web 场景名称和所属主机构成的稳定查询条件。.
-
#method_name ⇒ String
返回 Web 场景对象对应的 Zabbix API 方法前缀。.
Methods inherited from Basic
#add, #all, #create, #create_or_update, #create_raw, #delete, #delete_raw, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #get_raw, #hash_equals?, #initialize, #key, #keys, #log, #normalize_hash, #parse_keys, #update, #update_raw
Constructor Details
This class inherits a constructor from ZabbixManager::Basic
Instance Method Details
#default_options ⇒ Hash
返回创建 Web 场景时使用的默认步骤列表。
22 23 24 25 26 |
# File 'lib/zabbix_manager/classes/httptests.rb', line 22 def { steps: [] } end |
#identify ⇒ String
返回 Web 场景用于业务识别的字段名。
15 16 17 |
# File 'lib/zabbix_manager/classes/httptests.rb', line 15 def identify "name" end |
#identity_filter(data) ⇒ Hash
生成由 Web 场景名称和所属主机构成的稳定查询条件。
33 34 35 36 |
# File 'lib/zabbix_manager/classes/httptests.rb', line 33 def identity_filter(data) attributes = data.deep_symbolize_keys { name: attributes.fetch(:name), hostid: attributes.fetch(:hostid) } end |
#method_name ⇒ String
返回 Web 场景对象对应的 Zabbix API 方法前缀。
8 9 10 |
# File 'lib/zabbix_manager/classes/httptests.rb', line 8 def method_name "httptest" end |