Class: OsCtld::Devices::V2::GroupConfigurator

Inherits:
Configurator show all
Defined in:
lib/osctld/devices/v2/group_configurator.rb

Instance Attribute Summary

Attributes inherited from Configurator

#prog_name

Attributes inherited from Configurator

#owner

Instance Method Summary collapse

Methods inherited from Configurator

#attach_prog, #get_prog

Methods inherited from Configurator

#add_device, #apply_changes, #dup, #initialize, #remove_device

Constructor Details

This class inherits a constructor from OsCtld::Devices::Configurator

Instance Method Details

#abs_cgroup_pathObject (protected)



21
22
23
# File 'lib/osctld/devices/v2/group_configurator.rb', line 21

def abs_cgroup_path
  owner.abs_cgroup_path('devices')
end

#cgroup_pathObject (protected)



17
18
19
# File 'lib/osctld/devices/v2/group_configurator.rb', line 17

def cgroup_path
  owner.cgroup_path
end

#init(devices) ⇒ Object



5
6
7
8
9
# File 'lib/osctld/devices/v2/group_configurator.rb', line 5

def init(devices)
  CGroup.mkpath('devices', cgroup_path.split('/'), leaf: false)
  get_prog(devices)
  attach_prog(devices)
end

#reconfigure(devices) ⇒ Object



11
12
13
# File 'lib/osctld/devices/v2/group_configurator.rb', line 11

def reconfigure(devices)
  attach_prog(devices)
end