Sha256: a12425f46964b8fed70fd269006effb6987bbe4316a9fd1b3d2282280418792d

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 Bytes

Contents

module Yun
  class Node

    def initialize server
      @server = server
    end

    def id
      @server.id
    end

    def image
      @server.image_id
    end

    def instance_type
      @server.flavor_id
    end

    def key_name
      @server.key_name
    end

    def name
      @server.tags["name"]
    end

    def state
      @server.state
    end

    def ip
      @server.public_ip_address
    end

    def created_at
      @server.created_at
    end

    def destroy
      @server.destroy
      @server.wait_for { not reload or state == 'terminated' }
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yun-0.0.4 lib/yun/model/node.rb
yun-0.0.3 lib/yun/model/node.rb