zaws 0.0.5 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.travis.yml +9 -18
  4. data/Gemfile +0 -0
  5. data/Gemfile.lock +26 -35
  6. data/Gemfile.lock.linux +69 -0
  7. data/Gemfile.lock.mac +81 -0
  8. data/Gemfile.lock.windows +77 -0
  9. data/LICENSE +0 -0
  10. data/README.md +11 -0
  11. data/Rakefile +1 -7
  12. data/archive/cloud_trail/cloud_trail.feature +124 -0
  13. data/bin/win_zaws.bat +2 -0
  14. data/lib/zaws.rb +54 -41
  15. data/lib/zaws/command/ai.rb +34 -0
  16. data/lib/zaws/command/bucket.rb +35 -0
  17. data/lib/zaws/command/cloud_trail.rb +43 -0
  18. data/lib/zaws/command/compute.rb +152 -87
  19. data/lib/zaws/command/config.rb +42 -0
  20. data/lib/zaws/command/elasticip.rb +19 -9
  21. data/lib/zaws/command/hosted_zone.rb +31 -18
  22. data/lib/zaws/command/iam.rb +37 -0
  23. data/lib/zaws/command/load_balancer.rb +54 -51
  24. data/lib/zaws/command/nessus.rb +41 -0
  25. data/lib/zaws/command/newrelic.rb +30 -0
  26. data/lib/zaws/command/route_table.rb +135 -122
  27. data/lib/zaws/command/security_group.rb +95 -82
  28. data/lib/zaws/command/subnet.rb +58 -46
  29. data/lib/zaws/command/sumo.rb +34 -0
  30. data/lib/zaws/command/vpc.rb +53 -0
  31. data/lib/zaws/external/awscli/awscli.rb +65 -0
  32. data/lib/zaws/external/awscli/commands.rb +10 -0
  33. data/lib/zaws/external/awscli/commands/aws.rb +40 -0
  34. data/lib/zaws/external/awscli/commands/ec2.rb +74 -0
  35. data/lib/zaws/external/awscli/commands/ec2/allocate_address.rb +42 -0
  36. data/lib/zaws/external/awscli/commands/ec2/assign_private_ip_addresses.rb +49 -0
  37. data/lib/zaws/external/awscli/commands/ec2/associate_address.rb +48 -0
  38. data/lib/zaws/external/awscli/commands/ec2/associate_route_table.rb +48 -0
  39. data/lib/zaws/external/awscli/commands/ec2/authorize_security_group_ingress.rb +70 -0
  40. data/lib/zaws/external/awscli/commands/ec2/create_route.rb +60 -0
  41. data/lib/zaws/external/awscli/commands/ec2/create_route_table.rb +40 -0
  42. data/lib/zaws/external/awscli/commands/ec2/create_security_group.rb +58 -0
  43. data/lib/zaws/external/awscli/commands/ec2/create_subnet.rb +62 -0
  44. data/lib/zaws/external/awscli/commands/ec2/create_tags.rb +53 -0
  45. data/lib/zaws/external/awscli/commands/ec2/create_vpc.rb +21 -0
  46. data/lib/zaws/external/awscli/commands/ec2/delete_route.rb +54 -0
  47. data/lib/zaws/external/awscli/commands/ec2/delete_route_table.rb +46 -0
  48. data/lib/zaws/external/awscli/commands/ec2/delete_security_group.rb +46 -0
  49. data/lib/zaws/external/awscli/commands/ec2/delete_subnet.rb +46 -0
  50. data/lib/zaws/external/awscli/commands/ec2/describe_addresses.rb +41 -0
  51. data/lib/zaws/external/awscli/commands/ec2/describe_images.rb +58 -0
  52. data/lib/zaws/external/awscli/commands/ec2/describe_instances.rb +56 -0
  53. data/lib/zaws/external/awscli/commands/ec2/describe_route_tables.rb +44 -0
  54. data/lib/zaws/external/awscli/commands/ec2/describe_security_groups.rb +50 -0
  55. data/lib/zaws/external/awscli/commands/ec2/describe_subnets.rb +48 -0
  56. data/lib/zaws/external/awscli/commands/ec2/describe_vpc_peering_connections.rb +23 -0
  57. data/lib/zaws/external/awscli/commands/ec2/describe_vpcs.rb +26 -0
  58. data/lib/zaws/external/awscli/commands/ec2/disable_vgw_route_propagation.rb +48 -0
  59. data/lib/zaws/external/awscli/commands/ec2/disassociate-address.rb +42 -0
  60. data/lib/zaws/external/awscli/commands/ec2/disassociate_route_table.rb +41 -0
  61. data/lib/zaws/external/awscli/commands/ec2/enable_vgw_route_propagation.rb +48 -0
  62. data/lib/zaws/external/awscli/commands/ec2/filter.rb +115 -0
  63. data/lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb +62 -0
  64. data/lib/zaws/external/awscli/commands/ec2/network_interfaces.rb +63 -0
  65. data/lib/zaws/external/awscli/commands/ec2/release_address.rb +42 -0
  66. data/lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb +70 -0
  67. data/lib/zaws/external/awscli/commands/ec2/run_instances.rb +21 -0
  68. data/lib/zaws/external/awscli/commands/ec2/stop_instances.rb +21 -0
  69. data/lib/zaws/external/awscli/commands/ec2/terminate_instances.rb +40 -0
  70. data/lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb +49 -0
  71. data/lib/zaws/external/awscli/commands/elb.rb +19 -0
  72. data/lib/zaws/external/awscli/commands/elb/create_load_balancer.rb +64 -0
  73. data/lib/zaws/external/awscli/commands/elb/create_load_balancer_listeners.rb +47 -0
  74. data/lib/zaws/external/awscli/commands/elb/delete_load_balancer.rb +40 -0
  75. data/lib/zaws/external/awscli/commands/elb/delete_load_balancer_listeners.rb +49 -0
  76. data/lib/zaws/external/awscli/commands/elb/deregister_instances_with_load_balancer.rb +49 -0
  77. data/lib/zaws/external/awscli/commands/elb/describe_load_balancers.rb +30 -0
  78. data/lib/zaws/external/awscli/commands/elb/register_instances_with_load_balancer.rb +49 -0
  79. data/lib/zaws/external/awscli/commands/iam.rb +31 -0
  80. data/lib/zaws/external/awscli/commands/iam/GetPolicy.rb +21 -0
  81. data/lib/zaws/external/awscli/commands/iam/GetPolicyVersion.rb +21 -0
  82. data/lib/zaws/external/awscli/commands/iam/GetRolePolicy.rb +21 -0
  83. data/lib/zaws/external/awscli/commands/route53.rb +19 -0
  84. data/lib/zaws/external/awscli/commands/route53/list_hosted_zones.rb +30 -0
  85. data/lib/zaws/external/awscli/commands/route53/list_resource_record_sets.rb +41 -0
  86. data/lib/zaws/external/awscli/commands/s3/ls.rb +34 -0
  87. data/lib/zaws/external/awscli/commands/s3/mb.rb +41 -0
  88. data/lib/zaws/external/awscli/commands/s3/sync.rb +48 -0
  89. data/lib/zaws/external/awscli/credentials.rb +22 -0
  90. data/lib/zaws/external/awscli/data.rb +10 -0
  91. data/lib/zaws/external/awscli/data/ec2.rb +33 -0
  92. data/lib/zaws/external/awscli/data/ec2/instance.rb +162 -0
  93. data/lib/zaws/external/awscli/data/ec2/security_group.rb +51 -0
  94. data/lib/zaws/external/awscli/data/ec2/subnet.rb +59 -0
  95. data/lib/zaws/external/awscli/data/ec2/vpc.rb +85 -0
  96. data/lib/zaws/external/awscli/data/iam.rb +34 -0
  97. data/lib/zaws/external/awscli/data/iam/policy.rb +42 -0
  98. data/lib/zaws/external/awscli/data/iam/policy_document.rb +52 -0
  99. data/lib/zaws/external/awscli/data/iam/policy_version.rb +42 -0
  100. data/lib/zaws/external/awscli/data/iam/role_policy.rb +52 -0
  101. data/lib/zaws/external/awscli/generators/result/ec2/addresses.rb +70 -0
  102. data/lib/zaws/external/awscli/generators/result/ec2/allocation_id.rb +39 -0
  103. data/lib/zaws/external/awscli/generators/result/ec2/association_id.rb +29 -0
  104. data/lib/zaws/external/awscli/generators/result/ec2/images.rb +46 -0
  105. data/lib/zaws/external/awscli/generators/result/ec2/instances.rb +57 -0
  106. data/lib/zaws/external/awscli/generators/result/ec2/ip_permissions.rb +70 -0
  107. data/lib/zaws/external/awscli/generators/result/ec2/network_interfaces.rb +53 -0
  108. data/lib/zaws/external/awscli/generators/result/ec2/private_ip_addresses.rb +41 -0
  109. data/lib/zaws/external/awscli/generators/result/ec2/route_tables.rb +80 -0
  110. data/lib/zaws/external/awscli/generators/result/ec2/routes.rb +58 -0
  111. data/lib/zaws/external/awscli/generators/result/ec2/security_groups.rb +73 -0
  112. data/lib/zaws/external/awscli/generators/result/ec2/subnets.rb +88 -0
  113. data/lib/zaws/external/awscli/generators/result/ec2/tags.rb +34 -0
  114. data/lib/zaws/external/awscli/generators/result/ec2/virtual_gateway.rb +32 -0
  115. data/lib/zaws/external/awscli/generators/result/elb/listeners.rb +65 -0
  116. data/lib/zaws/external/awscli/generators/result/elb/load_balancers.rb +61 -0
  117. data/lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb +52 -0
  118. data/lib/zaws/external/awscli/regions.rb +13 -0
  119. data/lib/zaws/external/nessusapi/data/agents.rb +36 -0
  120. data/lib/zaws/external/nessusapi/data/scanners.rb +35 -0
  121. data/lib/zaws/external/nessusapi/nessusapi.rb +57 -0
  122. data/lib/zaws/external/nessusapi/reources.rb +10 -0
  123. data/lib/zaws/external/nessusapi/resources/agents.rb +18 -0
  124. data/lib/zaws/external/nessusapi/resources/agents/list.rb +20 -0
  125. data/lib/zaws/external/nessusapi/resources/scanners.rb +18 -0
  126. data/lib/zaws/external/nessusapi/resources/scanners/list.rb +20 -0
  127. data/lib/zaws/external/newrelicapi/data/servers.rb +36 -0
  128. data/lib/zaws/external/newrelicapi/newrelic_client.rb +64 -0
  129. data/lib/zaws/external/newrelicapi/newrelic_creds.rb +60 -0
  130. data/lib/zaws/external/newrelicapi/newrelicapi.rb +46 -0
  131. data/lib/zaws/external/newrelicapi/resources/servers.rb +18 -0
  132. data/lib/zaws/external/newrelicapi/resources/servers/list.rb +20 -0
  133. data/lib/zaws/external/sumoapi/data/collectors.rb +35 -0
  134. data/lib/zaws/external/sumoapi/data/sources.rb +35 -0
  135. data/lib/zaws/external/sumoapi/resources/collectors.rb +18 -0
  136. data/lib/zaws/external/sumoapi/resources/collectors/list.rb +20 -0
  137. data/lib/zaws/external/sumoapi/resources/sources.rb +18 -0
  138. data/lib/zaws/external/sumoapi/resources/sources/list.rb +20 -0
  139. data/lib/zaws/external/sumoapi/sumo_client.rb +63 -0
  140. data/lib/zaws/external/sumoapi/sumo_creds.rb +67 -0
  141. data/lib/zaws/external/sumoapi/sumoapi.rb +56 -0
  142. data/lib/zaws/helper/data_lattice.rb +22 -0
  143. data/lib/zaws/helper/filestore.rb +48 -0
  144. data/lib/zaws/helper/filter.rb +15 -0
  145. data/lib/zaws/helper/inifile.rb +632 -0
  146. data/lib/zaws/helper/nessus_client.rb +143 -0
  147. data/lib/zaws/helper/nessus_creds.rb +67 -0
  148. data/lib/zaws/helper/option.rb +14 -15
  149. data/lib/zaws/helper/output.rb +81 -29
  150. data/lib/zaws/helper/process_hash.rb +47 -0
  151. data/lib/zaws/helper/shell.rb +0 -0
  152. data/lib/zaws/helper/verbose.rb +15 -0
  153. data/lib/zaws/helper/zfile.rb +8 -8
  154. data/lib/zaws/services/ai.rb +35 -0
  155. data/lib/zaws/services/ai/query.rb +135 -0
  156. data/lib/zaws/services/aws.rb +41 -0
  157. data/lib/zaws/services/chef.rb +0 -0
  158. data/lib/zaws/services/cloud_trail.rb +76 -0
  159. data/lib/zaws/services/config.rb +31 -0
  160. data/lib/zaws/services/ec2.rb +47 -0
  161. data/lib/zaws/services/ec2/compute.rb +352 -0
  162. data/lib/zaws/services/ec2/elasticip.rb +82 -0
  163. data/lib/zaws/services/ec2/route_table.rb +210 -0
  164. data/lib/zaws/services/ec2/security_group.rb +186 -0
  165. data/lib/zaws/services/ec2/subnet.rb +111 -0
  166. data/lib/zaws/services/ec2/vpc.rb +69 -0
  167. data/lib/zaws/{elb.rb → services/elb.rb} +3 -2
  168. data/lib/zaws/services/elb/load_balancer.rb +160 -0
  169. data/lib/zaws/services/iam.rb +25 -0
  170. data/lib/zaws/services/iam/policy.rb +25 -0
  171. data/lib/zaws/services/iam/role.rb +23 -0
  172. data/lib/zaws/services/nessus.rb +24 -0
  173. data/lib/zaws/services/nessus/agents.rb +19 -0
  174. data/lib/zaws/services/nessus/scanners.rb +19 -0
  175. data/lib/zaws/services/newrelic.rb +21 -0
  176. data/lib/zaws/services/newrelic/servers.rb +19 -0
  177. data/lib/zaws/{route53.rb → services/route53.rb} +1 -1
  178. data/lib/zaws/services/route53/hosted_zone.rb +36 -0
  179. data/lib/zaws/services/s3.rb +15 -0
  180. data/lib/zaws/services/s3/bucket.rb +42 -0
  181. data/lib/zaws/services/sumo.rb +21 -0
  182. data/lib/zaws/services/sumo/collectors.rb +19 -0
  183. data/lib/zaws/services/vmware.rb +0 -0
  184. data/lib/zaws/version.rb +1 -1
  185. data/shove_all.sh +6 -0
  186. data/shove_all_mac.sh +6 -0
  187. data/shove_all_windows.sh +6 -0
  188. data/spec/spec_helper.rb +0 -0
  189. data/spec/zaws/command/ec2/compute/assoc_security_group_spec.rb +135 -0
  190. data/spec/zaws/command/ec2/compute/compute_spec.rb +321 -0
  191. data/spec/zaws/command/ec2/compute/images_spec.rb +69 -0
  192. data/spec/zaws/command/ec2/compute/management_spec.rb +364 -0
  193. data/spec/zaws/command/ec2/compute/network_spec.rb +93 -0
  194. data/spec/zaws/command/ec2/compute/node_spec.rb +70 -0
  195. data/spec/zaws/command/ec2/compute/secondary_ip_spec.rb +212 -0
  196. data/spec/zaws/command/ec2/compute/storage_spec.rb +63 -0
  197. data/spec/zaws/command/ec2/elasticip_spec.rb +271 -0
  198. data/spec/zaws/command/ec2/route_table_spec.rb +844 -0
  199. data/spec/zaws/command/ec2/security_group_spec.rb +710 -0
  200. data/spec/zaws/command/ec2/subnet_spec.rb +273 -0
  201. data/spec/zaws/command/ec2/vpc_spec.rb +180 -0
  202. data/spec/zaws/command/elb/load_balancer_spec.rb +633 -0
  203. data/spec/zaws/command/iam/policy_spec.rb +101 -0
  204. data/spec/zaws/command/iam/role_policy_spec.rb +35 -0
  205. data/spec/zaws/command/route53/hosted_zone_spec.rb +100 -0
  206. data/spec/zaws/command/s3/bucket_spec.rb +70 -0
  207. data/spec/zaws/external/awscli/data/ec2/instance_spec.rb +90 -0
  208. data/spec/zaws/external/awscli/data/iam/policy_document_spec.rb +56 -0
  209. data/spec/zaws/external/awscli/data/iam/role_policy_spec.rb +54 -0
  210. data/spec/zaws/external/awscli/get_aws_version_spec.rb +18 -0
  211. data/spec/zaws/helper/option_spec.rb +54 -0
  212. data/spec/zaws/helper/output_spec.rb +144 -0
  213. data/spec/zaws/helper/process_hash_spec.rb +48 -0
  214. data/spec/zaws/helper/shell_spec.rb +56 -0
  215. data/spec/zaws/nessus/scanners.json +0 -0
  216. data/spec/zaws/version_spec.rb +18 -0
  217. data/zaws.gemspec +1 -3
  218. metadata +260 -189
  219. data/feature/compute/assoc_security_group.feature +0 -55
  220. data/feature/compute/compute.feature +0 -138
  221. data/feature/compute/secondary_ip.feature +0 -107
  222. data/feature/compute/view.feature +0 -23
  223. data/feature/compute/view_images.feature +0 -24
  224. data/feature/elasticip/elasticip.feature +0 -138
  225. data/feature/elasticip/view.feature +0 -18
  226. data/feature/hosted_zone/view.feature +0 -17
  227. data/feature/hosted_zone/view_record.feature +0 -29
  228. data/feature/load_balancer/instance_registration.feature +0 -120
  229. data/feature/load_balancer/listener.feature +0 -86
  230. data/feature/load_balancer/load_balancer.feature +0 -101
  231. data/feature/load_balancer/view.feature +0 -18
  232. data/feature/route_table/assoc_subnet.feature +0 -128
  233. data/feature/route_table/route_propagation.feature +0 -93
  234. data/feature/route_table/route_table.feature +0 -91
  235. data/feature/route_table/route_to_gateway.feature +0 -69
  236. data/feature/route_table/route_to_instance.feature +0 -115
  237. data/feature/route_table/view.feature +0 -25
  238. data/feature/security_group/ingress_cidr.feature +0 -144
  239. data/feature/security_group/ingress_group.feature +0 -184
  240. data/feature/security_group/security_group.feature +0 -107
  241. data/feature/security_group/view.feature +0 -23
  242. data/feature/subnet/subnet.feature +0 -94
  243. data/feature/subnet/view.feature +0 -24
  244. data/feature/support/env.rb +0 -14
  245. data/feature/version.feature +0 -6
  246. data/lib/zaws/aws.rb +0 -26
  247. data/lib/zaws/ec2.rb +0 -40
  248. data/lib/zaws/ec2/compute.rb +0 -247
  249. data/lib/zaws/ec2/elasticip.rb +0 -79
  250. data/lib/zaws/ec2/route_table.rb +0 -207
  251. data/lib/zaws/ec2/security_group.rb +0 -154
  252. data/lib/zaws/ec2/subnet.rb +0 -109
  253. data/lib/zaws/elb/load_balancer.rb +0 -157
  254. data/lib/zaws/route53/hosted_zone.rb +0 -36
  255. data/spec/zaws/ec2/compute/add_volume_spec.rb +0 -39
  256. data/spec/zaws/ec2/compute/block_device_mapping_spec.rb +0 -31
  257. data/spec/zaws/ec2/compute/instance_id_by_external_id_spec.rb +0 -23
  258. data/spec/zaws/ec2/compute/instance_ping_spec.rb +0 -34
  259. data/spec/zaws/ec2/compute/instance_running_spec.rb +0 -47
  260. data/spec/zaws/ec2/compute/network_interface_json_spec.rb +0 -57
  261. data/spec/zaws/ec2/compute/nosdcheck_spec.rb +0 -17
  262. data/spec/zaws/ec2/compute/tag_instance_spec.rb +0 -21
  263. data/spec/zaws/ec2/security_group/id_by_name_spec.rb +0 -32
  264. data/spec/zaws/ec2/subnet/available_spec.rb +0 -22
  265. data/spec/zaws/ec2/subnet/declare_spec.rb +0 -31
  266. data/spec/zaws/ec2/subnet/exists_spec.rb +0 -33
  267. data/spec/zaws/ec2/subnet/id_array_by_cidrblock_array_spec.rb +0 -48
  268. data/spec/zaws/ec2/subnet/id_by_cidrblock_spec.rb +0 -35
  269. data/spec/zaws/ec2/subnet/id_by_ip_spec.rb +0 -42
  270. data/spec/zaws/ec2/subnet/view_spec.rb +0 -34
  271. data/spec/zaws/elb/load_balancer/calculated_listener_spec.rb +0 -18
  272. data/spec/zaws/helper/option/absent_spec.rb +0 -14
  273. data/spec/zaws/helper/option/exclusive_spec.rb +0 -14
  274. data/spec/zaws/helper/option/exists_spec.rb +0 -18
  275. data/spec/zaws/helper/option/minimum_spec.rb +0 -14
  276. data/spec/zaws/helper/output/binary_nagios_check_spec.rb +0 -19
  277. data/spec/zaws/helper/output/colorize_spec.rb +0 -30
  278. data/spec/zaws/helper/output/opt_exclusive_spec.rb +0 -14
  279. data/spec/zaws/helper/output/opt_minimum_spec.rb +0 -15
  280. data/spec/zaws/helper/output/opt_required_spec.rb +0 -12
  281. data/spec/zaws/helper/shell/cli_spec.rb +0 -33
  282. data/spec/zaws/helper/shell/if_then_spec.rb +0 -24
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::AWSCLI::Data::IAM::RolePolicy do
4
+
5
+ let(:vap_instance_id_exists) { <<-eos
6
+ {
7
+ "RoleName": "testStartStop",
8
+ "PolicyDocument": {
9
+ "Version": "2012-10-17",
10
+ "Statement": [
11
+ {
12
+ "Action": [
13
+ "ec2:StartInstances",
14
+ "ec2:StopInstances"
15
+ ],
16
+ "Resource": [
17
+ "arn:aws:ec2:us-east-1:123456789abc:instance/i-abcdefg1",
18
+ "arn:aws:ec2:us-east-1:123456789abc:instance/i-abcdefg2"
19
+ ],
20
+ "Effect": "Allow"
21
+ }
22
+ ]
23
+ },
24
+ "PolicyName": "testStopStart"
25
+ }
26
+ eos
27
+ }
28
+
29
+ let(:var_list_instance_ids) {"i-abcdefg1\ni-abcdefg2"}
30
+
31
+ before(:each) {
32
+ @textout=double('outout')
33
+ @shellout=double('ZAWS::Helper::Shell')
34
+ @data_iam = ZAWS::AWSCLI::Data::IAM::RolePolicy.new(@shellout,nil)
35
+ }
36
+
37
+ describe "#resource_instance_ids" do
38
+ context "in which the role policy has resources with instance ids" do
39
+ it "returns instance ids as list of strings" do
40
+ @data_iam.load(nil,vap_instance_id_exists,nil)
41
+ expect(@data_iam.resource_instance_ids()).to eq(var_list_instance_ids)
42
+ end
43
+ end
44
+
45
+ context "in which the role policy has resources has no instance ids" do
46
+
47
+ end
48
+ end
49
+
50
+ end
51
+
52
+
53
+
54
+
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::AWSCLI do
4
+
5
+ it "should auto detect version " do
6
+
7
+ textout=double('outout')
8
+ shellout=double('ZAWS::Helper::Shell')
9
+ expect(shellout).to receive(:cli).with("aws --version", nil).and_return("aws-cli/1.2.13 Python/2.7.5 Linux/3.10.0-123.el7.x86_64")
10
+ awscli=ZAWS::AWSCLI.new(shellout, true)
11
+ expect(awscli.version).to eq('aws-cli/1.2.13')
12
+
13
+ end
14
+
15
+ end
16
+
17
+
18
+
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::Helper::Option do
4
+
5
+ describe "#absent" do
6
+ it "absent options" do
7
+ ZAWS::Helper::Option.absent([:option1, :option2], {:option1 => 'option1'}).should =~ [:option2]
8
+ end
9
+
10
+ it "no absent options" do
11
+ ZAWS::Helper::Option.absent([:option1, :option2], {:option1 => 'option1', :option2 => 'option2'}).should =~ []
12
+ end
13
+ end
14
+
15
+ describe "#exclusive?" do
16
+ it "options not exclusive" do
17
+ ZAWS::Helper::Option.exclusive?([:option1, :option2], {:option1 => 'option1', :option2 => 'option2'}).should be_false
18
+ end
19
+
20
+ it "option is exclusive" do
21
+ ZAWS::Helper::Option.exclusive?([:option1, :option2], {:option1 => 'option1'}).should be_true
22
+ end
23
+ end
24
+
25
+ describe "#exists?" do
26
+
27
+ it "option exist" do
28
+ ZAWS::Helper::Option.exists?([:option1], {:option1 => 'option1'}).should be_true
29
+ end
30
+
31
+ it "all options do not exist" do
32
+ ZAWS::Helper::Option.exists?([:option1, :option2], {:option1 => 'option1'}).should be_false
33
+ end
34
+
35
+ it "all options exist" do
36
+ ZAWS::Helper::Option.exists?([:option1, :option2], {:option1 => 'option1', :option2 => 'option2'}).should be_true
37
+ end
38
+
39
+ end
40
+
41
+ describe "minimum?" do
42
+ it "minimum of 1 option specified" do
43
+ ZAWS::Helper::Option.minimum?(1, [:option1, :option2], {:option1 => 'option1'}).should be_true
44
+ end
45
+
46
+ it "minimum of 2 options not specified" do
47
+ ZAWS::Helper::Option.minimum?(2, [:option1, :option2], {:option1 => 'option1'}).should be_false
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+
54
+
@@ -0,0 +1,144 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::Helper::Output do
4
+
5
+ describe "#binary_nagios_check" do
6
+ it "does a binary nagios check and reports critical,exit 2 if condition is false" do
7
+ output = double ('output')
8
+ output.should_receive(:puts).with(/critical/)
9
+ expect(ZAWS::Helper::Output.binary_nagios_check(false, "ok", "critical", output)).to eq(2)
10
+ end
11
+
12
+ it "does a binary nagios check and reports ok,exit 0 if condition is true" do
13
+ output = double ('output')
14
+ output.should_receive(:puts).with(/ok/)
15
+ expect(ZAWS::Helper::Output.binary_nagios_check(true, "ok", "critical", output)).to eq(0)
16
+ end
17
+ end
18
+
19
+ describe "#colorize" do
20
+
21
+ it "colorize text red" do
22
+ ZAWS::Helper::Output.colorize("text", AWS_consts::COLOR_RED).should eql("\e[31mtext\e[0m")
23
+ end
24
+
25
+ it "colorize text yellow" do
26
+ ZAWS::Helper::Output.colorize("text", AWS_consts::COLOR_YELLOW).should eql("\e[33mtext\e[0m")
27
+ end
28
+
29
+ it "colorize text green" do
30
+ ZAWS::Helper::Output.colorize("text", AWS_consts::COLOR_GREEN).should eql("\e[32mtext\e[0m")
31
+ end
32
+
33
+ it "colorize text blue" do
34
+ ZAWS::Helper::Output.colorize("text", AWS_consts::COLOR_BLUE).should eql("\e[34mtext\e[0m")
35
+ end
36
+
37
+ it "colorize text cyan" do
38
+ ZAWS::Helper::Output.colorize("text", AWS_consts::COLOR_CYAN).should eql("\e[36mtext\e[0m")
39
+ end
40
+
41
+ it "colorize text default" do
42
+ ZAWS::Helper::Output.colorize("text", AWS_consts::COLOR_DEFAULT).should eql("\e[39mtext\e[0m")
43
+ end
44
+ end
45
+
46
+ describe "#opt_exclusive" do
47
+
48
+ it "output exclusive options" do
49
+ output = double ('output')
50
+ output.should_receive(:puts).with(" These options cannot be combined:").ordered
51
+ output.should_receive(:puts).with(" --option1").ordered
52
+ output.should_receive(:puts).with(" --option2").ordered
53
+ ZAWS::Helper::Output.opt_exclusive(output, [:option1, :option2])
54
+ end
55
+ end
56
+
57
+ describe "#opt_minimum" do
58
+ it "output minimum 1 options" do
59
+ output = double ('output')
60
+ output.should_receive(:puts).with(" At mininum, 1 of the following is required:").ordered
61
+ output.should_receive(:puts).with(" --option1").ordered
62
+ output.should_receive(:puts).with(" --option2").ordered
63
+ ZAWS::Helper::Output.opt_minimum(output, 1, [:option1, :option2])
64
+ end
65
+ end
66
+
67
+ describe "#opt_required" do
68
+ it "output required options" do
69
+ output = double ('output')
70
+ output.should_receive(:puts).with(' --option1 required!')
71
+ ZAWS::Helper::Output.opt_required(output, [:option1])
72
+ end
73
+ end
74
+
75
+ describe "#cloudtrail" do
76
+ it "should get_default_components in csv format" do
77
+
78
+ cloud_trail = <<eos
79
+ {
80
+ "Records": [{
81
+ "userIdentity": {
82
+ "userName": "name-1"
83
+ },
84
+ "eventTime": "event-1",
85
+ "eventSource": "source-1",
86
+ "eventName": "event-name-1"
87
+ }, {
88
+ "userIdentity": {
89
+ "userName": "name-2"
90
+ },
91
+ "eventTime": "event-2",
92
+ "eventSource": "source-2",
93
+ "eventName": "event-name-2"
94
+ }]
95
+ }
96
+ eos
97
+ expected_string = "name-1, event-1, source-1, event-name-1\nname-2, event-2, source-2, event-name-2\n"
98
+ ZAWS::Helper::Output.cloudtrail(cloud_trail).should eql(expected_string)
99
+ end
100
+
101
+ it "should get error code and error message in csv" do
102
+ cloud_trail = <<eos
103
+ {
104
+ "Records": [{
105
+ "userIdentity": {
106
+ "userName": "name-1"
107
+ },
108
+ "eventTime": "event-1",
109
+ "eventSource": "source-1",
110
+ "eventName": "event-name-1"
111
+ }, {
112
+ "userIdentity": {
113
+ "userName": "name-2"
114
+ },
115
+ "eventTime": "event-2",
116
+ "eventSource": "source-2",
117
+ "eventName": "event-name-2",
118
+ "errorCode": "some-code",
119
+ "errorMessage": "some-message"
120
+ }]
121
+ }
122
+ eos
123
+ expected_string = "name-1, event-1, source-1, event-name-1\n"
124
+ expected_string << "name-2, event-2, source-2, event-name-2, some-code, some-message\n"
125
+
126
+ ZAWS::Helper::Output.cloudtrail(cloud_trail).should eql(expected_string)
127
+ end
128
+
129
+ it "should return cloud trail json if format is raw" do
130
+ cloud_trail = <<eos
131
+ {
132
+ "Records": [{
133
+ "a": "A",
134
+ "b": "B",
135
+ "c": "C"
136
+ }]
137
+ }
138
+ eos
139
+
140
+ ZAWS::Helper::Output.cloudtrail(cloud_trail, "raw").should eql(cloud_trail)
141
+ end
142
+ end
143
+ end
144
+
@@ -0,0 +1,48 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::Helper::ProcessHash do
4
+
5
+ describe "#keep" do
6
+ context "provided hash with no value matching list of values" do
7
+ it "returns empty string" do
8
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => "value"}, ["test"])).to eql("")
9
+ end
10
+ end
11
+ context "provided hash with value matching list of values" do
12
+ it "returns hash" do
13
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => "value"}, ["value"])).to eql({"root" => "value"})
14
+ end
15
+ end
16
+ context "provided hash with no value matching list of values at any level" do
17
+ it "returns empty string" do
18
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => {"value" => "again"}}, ["test"])).to eql("")
19
+ end
20
+ end
21
+ context "provided hash with value matching list at second level" do
22
+ it "returns hash" do
23
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => {"value" => "again"}}, ["again"])).to eql({"root" => {"value" => "again"}})
24
+ end
25
+ end
26
+ context "provided hash with value matching list at second level, but not in other branch" do
27
+ it "returns matching branch hash" do
28
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => {"value" => "again", "not-matching" => {"branch" => "cut-off"}}}, ["again"])).to eql({"root" => {"value" => "again"}})
29
+ end
30
+ end
31
+ context "provided hash with value matching list at second level, but not in other branch" do
32
+ it "returns matching branch hash" do
33
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => {"value" => "again", "not-matching" => {"branch" => "cut-off"}}}, ["root"])).to eql({"root" => {"value" => "again", "not-matching" => {"branch" => "cut-off"}}})
34
+ end
35
+ end
36
+ context "provided array of hash with value matching leafs" do
37
+ it "returns matching array of hash" do
38
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => [{"root" => "easy1"}, {"root" => "easy2"}]}, ["easy"])).to eql({"root" => [{"root" => "easy1"}, {"root" => "easy2"}]})
39
+ end
40
+ end
41
+ context "provided array of hash with value matching leafs, and one of the leafs is an array" do
42
+ it "returns matching array of hash with array" do
43
+ expect(ZAWS::Helper::ProcessHash.keep({"root" => [{"root" => "easy1"}, {"root" => ["easy2","nope"]}]}, ["easy"])).to eql({"root" => [{"root" => "easy1"}, {"root" => ["easy2"]}]})
44
+ end
45
+ end
46
+ end
47
+ end
48
+
@@ -0,0 +1,56 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::Helper::Shell do
4
+
5
+ describe "#cli" do
6
+ it "echo 'text' should return text" do
7
+ shell=ZAWS::Helper::Shell.new
8
+ expect(shell.cli("echo 'text'")).to eq("text\n")
9
+ end
10
+
11
+ # Different results on Linux and Windows
12
+ # it "ls_no_such_command should raise an error" do
13
+ # shell=ZAWS::Helper::Shell.new
14
+ # expect {shell.cli("ls_no_such_command")}.to raise_error(Errno::ENOENT)
15
+ # end
16
+
17
+ it "grep exit code of 1 should raise an error" do
18
+ shell=ZAWS::Helper::Shell.new
19
+ expect { shell.cli("echo 'lookup' | grep 'lookout'") }.to raise_error(Mixlib::ShellOut::ShellCommandFailed)
20
+ end
21
+
22
+ it "grep exit code of 1 should raise an error" do
23
+ shell=ZAWS::Helper::Shell.new
24
+ expect { shell.cli("echo 'lookup' | grep 'lookout'") }.to raise_error(Mixlib::ShellOut::ShellCommandFailed)
25
+ end
26
+
27
+ it "should put colorize text to output" do
28
+ shell=ZAWS::Helper::Shell.new
29
+ output = double ('output')
30
+ output.should_receive(:puts).with("\e[34mecho 'text'\e[0m")
31
+ expect(shell.cli("echo 'text'", output)).to eq("text\n")
32
+ end
33
+ end
34
+
35
+ describe "#if_then" do
36
+ it "what if true should echo 'text' should return text" do
37
+ shell=ZAWS::Helper::Shell.new
38
+ expect(shell.if_then(true, "echo 'text'")).to eq("text\n")
39
+ end
40
+
41
+ it "what if false should return nil" do
42
+ shell=ZAWS::Helper::Shell.new
43
+ expect(shell.if_then(false, "echo 'text'")).to be_nil
44
+ end
45
+
46
+
47
+ it "what if false should return nil and output command" do
48
+ shell=ZAWS::Helper::Shell.new
49
+ output = double ('output')
50
+ output.should_receive(:puts).with("\e[34mecho 'text'\e[0m")
51
+ expect(shell.if_then(false, "echo 'text'", output)).to be_nil
52
+ end
53
+
54
+ end
55
+ end
56
+
File without changes
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe ZAWS::ZAWSCLI do
4
+
5
+ describe "#version" do
6
+
7
+ it "Get zaws version." do
8
+ @shellout=double('ZAWS::Helper::Shell')
9
+ zaws=ZAWS::ZAWSCLI.new
10
+ zaws.out=@shellout
11
+ expect(@shellout).to receive(:puts).with("zaws version #{ZAWS::VERSION}")
12
+ zaws.version
13
+ end
14
+ end
15
+
16
+ end
17
+
18
+
@@ -22,13 +22,11 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency "netaddr", "~> 1.5.0"
23
23
  spec.add_runtime_dependency "mixlib-shellout", "~> 1.1.0"
