Class: Nl::Linux::NetShaper::AsyncOperations

Inherits:
Object
  • Object
show all
Defined in:
nl-linux/generated/nl/linux/net_shaper.rb

Instance Method Summary collapse

Instance Method Details

#do_cap_get(**args) ⇒ Nl::Async::Future<Messages::DoCapGetReply>

Get the shaper capabilities supported by the given device for the specified scope.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Interface index queried for shapers capabilities.

  • scope (Integer) —

    The scope to which the queried capabilities apply.

    Known enum values are defined in Enums::Scope.

Returns:

See Also:



1389
1390
1391
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1389

def do_cap_get(**args)
  @exchange.call(:"do", Messages::DoCapGetRequest, Messages::DoCapGetReply, args)
end

#do_delete(**args) ⇒ Nl::Async::Future<void>

Clear (remove) the specified shaper. When deleting a node shaper, reattach all the node's leaves to the deleted node's parent. If, after the removal, the parent shaper has no more leaves and the parent shaper scope is node, the parent node is deleted, recursively. When deleting a queue shaper or a netdev shaper, the shaper disappears from the hierarchy, but the queue/device can still send traffic: it has an implicit node with infinite bandwidth. The queue's implicit node feeds an implicit RR node at the root of the hierarchy.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • handle (AttributeSets::Handle, Hash<Symbol, Object>) —

    Unique identifier for the given shaper inside the owning device.

  • ifindex (Integer) —

    Interface index owning the specified shaper.

Returns:

See Also:



1329
1330
1331
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1329

def do_delete(**args)
  @exchange.call(:"do", Messages::DoDeleteRequest, nil, args)
end

#do_get(**args) ⇒ Nl::Async::Future<Messages::DoGetReply>

Get information about a shaper for a given device.

Parameters:

  • args (Hash)

Options Hash (**args):

  • handle (AttributeSets::Handle, Hash<Symbol, Object>) —

    Unique identifier for the given shaper inside the owning device.

  • ifindex (Integer) —

    Interface index owning the specified shaper.

Returns:

See Also:



1269
1270
1271
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1269

def do_get(**args)
  @exchange.call(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
end

#do_group(**args) ⇒ Nl::Async::Future<Messages::DoGroupReply>

Create or update a scheduling group, attaching the specified leaves shapers under the specified node identified by handle. The leaves shapers scope must be queue and the node shaper scope must be either node or netdev. When the node shaper has node scope, if the handle id is not specified, a new shaper of such scope is created, otherwise the specified node must already exist. When updating an existing node shaper, the specified leaves are added to the existing node; such node will also retain any preexisting leave. The parent handle for a new node shaper defaults to the parent of all the leaves, provided all the leaves share the same parent. Otherwise parent handle must be specified. The user can optionally provide shaping attributes for the node shaper. The operation is atomic, on failure no change is applied to the device shaping configuration, otherwise the node shaper full identifier, comprising binding and handle, is provided as the reply.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • handle (AttributeSets::Handle, Hash<Symbol, Object>) —

    Unique identifier for the given shaper inside the owning device.

  • metric (Integer) —

    Metric used by the given shaper for bw-min, bw-max and burst.

    Known enum values are defined in Enums::Metric.

  • bw_min (Integer) —

    Guaranteed bandwidth for the given shaper.

  • bw_max (Integer) —

    Maximum bandwidth for the given shaper or 0 when unlimited.

  • burst (Integer) —

    Maximum burst-size for shaping. Should not be interpreted as a quantum.

  • priority (Integer) —

    Scheduling priority for the given shaper. The priority scheduling is applied to sibling shapers.

  • weight (Integer) —

    Relative weight for round robin scheduling of the given shaper. The scheduling is applied to all sibling shapers with the same priority.

  • ifindex (Integer) —

    Interface index owning the specified shaper.

  • parent (AttributeSets::Handle, Hash<Symbol, Object>) —

    Identifier for the parent of the affected shaper. Only needed for group operation.

  • leaves (Array<AttributeSets::LeafInfo, Hash<Symbol, Object>>) —

    Describes a set of leaves shapers for a group operation.

Returns:

See Also:



1376
1377
1378
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1376

def do_group(**args)
  @exchange.call(:"do", Messages::DoGroupRequest, Messages::DoGroupReply, args)
end

#do_set(**args) ⇒ Nl::Async::Future<void>

Create or update the specified shaper. The set operation can't be used to create a node scope shaper, use the group operation instead.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • handle (AttributeSets::Handle, Hash<Symbol, Object>) —

    Unique identifier for the given shaper inside the owning device.

  • metric (Integer) —

    Metric used by the given shaper for bw-min, bw-max and burst.

    Known enum values are defined in Enums::Metric.

  • bw_min (Integer) —

    Guaranteed bandwidth for the given shaper.

  • bw_max (Integer) —

    Maximum bandwidth for the given shaper or 0 when unlimited.

  • burst (Integer) —

    Maximum burst-size for shaping. Should not be interpreted as a quantum.

  • priority (Integer) —

    Scheduling priority for the given shaper. The priority scheduling is applied to sibling shapers.

  • weight (Integer) —

    Relative weight for round robin scheduling of the given shaper. The scheduling is applied to all sibling shapers with the same priority.

  • ifindex (Integer) —

    Interface index owning the specified shaper.

Returns:

See Also:



1306
1307
1308
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1306

def do_set(**args)
  @exchange.call(:"do", Messages::DoSetRequest, nil, args)
end

#dump_cap_get(**args) ⇒ Nl::Async::Stream<Messages::DumpCapGetReply>

Get the shaper capabilities supported by the given device for the specified scope.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Interface index queried for shapers capabilities.

Returns:

See Also:



1399
1400
1401
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1399

def dump_cap_get(**args)
  @exchange.call(:"dump", Messages::DumpCapGetRequest, Messages::DumpCapGetReply, args)
end

#dump_get(**args) ⇒ Nl::Async::Stream<Messages::DumpGetReply>

Get information about a shaper for a given device.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    Interface index owning the specified shaper.

Returns:

See Also:



1278
1279
1280
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 1278

def dump_get(**args)
  @exchange.call(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args)
end