Revision 5dbe379b
Added by Marc Dequènes over 10 years ago
lib/cyborghood/command_runner.rb | ||
---|---|---|
case cmdline.shift.upcase
|
||
when "ZONE"
|
||
return if cmdline.empty?
|
||
zone = cmdline.shift.downcase
|
||
zone = cmdline.shift
|
||
|
||
dom = DnsDomain.new(zone)
|
||
unless dom.hosted?
|
||
... | ... | |
case cmdline.shift.upcase
|
||
when "ZONE"
|
||
return if cmdline.empty?
|
||
zone = cmdline.shift.downcase
|
||
zone = cmdline.shift
|
||
dom = DnsDomain.new(zone)
|
||
unless dom.hosted?
|
||
result.message = _("This zone is not hosted here.")
|
lib/cyborghood/objects.rb | ||
---|---|---|
attr_reader :ldap, :name
|
||
|
||
def initialize(name)
|
||
@name = name
|
||
@name = name.downcase.gsub(/\.$/, '')
|
||
raise CyberError.new(:unrecoverable, "objects/dns", "invalid zone name") unless self.is_valid?
|
||
|
||
# may not exist (if creating a new one)
|
lib/cyborghood/services/dns.rb | ||
---|---|---|
attr_accessor :content
|
||
|
||
def initialize(zone)
|
||
@zone = zone
|
||
@zone = zone.downcase.gsub(/\.$/, '')
|
||
|
||
@config = Config.instance
|
||
@content = nil
|
Also available in: Unified diff
[fix] move zone name canonicalization in objects and strip final dot