Class: Tiktalik::Computing::VPSImage

Inherits:
Object
  • Object
show all
Defined in:
lib/tiktalik/computing/vpsimage.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#initialize

Constructor Details

This class inherits a constructor from Tiktalik::Object

Instance Attribute Details

#create_timeObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def create_time
  @create_time
end

#descriptionObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def description
  @description
end

#is_publicObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def is_public
  @is_public
end

#nameObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def name
  @name
end

#ownerObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def owner
  @owner
end

#typeObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def type
  @type
end

#uuidObject (readonly)

String



6
7
8
# File 'lib/tiktalik/computing/vpsimage.rb', line 6

def uuid
  @uuid
end

Class Method Details

.allObject

List of VPS images.



15
16
17
18
# File 'lib/tiktalik/computing/vpsimage.rb', line 15

def self.all
  results = request(:get, '/computing/image')
  results.collect { |result| new(result) }
end

.find(uuid) ⇒ Object

Get image or backup.

Parameters:

  • uuid (String)

    UUID of image



23
24
25
26
# File 'lib/tiktalik/computing/vpsimage.rb', line 23

def self.find(uuid)
  result = request(:get, "/computing/image/#{uuid}")
  new(result)
end

Instance Method Details

#destroyObject

Delete users backup image.



29
30
31
32
# File 'lib/tiktalik/computing/vpsimage.rb', line 29

def destroy
  request(:delete, "/computing/image/#{uuid}")
  true
end