24
24
  spec.add_runtime_dependency "json", "~> 1.5.0"
25
+ spec.add_runtime_dependency "excon"
25
26
 
26
27
  spec.add_development_dependency "coveralls"
27
28
  spec.add_development_dependency "bundler"
28
29
  spec.add_development_dependency "rake"
29
30
  spec.add_development_dependency "rspec", "~> 2.14.1"
30
- spec.add_development_dependency "cucumber", "~> 1.3.14"
31
- spec.add_development_dependency "aruba", "~> 0.5.4"
32
- spec.add_development_dependency "aruba-doubles", "~> 1.2.1"
33
31
 
34
32
  end
metadata CHANGED
@@ -1,192 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Aslan Brooke
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-27 00:00:00.000000000 Z
11
+ date: 2016-10-16 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: thor
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.18.1
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.18.1
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: netaddr
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 1.5.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.5.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: mixlib-shellout
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: 1.1.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: 1.1.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: json
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: 1.5.0
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: 1.5.0
78
69
  - !ruby/object:Gem::Dependency
79
- name: coveralls
70
+ name: excon
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
- type: :development
76
+ type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
- name: bundler
84
+ name: coveralls
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
- name: rake
98
+ name: bundler
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
- name: rspec
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- version: 2.14.1
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ~>
140
- - !ruby/object:Gem::Version
141
- version: 2.14.1
142
- - !ruby/object:Gem::Dependency
143
- name: cucumber
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ~>
148
- - !ruby/object:Gem::Version
149
- version: 1.3.14
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ~>
156
- - !ruby/object:Gem::Version
157
- version: 1.3.14
158
- - !ruby/object:Gem::Dependency
159
- name: aruba
112
+ name: rake
160
113
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
114
  requirements:
