Class: Dcmgr::NodeModules::OpenFlowPort

Inherits:
Object
  • Object
show all
Defined in:
lib/dcmgr/node_modules/openflow_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(port_info) ⇒ OpenFlowPort

Returns a new instance of OpenFlowPort.



664
665
666
667
668
669
670
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 664

def initialize port_info
  @port_info = port_info
  @lock = Mutex.new
  @has_instance = false
  @is_active = false
  @is_tunnel = false
end

Instance Attribute Details

#has_instanceObject

Returns the value of attribute has_instance.



657
658
659
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 657

def has_instance
  @has_instance
end

#ipObject

Returns the value of attribute ip.



660
661
662
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 660

def ip
  @ip
end

#is_activeObject

Returns the value of attribute is_active.



658
659
660
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 658

def is_active
  @is_active
end

#is_tunnelObject

Returns the value of attribute is_tunnel.



659
660
661
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 659

def is_tunnel
  @is_tunnel
end

#lockObject (readonly)

Returns the value of attribute lock.



656
657
658
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 656

def lock
  @lock
end

#macObject

Returns the value of attribute mac.



661
662
663
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 661

def mac
  @mac
end

#networkObject

Returns the value of attribute network.



662
663
664
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 662

def network
  @network
end

#port_infoObject (readonly)

Returns the value of attribute port_info.



655
656
657
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 655

def port_info
  @port_info
end

Instance Method Details

#active_flowsObject



672
673
674
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 672

def active_flows
  @active_flows ||= Array.new
end

#queue_flow(prefix, match, actions) ⇒ Object



680
681
682
683
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 680

def queue_flow prefix, match, actions
  active_flows << match
  queued_flows << ["#{prefix},#{match}", actions]
end

#queued_flowsObject



676
677
678
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 676

def queued_flows
  @queued_flows ||= Array.new
end