Class: Pdns::Remotebackend::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/pdns/remotebackend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHandler

Initialize with defaults values



11
12
13
14
15
16
# File 'lib/pdns/remotebackend.rb', line 11

def initialize
  @log = []
  @result = false
  @ttl = 300
  @params = {}
end

Instance Attribute Details

#logObject

Returns the value of attribute log.



8
9
10
# File 'lib/pdns/remotebackend.rb', line 8

def log
  @log
end

#resultObject

Returns the value of attribute result.



8
9
10
# File 'lib/pdns/remotebackend.rb', line 8

def result
  @result
end

#ttlObject

Returns the value of attribute ttl.



8
9
10
# File 'lib/pdns/remotebackend.rb', line 8

def ttl
  @ttl
end

Instance Method Details

#do_aborttransaction(args) ⇒ Object



132
133
# File 'lib/pdns/remotebackend.rb', line 132

def do_aborttransaction(args)
end

#do_activatedomainkey(args) ⇒ Object



78
79
# File 'lib/pdns/remotebackend.rb', line 78

def do_activatedomainkey(args) 
end

#do_adddomainkey(args) ⇒ Object



72
73
# File 'lib/pdns/remotebackend.rb', line 72

def do_adddomainkey(args)
end

#do_calculatesoaserial(args) ⇒ Object



135
136
# File 'lib/pdns/remotebackend.rb', line 135

def do_calculatesoaserial(args)
end

#do_committransaction(args) ⇒ Object



129
130
# File 'lib/pdns/remotebackend.rb', line 129

def do_committransaction(args)
end

#do_createslavedomain(args) ⇒ Object



102
103
# File 'lib/pdns/remotebackend.rb', line 102

def do_createslavedomain(args)
end

#do_deactivatedomainkey(args) ⇒ Object



81
82
# File 'lib/pdns/remotebackend.rb', line 81

def do_deactivatedomainkey(args)
end

#do_deletetsigkey(args) ⇒ Object



120
121
# File 'lib/pdns/remotebackend.rb', line 120

def do_deletetsigkey(args)
end

#do_feedents(args) ⇒ Object



111
112
# File 'lib/pdns/remotebackend.rb', line 111

def do_feedents(args)
end

#do_feedents3(args) ⇒ Object



114
115
# File 'lib/pdns/remotebackend.rb', line 114

def do_feedents3(args)
end

#do_feedrecord(args) ⇒ Object



105
106
# File 'lib/pdns/remotebackend.rb', line 105

def do_feedrecord(args)
end

#do_getbeforeandafternamesabsolute(args) ⇒ Object



87
88
# File 'lib/pdns/remotebackend.rb', line 87

def do_getbeforeandafternamesabsolute(args)
end

#do_getdomaininfo(args) ⇒ Object



96
97
# File 'lib/pdns/remotebackend.rb', line 96

def do_getdomaininfo(args) 
end

#do_getdomainkeys(args) ⇒ Object



75
76
# File 'lib/pdns/remotebackend.rb', line 75

def do_getdomainkeys(args) 
end

#do_getdomainmetadata(args) ⇒ Object



66
67
# File 'lib/pdns/remotebackend.rb', line 66

def (args)
end

#do_gettsigkey(args) ⇒ Object



90
91
# File 'lib/pdns/remotebackend.rb', line 90

def do_gettsigkey(args) 
end

#do_gettsigkeys(*args) ⇒ Object



123
124
# File 'lib/pdns/remotebackend.rb', line 123

def do_gettsigkeys(*args)
end

#do_initialize(*args) ⇒ Object



54
55
56
57
58
# File 'lib/pdns/remotebackend.rb', line 54

def do_initialize(*args)
  @params = args
  @log << "PowerDNS ruby remotebackend version #{Pdns::Remotebackend::VERSION} initialized"
  @result = true
end

#do_list(args) ⇒ Object



63
64
# File 'lib/pdns/remotebackend.rb', line 63

def do_list(args)
end

#do_lookup(args) ⇒ Object



60
61
# File 'lib/pdns/remotebackend.rb', line 60

def do_lookup(args) 
end

#do_removedomainkey(args) ⇒ Object



84
85
# File 'lib/pdns/remotebackend.rb', line 84

def do_removedomainkey(args)
end

#do_replacerrset(args) ⇒ Object



108
109
# File 'lib/pdns/remotebackend.rb', line 108

def do_replacerrset(args)
end

#do_setdomainmetadata(args) ⇒ Object



69
70
# File 'lib/pdns/remotebackend.rb', line 69

def (args)
end

#do_setnotified(args) ⇒ Object



93
94
# File 'lib/pdns/remotebackend.rb', line 93

def do_setnotified(args) 
end

#do_settsigkey(args) ⇒ Object



117
118
# File 'lib/pdns/remotebackend.rb', line 117

def do_settsigkey(args) 
end

#do_starttransaction(args) ⇒ Object



126
127
# File 'lib/pdns/remotebackend.rb', line 126

def do_starttransaction(args) 
end

#do_supermasterbackend(args) ⇒ Object



99
100
# File 'lib/pdns/remotebackend.rb', line 99

def do_supermasterbackend(args) 
end

#record(qname, qtype, content, auth = 1) ⇒ Hash

Generates a hash of resource record

Parameters:

  • qname (String)

    name of record

  • qtype (String)

    type of record

  • content (String)

    record contents

  • auth (Integer) (defaults to: 1)

    Whether we are authoritative for the record or not

Returns:

  • (Hash)

    A resource record hash



50
51
52
# File 'lib/pdns/remotebackend.rb', line 50

def record(qname,qtype,content,auth=1)
  record_prio_ttl(qname,qtype,content,0,@ttl,auth)
end

#record_prio(qname, qtype, content, prio, auth = 1) ⇒ Hash

Generates a hash of resource record

Parameters:

  • qname (String)

    name of record

  • qtype (String)

    type of record

  • content (String)

    record contents

  • prio (Integer)

    Record priority

  • auth (Integer) (defaults to: 1)

    Whether we are authoritative for the record or not

Returns:

  • (Hash)

    A resource record hash



39
40
41
# File 'lib/pdns/remotebackend.rb', line 39

def record_prio(qname,qtype,content,prio,auth=1)
  record_prio_ttl(qname,qtype,content,prio,@ttl,auth)
end

#record_prio_ttl(qname, qtype, content, prio, ttl, auth = 1) ⇒ Hash

Generates a hash of resource record

Parameters:

  • qname (String)

    name of record

  • qtype (String)

    type of record

  • content (String)

    record contents

  • prio (Integer)

    Record priority

  • ttl (Integer)

    Record TTL

  • auth (Integer) (defaults to: 1)

    Whether we are authoritative for the record or not

Returns:

  • (Hash)

    A resource record hash



27
28
29
# File 'lib/pdns/remotebackend.rb', line 27

def record_prio_ttl(qname,qtype,content,prio,ttl,auth=1)
  {:qtype => qtype, :qname => qname, :content => content, :priority => prio, :ttl => ttl, :auth => auth}
end