163
- - - ~>
115
+ - - ">="
164
116
  - !ruby/object:Gem::Version
165
- version: 0.5.4
117
+ version: '0'
166
118
  type: :development
167
119
  prerelease: false
168
120
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
121
  requirements:
171
- - - ~>
122
+ - - ">="
172
123
  - !ruby/object:Gem::Version
173
- version: 0.5.4
124
+ version: '0'
174
125
  - !ruby/object:Gem::Dependency
175
- name: aruba-doubles
126
+ name: rspec
176
127
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
128
  requirements:
179
- - - ~>
129
+ - - "~>"
180
130
  - !ruby/object:Gem::Version
181
- version: 1.2.1
131
+ version: 2.14.1
182
132
  type: :development
183
133
  prerelease: false
184
134
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
135
  requirements:
187
- - - ~>
136
+ - - "~>"
188
137
  - !ruby/object:Gem::Version
189
- version: 1.2.1
138
+ version: 2.14.1
190
139
  description: the zaws gem provides command line tools for interfacing with AWS through
191
140
  the AWS CLI. It is required that the AWS CLI be installed on the system that this
192
141
  gem is used on. This gem expects the AWS credentials to be located in a location
@@ -195,157 +144,279 @@ description: the zaws gem provides command line tools for interfacing with AWS t
195
144
  email:
