Sha256: a1218a256878d0d5fbd56b899d6efcfc2935fff1b43518406981905302fe4b71
Contents?: true
Size: 933 Bytes
Versions: 13
Compression:
Stored size: 933 Bytes
Contents
class TestLab # Interface Error Class class InterfaceError < TestLabError; end # Interface Class # # @author Zachary Patten <zachary AT jovelabs DOT com> class Interface < ZTK::DSL::Base # Associations and Attributes belongs_to :container, :class_name => 'TestLab::Container' belongs_to :network, :class_name => 'TestLab::Network' attribute :address attribute :mac attribute :name attribute :primary, :default => false def initialize(*args) @ui = TestLab.ui @ui.logger.debug { "Loading Interface" } super(*args) @ui.logger.debug { "Interface '#{self.id}' Loaded" } end def ip TestLab::Utility.ip(self.address) end def cidr TestLab::Utility.cidr(self.address) end def netmask TestLab::Utility.netmask(self.address) end def ptr TestLab::Utility.ptr(self.address) end end end
Version data entries
13 entries across 13 versions & 1 rubygems