root/lib/cyborghood-mapmaker/dnssec/base.rb @ 66cff75f
90197e7b | Marc Dequènes (Duck) | #--
|
|
# CyborgHood, a distributed system management software.
|
|||
364e4a96 | Marc Dequènes (Duck) | # Copyright (c) 2009-2011 Marc Dequènes (Duck) <Duck@DuckCorp.org>
|
|
90197e7b | Marc Dequènes (Duck) | #
|
|
# This program is free software: you can redistribute it and/or modify
|
|||
# it under the terms of the GNU General Public License as published by
|
|||
# the Free Software Foundation, either version 3 of the License, or
|
|||
# (at your option) any later version.
|
|||
#
|
|||
# This program is distributed in the hope that it will be useful,
|
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
# GNU General Public License for more details.
|
|||
#
|
|||
# You should have received a copy of the GNU General Public License
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#++
|
|||
module CyborgHood
|
|||
module MapMakerLand
|
|||
class DNSSECBase
|
|||
def initialize(config)
|
|||
@config = config
|
|||
flush_cache
|
|||
end
|
|||
def zones
|
|||
@zone_list.keys
|
|||
end
|
|||
def get_zone(zone_name)
|
|||
@zone_list[zone_name]
|
|||
end
|
|||
def software
|
|||
@config.dnssec.software
|
|||
end
|
|||
def info
|
|||
{
|
|||
:software => self.software
|
|||
}
|
|||
end
|
|||
def flush_cache
|
|||
fetch_zone_list()
|
|||
end
|
|||
end
|
|||
class DNSSECZoneBase
|
|||
attr_reader :name, :input_file, :output_file, :params
|
|||
def initialize(config, name, input_file, output_file, params)
|
|||
@config = config
|
|||
@name = name
|
|||
@input_file = input_file
|
|||
@output_file = output_file
|
|||
# backend-specific parameters, used for checks or generating useful info
|
|||
@params = params
|
|||
end
|
|||
def info
|
|||
{
|
|||
:dnssec_input_file => @input_file,
|
|||
:dnssec_output_file => @output_file
|
|||
}
|
|||
end
|
|||
# methods a backend MUST implement
|
|||
# - resign
|
|||
end
|
|||
end # MapMakerLand
|
|||
end
|