196
145
  - aslandbrooke@yahoo.com
197
146
  executables:
147
+ - win_zaws.bat
198
148
  - zaws
199
149
  extensions: []
200
150
  extra_rdoc_files: []
201
151
  files:
202
- - .gitignore
203
- - .travis.yml
152
+ - ".gitignore"
153
+ - ".travis.yml"
204
154
  - Gemfile
205
155
  - Gemfile.lock
156
+ - Gemfile.lock.linux
157
+ - Gemfile.lock.mac
158
+ - Gemfile.lock.windows
206
159
  - LICENSE
207
160
  - README.md
208
161
  - Rakefile
162
+ - archive/cloud_trail/cloud_trail.feature
163
+ - bin/win_zaws.bat
209
164
  - bin/zaws
210
- - feature/compute/assoc_security_group.feature
211
- - feature/compute/compute.feature
212
- - feature/compute/secondary_ip.feature
213
- - feature/compute/view.feature
214
- - feature/compute/view_images.feature
215
- - feature/elasticip/elasticip.feature
216
- - feature/elasticip/view.feature
217
- - feature/hosted_zone/view.feature
218
- - feature/hosted_zone/view_record.feature
219
- - feature/load_balancer/instance_registration.feature
220
- - feature/load_balancer/listener.feature
221
- - feature/load_balancer/load_balancer.feature
222
- - feature/load_balancer/view.feature
223
- - feature/route_table/assoc_subnet.feature
224
- - feature/route_table/route_propagation.feature
225
- - feature/route_table/route_table.feature
226
- - feature/route_table/route_to_gateway.feature
227
- - feature/route_table/route_to_instance.feature
228
- - feature/route_table/view.feature
229
- - feature/security_group/ingress_cidr.feature
230
- - feature/security_group/ingress_group.feature
231
- - feature/security_group/security_group.feature
232
- - feature/security_group/view.feature
233
- - feature/subnet/subnet.feature
234
- - feature/subnet/view.feature
235
- - feature/support/env.rb
236
- - feature/version.feature
237
165
  - lib/zaws.rb
