zaws 0.0.5 → 0.1.1
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 +7 -0
- data/.gitignore +2 -0
- data/.travis.yml +9 -18
- data/Gemfile +0 -0
- data/Gemfile.lock +26 -35
- data/Gemfile.lock.linux +69 -0
- data/Gemfile.lock.mac +81 -0
- data/Gemfile.lock.windows +77 -0
- data/LICENSE +0 -0
- data/README.md +11 -0
- data/Rakefile +1 -7
- data/archive/cloud_trail/cloud_trail.feature +124 -0
- data/bin/win_zaws.bat +2 -0
- data/lib/zaws.rb +54 -41
- data/lib/zaws/command/ai.rb +34 -0
- data/lib/zaws/command/bucket.rb +35 -0
- data/lib/zaws/command/cloud_trail.rb +43 -0
- data/lib/zaws/command/compute.rb +152 -87
- data/lib/zaws/command/config.rb +42 -0
- data/lib/zaws/command/elasticip.rb +19 -9
- data/lib/zaws/command/hosted_zone.rb +31 -18
- data/lib/zaws/command/iam.rb +37 -0
- data/lib/zaws/command/load_balancer.rb +54 -51
- data/lib/zaws/command/nessus.rb +41 -0
- data/lib/zaws/command/newrelic.rb +30 -0
- data/lib/zaws/command/route_table.rb +135 -122
- data/lib/zaws/command/security_group.rb +95 -82
- data/lib/zaws/command/subnet.rb +58 -46
- data/lib/zaws/command/sumo.rb +34 -0
- data/lib/zaws/command/vpc.rb +53 -0
- data/lib/zaws/external/awscli/awscli.rb +65 -0
- data/lib/zaws/external/awscli/commands.rb +10 -0
- data/lib/zaws/external/awscli/commands/aws.rb +40 -0
- data/lib/zaws/external/awscli/commands/ec2.rb +74 -0
- data/lib/zaws/external/awscli/commands/ec2/allocate_address.rb +42 -0
- data/lib/zaws/external/awscli/commands/ec2/assign_private_ip_addresses.rb +49 -0
- data/lib/zaws/external/awscli/commands/ec2/associate_address.rb +48 -0
- data/lib/zaws/external/awscli/commands/ec2/associate_route_table.rb +48 -0
- data/lib/zaws/external/awscli/commands/ec2/authorize_security_group_ingress.rb +70 -0
- data/lib/zaws/external/awscli/commands/ec2/create_route.rb +60 -0
- data/lib/zaws/external/awscli/commands/ec2/create_route_table.rb +40 -0
- data/lib/zaws/external/awscli/commands/ec2/create_security_group.rb +58 -0
- data/lib/zaws/external/awscli/commands/ec2/create_subnet.rb +62 -0
- data/lib/zaws/external/awscli/commands/ec2/create_tags.rb +53 -0
- data/lib/zaws/external/awscli/commands/ec2/create_vpc.rb +21 -0
- data/lib/zaws/external/awscli/commands/ec2/delete_route.rb +54 -0
- data/lib/zaws/external/awscli/commands/ec2/delete_route_table.rb +46 -0
- data/lib/zaws/external/awscli/commands/ec2/delete_security_group.rb +46 -0
- data/lib/zaws/external/awscli/commands/ec2/delete_subnet.rb +46 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_addresses.rb +41 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_images.rb +58 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_instances.rb +56 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_route_tables.rb +44 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_security_groups.rb +50 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_subnets.rb +48 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_vpc_peering_connections.rb +23 -0
- data/lib/zaws/external/awscli/commands/ec2/describe_vpcs.rb +26 -0
- data/lib/zaws/external/awscli/commands/ec2/disable_vgw_route_propagation.rb +48 -0
- data/lib/zaws/external/awscli/commands/ec2/disassociate-address.rb +42 -0
- data/lib/zaws/external/awscli/commands/ec2/disassociate_route_table.rb +41 -0
- data/lib/zaws/external/awscli/commands/ec2/enable_vgw_route_propagation.rb +48 -0
- data/lib/zaws/external/awscli/commands/ec2/filter.rb +115 -0
- data/lib/zaws/external/awscli/commands/ec2/modify_instance_attribute.rb +62 -0
- data/lib/zaws/external/awscli/commands/ec2/network_interfaces.rb +63 -0
- data/lib/zaws/external/awscli/commands/ec2/release_address.rb +42 -0
- data/lib/zaws/external/awscli/commands/ec2/revoke_security_group_ingress.rb +70 -0
- data/lib/zaws/external/awscli/commands/ec2/run_instances.rb +21 -0
- data/lib/zaws/external/awscli/commands/ec2/stop_instances.rb +21 -0
- data/lib/zaws/external/awscli/commands/ec2/terminate_instances.rb +40 -0
- data/lib/zaws/external/awscli/commands/ec2/unassign_private_ip_addresses.rb +49 -0
- data/lib/zaws/external/awscli/commands/elb.rb +19 -0
- data/lib/zaws/external/awscli/commands/elb/create_load_balancer.rb +64 -0
- data/lib/zaws/external/awscli/commands/elb/create_load_balancer_listeners.rb +47 -0
- data/lib/zaws/external/awscli/commands/elb/delete_load_balancer.rb +40 -0
- data/lib/zaws/external/awscli/commands/elb/delete_load_balancer_listeners.rb +49 -0
- data/lib/zaws/external/awscli/commands/elb/deregister_instances_with_load_balancer.rb +49 -0
- data/lib/zaws/external/awscli/commands/elb/describe_load_balancers.rb +30 -0
- data/lib/zaws/external/awscli/commands/elb/register_instances_with_load_balancer.rb +49 -0
- data/lib/zaws/external/awscli/commands/iam.rb +31 -0
- data/lib/zaws/external/awscli/commands/iam/GetPolicy.rb +21 -0
- data/lib/zaws/external/awscli/commands/iam/GetPolicyVersion.rb +21 -0
- data/lib/zaws/external/awscli/commands/iam/GetRolePolicy.rb +21 -0
- data/lib/zaws/external/awscli/commands/route53.rb +19 -0
- data/lib/zaws/external/awscli/commands/route53/list_hosted_zones.rb +30 -0
- data/lib/zaws/external/awscli/commands/route53/list_resource_record_sets.rb +41 -0
- data/lib/zaws/external/awscli/commands/s3/ls.rb +34 -0
- data/lib/zaws/external/awscli/commands/s3/mb.rb +41 -0
- data/lib/zaws/external/awscli/commands/s3/sync.rb +48 -0
- data/lib/zaws/external/awscli/credentials.rb +22 -0
- data/lib/zaws/external/awscli/data.rb +10 -0
- data/lib/zaws/external/awscli/data/ec2.rb +33 -0
- data/lib/zaws/external/awscli/data/ec2/instance.rb +162 -0
- data/lib/zaws/external/awscli/data/ec2/security_group.rb +51 -0
- data/lib/zaws/external/awscli/data/ec2/subnet.rb +59 -0
- data/lib/zaws/external/awscli/data/ec2/vpc.rb +85 -0
- data/lib/zaws/external/awscli/data/iam.rb +34 -0
- data/lib/zaws/external/awscli/data/iam/policy.rb +42 -0
- data/lib/zaws/external/awscli/data/iam/policy_document.rb +52 -0
- data/lib/zaws/external/awscli/data/iam/policy_version.rb +42 -0
- data/lib/zaws/external/awscli/data/iam/role_policy.rb +52 -0
- data/lib/zaws/external/awscli/generators/result/ec2/addresses.rb +70 -0
- data/lib/zaws/external/awscli/generators/result/ec2/allocation_id.rb +39 -0
- data/lib/zaws/external/awscli/generators/result/ec2/association_id.rb +29 -0
- data/lib/zaws/external/awscli/generators/result/ec2/images.rb +46 -0
- data/lib/zaws/external/awscli/generators/result/ec2/instances.rb +57 -0
- data/lib/zaws/external/awscli/generators/result/ec2/ip_permissions.rb +70 -0
- data/lib/zaws/external/awscli/generators/result/ec2/network_interfaces.rb +53 -0
- data/lib/zaws/external/awscli/generators/result/ec2/private_ip_addresses.rb +41 -0
- data/lib/zaws/external/awscli/generators/result/ec2/route_tables.rb +80 -0
- data/lib/zaws/external/awscli/generators/result/ec2/routes.rb +58 -0
- data/lib/zaws/external/awscli/generators/result/ec2/security_groups.rb +73 -0
- data/lib/zaws/external/awscli/generators/result/ec2/subnets.rb +88 -0
- data/lib/zaws/external/awscli/generators/result/ec2/tags.rb +34 -0
- data/lib/zaws/external/awscli/generators/result/ec2/virtual_gateway.rb +32 -0
- data/lib/zaws/external/awscli/generators/result/elb/listeners.rb +65 -0
- data/lib/zaws/external/awscli/generators/result/elb/load_balancers.rb +61 -0
- data/lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb +52 -0
- data/lib/zaws/external/awscli/regions.rb +13 -0
- data/lib/zaws/external/nessusapi/data/agents.rb +36 -0
- data/lib/zaws/external/nessusapi/data/scanners.rb +35 -0
- data/lib/zaws/external/nessusapi/nessusapi.rb +57 -0
- data/lib/zaws/external/nessusapi/reources.rb +10 -0
- data/lib/zaws/external/nessusapi/resources/agents.rb +18 -0
- data/lib/zaws/external/nessusapi/resources/agents/list.rb +20 -0
- data/lib/zaws/external/nessusapi/resources/scanners.rb +18 -0
- data/lib/zaws/external/nessusapi/resources/scanners/list.rb +20 -0
- data/lib/zaws/external/newrelicapi/data/servers.rb +36 -0
- data/lib/zaws/external/newrelicapi/newrelic_client.rb +64 -0
- data/lib/zaws/external/newrelicapi/newrelic_creds.rb +60 -0
- data/lib/zaws/external/newrelicapi/newrelicapi.rb +46 -0
- data/lib/zaws/external/newrelicapi/resources/servers.rb +18 -0
- data/lib/zaws/external/newrelicapi/resources/servers/list.rb +20 -0
- data/lib/zaws/external/sumoapi/data/collectors.rb +35 -0
- data/lib/zaws/external/sumoapi/data/sources.rb +35 -0
- data/lib/zaws/external/sumoapi/resources/collectors.rb +18 -0
- data/lib/zaws/external/sumoapi/resources/collectors/list.rb +20 -0
- data/lib/zaws/external/sumoapi/resources/sources.rb +18 -0
- data/lib/zaws/external/sumoapi/resources/sources/list.rb +20 -0
- data/lib/zaws/external/sumoapi/sumo_client.rb +63 -0
- data/lib/zaws/external/sumoapi/sumo_creds.rb +67 -0
- data/lib/zaws/external/sumoapi/sumoapi.rb +56 -0
- data/lib/zaws/helper/data_lattice.rb +22 -0
- data/lib/zaws/helper/filestore.rb +48 -0
- data/lib/zaws/helper/filter.rb +15 -0
- data/lib/zaws/helper/inifile.rb +632 -0
- data/lib/zaws/helper/nessus_client.rb +143 -0
- data/lib/zaws/helper/nessus_creds.rb +67 -0
- data/lib/zaws/helper/option.rb +14 -15
- data/lib/zaws/helper/output.rb +81 -29
- data/lib/zaws/helper/process_hash.rb +47 -0
- data/lib/zaws/helper/shell.rb +0 -0
- data/lib/zaws/helper/verbose.rb +15 -0
- data/lib/zaws/helper/zfile.rb +8 -8
- data/lib/zaws/services/ai.rb +35 -0
- data/lib/zaws/services/ai/query.rb +135 -0
- data/lib/zaws/services/aws.rb +41 -0
- data/lib/zaws/services/chef.rb +0 -0
- data/lib/zaws/services/cloud_trail.rb +76 -0
- data/lib/zaws/services/config.rb +31 -0
- data/lib/zaws/services/ec2.rb +47 -0
- data/lib/zaws/services/ec2/compute.rb +352 -0
- data/lib/zaws/services/ec2/elasticip.rb +82 -0
- data/lib/zaws/services/ec2/route_table.rb +210 -0
- data/lib/zaws/services/ec2/security_group.rb +186 -0
- data/lib/zaws/services/ec2/subnet.rb +111 -0
- data/lib/zaws/services/ec2/vpc.rb +69 -0
- data/lib/zaws/{elb.rb → services/elb.rb} +3 -2
- data/lib/zaws/services/elb/load_balancer.rb +160 -0
- data/lib/zaws/services/iam.rb +25 -0
- data/lib/zaws/services/iam/policy.rb +25 -0
- data/lib/zaws/services/iam/role.rb +23 -0
- data/lib/zaws/services/nessus.rb +24 -0
- data/lib/zaws/services/nessus/agents.rb +19 -0
- data/lib/zaws/services/nessus/scanners.rb +19 -0
- data/lib/zaws/services/newrelic.rb +21 -0
- data/lib/zaws/services/newrelic/servers.rb +19 -0
- data/lib/zaws/{route53.rb → services/route53.rb} +1 -1
- data/lib/zaws/services/route53/hosted_zone.rb +36 -0
- data/lib/zaws/services/s3.rb +15 -0
- data/lib/zaws/services/s3/bucket.rb +42 -0
- data/lib/zaws/services/sumo.rb +21 -0
- data/lib/zaws/services/sumo/collectors.rb +19 -0
- data/lib/zaws/services/vmware.rb +0 -0
- data/lib/zaws/version.rb +1 -1
- data/shove_all.sh +6 -0
- data/shove_all_mac.sh +6 -0
- data/shove_all_windows.sh +6 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/zaws/command/ec2/compute/assoc_security_group_spec.rb +135 -0
- data/spec/zaws/command/ec2/compute/compute_spec.rb +321 -0
- data/spec/zaws/command/ec2/compute/images_spec.rb +69 -0
- data/spec/zaws/command/ec2/compute/management_spec.rb +364 -0
- data/spec/zaws/command/ec2/compute/network_spec.rb +93 -0
- data/spec/zaws/command/ec2/compute/node_spec.rb +70 -0
- data/spec/zaws/command/ec2/compute/secondary_ip_spec.rb +212 -0
- data/spec/zaws/command/ec2/compute/storage_spec.rb +63 -0
- data/spec/zaws/command/ec2/elasticip_spec.rb +271 -0
- data/spec/zaws/command/ec2/route_table_spec.rb +844 -0
- data/spec/zaws/command/ec2/security_group_spec.rb +710 -0
- data/spec/zaws/command/ec2/subnet_spec.rb +273 -0
- data/spec/zaws/command/ec2/vpc_spec.rb +180 -0
- data/spec/zaws/command/elb/load_balancer_spec.rb +633 -0
- data/spec/zaws/command/iam/policy_spec.rb +101 -0
- data/spec/zaws/command/iam/role_policy_spec.rb +35 -0
- data/spec/zaws/command/route53/hosted_zone_spec.rb +100 -0
- data/spec/zaws/command/s3/bucket_spec.rb +70 -0
- data/spec/zaws/external/awscli/data/ec2/instance_spec.rb +90 -0
- data/spec/zaws/external/awscli/data/iam/policy_document_spec.rb +56 -0
- data/spec/zaws/external/awscli/data/iam/role_policy_spec.rb +54 -0
- data/spec/zaws/external/awscli/get_aws_version_spec.rb +18 -0
- data/spec/zaws/helper/option_spec.rb +54 -0
- data/spec/zaws/helper/output_spec.rb +144 -0
- data/spec/zaws/helper/process_hash_spec.rb +48 -0
- data/spec/zaws/helper/shell_spec.rb +56 -0
- data/spec/zaws/nessus/scanners.json +0 -0
- data/spec/zaws/version_spec.rb +18 -0
- data/zaws.gemspec +1 -3
- metadata +260 -189
- data/feature/compute/assoc_security_group.feature +0 -55
- data/feature/compute/compute.feature +0 -138
- data/feature/compute/secondary_ip.feature +0 -107
- data/feature/compute/view.feature +0 -23
- data/feature/compute/view_images.feature +0 -24
- data/feature/elasticip/elasticip.feature +0 -138
- data/feature/elasticip/view.feature +0 -18
- data/feature/hosted_zone/view.feature +0 -17
- data/feature/hosted_zone/view_record.feature +0 -29
- data/feature/load_balancer/instance_registration.feature +0 -120
- data/feature/load_balancer/listener.feature +0 -86
- data/feature/load_balancer/load_balancer.feature +0 -101
- data/feature/load_balancer/view.feature +0 -18
- data/feature/route_table/assoc_subnet.feature +0 -128
- data/feature/route_table/route_propagation.feature +0 -93
- data/feature/route_table/route_table.feature +0 -91
- data/feature/route_table/route_to_gateway.feature +0 -69
- data/feature/route_table/route_to_instance.feature +0 -115
- data/feature/route_table/view.feature +0 -25
- data/feature/security_group/ingress_cidr.feature +0 -144
- data/feature/security_group/ingress_group.feature +0 -184
- data/feature/security_group/security_group.feature +0 -107
- data/feature/security_group/view.feature +0 -23
- data/feature/subnet/subnet.feature +0 -94
- data/feature/subnet/view.feature +0 -24
- data/feature/support/env.rb +0 -14
- data/feature/version.feature +0 -6
- data/lib/zaws/aws.rb +0 -26
- data/lib/zaws/ec2.rb +0 -40
- data/lib/zaws/ec2/compute.rb +0 -247
- data/lib/zaws/ec2/elasticip.rb +0 -79
- data/lib/zaws/ec2/route_table.rb +0 -207
- data/lib/zaws/ec2/security_group.rb +0 -154
- data/lib/zaws/ec2/subnet.rb +0 -109
- data/lib/zaws/elb/load_balancer.rb +0 -157
- data/lib/zaws/route53/hosted_zone.rb +0 -36
- data/spec/zaws/ec2/compute/add_volume_spec.rb +0 -39
- data/spec/zaws/ec2/compute/block_device_mapping_spec.rb +0 -31
- data/spec/zaws/ec2/compute/instance_id_by_external_id_spec.rb +0 -23
- data/spec/zaws/ec2/compute/instance_ping_spec.rb +0 -34
- data/spec/zaws/ec2/compute/instance_running_spec.rb +0 -47
- data/spec/zaws/ec2/compute/network_interface_json_spec.rb +0 -57
- data/spec/zaws/ec2/compute/nosdcheck_spec.rb +0 -17
- data/spec/zaws/ec2/compute/tag_instance_spec.rb +0 -21
- data/spec/zaws/ec2/security_group/id_by_name_spec.rb +0 -32
- data/spec/zaws/ec2/subnet/available_spec.rb +0 -22
- data/spec/zaws/ec2/subnet/declare_spec.rb +0 -31
- data/spec/zaws/ec2/subnet/exists_spec.rb +0 -33
- data/spec/zaws/ec2/subnet/id_array_by_cidrblock_array_spec.rb +0 -48
- data/spec/zaws/ec2/subnet/id_by_cidrblock_spec.rb +0 -35
- data/spec/zaws/ec2/subnet/id_by_ip_spec.rb +0 -42
- data/spec/zaws/ec2/subnet/view_spec.rb +0 -34
- data/spec/zaws/elb/load_balancer/calculated_listener_spec.rb +0 -18
- data/spec/zaws/helper/option/absent_spec.rb +0 -14
- data/spec/zaws/helper/option/exclusive_spec.rb +0 -14
- data/spec/zaws/helper/option/exists_spec.rb +0 -18
- data/spec/zaws/helper/option/minimum_spec.rb +0 -14
- data/spec/zaws/helper/output/binary_nagios_check_spec.rb +0 -19
- data/spec/zaws/helper/output/colorize_spec.rb +0 -30
- data/spec/zaws/helper/output/opt_exclusive_spec.rb +0 -14
- data/spec/zaws/helper/output/opt_minimum_spec.rb +0 -15
- data/spec/zaws/helper/output/opt_required_spec.rb +0 -12
- data/spec/zaws/helper/shell/cli_spec.rb +0 -33
- data/spec/zaws/helper/shell/if_then_spec.rb +0 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ca6a56dcddb8e72789778ceb73b6dfe249e39f5a
|
4
|
+
data.tar.gz: 9edf58f00281bcd5f504a8d86d29618cefb20274
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c2674c57a303a18a1ec385a2f55f8c0b46e439cd4d9c3504445ad164451d5b031d26d1f97d3b1a1d6746f7a5012a991f04ded31f823633ff299bf4eb74f605ce
|
7
|
+
data.tar.gz: 5464a58443a888ad4c7b964b5fba82f140b76551d93ff26f57472239f394332c473e970172f315432acadb39c4d681da9ed65a95cc12349f25c2a10b99e4c9be
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,20 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
#install: ruby -S bundle install
|
13
|
-
#script: find .
|
14
|
-
# - bundle exec rspec spec
|
15
|
-
# - bundle exec gem env
|
16
|
-
# - bundle exec gem env
|
17
|
-
# - bundle exec --verbose rake feature
|
18
|
-
# - export GEM_PATH=/home/travis/build/zynxhealth/zaws/vendor/bundle/ruby/1.9.1:/home/travis/.rvm/gems/ruby-1.9.3-p545
|
19
|
-
#:/home/travis/.rvm/gems/ruby-1.9.3-p545@global/bin:/home/travis/.rvm/rubies/ruby-1.9.3-p545/bin:/home/travis/.rvm/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin
|
20
|
-
|
3
|
+
- 2.0.0
|
4
|
+
deploy:
|
5
|
+
provider: rubygems
|
6
|
+
api_key:
|
7
|
+
secure: Yh9SvLN3oX7irNROrMWci4sFXhRi6bOte0tyFaSkF1EGjX78Bl3ja/8cVVXIPO6QNTFl8z1nOtw3vCny4sHqwUoGVszGxiHlBHfHSGd5jFBx+9ctT5wZrVEaspzBd+rIUuXOhV1276IoQPcpI4BkYRfAdnOsqvT5bW2N4bvaKEE=
|
8
|
+
gem: zaws
|
9
|
+
on:
|
10
|
+
tags: true
|
11
|
+
repo: zynxhealth/zaws
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zaws (0.
|
4
|
+
zaws (0.1.1)
|
5
|
+
excon
|
5
6
|
json (~> 1.5.0)
|
6
7
|
mixlib-shellout (~> 1.1.0)
|
7
8
|
netaddr (~> 1.5.0)
|
@@ -10,40 +11,30 @@ PATH
|
|
10
11
|
GEM
|
11
12
|
remote: https://rubygems.org/
|
12
13
|
specs:
|
13
|
-
aruba (0.5.4)
|
14
|
-
childprocess (>= 0.3.6)
|
15
|
-
cucumber (>= 1.1.1)
|
16
|
-
rspec-expectations (>= 2.7.0)
|
17
|
-
aruba-doubles (1.2.1)
|
18
|
-
cucumber (>= 1.0.2)
|
19
|
-
rspec (>= 2.6.0)
|
20
14
|
builder (3.2.2)
|
21
|
-
childprocess (0.5.
|
15
|
+
childprocess (0.5.9)
|
22
16
|
ffi (~> 1.0, >= 1.0.11)
|
23
|
-
coveralls (0.7.
|
17
|
+
coveralls (0.7.2)
|
24
18
|
multi_json (~> 1.3)
|
25
|
-
rest-client
|
19
|
+
rest-client (= 1.6.7)
|
26
20
|
simplecov (>= 0.7)
|
27
|
-
term-ansicolor
|
28
|
-
thor
|
29
|
-
cucumber (1.3.14)
|
30
|
-
builder (>= 2.1.2)
|
31
|
-
diff-lcs (>= 1.1.3)
|
32
|
-
gherkin (~> 2.12)
|
33
|
-
multi_json (>= 1.7.5, < 2.0)
|
34
|
-
multi_test (>= 0.1.1)
|
21
|
+
term-ansicolor (= 1.2.2)
|
22
|
+
thor (= 0.18.1)
|
35
23
|
diff-lcs (1.2.5)
|
36
24
|
docile (1.1.5)
|
37
|
-
|
25
|
+
excon (0.52.0)
|
26
|
+
ffi (1.9.14)
|
38
27
|
gherkin (2.12.2)
|
39
28
|
multi_json (~> 1.3)
|
40
29
|
json (1.5.5)
|
41
|
-
mime-types (
|
30
|
+
mime-types (3.1)
|
31
|
+
mime-types-data (~> 3.2015)
|
32
|
+
mime-types-data (3.2016.0521)
|
42
33
|
mixlib-shellout (1.1.0)
|
43
|
-
multi_json (1.
|
44
|
-
multi_test (0.1.
|
45
|
-
netaddr (1.5.
|
46
|
-
rake (
|
34
|
+
multi_json (1.12.1)
|
35
|
+
multi_test (0.1.2)
|
36
|
+
netaddr (1.5.1)
|
37
|
+
rake (11.2.2)
|
47
38
|
rest-client (1.6.7)
|
48
39
|
mime-types (>= 1.16)
|
49
40
|
rspec (2.14.1)
|
@@ -54,25 +45,25 @@ GEM
|
|
54
45
|
rspec-expectations (2.14.5)
|
55
46
|
diff-lcs (>= 1.1.3, < 2.0)
|
56
47
|
rspec-mocks (2.14.6)
|
57
|
-
simplecov (0.
|
48
|
+
simplecov (0.9.2)
|
58
49
|
docile (~> 1.1.0)
|
59
|
-
multi_json
|
60
|
-
simplecov-html (~> 0.
|
61
|
-
simplecov-html (0.
|
62
|
-
term-ansicolor (1.
|
63
|
-
tins (~>
|
50
|
+
multi_json (~> 1.0)
|
51
|
+
simplecov-html (~> 0.9.0)
|
52
|
+
simplecov-html (0.9.0)
|
53
|
+
term-ansicolor (1.2.2)
|
54
|
+
tins (~> 0.8)
|
64
55
|
thor (0.18.1)
|
65
|
-
tins (
|
56
|
+
tins (0.13.2)
|
66
57
|
|
67
58
|
PLATFORMS
|
68
59
|
ruby
|
69
60
|
|
70
61
|
DEPENDENCIES
|
71
|
-
aruba (~> 0.5.4)
|
72
|
-
aruba-doubles (~> 1.2.1)
|
73
62
|
bundler
|
74
63
|
coveralls
|
75
|
-
cucumber (~> 1.3.14)
|
76
64
|
rake
|
77
65
|
rspec (~> 2.14.1)
|
78
66
|
zaws!
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
1.12.5
|
data/Gemfile.lock.linux
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
zaws (0.1.1)
|
5
|
+
excon
|
6
|
+
json (~> 1.5.0)
|
7
|
+
mixlib-shellout (~> 1.1.0)
|
8
|
+
netaddr (~> 1.5.0)
|
9
|
+
thor (~> 0.18.1)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
builder (3.2.2)
|
15
|
+
childprocess (0.5.9)
|
16
|
+
ffi (~> 1.0, >= 1.0.11)
|
17
|
+
coveralls (0.7.2)
|
18
|
+
multi_json (~> 1.3)
|
19
|
+
rest-client (= 1.6.7)
|
20
|
+
simplecov (>= 0.7)
|
21
|
+
term-ansicolor (= 1.2.2)
|
22
|
+
thor (= 0.18.1)
|
23
|
+
diff-lcs (1.2.5)
|
24
|
+
docile (1.1.5)
|
25
|
+
excon (0.52.0)
|
26
|
+
ffi (1.9.14)
|
27
|
+
gherkin (2.12.2)
|
28
|
+
multi_json (~> 1.3)
|
29
|
+
json (1.5.5)
|
30
|
+
mime-types (3.1)
|
31
|
+
mime-types-data (~> 3.2015)
|
32
|
+
mime-types-data (3.2016.0521)
|
33
|
+
mixlib-shellout (1.1.0)
|
34
|
+
multi_json (1.12.1)
|
35
|
+
multi_test (0.1.2)
|
36
|
+
netaddr (1.5.1)
|
37
|
+
rake (11.2.2)
|
38
|
+
rest-client (1.6.7)
|
39
|
+
mime-types (>= 1.16)
|
40
|
+
rspec (2.14.1)
|
41
|
+
rspec-core (~> 2.14.0)
|
42
|
+
rspec-expectations (~> 2.14.0)
|
43
|
+
rspec-mocks (~> 2.14.0)
|
44
|
+
rspec-core (2.14.8)
|
45
|
+
rspec-expectations (2.14.5)
|
46
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
47
|
+
rspec-mocks (2.14.6)
|
48
|
+
simplecov (0.9.2)
|
49
|
+
docile (~> 1.1.0)
|
50
|
+
multi_json (~> 1.0)
|
51
|
+
simplecov-html (~> 0.9.0)
|
52
|
+
simplecov-html (0.9.0)
|
53
|
+
term-ansicolor (1.2.2)
|
54
|
+
tins (~> 0.8)
|
55
|
+
thor (0.18.1)
|
56
|
+
tins (0.13.2)
|
57
|
+
|
58
|
+
PLATFORMS
|
59
|
+
ruby
|
60
|
+
|
61
|
+
DEPENDENCIES
|
62
|
+
bundler
|
63
|
+
coveralls
|
64
|
+
rake
|
65
|
+
rspec (~> 2.14.1)
|
66
|
+
zaws!
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
1.12.5
|
data/Gemfile.lock.mac
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
zaws (0.1.1)
|
5
|
+
excon
|
6
|
+
json (~> 1.5.0)
|
7
|
+
mixlib-shellout (~> 1.1.0)
|
8
|
+
netaddr (~> 1.5.0)
|
9
|
+
thor (~> 0.18.1)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
builder (3.2.2)
|
15
|
+
childprocess (0.5.3)
|
16
|
+
ffi (~> 1.0, >= 1.0.11)
|
17
|
+
coveralls (0.7.0)
|
18
|
+
multi_json (~> 1.3)
|
19
|
+
rest-client
|
20
|
+
simplecov (>= 0.7)
|
21
|
+
term-ansicolor
|
22
|
+
thor
|
23
|
+
diff-lcs (1.2.5)
|
24
|
+
docile (1.1.5)
|
25
|
+
excon (0.49.0)
|
26
|
+
ffi (1.9.3)
|
27
|
+
ffi (1.9.3-x86-mingw32)
|
28
|
+
gherkin (2.12.2)
|
29
|
+
multi_json (~> 1.3)
|
30
|
+
gherkin (2.12.2-x86-mingw32)
|
31
|
+
multi_json (~> 1.3)
|
32
|
+
json (1.5.5)
|
33
|
+
mime-types (2.3)
|
34
|
+
mixlib-shellout (1.1.0)
|
35
|
+
mixlib-shellout (1.1.0-x86-mingw32)
|
36
|
+
win32-process (~> 0.6.5)
|
37
|
+
multi_json (1.7.9)
|
38
|
+
multi_test (0.1.1)
|
39
|
+
netaddr (1.5.1)
|
40
|
+
rake (10.1.0)
|
41
|
+
rest-client (1.6.7)
|
42
|
+
mime-types (>= 1.16)
|
43
|
+
rspec (2.14.1)
|
44
|
+
rspec-core (~> 2.14.0)
|
45
|
+
rspec-expectations (~> 2.14.0)
|
46
|
+
rspec-mocks (~> 2.14.0)
|
47
|
+
rspec-core (2.14.8)
|
48
|
+
rspec-expectations (2.14.5)
|
49
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
50
|
+
rspec-mocks (2.14.6)
|
51
|
+
simplecov (0.8.2)
|
52
|
+
docile (~> 1.1.0)
|
53
|
+
multi_json
|
54
|
+
simplecov-html (~> 0.8.0)
|
55
|
+
simplecov-html (0.8.0)
|
56
|
+
term-ansicolor (1.3.0)
|
57
|
+
tins (~> 1.0)
|
58
|
+
thor (0.18.1)
|
59
|
+
tins (1.3.0)
|
60
|
+
win32-api (1.5.3-x86-mingw32)
|
61
|
+
win32-process (0.6.6)
|
62
|
+
windows-pr (>= 1.2.2)
|
63
|
+
windows-api (0.4.4)
|
64
|
+
win32-api (>= 1.4.5)
|
65
|
+
windows-pr (1.2.4)
|
66
|
+
win32-api (>= 1.4.5)
|
67
|
+
windows-api (>= 0.4.0)
|
68
|
+
|
69
|
+
PLATFORMS
|
70
|
+
ruby
|
71
|
+
x86-mingw32
|
72
|
+
|
73
|
+
DEPENDENCIES
|
74
|
+
bundler
|
75
|
+
coveralls
|
76
|
+
rake
|
77
|
+
rspec (~> 2.14.1)
|
78
|
+
zaws!
|
79
|
+
|
80
|
+
BUNDLED WITH
|
81
|
+
1.11.2
|
@@ -0,0 +1,77 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
zaws (0.1.1)
|
5
|
+
excon
|
6
|
+
json (~> 1.5.0)
|
7
|
+
mixlib-shellout (~> 1.1.0)
|
8
|
+
netaddr (~> 1.5.0)
|
9
|
+
thor (~> 0.18.1)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
builder (3.2.2)
|
15
|
+
childprocess (0.5.3)
|
16
|
+
ffi (~> 1.0, >= 1.0.11)
|
17
|
+
coveralls (0.7.0)
|
18
|
+
multi_json (~> 1.3)
|
19
|
+
rest-client
|
20
|
+
simplecov (>= 0.7)
|
21
|
+
term-ansicolor
|
22
|
+
thor
|
23
|
+
diff-lcs (1.2.5)
|
24
|
+
docile (1.1.5)
|
25
|
+
excon (0.49.0)
|
26
|
+
ffi (1.9.3)
|
27
|
+
ffi (1.9.3-x86-mingw32)
|
28
|
+
gherkin (2.12.2)
|
29
|
+
multi_json (~> 1.3)
|
30
|
+
gherkin (2.12.2-x86-mingw32)
|
31
|
+
multi_json (~> 1.3)
|
32
|
+
json (1.5.5)
|
33
|
+
mime-types (2.3)
|
34
|
+
mixlib-shellout (1.1.0-x86-mingw32)
|
35
|
+
win32-process (~> 0.6.5)
|
36
|
+
multi_json (1.7.9)
|
37
|
+
multi_test (0.1.1)
|
38
|
+
netaddr (1.5.1)
|
39
|
+
rake (10.1.0)
|
40
|
+
rest-client (1.6.7)
|
41
|
+
mime-types (>= 1.16)
|
42
|
+
rspec (2.14.1)
|
43
|
+
rspec-core (~> 2.14.0)
|
44
|
+
rspec-expectations (~> 2.14.0)
|
45
|
+
rspec-mocks (~> 2.14.0)
|
46
|
+
rspec-core (2.14.8)
|
47
|
+
rspec-expectations (2.14.5)
|
48
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
49
|
+
rspec-mocks (2.14.6)
|
50
|
+
simplecov (0.8.2)
|
51
|
+
docile (~> 1.1.0)
|
52
|
+
multi_json
|
53
|
+
simplecov-html (~> 0.8.0)
|
54
|
+
simplecov-html (0.8.0)
|
55
|
+
term-ansicolor (1.3.0)
|
56
|
+
tins (~> 1.0)
|
57
|
+
thor (0.18.1)
|
58
|
+
tins (1.3.0)
|
59
|
+
win32-api (1.5.3-x86-mingw32)
|
60
|
+
win32-process (0.6.6)
|
61
|
+
windows-pr (>= 1.2.2)
|
62
|
+
windows-api (0.4.4)
|
63
|
+
win32-api (>= 1.4.5)
|
64
|
+
windows-pr (1.2.4)
|
65
|
+
win32-api (>= 1.4.5)
|
66
|
+
windows-api (>= 0.4.0)
|
67
|
+
|
68
|
+
PLATFORMS
|
69
|
+
ruby
|
70
|
+
x86-mingw32
|
71
|
+
|
72
|
+
DEPENDENCIES
|
73
|
+
bundler
|
74
|
+
coveralls
|
75
|
+
rake
|
76
|
+
rspec (~> 2.14.1)
|
77
|
+
zaws!
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Status
|
2
|
+
|
3
|
+
Beta software - Expect frequent releases of 0.0.* versions. Minor Bugs are being removed. You can submit [issues](https://github.com/zynxhealth/zaws/issues) as well and they will be looked into.
|
4
|
+
|
1
5
|
[](https://travis-ci.org/zynxhealth/zaws) [](https://coveralls.io/r/zynxhealth/zaws?branch=master) [](http://badge.fury.io/rb/zaws)
|
2
6
|
|
3
7
|
* For some reason the Coverage is flip floppping between 99% and mid 80%s, this looks like an issue with picking up some results. The 99% value is more accurate.
|
@@ -6,6 +10,13 @@
|
|
6
10
|
|
7
11
|
Zynx AWS Automation Tool
|
8
12
|
|
13
|
+
* [Start using "zaws" today](https://github.com/zynxhealth/zaws/wiki/02.-Start-Using-%22zaws%22). This will give you the first steps.
|
14
|
+
* [Authorization Delegated to AWS CLI](https://github.com/zynxhealth/zaws/wiki/Authorization-Done-by-AWS-CLI)
|
15
|
+
* The [design](https://github.com/zynxhealth/zaws/wiki/04.-Design) of the application is uniform and can be understood with a little effort.
|
16
|
+
* The [testing strategy](https://github.com/zynxhealth/zaws/wiki/05.-Testing) has elements of BDD using cucumber and TDD using Rspec.
|
17
|
+
* [Enhancement requests and issues](https://github.com/zynxhealth/zaws/issues) are tracked here on github. Please feel free to make requests, submit issue tickets, or submit [pull requests](https://github.com/zynxhealth/zaws/pulls).
|
18
|
+
* The [reference](https://github.com/zynxhealth/zaws/wiki/06.-References-(eg-Books,-...)) section contains lists of sources that were used in this project.
|
19
|
+
|
9
20
|
# Development
|
10
21
|
|
11
22
|
1. Fork repostiory.
|
data/Rakefile
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler'
|
3
3
|
require "bundler/gem_tasks"
|
4
|
-
require 'cucumber'
|
5
|
-
require 'cucumber/rake/task'
|
6
4
|
require 'coveralls/rake/task'
|
7
5
|
Bundler.setup
|
8
6
|
Bundler::GemHelper.install_tasks
|
9
7
|
|
10
|
-
Cucumber::Rake::Task.new do |t|
|
11
|
-
t.cucumber_opts = "feature --format pretty"
|
12
|
-
end
|
13
|
-
|
14
8
|
require 'rspec/core/rake_task'
|
15
9
|
desc "Run RSpec"
|
16
10
|
RSpec::Core::RakeTask.new do |spec|
|
@@ -21,6 +15,6 @@ end
|
|
21
15
|
Coveralls::RakeTask.new
|
22
16
|
|
23
17
|
desc "Run tests, both RSpec and Cucumber, then push coverage to Coveralls."
|
24
|
-
task :test => [:spec,
|
18
|
+
task :test => [:spec, 'coveralls:push']
|
25
19
|
|
26
20
|
task :default => :test
|
@@ -0,0 +1,124 @@
|
|
1
|
+
Feature: Cloud Trail
|
2
|
+
|
3
|
+
# Scenario: Get default cloud trail for region if no bucket name or trail name given
|
4
|
+
# Given I double `aws cloudtrail describe-trails --region us-west-1` with stdout:
|
5
|
+
# """
|
6
|
+
# {
|
7
|
+
# "trailList": [
|
8
|
+
# { "Name": "dontGetMe", "S3BucketName": "dontUseMe"},
|
9
|
+
# { "Name": "default", "S3BucketName": "bucketName"}
|
10
|
+
# ]
|
11
|
+
# }
|
12
|
+
# """
|
13
|
+
# And I double `aws s3 sync bucketName ~/.zaws/s3-cache/bucketName/ --region us-west-1` with "~/.zaws/s3-cache/bucketName/"
|
14
|
+
# And a gzip file named "~/.zaws/s3-cache/bucketName/test" with:
|
15
|
+
# """
|
16
|
+
# {"Results":"testResults"}
|
17
|
+
# """
|
18
|
+
# When I run `bundle exec zaws cloud_trail view --region us-west-1 --raw`
|
19
|
+
# Then the output should contain:
|
20
|
+
# """
|
21
|
+
# {"Results":"testResults"}
|
22
|
+
# """
|
23
|
+
#
|
24
|
+
# Scenario: Get specified cloud trail for region if trail name given
|
25
|
+
# Given I double `aws cloudtrail describe-trails --region us-west-1` with stdout:
|
26
|
+
# """
|
27
|
+
# {
|
28
|
+
# "trailList": [
|
29
|
+
# { "Name": "namedTrail", "S3BucketName": "bucketName"},
|
30
|
+
# { "Name": "default", "S3BucketName": "dontUseMe"}
|
31
|
+
# ]
|
32
|
+
# }
|
33
|
+
# """
|
34
|
+
# And I double `aws s3 sync bucketName ~/.zaws/s3-cache/bucketName/ --region us-west-1` with "~/.zaws/s3-cache/bucketName/"
|
35
|
+
# and a gzip file named "~/.zaws/s3-cache/bucketName/test" with:
|
36
|
+
# """
|
37
|
+
# {"Results":"testResults"}
|
38
|
+
# """
|
39
|
+
# When I run `bundle exec zaws cloud_trail view --region us-west-1 --trailName namedTrail --raw`
|
40
|
+
# Then the output should contain:
|
41
|
+
# """
|
42
|
+
# {"Results":"testResults"}
|
43
|
+
# """
|
44
|
+
#
|
45
|
+
# Scenario: Get specified cloud trail for region if bucket name given
|
46
|
+
# Given I double `aws s3 sync bucketName ~/.zaws/s3-cache/bucketName/ --region us-west-1` with "Not Relevant"
|
47
|
+
# and a gzip file named "~/.zaws/s3-cache/bucketName/someFile" with:
|
48
|
+
# """
|
49
|
+
# {"Results":"testResults"}
|
50
|
+
# """
|
51
|
+
# When I run `bundle exec zaws cloud_trail view --region us-west-1 --bucket bucketName --raw`
|
52
|
+
# Then the output should contain:
|
53
|
+
# """
|
54
|
+
# {"Results":"testResults"}
|
55
|
+
# """
|
56
|
+
#
|
57
|
+
# Scenario: Get specified cloud trail by bucket name and consolidate all json logs into a single json
|
58
|
+
# Given I double `aws s3 sync bucketName ~/.zaws/s3-cache/bucketName/ --region us-west-1` with "Not Relevant"
|
59
|
+
# and a gzip file named "~/.zaws/s3-cache/bucketName/topLevelFile" with:
|
60
|
+
# """
|
61
|
+
# {"Results":"firstFileResults"}
|
62
|
+
# """
|
63
|
+
# and a gzip file named "~/.zaws/s3-cache/bucketName/someDir/nestedFile" with:
|
64
|
+
# """
|
65
|
+
# {"Results":"secondFileResults"}
|
66
|
+
# """
|
67
|
+
# and a gzip file named "~/.zaws/s3-cache/bucketName/someOtherDir/anotherDir/anotherNestedFile" with:
|
68
|
+
# """
|
69
|
+
# {"Results":"thirdFileResults"}
|
70
|
+
# """
|
71
|
+
# When I run `bundle exec zaws cloud_trail view --region us-west-1 --bucket bucketName --raw`
|
72
|
+
# Then the output should contain:
|
73
|
+
# """
|
74
|
+
# {"Results":"firstFileResults"}
|
75
|
+
# """
|
76
|
+
# Then the output should contain:
|
77
|
+
# """
|
78
|
+
# {"Results":"secondFileResults"}
|
79
|
+
# """
|
80
|
+
# Then the output should contain:
|
81
|
+
# """
|
82
|
+
# {"Results":"thirdFileResults"}
|
83
|
+
# """
|
84
|
+
#
|
85
|
+
# Scenario: Declare a CloudTrail by name but skip actual creation because it already exists
|
86
|
+
# Given I double `aws cloudtrail describe-trails --region us-west-1` with stdout:
|
87
|
+
# """
|
88
|
+
# {
|
89
|
+
# "trailList": [
|
90
|
+
# { "Name": "test-cloudtrail", "S3BucketName": "does-not-matter"}
|
91
|
+
# ]
|
92
|
+
# }
|
93
|
+
# """
|
94
|
+
# When I run `bundle exec zaws cloud_trail declare test-cloudtrail --region us-west-1`
|
95
|
+
# Then the output should contain "CloudTrail already exists. Creation skipped.\n"
|
96
|
+
#
|
97
|
+
# Scenario: Declare a CloudTrail by name that is actually created because it doesn't yet exist
|
98
|
+
# Given I double `aws cloudtrail describe-trails --region us-west-1` with stdout:
|
99
|
+
# """
|
100
|
+
# {
|
101
|
+
# "trailList": []
|
102
|
+
# }
|
103
|
+
# """
|
104
|
+
# And I double `aws --region us-west-1 cloudtrail create-subscription --name test-cloudtrail --s3-new-bucket zaws-cloudtrail-test-cloudtrail` with stdout:
|
105
|
+
# """
|
106
|
+
#Setting up new S3 bucket zaws-cloudtrail-test-cloudtrail...
|
107
|
+
#Creating/updating CloudTrail configuration...
|
108
|
+
#CloudTrail configuration:
|
109
|
+
#{
|
110
|
+
# "trailList": [
|
111
|
+
# {
|
112
|
+
# "IncludeGlobalServiceEvents": true,
|
113
|
+
# "Name": "test-cloudtrail",
|
114
|
+
# "S3BucketName": "zaws-cloudtrail-test-cloudtrail"
|
115
|
+
# }
|
116
|
+
# ]
|
117
|
+
#}
|
118
|
+
#Starting CloudTrail service...
|
119
|
+
#Logs will be delivered to zaws-cloudtrail-test-cloudtrail:
|
120
|
+
# """
|
121
|
+
# When I run `bundle exec zaws cloud_trail declare test-cloudtrail --region us-west-1`
|
122
|
+
# Then the output should contain "Logs will be delivered to zaws-cloudtrail-test-cloudtrail"
|
123
|
+
#
|
124
|
+
|