lib/nephophobia/compute.rb in nephophobia-0.0.2 vs lib/nephophobia/compute.rb in nephophobia-0.0.3
- old
+ new
@@ -44,11 +44,11 @@
ComputeData.new data
end
end
##
- # Create the compute instance identified by +instance_id+.
+ # Create a compute instance with the given 'image_id'.
# Returns information about the new instance.
#
# +image_id+: A String representing the ID of the image.
# +params+: An optional Hash.
# See the API Reference for further details.
@@ -66,12 +66,11 @@
ComputeData.new response.body['RunInstancesResponse']
end
##
- # Shuts down the given 'instance_id'. This operation is idempotent; if
- # you terminate an instance more than once, each call will succeed.
+ # Removes the given 'instance_id'.
# Returns instances response to a state change.
#
# +instance_id+: A String representing the ID of the instance.
def destroy instance_id
@@ -83,11 +82,11 @@
ResponseData.new response.body['TerminateInstancesResponse']
end
##
- # Returns information about the given 'instance_id' +@client+ owns.
+ # Returns information about the given 'instance_id'.
#
# +instance_id+: A String representing the ID of the instance.
def find instance_id
filter = {
@@ -98,11 +97,11 @@
ComputeData.new response.body['DescribeInstancesResponse']['reservationSet']['item']
end
##
- # Reboot the compute instance identified by +instance_id+.
+ # Reboot the given 'instance_id'.
# Returns instances response to a state change.
#
# +instance_id+: A String representing the ID of the instance.
def reboot instance_id
@@ -114,11 +113,11 @@
ResponseData.new response.body['RebootInstancesResponse']
end
##
- # Starts the compute instance identified by +instance_id+.
+ # Starts the given 'instance_id'.
# Returns instances current and previous state.
#
# +instance_id+: A String representing the ID of the instance.
def start instance_id
@@ -130,10 +129,10 @@
ResponseData.new response.body
end
##
- # Stops the compute instance identified by +instance_id+.
+ # Stops the given 'instance_id'
# Returns instances current and previous state.
#
# +instance_id+: A String representing the ID of the instance.
def stop instance_id