238
- - lib/zaws/aws.rb
166
+ - lib/zaws/command/ai.rb
167
+ - lib/zaws/command/bucket.rb
168
+ - lib/zaws/command/cloud_trail.rb
239
169
  - lib/zaws/command/compute.rb
170
+ - lib/zaws/command/config.rb
240
171
  - lib/zaws/command/elasticip.rb
241
172
  - lib/zaws/command/hosted_zone.rb
173
+ - lib/zaws/command/iam.rb
242
174
  - lib/zaws/command/load_balancer.rb
175
+ - lib/zaws/command/nessus.rb
176
+ - lib/zaws/command/newrelic.rb
243
177
  - lib/zaws/command/route_table.rb
244
178
  - lib/zaws/command/security_group.rb
245
179
  - lib/zaws/command/subnet.rb
246
- - lib/zaws/ec2.rb
247
- - lib/zaws/ec2/compute.rb
248
- - lib/zaws/ec2/elasticip.rb
249
- - lib/zaws/ec2/route_table.rb
250
- - lib/zaws/ec2/security_group.rb
251
- - lib/zaws/ec2/subnet.rb
252
- - lib/zaws/elb.rb
253
- - lib/zaws/elb/load_balancer.rb
180
+ - lib/zaws/command/sumo.rb
181
+ - lib/zaws/command/vpc.rb
182
+ - lib/zaws/external/awscli/awscli.rb
183
+ - lib/zaws/external/awscli/commands.rb
184
+ - lib/zaws/external/awscli/commands/aws.rb
185
+ - lib/zaws/external/awscli/commands/ec2.rb
186
+ - lib/zaws/external/awscli/commands/ec2/allocate_address.rb
187
+ - lib/zaws/external/awscli/commands/ec2/assign_private_ip_addresses.rb
188
+ - lib/zaws/external/awscli/commands/ec2/associate_address.rb
189
+ - lib/zaws/external/awscli/commands/ec2/associate_route_table.rb
190
+ - lib/zaws/external/awscli/commands/ec2/authorize_security_group_ingress.rb
191
+ - lib/zaws/external/awscli/commands/ec2/create_route.rb
192
+ - lib/zaws/external/awscli/commands/ec2/create_route_table.rb
193
+ - lib/zaws/external/awscli/commands/ec2/create_security_group.rb
194
+ - lib/zaws/external/awscli/commands/ec2/create_subnet.rb
195
+ - lib/zaws/external/awscli/commands/ec2/create_tags.rb
196
+ - lib/zaws/external/awscli/commands/ec2/create_vpc.rb
197
+ - lib/zaws/external/awscli/commands/ec2/delete_route.rb
198
+ - lib/zaws/external/awscli/commands/ec2/delete_route_table.rb
199
+ - lib/zaws/external/awscli/commands/ec2/delete_security_group.rb
200
+ - lib/zaws/external/awscli/commands/ec2/delete_subnet.rb
201
+ - lib/zaws/external/awscli/commands/ec2/describe_addresses.rb
202
+ - lib/zaws/external/awscli/commands/ec2/describe_images.rb
203
+ - lib/zaws/external/awscli/commands/ec2/describe_instances.rb
204
+ - lib/zaws/external/awscli/commands/ec2/describe_route_tables.rb
205
+ - lib/zaws/external/awscli/commands/ec2/describe_security_groups.rb
206
+ - lib/zaws/external/awscli/commands/ec2/describe_subnets.rb
207
+ - lib/zaws/external/awscli/commands/ec2/describe_vpc_peering_connections.rb
208
+ - lib/zaws/external/awscli/commands/ec2/describe_vpcs.rb
209
+ - lib/zaws/external/awscli/commands/ec2/disable_vgw_route_propagation.rb
210
+ - lib/zaws/external/awscli/commands/ec2/disassociate-address.rb
211
+ - lib/zaws/external/awscli/commands/ec2/disassociate_route_table.rb
212
+ - lib/zaws/external/awscli/commands/ec2/enable_vgw_route_propagation.rb
213
+ - lib/zaws/external/awscli/commands/ec2/filter.rb
214
+ - lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb
215
+ - lib/zaws/external/awscli/commands/ec2/network_interfaces.rb
216
+ - lib/zaws/external/awscli/commands/ec2/release_address.rb
217
+ - lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb
218
+ - lib/zaws/external/awscli/commands/ec2/run_instances.rb
219
+ - lib/zaws/external/awscli/commands/ec2/stop_instances.rb
220
+ - lib/zaws/external/awscli/commands/ec2/terminate_instances.rb
221
+ - lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb
222
+ - lib/zaws/external/awscli/commands/elb.rb
223
+ - lib/zaws/external/awscli/commands/elb/create_load_balancer.rb
224
+ - lib/zaws/external/awscli/commands/elb/create_load_balancer_listeners.rb
225
+ - lib/zaws/external/awscli/commands/elb/delete_load_balancer.rb
226
+ - lib/zaws/external/awscli/commands/elb/delete_load_balancer_listeners.rb
227
+ - lib/zaws/external/awscli/commands/elb/deregister_instances_with_load_balancer.rb
228
+ - lib/zaws/external/awscli/commands/elb/describe_load_balancers.rb
229
+ - lib/zaws/external/awscli/commands/elb/register_instances_with_load_balancer.rb
230
+ - lib/zaws/external/awscli/commands/iam.rb
231
+ - lib/zaws/external/awscli/commands/iam/GetPolicy.rb
232
+ - lib/zaws/external/awscli/commands/iam/GetPolicyVersion.rb
233
+ - lib/zaws/external/awscli/commands/iam/GetRolePolicy.rb
234
+ - lib/zaws/external/awscli/commands/route53.rb
235
+ - lib/zaws/external/awscli/commands/route53/list_hosted_zones.rb
236
+ - lib/zaws/external/awscli/commands/route53/list_resource_record_sets.rb
237
+ - lib/zaws/external/awscli/commands/s3/ls.rb
238
+ - lib/zaws/external/awscli/commands/s3/mb.rb
239
+ - lib/zaws/external/awscli/commands/s3/sync.rb
240
+ - lib/zaws/external/awscli/credentials.rb
241
+ - lib/zaws/external/awscli/data.rb
242
+ - lib/zaws/external/awscli/data/ec2.rb
243
+ - lib/zaws/external/awscli/data/ec2/instance.rb
244
+ - lib/zaws/external/awscli/data/ec2/security_group.rb
245
+ - lib/zaws/external/awscli/data/ec2/subnet.rb
246
+ - lib/zaws/external/awscli/data/ec2/vpc.rb
247
+ - lib/zaws/external/awscli/data/iam.rb
248
+ - lib/zaws/external/awscli/data/iam/policy.rb
249
+ - lib/zaws/external/awscli/data/iam/policy_document.rb
250
+ - lib/zaws/external/awscli/data/iam/policy_version.rb
251
+ - lib/zaws/external/awscli/data/iam/role_policy.rb
252
+ - lib/zaws/external/awscli/generators/result/ec2/addresses.rb
253
+ - lib/zaws/external/awscli/generators/result/ec2/allocation_id.rb
254
+ - lib/zaws/external/awscli/generators/result/ec2/association_id.rb
255
+ - lib/zaws/external/awscli/generators/result/ec2/images.rb
256
+ - lib/zaws/external/awscli/generators/result/ec2/instances.rb
257
+ - lib/zaws/external/awscli/generators/result/ec2/ip_permissions.rb
258
+ - lib/zaws/external/awscli/generators/result/ec2/network_interfaces.rb
259
+ - lib/zaws/external/awscli/generators/result/ec2/private_ip_addresses.rb
260
+ - lib/zaws/external/awscli/generators/result/ec2/route_tables.rb
261
+ - lib/zaws/external/awscli/generators/result/ec2/routes.rb
262
+ - lib/zaws/external/awscli/generators/result/ec2/security_groups.rb
263
+ - lib/zaws/external/awscli/generators/result/ec2/subnets.rb
264
+ - lib/zaws/external/awscli/generators/result/ec2/tags.rb
265
+ - lib/zaws/external/awscli/generators/result/ec2/virtual_gateway.rb
266
+ - lib/zaws/external/awscli/generators/result/elb/listeners.rb
267
+ - lib/zaws/external/awscli/generators/result/elb/load_balancers.rb
268
+ - lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb
269
+ - lib/zaws/external/awscli/regions.rb
270
+ - lib/zaws/external/nessusapi/data/agents.rb
271
+ - lib/zaws/external/nessusapi/data/scanners.rb
272
+ - lib/zaws/external/nessusapi/nessusapi.rb
273
+ - lib/zaws/external/nessusapi/reources.rb
274
+ - lib/zaws/external/nessusapi/resources/agents.rb
275
+ - lib/zaws/external/nessusapi/resources/agents/list.rb
276
+ - lib/zaws/external/nessusapi/resources/scanners.rb
277
+ - lib/zaws/external/nessusapi/resources/scanners/list.rb
278
+ - lib/zaws/external/newrelicapi/data/servers.rb
279
+ - lib/zaws/external/newrelicapi/newrelic_client.rb
280
+ - lib/zaws/external/newrelicapi/newrelic_creds.rb
281
+ - lib/zaws/external/newrelicapi/newrelicapi.rb
282
+ - lib/zaws/external/newrelicapi/resources/servers.rb
283
+ - lib/zaws/external/newrelicapi/resources/servers/list.rb
284
+ - lib/zaws/external/sumoapi/data/collectors.rb
285
+ - lib/zaws/external/sumoapi/data/sources.rb
286
+ - lib/zaws/external/sumoapi/resources/collectors.rb
287
+ - lib/zaws/external/sumoapi/resources/collectors/list.rb
288
+ - lib/zaws/external/sumoapi/resources/sources.rb
289
+ - lib/zaws/external/sumoapi/resources/sources/list.rb
290
+ - lib/zaws/external/sumoapi/sumo_client.rb
291
+ - lib/zaws/external/sumoapi/sumo_creds.rb
292
+ - lib/zaws/external/sumoapi/sumoapi.rb
293
+ - lib/zaws/helper/data_lattice.rb
294
+ - lib/zaws/helper/filestore.rb
295
+ - lib/zaws/helper/filter.rb
296
+ - lib/zaws/helper/inifile.rb
297
+ - lib/zaws/helper/nessus_client.rb
298
+ - lib/zaws/helper/nessus_creds.rb
254
299
  - lib/zaws/helper/option.rb
