class TritonOps::Resource::Image

Constants

CPU
DiskDriver
NICDriver
OS
State
Type

Public Class Methods

new(**options) click to toggle source
# File lib/triton-ops/resource/image.rb, line 55
def initialize(**options)
  @options = options
  self.to_h
  remove_instance_variable '@options'
  self
end

Public Instance Methods

cpu_type() click to toggle source
# File lib/triton-ops/resource/image.rb, line 183
def cpu_type
  @cpu_type ||= (@options || {}).fetch :cpu_type, nil
end
description() click to toggle source
# File lib/triton-ops/resource/image.rb, line 153
def description
  @description ||= (@options || {}).fetch :description, nil
end
disabled() click to toggle source
# File lib/triton-ops/resource/image.rb, line 97
def disabled
  @disabled ||= (@options || {}).fetch :disabled, false
end
Also aliased as: disabled?
disabled?()
Alias for: disabled
disk_driver() click to toggle source
# File lib/triton-ops/resource/image.rb, line 178
def disk_driver
  @disk_driver ||= (@options || {}).fetch :disk_driver, nil
end
files() click to toggle source
# File lib/triton-ops/resource/image.rb, line 122
def files
  @files ||= @options.fetch(:files).map { |file| file.transform_keys(&:to_sym) }
end
homepage() click to toggle source
# File lib/triton-ops/resource/image.rb, line 158
def homepage
  @homepage ||= (@options || {}).fetch :homepage, nil
end
image_size() click to toggle source
# File lib/triton-ops/resource/image.rb, line 188
def image_size
  @image_size ||= (@options || {}).fetch :image_size, nil
end
Also aliased as: size
name() click to toggle source
# File lib/triton-ops/resource/image.rb, line 82
def name
  @name ||= @options.fetch :owner
end
nic_driver() click to toggle source
# File lib/triton-ops/resource/image.rb, line 173
def nic_driver
  @nic_driver ||= (@options || {}).fetch :nic_driver, nil
end
origin() click to toggle source
# File lib/triton-ops/resource/image.rb, line 163
def origin
  @origin ||= (@options || {}).fetch :origin, nil
end
os() click to toggle source
# File lib/triton-ops/resource/image.rb, line 117
def os
  @os ||= @options.fetch :os
end
owner() click to toggle source
# File lib/triton-ops/resource/image.rb, line 77
def owner
  @owner ||= @options.fetch :owner
end
public() click to toggle source
# File lib/triton-ops/resource/image.rb, line 102
def public
  @public ||= (@options || {}).fetch :public, false
end
Also aliased as: public?
public?()
Alias for: public
published_at() click to toggle source
# File lib/triton-ops/resource/image.rb, line 107
def published_at
  @published_at ||= Coerce.to_time @options.fetch :published_at
end
requirements() click to toggle source
# File lib/triton-ops/resource/image.rb, line 134
def requirements
  @requirements ||= @options.fetch(:requirements, {}).transform_keys(&:to_sym)
end
size()
Alias for: image_size
state() click to toggle source
# File lib/triton-ops/resource/image.rb, line 92
def state
  @state ||= @options.fetch :state
end
tags() click to toggle source
# File lib/triton-ops/resource/image.rb, line 139
def tags
  @tags ||= @options.fetch(:tags, {}).transform_keys(&:to_s)
end
type() click to toggle source
# File lib/triton-ops/resource/image.rb, line 112
def type
  @type ||= @options.fetch :type
end
urn() click to toggle source
# File lib/triton-ops/resource/image.rb, line 168
def urn
  @urn ||= (@options || {}).fetch :urn, nil
end
users() click to toggle source
# File lib/triton-ops/resource/image.rb, line 144
def users
  @users ||= @options.fetch :users, []
end
uuid() click to toggle source
# File lib/triton-ops/resource/image.rb, line 72
def uuid
  @uuid ||= @options.fetch :uuid
end
v() click to toggle source
# File lib/triton-ops/resource/image.rb, line 67
def v
  @v ||= @options.fetch :v
end
version() click to toggle source
# File lib/triton-ops/resource/image.rb, line 87
def version
  @version ||= @options.fetch :owner
end