Sha256: 963a1349758e65634ce95dac3aa68e508807b1e5df59d06df04a11ce8cce1a5f

Contents?: true

Size: 1.21 KB

Versions: 9

Compression:

Stored size: 1.21 KB

Contents

class TestLab

  # Network Error Class
  class NetworkError < TestLabError; end

  # Network Class
  #
  # @author Zachary Patten <zachary AT jovelabs DOT com>
  class Network < ZTK::DSL::Base
    STATUS_KEYS   = %w(node_id id state interface network netmask broadcast provisioners).map(&:to_sym)

    # Sub-Modules
    autoload :Actions,      'testlab/network/actions'
    autoload :Bind,         'testlab/network/bind'
    autoload :ClassMethods, 'testlab/network/class_methods'
    autoload :Lifecycle,    'testlab/network/lifecycle'
    autoload :Status,       'testlab/network/status'

    include TestLab::Network::Actions
    include TestLab::Network::Bind
    include TestLab::Network::Lifecycle
    include TestLab::Network::Status

    extend  TestLab::Network::ClassMethods

    include TestLab::Utility::Misc

    # Associations and Attributes
    belongs_to  :node,          :class_name => 'TestLab::Node'
    has_many    :interfaces,    :class_name => 'TestLab::Interface'

    attribute   :provisioners,  :default => Array.new
    attribute   :config,        :default => Hash.new

    attribute   :address
    attribute   :bridge


    def initialize(*args)
      @ui     = TestLab.ui

      super(*args)
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
testlab-0.7.6 lib/testlab/network.rb
testlab-0.7.5 lib/testlab/network.rb
testlab-0.7.4 lib/testlab/network.rb
testlab-0.7.3 lib/testlab/network.rb
testlab-0.7.2 lib/testlab/network.rb
testlab-0.7.1 lib/testlab/network.rb
testlab-0.7.0 lib/testlab/network.rb
testlab-0.6.17 lib/testlab/network.rb
testlab-0.6.16 lib/testlab/network.rb