255
300
  - lib/zaws/helper/output.rb
301
+ - lib/zaws/helper/process_hash.rb
256
302
  - lib/zaws/helper/shell.rb
303
+ - lib/zaws/helper/verbose.rb
257
304
  - lib/zaws/helper/zfile.rb
258
- - lib/zaws/route53.rb
259
- - lib/zaws/route53/hosted_zone.rb
305
+ - lib/zaws/services/ai.rb
306
+ - lib/zaws/services/ai/query.rb
307
+ - lib/zaws/services/aws.rb
308
+ - lib/zaws/services/chef.rb
309
+ - lib/zaws/services/cloud_trail.rb
310
+ - lib/zaws/services/config.rb
311
+ - lib/zaws/services/ec2.rb
312
+ - lib/zaws/services/ec2/compute.rb
313
+ - lib/zaws/services/ec2/elasticip.rb
314
+ - lib/zaws/services/ec2/route_table.rb
315
+ - lib/zaws/services/ec2/security_group.rb
316
+ - lib/zaws/services/ec2/subnet.rb
317
+ - lib/zaws/services/ec2/vpc.rb
318
+ - lib/zaws/services/elb.rb
319
+ - lib/zaws/services/elb/load_balancer.rb
320
+ - lib/zaws/services/iam.rb
321
+ - lib/zaws/services/iam/policy.rb
322
+ - lib/zaws/services/iam/role.rb
323
+ - lib/zaws/services/nessus.rb
324
+ - lib/zaws/services/nessus/agents.rb
325
+ - lib/zaws/services/nessus/scanners.rb
326
+ - lib/zaws/services/newrelic.rb
327
+ - lib/zaws/services/newrelic/servers.rb
328
+ - lib/zaws/services/route53.rb
329
+ - lib/zaws/services/route53/hosted_zone.rb
330
+ - lib/zaws/services/s3.rb
331
+ - lib/zaws/services/s3/bucket.rb
332
+ - lib/zaws/services/sumo.rb
333
+ - lib/zaws/services/sumo/collectors.rb
334
+ - lib/zaws/services/vmware.rb
260
335
  - lib/zaws/version.rb
