Class: Dcmgr::NodeModules::OpenFlowPort
- Inherits:
-
Object
- Object
- Dcmgr::NodeModules::OpenFlowPort
- Defined in:
- lib/dcmgr/node_modules/openflow_controller.rb
Instance Attribute Summary collapse
-
#has_instance ⇒ Object
Returns the value of attribute has_instance.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#is_active ⇒ Object
Returns the value of attribute is_active.
-
#is_tunnel ⇒ Object
Returns the value of attribute is_tunnel.
-
#lock ⇒ Object
readonly
Returns the value of attribute lock.
-
#mac ⇒ Object
Returns the value of attribute mac.
-
#network ⇒ Object
Returns the value of attribute network.
-
#port_info ⇒ Object
readonly
Returns the value of attribute port_info.
Instance Method Summary collapse
- #active_flows ⇒ Object
-
#initialize(port_info) ⇒ OpenFlowPort
constructor
A new instance of OpenFlowPort.
- #queue_flow(prefix, match, actions) ⇒ Object
- #queued_flows ⇒ Object
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_instance ⇒ Object
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 |
#ip ⇒ Object
Returns the value of attribute ip.
660 661 662 |
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 660 def ip @ip end |
#is_active ⇒ Object
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_tunnel ⇒ Object
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 |
#lock ⇒ Object (readonly)
Returns the value of attribute lock.
656 657 658 |
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 656 def lock @lock end |
#mac ⇒ Object
Returns the value of attribute mac.
661 662 663 |
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 661 def mac @mac end |
#network ⇒ Object
Returns the value of attribute network.
662 663 664 |
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 662 def network @network end |
#port_info ⇒ Object (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_flows ⇒ Object
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_flows ⇒ Object
676 677 678 |
# File 'lib/dcmgr/node_modules/openflow_controller.rb', line 676 def queued_flows @queued_flows ||= Array.new end |