Class: DNSUpdater::Updaters::SSH

Inherits:
Updater
  • Object
show all
Defined in:
lib/dnsupdater/updaters/ssh.rb

Overview

DNS updater over SSH

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Methods inherited from Updater

getHostPort, #initialize

Constructor Details

This class inherits a constructor from DNSUpdater::Updaters::Updater

Instance Method Details

#update(params) ⇒ Object

See Also:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/dnsupdater/updaters/ssh.rb', line 18

def update(params)
    fillParams(params)

    startPortForward(params[:Server], params[:SSHParams], params[:TargetHost], params[:TargetPort], params[:TargetParams]) do |targetParams|
        targetParams[:IPs] = getIPs(params[:IPs])
    end
    waitPortForward(params[:SSHParams][:timeout])

    DNSUpdater.update(params[:TargetParams][:Protocol], params[:TargetParams], @Config)

    finishPortForward
rescue Interrupt
    raise Error, "\nCancelled!"
end