class Infoblox::Grid

Public Class Methods

get(connection) click to toggle source
# File lib/infoblox/resource/grid.rb, line 30
def self.get(connection)
  JSON.parse(connection.get(resource_uri).body).map do |jobj|
    klass = resource_map[jobj["_ref"].split("/").first]
    if klass.nil?
      puts jobj['_ref']
      warn "umapped resource: #{jobj["_ref"]}"
    else
      klass.new(jobj.merge({:connection => connection}))
    end
  end.compact
end

Public Instance Methods

create() click to toggle source
# File lib/infoblox/resource/grid.rb, line 22
def create
  raise "Not supported"
end
delete() click to toggle source
# File lib/infoblox/resource/grid.rb, line 18
def delete
  raise "Not supported"
end
modify() click to toggle source
# File lib/infoblox/resource/grid.rb, line 26
def modify
  raise "Not supported"
end
restartservices(member_order="SEQUENTIALLY", restart_option="RESTART_IF_NEEDED", sequential_delay=15, service_option="DHCP") click to toggle source

Example of a working post for restartservices POST /wapi/v1.4/grid/b25lLmNsdXN0ZXIkMA:DNSone?_function=restartservices &member_order=SEQUENTIALLY &restart_option=RESTART_IF_NEEDED &sequential_delay=15 &service_option=DHCP

# File lib/infoblox/resource/grid.rb, line 48
def restartservices(member_order="SEQUENTIALLY",
  restart_option="RESTART_IF_NEEDED",
  sequential_delay=15,
  service_option="DHCP")

  post_body = {
    :member_order =>      member_order,
    :restart_option =>    restart_option,
    :sequential_delay =>  sequential_delay.to_i,
    :service_option =>    service_option
  }
  JSON.parse(connection.post(resource_uri + "?_function=restartservices", post_body).body);
end