Class: Nl::Linux::OvsFlow

Inherits:
Genl::Family show all
Defined in:
nl-linux/generated/nl/linux/ovs_flow.rb

Overview

OVS flow configuration over generic netlink.

Defined Under Namespace

Modules: AttributeSets, Enums, Flags, Messages, Notifications, Structs Classes: AsyncOperations

Constant Summary collapse

NAME =
"ovs_flow"
VERSION =
1

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Genl::Family

version

Class Method Details

.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ OvsFlow .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

Overloads:

  • .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ OvsFlow

    Parameters:

    • resolver (#call) (defaults to: ::Nl::Linux::DEFAULT_RESOLVER)
    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Returns:

  • .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

    Returns the result of the block.

    Parameters:

    • resolver (#call) (defaults to: ::Nl::Linux::DEFAULT_RESOLVER)
    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Yield Parameters:

    Returns:

    • (Object) —

      the result of the block



26
27
28
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 26

def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
  super
end

Instance Method Details

#async(stream_capacity: nil) ⇒ AsyncOperations

Returns the asynchronous operation facade for this family.

Parameters:

  • stream_capacity (::Integer, nil) (defaults to: nil)

Returns:



2942
2943
2944
2945
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 2942

def async(stream_capacity: nil)
  return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
  build_async_facade(AsyncOperations, stream_capacity:)
end

#do_get(**args) ⇒ Messages::DoGetReply

Get / dump OVS flow configuration and state

Parameters:

  • args (Hash)

Options Hash (**args):

  • dp_ifindex (Integer) —

    ifindex of local port for datapath (0 to make a request not specific to a datapath).

  • key (AttributeSets::KeyAttrs, Hash<Symbol, Object>) —

    Nested attributes specifying the flow key. Always present in notifications. Required for all requests (except dumps).

  • ufid (String) —

    A value between 1-16 octets specifying a unique identifier for the flow. Causes the flow to be indexed by this value rather than the value of the OVS_FLOW_ATTR_KEY attribute. Optional for all requests. Present in notifications if the flow was created with this attribute.

  • ufid_flags (Integer) —

    A 32-bit value of ORed flags that provide alternative semantics for flow installation and retrieval. Optional for all requests.

    Known flags are defined in Nl::Linux::OvsFlow::Flags::OvsUfidFlags.

Returns:

See Also:



2783
2784
2785
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 2783

def do_get(**args)
  exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
end

#do_new(**args) ⇒ void

This method returns an undefined value.

Create OVS flow configuration in a data path

Parameters:

  • args (Hash)

Options Hash (**args):

  • dp_ifindex (Integer) —

    ifindex of local port for datapath (0 to make a request not specific to a datapath).

  • key (AttributeSets::KeyAttrs, Hash<Symbol, Object>) —

    Nested attributes specifying the flow key. Always present in notifications. Required for all requests (except dumps).

  • actions (AttributeSets::ActionAttrs, Hash<Symbol, Object>) —

    Nested attributes specifying the actions to take for packets that match the key. Always present in notifications. Required for OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests. An OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the actions. To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any nested attributes must be given.

  • mask (AttributeSets::KeyAttrs, Hash<Symbol, Object>) —

    Nested attributes specifying the mask bits for wildcarded flow match. Mask bit value '1' specifies exact match with corresponding flow key bit, while mask bit value '0' specifies a wildcarded match. Omitting attribute is treated as wildcarding all corresponding fields. Optional for all requests. If not present, all flow key bits are exact match bits.

  • ufid (String) —

    A value between 1-16 octets specifying a unique identifier for the flow. Causes the flow to be indexed by this value rather than the value of the OVS_FLOW_ATTR_KEY attribute. Optional for all requests. Present in notifications if the flow was created with this attribute.

See Also:



2856
2857
2858
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 2856

def do_new(**args)
  exchange_message(:"do", Messages::DoNewRequest, nil, args)
end

#dump_get(**args) ⇒ Array<Messages::DumpGetReply> #dump_get(**args) {|reply| ... } ⇒ void

Get / dump OVS flow configuration and state

Overloads:

  • #dump_get(**args) ⇒ Array<Messages::DumpGetReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • dp_ifindex (Integer) —

      ifindex of local port for datapath (0 to make a request not specific to a datapath).

    • key (AttributeSets::KeyAttrs, Hash<Symbol, Object>) —

      Nested attributes specifying the flow key. Always present in notifications. Required for all requests (except dumps).

    • ufid (String) —

      A value between 1-16 octets specifying a unique identifier for the flow. Causes the flow to be indexed by this value rather than the value of the OVS_FLOW_ATTR_KEY attribute. Optional for all requests. Present in notifications if the flow was created with this attribute.

    • ufid_flags (Integer) —

      A 32-bit value of ORed flags that provide alternative semantics for flow installation and retrieval. Optional for all requests.

      Known flags are defined in Nl::Linux::OvsFlow::Flags::OvsUfidFlags.

    Returns:

  • #dump_get(**args) {|reply| ... } ⇒ void

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Options Hash (**args):

    • dp_ifindex (Integer) —

      ifindex of local port for datapath (0 to make a request not specific to a datapath).

    • key (AttributeSets::KeyAttrs, Hash<Symbol, Object>) —

      Nested attributes specifying the flow key. Always present in notifications. Required for all requests (except dumps).

    • ufid (String) —

      A value between 1-16 octets specifying a unique identifier for the flow. Causes the flow to be indexed by this value rather than the value of the OVS_FLOW_ATTR_KEY attribute. Optional for all requests. Present in notifications if the flow was created with this attribute.

    • ufid_flags (Integer) —

      A 32-bit value of ORed flags that provide alternative semantics for flow installation and retrieval. Optional for all requests.

      Known flags are defined in Nl::Linux::OvsFlow::Flags::OvsUfidFlags.

    Yield Parameters:

See Also:



2827
2828
2829
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 2827

def dump_get(**args, &block)
  exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
end

#subscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:ovs_flow>)

Returns:

  • (self)


2949
2950
2951
2952
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 2949

def subscribe(*groups) = super
# @rbs (*(:ovs_flow) groups) -> self
# @param [Array<:ovs_flow>] groups
# @return [self]

#unsubscribe(*groups) ⇒ self

Parameters:

  • groups (Array<:ovs_flow>)

Returns:

  • (self)


2953
# File 'nl-linux/generated/nl/linux/ovs_flow.rb', line 2953

def unsubscribe(*groups) = super