Class: PDNS::Override

Inherits:
API
  • Object
show all
Defined in:
lib/pdns_api/override.rb

Overview

Override for a server.

Instance Attribute Summary collapse

Attributes inherited from API

#class, #url

Instance Method Summary collapse

Methods inherited from API

#create, #delete, #ensure_array, #get, #info

Constructor Details

#initialize(http, parent, id, info = {}) ⇒ Override

Creates a configuration option object.

  • http: An HTTP object for interaction with the PowerDNS server.

  • parent: This object’s parent.

  • id: ID of the override.

  • info: Optional information of the override.



35
36
37
38
39
40
41
42
# File 'lib/pdns_api/override.rb', line 35

def initialize(http, parent, id, info = {})
  @class  = :overrides
  @http   = http
  @parent = parent
  @id     = id
  @info   = info
  @url    = "#{parent.url}/#{@class}/#{id}"
end

Instance Attribute Details

#idObject (readonly)

The ID of the override.



26
27
28
# File 'lib/pdns_api/override.rb', line 26

def id
  @id
end

Instance Method Details

#change(rrsets) ⇒ Object

Changes override information.

rrset is used as changeset for the update.



48
49
50
# File 'lib/pdns_api/override.rb', line 48

def change(rrsets)
  @http.put(@url, rrsets)
end