Class: ADAssault::CLI::DNS::DUZDU::Replace

Inherits:
BaseAction
  • Object
show all
Defined in:
lib/adassault/cli/dns/duzdu/replace.rb

Overview

command: ‘ada dns duzdu replace`

Since:

  • 0.0.1

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseAction

command_name, #initialize, register

Constructor Details

This class inherits a constructor from ADAssault::CLI::DNS::DUZDU::BaseAction

Class Method Details

.argumentsObject

Since:

  • 0.0.1



26
27
28
# File 'lib/adassault/cli/dns/duzdu/replace.rb', line 26

def arguments
  %i[<name> <ip>]
end

.descriptionObject

Since:

  • 0.0.1



17
18
19
# File 'lib/adassault/cli/dns/duzdu/replace.rb', line 17

def description
  'Change the value of an existing DNS A record (IPv4) via dynamic updates'
end

.long_descriptionObject

Since:

  • 0.0.1



21
22
23
24
# File 'lib/adassault/cli/dns/duzdu/replace.rb', line 21

def long_description
  '<name>: DNS name, A record. The domain is automatically appended, e.g. test ➡️ test.example.org' \
    "\n\n<ip>: IP address."
end

Instance Method Details

#run(args) ⇒ Object

Since:

  • 0.0.1



11
12
13
14
# File 'lib/adassault/cli/dns/duzdu/replace.rb', line 11

def run(args)
  res = @duz.replacev4(args[0], args[1])
  @duz.display(res, self.class.command_name)
end