awscli 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/awscli/cli/ec2/instances.rb +19 -19
- data/lib/awscli/cli/ec2/vmmng.rb +7 -5
- data/lib/awscli/ec2.rb +6 -2
- data/lib/awscli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmE4ZjVkYWQ3OTg2OWYzODY0OTU5MGZkM2JhNzllMGNmY2MzYjk1Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTRjMDAyYWI2MTU4NDAzNzljNzRmNDIwMzBmOTA0ZmIxYjM3OWZiOQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzgxMTY2YTBlZmJlYTEwMDBlZTAwZDdmYTY4Y2QzZTExYWZmYjM3NzMxNGMx
|
10
|
+
M2I2YzEyMzJhNjljZDA0YjhiZTU4NTZjY2ViNzhmYmI4NmMyNjNkNmRlNDRj
|
11
|
+
NWY5M2I1ZTdkZjc4NmJkZTYwNjFiZjAzYTFkMjJmZmQzNGQzMjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzJkZjZkNzIzOWNiMmY5NmIxZWY5YTBkMWViNGYzMzRmYTM1MmUwMDRjYThl
|
14
|
+
NjU0OWY3Y2EwZDIzODI5MDUyMzc4M2VhNGM5NTA1NDg0YjhmMDFjYWQ4OTgx
|
15
|
+
YWI2ZjdjZjlhNTg1NjU2OThiZjNmYjA1YzA4ZmNkOWNkZDU1NGU=
|
@@ -6,7 +6,7 @@ module AwsCli
|
|
6
6
|
|
7
7
|
# default_task :list
|
8
8
|
|
9
|
-
desc "list", "
|
9
|
+
desc "list", "lise the instances"
|
10
10
|
long_desc <<-LONGDESC
|
11
11
|
List and describe your instances
|
12
12
|
The INSTANCE parameter is the instance ID(s) to describe.
|
@@ -19,7 +19,7 @@ module AwsCli
|
|
19
19
|
@ec2.list_instances
|
20
20
|
end
|
21
21
|
|
22
|
-
desc "diatt", "
|
22
|
+
desc "diatt", "list instance attributes"
|
23
23
|
long_desc <<-LONGDESC
|
24
24
|
Describes the specified attribute of the specified instance. You can specify only one attribute at a time.
|
25
25
|
\x5
|
@@ -38,7 +38,7 @@ module AwsCli
|
|
38
38
|
end
|
39
39
|
|
40
40
|
|
41
|
-
desc "miatt", "
|
41
|
+
desc "miatt", "modify instance attributes"
|
42
42
|
long_desc <<-LONGDESC
|
43
43
|
Modifies an instance attribute. Only one attribute can be specified per call.
|
44
44
|
LONGDESC
|
@@ -64,7 +64,7 @@ module AwsCli
|
|
64
64
|
|
65
65
|
end
|
66
66
|
|
67
|
-
desc "riatt", "
|
67
|
+
desc "riatt", "reset instances attribute(s)"
|
68
68
|
long_desc <<-LONGDESC
|
69
69
|
Resets an instance attribute to its initial value. Only one attribute can be specified per call.
|
70
70
|
LONGDESC
|
@@ -90,17 +90,17 @@ module AwsCli
|
|
90
90
|
@ec2.describe_instance_status options[:instance_id]
|
91
91
|
end
|
92
92
|
|
93
|
-
desc "import", "ec2_import_instance"
|
94
|
-
long_desc <<-LONGDESC
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
LONGDESC
|
99
|
-
def import
|
100
|
-
|
101
|
-
end
|
102
|
-
|
103
|
-
desc "reboot", "
|
93
|
+
# desc "import", "ec2_import_instance"
|
94
|
+
# long_desc <<-LONGDESC
|
95
|
+
# Create an import instance task to import a virtual machine into EC2
|
96
|
+
# using meta_data from the given disk image. The volume size for the
|
97
|
+
# imported disk_image will be calculated automatically, unless specified.
|
98
|
+
# LONGDESC
|
99
|
+
# def import
|
100
|
+
# puts "Cannot find it in the *FOG*"
|
101
|
+
# end
|
102
|
+
|
103
|
+
desc "reboot", "reboot an instance"
|
104
104
|
long_desc <<-LONGDESC
|
105
105
|
Reboot selected running instances.
|
106
106
|
The INSTANCE parameter is an instance ID to reboot.
|
@@ -111,7 +111,7 @@ module AwsCli
|
|
111
111
|
@ec2.reboot_instance options[:instance_id]
|
112
112
|
end
|
113
113
|
|
114
|
-
desc "create", "
|
114
|
+
desc "create", "launch a new instance"
|
115
115
|
long_desc <<-LONGDESC
|
116
116
|
Launch an instance of a specified AMI.
|
117
117
|
|
@@ -162,7 +162,7 @@ module AwsCli
|
|
162
162
|
@ec2.create_instance options
|
163
163
|
end
|
164
164
|
|
165
|
-
desc "start", "
|
165
|
+
desc "start", "start instances"
|
166
166
|
long_desc <<-LONGDESC
|
167
167
|
Start selected running instances.
|
168
168
|
LONGDESC
|
@@ -172,7 +172,7 @@ module AwsCli
|
|
172
172
|
@ec2.start_instance options[:instance_id]
|
173
173
|
end
|
174
174
|
|
175
|
-
desc "stop", "
|
175
|
+
desc "stop", "stop instances"
|
176
176
|
long_desc <<-LONGDESC
|
177
177
|
Stop selected running instances.
|
178
178
|
LONGDESC
|
@@ -182,7 +182,7 @@ module AwsCli
|
|
182
182
|
@ec2.stop_instance options[:instance_id]
|
183
183
|
end
|
184
184
|
|
185
|
-
desc "
|
185
|
+
desc "terminate", "teminate instances"
|
186
186
|
long_desc <<-LONGDESC
|
187
187
|
Terminate selected running instances
|
188
188
|
LONGDESC
|
data/lib/awscli/cli/ec2/vmmng.rb
CHANGED
@@ -4,12 +4,14 @@ module AwsCli
|
|
4
4
|
require 'awscli/cli/ec2'
|
5
5
|
class VmManagement < Thor
|
6
6
|
|
7
|
-
|
8
|
-
def list
|
9
|
-
puts "Listing Images"
|
10
|
-
end
|
7
|
+
#TODO
|
11
8
|
|
12
|
-
|
9
|
+
# desc "list", "List Images"
|
10
|
+
# def list
|
11
|
+
# puts "Listing Images"
|
12
|
+
# end
|
13
|
+
|
14
|
+
# AwsCli::CLI::Ec2.register AwsCli::CLI::EC2::VmManagement, :vm, 'vm [COMMAND]', 'EC2 VM Management'
|
13
15
|
|
14
16
|
end
|
15
17
|
end
|
data/lib/awscli/ec2.rb
CHANGED
@@ -176,8 +176,12 @@ module Awscli
|
|
176
176
|
def terminate_instance instance_id
|
177
177
|
response = @@conn.servers.get(instance_id)
|
178
178
|
abort "InstanceId Not found :#{instance_id}" unless response
|
179
|
-
response.
|
180
|
-
|
179
|
+
unless response.state == 'terminated'
|
180
|
+
response.destroy
|
181
|
+
puts "Terminated Instance: #{instance_id}"
|
182
|
+
else
|
183
|
+
puts "Instance is already in terminated state"
|
184
|
+
end
|
181
185
|
end
|
182
186
|
|
183
187
|
def get_console_output instance_id
|
data/lib/awscli/version.rb
CHANGED