Class: OsCtld::GarbageCollector::ContainerRunDataset
- Inherits:
-
Object
- Object
- OsCtld::GarbageCollector::ContainerRunDataset
- Defined in:
- lib/osctld/garbage_collector.rb
Instance Attribute Summary collapse
- #dataset ⇒ OsCtl::Lib::Zfs::Dataset readonly
- #run_id ⇒ Container::RunId readonly
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #container_id ⇒ Object
- #dump ⇒ Object
-
#initialize(run_id, dataset) ⇒ ContainerRunDataset
constructor
A new instance of ContainerRunDataset.
- #pool_name ⇒ Object
Constructor Details
#initialize(run_id, dataset) ⇒ ContainerRunDataset
Returns a new instance of ContainerRunDataset.
27 28 29 30 |
# File 'lib/osctld/garbage_collector.rb', line 27 def initialize(run_id, dataset) @run_id = run_id @dataset = dataset end |
Instance Attribute Details
#dataset ⇒ OsCtl::Lib::Zfs::Dataset (readonly)
23 24 25 |
# File 'lib/osctld/garbage_collector.rb', line 23 def dataset @dataset end |
#run_id ⇒ Container::RunId (readonly)
20 21 22 |
# File 'lib/osctld/garbage_collector.rb', line 20 def run_id @run_id end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
47 48 49 |
# File 'lib/osctld/garbage_collector.rb', line 47 def ==(other) other.run_id == run_id && other.dataset.name == dataset.name end |
#container_id ⇒ Object
36 37 38 |
# File 'lib/osctld/garbage_collector.rb', line 36 def container_id run_id.container_id end |
#dump ⇒ Object
40 41 42 43 44 45 |
# File 'lib/osctld/garbage_collector.rb', line 40 def dump { 'run_id' => run_id.dump, 'dataset' => dataset.name } end |
#pool_name ⇒ Object
32 33 34 |
# File 'lib/osctld/garbage_collector.rb', line 32 def pool_name run_id.pool_name end |