336
+ - shove_all.sh
337
+ - shove_all_mac.sh
338
+ - shove_all_windows.sh
261
339
  - spec/spec_helper.rb
262
- - spec/zaws/ec2/compute/add_volume_spec.rb
263
- - spec/zaws/ec2/compute/block_device_mapping_spec.rb
264
- - spec/zaws/ec2/compute/instance_id_by_external_id_spec.rb
265
- - spec/zaws/ec2/compute/instance_ping_spec.rb
266
- - spec/zaws/ec2/compute/instance_running_spec.rb
267
- - spec/zaws/ec2/compute/network_interface_json_spec.rb
268
- - spec/zaws/ec2/compute/nosdcheck_spec.rb
269
- - spec/zaws/ec2/compute/tag_instance_spec.rb
270
- - spec/zaws/ec2/security_group/id_by_name_spec.rb
271
- - spec/zaws/ec2/subnet/available_spec.rb
272
- - spec/zaws/ec2/subnet/declare_spec.rb
273
- - spec/zaws/ec2/subnet/exists_spec.rb
274
- - spec/zaws/ec2/subnet/id_array_by_cidrblock_array_spec.rb
275
- - spec/zaws/ec2/subnet/id_by_cidrblock_spec.rb
276
- - spec/zaws/ec2/subnet/id_by_ip_spec.rb
277
- - spec/zaws/ec2/subnet/view_spec.rb
278
- - spec/zaws/elb/load_balancer/calculated_listener_spec.rb
279
- - spec/zaws/helper/option/absent_spec.rb
280
- - spec/zaws/helper/option/exclusive_spec.rb
281
- - spec/zaws/helper/option/exists_spec.rb
282
- - spec/zaws/helper/option/minimum_spec.rb
283
- - spec/zaws/helper/output/binary_nagios_check_spec.rb
284
- - spec/zaws/helper/output/colorize_spec.rb
285
- - spec/zaws/helper/output/opt_exclusive_spec.rb
286
- - spec/zaws/helper/output/opt_minimum_spec.rb
287
- - spec/zaws/helper/output/opt_required_spec.rb
288
- - spec/zaws/helper/shell/cli_spec.rb
289
- - spec/zaws/helper/shell/if_then_spec.rb
340
+ - spec/zaws/command/ec2/compute/assoc_security_group_spec.rb
341
+ - spec/zaws/command/ec2/compute/compute_spec.rb
342
+ - spec/zaws/command/ec2/compute/images_spec.rb
343
+ - spec/zaws/command/ec2/compute/management_spec.rb
344
+ - spec/zaws/command/ec2/compute/network_spec.rb
345
+ - spec/zaws/command/ec2/compute/node_spec.rb
346
+ - spec/zaws/command/ec2/compute/secondary_ip_spec.rb
347
+ - spec/zaws/command/ec2/compute/storage_spec.rb
348
+ - spec/zaws/command/ec2/elasticip_spec.rb
349
+ - spec/zaws/command/ec2/route_table_spec.rb
350
+ - spec/zaws/command/ec2/security_group_spec.rb
351
+ - spec/zaws/command/ec2/subnet_spec.rb
352
+ - spec/zaws/command/ec2/vpc_spec.rb
353
+ - spec/zaws/command/elb/load_balancer_spec.rb
354
+ - spec/zaws/command/iam/policy_spec.rb
355
+ - spec/zaws/command/iam/role_policy_spec.rb
356
+ - spec/zaws/command/route53/hosted_zone_spec.rb
357
+ - spec/zaws/command/s3/bucket_spec.rb
358
+ - spec/zaws/external/awscli/data/ec2/instance_spec.rb
359
+ - spec/zaws/external/awscli/data/iam/policy_document_spec.rb
360
+ - spec/zaws/external/awscli/data/iam/role_policy_spec.rb
361
+ - spec/zaws/external/awscli/get_aws_version_spec.rb
362
+ - spec/zaws/helper/option_spec.rb
363
+ - spec/zaws/helper/output_spec.rb
364
+ - spec/zaws/helper/process_hash_spec.rb
365
+ - spec/zaws/helper/shell_spec.rb
366
+ - spec/zaws/nessus/scanners.json
367
+ - spec/zaws/version_spec.rb
290
368
  - zaws.gemspec
