Class: OsCtld::Devices::V1::GroupManager

Inherits:
Manager
  • Object
show all
Includes:
OsCtl::Lib::Utils::Log
Defined in:
lib/osctld/devices/v1/group_manager.rb

Instance Attribute Summary

Attributes inherited from Manager

#configurator, #devices, #owner

Instance Method Summary collapse

Methods inherited from Manager

#add, #add_new, #apply, #changeset_sort_key, #check_availability!, #check_descendant_mode!, #check_descendants!, #check_unset_inherit!, #chmod, class_for, #detect, #do_add, #dump, #dup, #each, #export, #find, #get, #include?, #inherit, #inherit_promoted, #inherit_recursive, #inherited?, #init, #initialize, load, new_for, #promote, #provide, #remove, #replace, #select, #set_inherit, #sync, #uninherit_recursive, #unset_inherit, #update_inherited_mode, #used?, #used_by_descendants?

Constructor Details

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

Instance Method Details

#add_to_changesetObject (protected)



32
33
34
# File 'lib/osctld/devices/v1/group_manager.rb', line 32

def add_to_changeset
  # not used on v1
end

#assets(add) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/osctld/devices/v1/group_manager.rb', line 8

def assets(add)
  add.cgroup_device_list(
    group.abs_cgroup_path('devices'),
    desc: 'Controls access to devices',
    devices:
  )
end

#childrenObject



20
21
22
# File 'lib/osctld/devices/v1/group_manager.rb', line 20

def children
  group.children + group.containers
end

#configurator_classObject



24
25
26
# File 'lib/osctld/devices/v1/group_manager.rb', line 24

def configurator_class
  Devices::V1::GroupConfigurator
end

#parentObject



16
17
18
# File 'lib/osctld/devices/v1/group_manager.rb', line 16

def parent
  group.root? ? nil : group.parent
end