awscli 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTVlMWI2YTU4MDVhMDA4NTJmMTYyMzE5ZWQwYzk3NzkxYzZmZWFhMw==
4
+ ZjBiZmExNDk4NWExYjBkNjEzZjIzYzAzMjg3MmM3NmRiM2FjNDliZQ==
5
5
  data.tar.gz: !binary |-
6
- NTFjYmUwNTA5MmJiZDdmNTgzZDRjYmRhYmE0MzBmNzg1YTYyMWY5Zg==
6
+ ODA0NDYzZTI3MTcyYjhiZTQzOGU4MzAzMzg2ODc4NTc4OTlmYmRkOQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTEzYmQ0YjBjMDVkOTU2MzE0YWQ0OWI5ZWM3NjhhNDAyZDlmNjI5YjgwMGY4
10
- NDMxOGNiMzE4MGU2NGNjMTkwNTExNzJiYzk1MGRhYzJjZDAwZDU1YjRhNzk5
11
- MjYyZTUwYzRkZTVkNTZhMmVmYmZkY2FlODFhYjllM2Q2NTlkOTY=
9
+ M2RlNzdkYTQ3Y2NhM2EzMzA4Yzc5YTE3NmIwZTkxYWFhNzY0NmI3NWQ4ZjU5
10
+ ODEyYTJmMzY2ODlmZDJiM2M5NWJiNzk5N2YzNGE4OGFlMzg2ODA1OGY2YzA4
11
+ ZDY2ODJlYTI5YjAyZjgxMjNhMmM4NDNhMjEyOGQwZWFhODZiOWQ=
12
12
  data.tar.gz: !binary |-
13
- NzMwYjhlMWY4ZTMwYzYxMTc4YTVmZjY0MWM0M2ZlMTJhZTMxYmViZjU5ODdj
14
- MGU1ZmYwZjBiNTM5ZDZiMmFiYzkxY2I1OTkwYmEzMTI2OGY0NDRjNDcwNmNj
15
- ZWJiZjM2MWRlNWJjMTU2ZjFjYzhiMGVjMzNiNDJmZDFmODdhODg=
13
+ MmRjMzM3YTk3MDhmZjAxMDBhZjdlZWNlNDAyOTY2ODYzYmM1OGUyZGMwM2Uw
14
+ MjczYTBlOGViNWIwMTViMzk0OWMyMDNiNTNkNTk1NjBkZmY1ODdjNjBmNjZl
15
+ MGNlNTUzMTJhMGYyM2ExMjk3MjVkYzQyMmY1YmUzZmYwNzA5MzI=
data/lib/awscli.rb CHANGED
@@ -37,6 +37,7 @@ module AwsCli
37
37
  require 'awscli/cli/ec2/vpc/net_interfaces'
38
38
  require 'awscli/cli/ec2/vpc/internet_gateways'
39
39
  require 'awscli/cli/ec2/vpc/dhcp'
40
+ require 'awscli/cli/ec2/vpc/subnet'
40
41
  #S3
41
42
  require 'awscli/cli/s3'
42
43
  require 'awscli/cli/s3/files'