291
369
  homepage: ''
292
370
  licenses:
293
371
  - Apache v2.0
372
+ metadata: {}
294
373
  post_install_message:
295
374
  rdoc_options: []
296
375
  require_paths:
297
376
  - lib
298
377
  required_ruby_version: !ruby/object:Gem::Requirement
299
- none: false
300
378
  requirements:
301
- - - ! '>='
379
+ - - ">="
302
380
  - !ruby/object:Gem::Version
303
381
  version: '0'
304
- segments:
305
- - 0
306
- hash: 860318831124502265
307
382
  required_rubygems_version: !ruby/object:Gem::Requirement
308
- none: false
309
383
  requirements:
310
- - - ! '>='
384
+ - - ">="
311
385
  - !ruby/object:Gem::Version
312
386
  version: '0'
313
- segments:
314
- - 0
315
- hash: 860318831124502265
316
387
  requirements: []
317
388
  rubyforge_project:
318
- rubygems_version: 1.8.24
389
+ rubygems_version: 2.6.6
319
390
  signing_key:
320
- specification_version: 3
391
+ specification_version: 4
321
392
  summary: Zynx AWS Automation Tool
322
393
  test_files:
323
394
  - spec/spec_helper.rb
324
- - spec/zaws/ec2/compute/add_volume_spec.rb
325
- - spec/zaws/ec2/compute/block_device_mapping_spec.rb
326
- - spec/zaws/ec2/compute/instance_id_by_external_id_spec.rb
327
- - spec/zaws/ec2/compute/instance_ping_spec.rb
328
- - spec/zaws/ec2/compute/instance_running_spec.rb
329
- - spec/zaws/ec2/compute/network_interface_json_spec.rb
330
- - spec/zaws/ec2/compute/nosdcheck_spec.rb
331
- - spec/zaws/ec2/compute/tag_instance_spec.rb
332
- - spec/zaws/ec2/security_group/id_by_name_spec.rb
333
- - spec/zaws/ec2/subnet/available_spec.rb
334
- - spec/zaws/ec2/subnet/declare_spec.rb
335
- - spec/zaws/ec2/subnet/exists_spec.rb
336
- - spec/zaws/ec2/subnet/id_array_by_cidrblock_array_spec.rb
337
- - spec/zaws/ec2/subnet/id_by_cidrblock_spec.rb
338
- - spec/zaws/ec2/subnet/id_by_ip_spec.rb
339
- - spec/zaws/ec2/subnet/view_spec.rb
340
- - spec/zaws/elb/load_balancer/calculated_listener_spec.rb
341
- - spec/zaws/helper/option/absent_spec.rb
342
- - spec/zaws/helper/option/exclusive_spec.rb
343
- - spec/zaws/helper/option/exists_spec.rb
344
- - spec/zaws/helper/option/minimum_spec.rb
345
- - spec/zaws/helper/output/binary_nagios_check_spec.rb
346
- - spec/zaws/helper/output/colorize_spec.rb
347
- - spec/zaws/helper/output/opt_exclusive_spec.rb
348
- - spec/zaws/helper/output/opt_minimum_spec.rb
349
- - spec/zaws/helper/output/opt_required_spec.rb
350
- - spec/zaws/helper/shell/cli_spec.rb
351
- - spec/zaws/helper/shell/if_then_spec.rb
395
+ - spec/zaws/command/ec2/compute/assoc_security_group_spec.rb
396
+ - spec/zaws/command/ec2/compute/compute_spec.rb
397
+ - spec/zaws/command/ec2/compute/images_spec.rb
398
+ - spec/zaws/command/ec2/compute/management_spec.rb
399
+ - spec/zaws/command/ec2/compute/network_spec.rb
400
+ - spec/zaws/command/ec2/compute/node_spec.rb
401
+ - spec/zaws/command/ec2/compute/secondary_ip_spec.rb
402
+ - spec/zaws/command/ec2/compute/storage_spec.rb
403
+ - spec/zaws/command/ec2/elasticip_spec.rb
404
+ - spec/zaws/command/ec2/route_table_spec.rb
405
+ - spec/zaws/command/ec2/security_group_spec.rb
406
+ - spec/zaws/command/ec2/subnet_spec.rb
407
+ - spec/zaws/command/ec2/vpc_spec.rb
408
+ - spec/zaws/command/elb/load_balancer_spec.rb
409
+ - spec/zaws/command/iam/policy_spec.rb
410
+ - spec/zaws/command/iam/role_policy_spec.rb
411
+ - spec/zaws/command/route53/hosted_zone_spec.rb
412
+ - spec/zaws/command/s3/bucket_spec.rb
413
+ - spec/zaws/external/awscli/data/ec2/instance_spec.rb
414
+ - spec/zaws/external/awscli/data/iam/policy_document_spec.rb
415
+ - spec/zaws/external/awscli/data/iam/role_policy_spec.rb
416
+ - spec/zaws/external/awscli/get_aws_version_spec.rb
417
+ - spec/zaws/helper/option_spec.rb
418
+ - spec/zaws/helper/output_spec.rb
419
+ - spec/zaws/helper/process_hash_spec.rb
420
+ - spec/zaws/helper/shell_spec.rb
421
+ - spec/zaws/nessus/scanners.json
422
+ - spec/zaws/version_spec.rb