Class: OsCtl::Image::ContainerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/osctl/image/container_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#archObject

Returns the value of attribute arch.



3
4
5
# File 'lib/osctl/image/container_config.rb', line 3

def arch
  @arch
end

#datasetObject

Returns the value of attribute dataset.



3
4
5
# File 'lib/osctl/image/container_config.rb', line 3

def dataset
  @dataset
end

#distributionObject

Returns the value of attribute distribution.



3
4
5
# File 'lib/osctl/image/container_config.rb', line 3

def distribution
  @distribution
end

#rootfsObject

Returns the value of attribute rootfs.



3
4
5
# File 'lib/osctl/image/container_config.rb', line 3

def rootfs
  @rootfs
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/osctl/image/container_config.rb', line 3

def version
  @version
end

Instance Method Details

#datasetsObject



9
10
11
# File 'lib/osctl/image/container_config.rb', line 9

def datasets
  [dataset] + dataset.descendants
end

#dump_configObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/osctl/image/container_config.rb', line 17

def dump_config
  ret = {
    'distribution' => distribution,
    'version' => version,
    'arch' => arch
  }

  ret.update(@overrides) if @overrides
  ret
end

#groupObject



7
# File 'lib/osctl/image/container_config.rb', line 7

def group = nil

#idObject



5
# File 'lib/osctl/image/container_config.rb', line 5

def id = nil

#override_with(opts) ⇒ Object



13
14
15
# File 'lib/osctl/image/container_config.rb', line 13

def override_with(opts)
  @overrides = opts
end

#userObject



6
# File 'lib/osctl/image/container_config.rb', line 6

def user = nil