@@ -0,0 +1,48 @@
1
+ module AwsCli
2
+ module CLI
3
+ module EC2
4
+ module VPC
5
+ require 'awscli/cli/ec2/vpc'
6
+ class Subnet < Thor
7
+
8
+ desc "list", "List VPCs"
9
+ def list
10
+ create_ec2_object
11
+ @ec2.list
12
+ end
13
+
14
+ desc "create", "Create a subnet in an existing VPC, You can create up to 20 subnets in a VPC."
15
+ method_option :vpc_id, :aliases => "-v", :type => :string, :required => true, :desc => "The ID of the VPC where you want to create the subnet"
16
+ method_option :cidr_block, :aliases => "-c", :type => :string, :required => true, :desc => "The CIDR block you want the subnet to cover (e.g., 10.0.0.0/24)"
17
+ method_option :availability_zone, :aliases => "-z", :type => :string, :desc => "The Availability Zone you want the subnet in. Default: AWS selects a zone for you (recommended)"
18
+ def create
19
+ create_ec2_object
20
+ @ec2.create options
21
+ end
22
+
23
+ desc "delete", "Delete a subnet"
24
+ method_option :subnet_id, :aliases => "-s", :type => :string, :required => true, :desc => "The ID of the subnet you want to delete"
25
+ def delete
26
+ create_ec2_object
27
+ @ec2.delete options[:subnet_id]
28
+ end
29
+
30
+ private
31
+
32
+ def create_ec2_object
33
+ puts "ec2 Establishing Connetion..."
34
+ $ec2_conn = if parent_options[:region]
35
+ Awscli::Connection.new.request_ec2(parent_options[:region])
36
+ else
37
+ Awscli::Connection.new.request_ec2
38
+ end
39
+ puts "ec2 Establishing Connetion... OK"
40
+ @ec2 = Awscli::EC2::Subnet.new($ec2_conn)
41
+ end
42
+
43
+ AwsCli::CLI::EC2::Vpc.register AwsCli::CLI::EC2::VPC::Subnet, :subnet, 'subnet [COMMAND]', 'VPC Subnet Management'
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,3 +1,3 @@
1
1
  module Awscli
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awscli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashrith
@@ -138,7 +138,6 @@ files:
138
138
  - lib/awscli/cli/ec2/reservedinstmng.rb
139
139
  - lib/awscli/cli/ec2/secgroups.rb
140
140
  - lib/awscli/cli/ec2/spot.rb
141
- - lib/awscli/cli/ec2/subnet.rb
142
141
  - lib/awscli/cli/ec2/tags.rb
143
142
  - lib/awscli/cli/ec2/vmmng.rb
144
143
  - lib/awscli/cli/ec2/vpc/connections.rb
@@ -149,6 +148,7 @@ files:
149
148
  - lib/awscli/cli/ec2/vpc/network_acls.rb
150
149
  - lib/awscli/cli/ec2/vpc/priv_gatewats.rb
151
150
  - lib/awscli/cli/ec2/vpc/route_tables.rb
151
+ - lib/awscli/cli/ec2/vpc/subnet.rb
152
152
  - lib/awscli/cli/ec2/vpc.rb
153
153
  - lib/awscli/cli/ec2.rb
154
154
  - lib/awscli/cli/emr.rb
@@ -1,47 +0,0 @@
1
- module AwsCli
2
- module CLI
3
- module EC2
4
- require 'awscli/cli/ec2'
5
- class Subnet < Thor
6
-
7
- desc "list", "List VPCs"
8
- def list
9
- create_ec2_object
10
- @ec2.list
11
- end
12
-
13
- desc "create", "Create a subnet in an existing VPC, You can create up to 20 subnets in a VPC."
14
- method_option :vpc_id, :aliases => "-v", :type => :string, :required => true, :desc => "The ID of the VPC where you want to create the subnet"
15
- method_option :cidr_block, :aliases => "-c", :type => :string, :required => true, :desc => "The CIDR block you want the subnet to cover (e.g., 10.0.0.0/24)"
16
- method_option :availability_zone, :aliases => "-z", :type => :string, :desc => "The Availability Zone you want the subnet in. Default: AWS selects a zone for you (recommended)"
17
- def create
18
- create_ec2_object
19
- @ec2.create options
20
- end
21
-
22
- desc "delete", "Delete a subnet"
23
- method_option :subnet_id, :aliases => "-s", :type => :string, :required => true, :desc => "The ID of the subnet you want to delete"
24
- def delete
25
- create_ec2_object
26
- @ec2.delete options[:subnet_id]
27
- end
28
-
29
- private
30
-
31
- def create_ec2_object
32
- puts "ec2 Establishing Connetion..."
33
- $ec2_conn = if parent_options[:region]
34
- Awscli::Connection.new.request_ec2(parent_options[:region])
35
- else
36
- Awscli::Connection.new.request_ec2
37
- end
38
- puts "ec2 Establishing Connetion... OK"
39
- @ec2 = Awscli::EC2::Subnet.new($ec2_conn)
40
- end
41
-
42
- AwsCli::CLI::Ec2.register AwsCli::CLI::EC2::Subnet, :subnet, 'subnet [COMMAND]', 'EC2 Subnet Management'
43
-
44
- end
45
- end
46
- end
47
- end