Class: ZabbixApi::HttpTests

Inherits:
Basic
  • Object
show all
Defined in:
lib/zabbixapi/classes/httptests.rb

Instance Method Summary collapse

Methods inherited from Basic

#add, #all, #create, #delete, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #get_raw, #hash_equals?, #initialize, #key, #keys, #log, #merge_params, #normalize_array, #normalize_hash, #parse_keys, #symbolize_keys, #update

Constructor Details

This class inherits a constructor from ZabbixApi::Basic

Instance Method Details

#create_or_update(data) ⇒ Object



20
21
22
23
# File 'lib/zabbixapi/classes/httptests.rb', line 20

def create_or_update(data)
  httptestid = get_id(:name => data[:name])
  httptestid ? update(data.merge(:httptestid => httptestid)) : create(data)
end

#default_optionsObject



12
13
14
15
16
17
18
# File 'lib/zabbixapi/classes/httptests.rb', line 12

def default_options
  {
    :hostid => nil,
    :name => nil,
    :steps => []
  }
end

#indentifyObject



8
9
10
# File 'lib/zabbixapi/classes/httptests.rb', line 8

def indentify
  "name"
end

#method_nameObject



4
5
6
# File 'lib/zabbixapi/classes/httptests.rb', line 4

def method_name
  "httptest"
end