brightbox-cli 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. data/.gitignore +1 -1
  2. data/brightbox-cli.gemspec +10 -9
  3. data/lib/brightbox-cli/commands/servers-activate-console.rb +1 -1
  4. data/lib/brightbox-cli/commands/types-show.rb +5 -4
  5. data/lib/brightbox-cli/config.rb +1 -1
  6. data/lib/brightbox-cli/detailed_server.rb +2 -1
  7. data/lib/brightbox-cli/gli_global_hooks.rb +1 -8
  8. data/lib/brightbox-cli/server_groups.rb +4 -0
  9. data/lib/brightbox-cli/servers.rb +5 -13
  10. data/lib/brightbox-cli/types.rb +1 -1
  11. data/lib/brightbox-cli/vendor/fog/.gitignore +1 -0
  12. data/lib/brightbox-cli/vendor/fog/README.rdoc +1 -1
  13. data/lib/brightbox-cli/vendor/fog/Rakefile +4 -3
  14. data/lib/brightbox-cli/vendor/fog/changelog.txt +213 -0
  15. data/lib/brightbox-cli/vendor/fog/docs/compute/index.markdown +15 -1
  16. data/lib/brightbox-cli/vendor/fog/docs/index.markdown +1 -1
  17. data/lib/brightbox-cli/vendor/fog/docs/storage/index.markdown +4 -4
  18. data/lib/brightbox-cli/vendor/fog/examples/compute_tests.rb +18 -6
  19. data/lib/brightbox-cli/vendor/fog/examples/dns_tests.rb +1 -1
  20. data/lib/brightbox-cli/vendor/fog/examples/storage_tests.rb +1 -1
  21. data/lib/brightbox-cli/vendor/fog/fog.gemspec +4 -3
  22. data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
  23. data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +16 -1
  24. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/auto_scaling.rb +2 -17
  25. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_formation.rb +1 -16
  26. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +2 -17
  27. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +10 -21
  28. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elasticache.rb +1 -7
  29. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb +34 -24
  30. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb +5 -4
  31. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/iam.rb +16 -1
  32. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/auto_scaling/group.rb +2 -2
  33. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/metric_statistic.rb +1 -2
  34. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_group.rb +3 -3
  35. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_groups.rb +25 -0
  36. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/server.rb +4 -1
  37. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/dns/records.rb +3 -3
  38. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/listener.rb +9 -7
  39. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/load_balancer.rb +6 -0
  40. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/directory.rb +21 -0
  41. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/file.rb +19 -5
  42. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/files.rb +4 -4
  43. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_instances.rb +2 -2
  44. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_security_groups.rb +2 -2
  45. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/sqs/receive_message.rb +1 -1
  46. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/rds.rb +41 -18
  47. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_security_group.rb +6 -4
  48. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_tags.rb +3 -2
  49. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
  50. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
  51. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +2 -0
  52. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +3 -1
  53. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer.rb +7 -2
  54. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +10 -1
  55. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +1 -1
  56. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_load_balancers.rb +5 -1
  57. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +27 -0
  58. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +1 -1
  59. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb +9 -7
  60. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/add_user_to_group.rb +24 -0
  61. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_access_key.rb +24 -0
  62. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_group.rb +21 -0
  63. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_user.rb +21 -0
  64. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_access_key.rb +17 -0
  65. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_group.rb +19 -0
  66. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_user.rb +17 -0
  67. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_user_policy.rb +16 -0
  68. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_access_keys.rb +21 -0
  69. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_groups.rb +18 -0
  70. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_groups_for_user.rb +24 -0
  71. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_user_policies.rb +18 -0
  72. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_users.rb +17 -0
  73. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/put_user_policy.rb +18 -0
  74. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/remove_user_from_group.rb +19 -0
  75. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/upload_server_certificate.rb +1 -1
  76. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +30 -1
  77. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/create_db_instance.rb +67 -1
  78. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/create_db_security_group.rb +19 -1
  79. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/delete_db_instance.rb +19 -3
  80. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/delete_db_security_group.rb +11 -1
  81. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_instances.rb +56 -1
  82. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +1 -1
  83. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_security_groups.rb +44 -2
  84. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/modify_db_instance.rb +26 -1
  85. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/reboot_db_instance.rb +17 -1
  86. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +27 -1
  87. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
  88. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
  89. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/receive_message.rb +13 -14
  90. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/copy_object.rb +14 -6
  91. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/delete_object.rb +73 -2
  92. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket.rb +3 -2
  93. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +95 -2
  94. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_versioning.rb +32 -0
  95. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object.rb +27 -1
  96. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_http_url.rb +4 -3
  97. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_https_url.rb +4 -3
  98. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_versioning.rb +41 -0
  99. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_website.rb +17 -0
  100. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_object.rb +25 -9
  101. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/ses.rb +2 -7
  102. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/simpledb.rb +4 -17
  103. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sns.rb +1 -14
  104. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +5 -11
  105. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +6 -22
  106. data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +2 -0
  107. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +9 -1
  108. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/voxel.rb +1 -1
  109. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +1 -0
  110. data/lib/brightbox-cli/vendor/fog/lib/fog/compute.rb +6 -0
  111. data/lib/brightbox-cli/vendor/fog/lib/fog/compute/models/server.rb +11 -0
  112. data/lib/brightbox-cli/vendor/fog/lib/fog/core.rb +0 -1
  113. data/lib/brightbox-cli/vendor/fog/lib/fog/core/connection.rb +0 -1
  114. data/lib/brightbox-cli/vendor/fog/lib/fog/core/errors.rb +5 -0
  115. data/lib/brightbox-cli/vendor/fog/lib/fog/core/scp.rb +18 -2
  116. data/lib/brightbox-cli/vendor/fog/lib/fog/core/wait_for.rb +1 -1
  117. data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy/dns.rb +1 -1
  118. data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/models/dns/records.rb +2 -2
  119. data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/get_node_list.rb +2 -1
  120. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -1
  121. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_backup_internet_service.rb +1 -1
  122. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_internet_service.rb +2 -2
  123. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_node.rb +1 -1
  124. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/clone_vapp.rb +1 -1
  125. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_internet_service.rb +1 -1
  126. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_network.rb +1 -1
  127. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_network_ip.rb +1 -1
  128. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_vapp.rb +1 -1
  129. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/instantiate_vapp_template.rb +1 -1
  130. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/compute.rb +7 -3
  131. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/nodes.rb +1 -3
  132. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/server.rb +93 -99
  133. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/servers.rb +2 -1
  134. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb +1 -2
  135. data/lib/brightbox-cli/vendor/fog/lib/fog/providers.rb +2 -0
  136. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/dns.rb +10 -2
  137. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/load_balancers.rb +3 -0
  138. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/compute/flavor.rb +2 -0
  139. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/compute/server.rb +2 -2
  140. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/callback.rb +3 -1
  141. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/record.rb +4 -0
  142. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/load_balancer.rb +18 -8
  143. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/storage/directory.rb +5 -1
  144. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/compute/create_image.rb +1 -3
  145. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +1 -2
  146. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +8 -2
  147. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/compute.rb +1 -1
  148. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/compute.rb +91 -30
  149. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalog.rb +1 -1
  150. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
  151. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalogs.rb +5 -8
  152. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/ip.rb +2 -2
  153. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/network.rb +9 -51
  154. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/networks.rb +21 -7
  155. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/server.rb +38 -58
  156. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/servers.rb +12 -18
  157. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/task.rb +1 -1
  158. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/tasks.rb +1 -3
  159. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/vdc.rb +14 -29
  160. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/vdcs.rb +6 -11
  161. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/clone_vapp.rb +1 -1
  162. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_network.rb +1 -1
  163. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_network_ip.rb +1 -1
  164. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_vapp.rb +1 -1
  165. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_vm.rb +1 -1
  166. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +1 -1
  167. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/login.rb +8 -4
  168. data/lib/brightbox-cli/vendor/fog/lib/fog/virtual_box/compute.rb +4 -0
  169. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +1 -0
  170. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb +7 -1
  171. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +86 -86
  172. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb +43 -8
  173. data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/record.rb +7 -5
  174. data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_host.rb +2 -2
  175. data/lib/brightbox-cli/vendor/fog/spec/ecloud/spec_helper.rb +1 -1
  176. data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +15 -6
  177. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/instance_tests.rb +37 -0
  178. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/security_group_tests.rb +6 -4
  179. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/helper.rb +33 -0
  180. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/listener_tests.rb +22 -4
  181. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/policy_tests.rb +13 -0
  182. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/access_key_tests.rb +2 -7
  183. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/group_tests.rb +1 -4
  184. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/user_policy_tests.rb +4 -11
  185. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/user_tests.rb +19 -12
  186. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/rds/helper.rb +38 -3
  187. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/rds/instance_tests.rb +3 -1
  188. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb +66 -1
  189. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/account_tests.rb +3 -3
  190. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/api_client_tests.rb +6 -6
  191. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/cloud_ip_tests.rb +15 -9
  192. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/helper.rb +6 -2
  193. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/image_tests.rb +2 -2
  194. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb +1 -1
  195. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +9 -9
  196. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_group_tests.rb +8 -8
  197. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_tests.rb +17 -13
  198. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
  199. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/user_tests.rb +3 -3
  200. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb +2 -2
  201. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/helper.rb +87 -64
  202. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/ip_tests.rb +1 -1
  203. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/server_tests.rb +4 -4
  204. data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper.rb +1 -1
  205. data/lib/brightbox-cli/vendor/fog/tests/helpers/mock_helper.rb +2 -0
  206. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +4 -2
  207. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/helper.rb +27 -11
  208. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +4 -1
  209. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/node_tests.rb +24 -25
  210. data/lib/brightbox-cli/vendor/fog/tests/slicehost/requests/compute/slice_tests.rb +2 -2
  211. data/lib/brightbox-cli/vendor/fog/tests/storm_on_demand/requests/compute/server_tests.rb +3 -3
  212. data/lib/brightbox-cli/vendor/fog/tests/vcloud/models/compute/servers_tests.rb +18 -90
  213. data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +16 -4
  214. data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_power_on_tests.rb +1 -1
  215. data/lib/brightbox-cli/version.rb +1 -1
  216. data/spec/cloud_ips_spec.rb +1 -1
  217. data/spec/fixtures/vcr_cassettes/list_cloud_ip.yml +58 -26
  218. data/spec/fixtures/vcr_cassettes/server_show.yml +143 -102
  219. data/spec/servers_spec.rb +3 -2
  220. data/spec/spec_helper.rb +4 -0
  221. metadata +128 -213
  222. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/access_list_tests.rb +0 -12
  223. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/access_lists_tests.rb +0 -12
  224. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/load_balancer_tests.rb +0 -116
  225. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/load_balancers_tests.rb +0 -19
  226. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/node_tests.rb +0 -19
  227. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/nodes_tests.rb +0 -12
  228. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/virtual_ip_tests.rb +0 -16
  229. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/virtual_ips_tests.rb +0 -12
@@ -24,9 +24,9 @@ module Fog
24
24
  options.each { |option, value|
25
25
  case option
26
26
  when :host_type
27
- optional_tags+= "<host-type>#{host_type}</host-type>"
27
+ optional_tags+= "<host-type>#{value}</host-type>"
28
28
  when :data
29
- optional_tags+= "<data>#{data}</data>"
29
+ optional_tags+= "<data>#{value}</data>"
30
30
  when :hostname
31
31
  optional_tags+= "<hostname>#{value}</hostname>"
32
32
  when :notes
@@ -327,7 +327,7 @@ end
327
327
  Spec::Matchers.define :have_keys_with_values do |expected|
328
328
  match do |actual|
329
329
  actual.each_pair.all? do |key, value|
330
- expected.keys.include?(key) && expected[key] == value
330
+ expected.has_key?(key) && expected[key] == value
331
331
  end
332
332
  end
333
333
  end
@@ -1,4 +1,5 @@
1
1
  Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
2
+ require 'fog'
2
3
  @availability_zones = Fog::Compute[:aws].describe_availability_zones('state' => 'available').body['availabilityZoneInfo'].collect{ |az| az['zoneName'] }
3
4
  @key_name = 'fog-test-model'
4
5
 
@@ -13,15 +14,17 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
13
14
  tests("default attributes") do
14
15
  listener = Fog::AWS[:elb].listeners.new
15
16
  tests('instance_port is 80').returns(80) { listener.instance_port }
17
+ tests('instance_protocol is HTTP').returns('HTTP') { listener.instance_protocol }
16
18
  tests('lb_port is 80').returns(80) { listener.lb_port }
17
19
  tests('protocol is HTTP').returns('HTTP') { listener.protocol }
18
20
  tests('policy_names is empty').returns([]) { listener.policy_names }
19
21
  end
20
22
 
21
23
  tests("specifying attributes") do
22
- attributes = {:instance_port => 2000, :lb_port => 2001, :protocol => 'SSL', :policy_names => ['fake'] }
24
+ attributes = {:instance_port => 2000, :instance_protocol => 'SSL', :lb_port => 2001, :protocol => 'SSL', :policy_names => ['fake'] }
23
25
  listener = Fog::AWS[:elb].listeners.new(attributes)
24
26
  tests('instance_port is 2000').returns(2000) { listener.instance_port }
27
+ tests('instance_protocol is SSL').returns('SSL') { listener.instance_protocol }
25
28
  tests('lb_port is 2001').returns(2001) { listener.lb_port }
26
29
  tests('protocol is SSL').returns('SSL') { listener.protocol }
27
30
  tests('policy_names is [ fake ]').returns(['fake']) { listener.policy_names }
@@ -62,7 +65,7 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
62
65
  'PolicyNames' => []
63
66
  }, {
64
67
  'Listener' => {
65
- 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'Protocol' => 'HTTPS',
68
+ 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'Protocol' => 'HTTPS', 'InstanceProtocol' => 'HTTPS',
66
69
  'SSLCertificateId' => @certificate['Arn']
67
70
  },
68
71
  'PolicyNames' => []
@@ -73,13 +76,14 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
73
76
  tests('lb_port is 2030').returns(2030) { elb3.listeners.first.lb_port }
74
77
  tests('protocol is HTTP').returns('HTTP') { elb3.listeners.first.protocol }
75
78
  tests('protocol is HTTPS').returns('HTTPS') { elb3.listeners.last.protocol }
79
+ tests('instance_protocol is HTTPS').returns('HTTPS') { elb3.listeners.last.instance_protocol }
76
80
  elb3.destroy
77
81
  end
78
82
 
79
83
  tests('with invalid Server Cert ARN').raises(Fog::AWS::IAM::NotFound) do
80
84
  listeners = [{
81
85
  'Listener' => {
82
- 'LoadBalancerPort' => 443, 'InstancePort' => 80, 'Protocol' => 'HTTPS', "SSLCertificateId" => "fakecert"}
86
+ 'LoadBalancerPort' => 443, 'InstancePort' => 80, 'Protocol' => 'HTTPS', 'InstanceProtocol' => 'HTTPS', "SSLCertificateId" => "fakecert"}
83
87
  }]
84
88
  Fog::AWS[:elb].load_balancers.create(:id => "#{elb_id}-4", "ListenerDescriptions" => listeners, :availability_zones => @availability_zones)
85
89
  end
@@ -178,7 +182,7 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
178
182
  returns(1) { elb.listeners.size }
179
183
 
180
184
  listener = elb.listeners.first
181
- returns([80,80,'HTTP', []]) { [listener.instance_port, listener.lb_port, listener.protocol, listener.policy_names] }
185
+ returns([80,80,'HTTP','HTTP', []]) { [listener.instance_port, listener.lb_port, listener.protocol, listener.instance_protocol, listener.policy_names] }
182
186
  end
183
187
 
184
188
  tests('#get') do
@@ -186,8 +190,8 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
186
190
  end
187
191
 
188
192
  tests('create') do
189
- new_listener = { 'InstancePort' => 443, 'LoadBalancerPort' => 443, 'Protocol' => 'TCP'}
190
- elb.listeners.create(:instance_port => 443, :lb_port => 443, :protocol => 'TCP')
193
+ new_listener = { 'InstancePort' => 443, 'LoadBalancerPort' => 443, 'Protocol' => 'TCP', 'InstanceProtocol' => 'TCP'}
194
+ elb.listeners.create(:instance_port => 443, :lb_port => 443, :protocol => 'TCP', :instance_protocol => 'TCP')
191
195
  returns(2) { elb.listeners.size }
192
196
  returns(443) { elb.listeners.get(443).lb_port }
193
197
  end
@@ -244,6 +248,11 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
244
248
  end
245
249
  end
246
250
 
251
+ tests('setting a new ssl certificate id') do
252
+ elb.listeners.create(:instance_port => 443, :lb_port => 443, :protocol => 'HTTPS', :instance_protocol => 'HTTPS', :ssl_id => @certificate['Arn'])
253
+ elb.set_listener_ssl_certificate(443, @certificate['Arn'])
254
+ end
255
+
247
256
  tests('destroy') do
248
257
  elb.destroy
249
258
  end
@@ -122,6 +122,39 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
122
122
  'requestId' => String
123
123
  }
124
124
 
125
+ @describe_instance_status_format = {
126
+ 'requestId' => String,
127
+ 'instanceStatusSet' => [{
128
+ 'instanceId' => String,
129
+ 'availabilityZone' => String,
130
+ 'instanceState' => {
131
+ 'code' => Integer,
132
+ 'name' => String
133
+ },
134
+ 'systemStatus' => {
135
+ 'status' => String,
136
+ 'details' => [{
137
+ 'name' => String,
138
+ 'status' => String
139
+ }]
140
+ },
141
+ 'instanceStatus' => {
142
+ 'status' => String,
143
+ 'details' => [{
144
+ 'name' => String,
145
+ 'status' => String
146
+ }]
147
+ },
148
+ 'event' => {
149
+ 'code' => String,
150
+ 'description' => String,
151
+ 'notBefore' => Time,
152
+ 'notAfter' => Time
153
+ }
154
+ }]
155
+
156
+ }
157
+
125
158
  tests('success') do
126
159
 
127
160
  @instance_id = nil
@@ -214,6 +247,10 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
214
247
  @reserved_instances
215
248
  end
216
249
 
250
+ tests('#describe_instance_status').formats(@describe_instance_status_format) do
251
+ Fog::Compute[:aws].describe_instance_status.body
252
+ end
253
+
217
254
  if Fog.mocking?
218
255
  @reserved_instance_offering_id = @reserved_instances["reservedInstancesOfferingsSet"].first["reservedInstancesOfferingId"]
219
256
  tests("#purchase_reserved_instances_offering('#{@reserved_instance_offering_id}')").formats(@purchase_reserved_instances_offering_format) do
@@ -4,16 +4,18 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
4
4
  'requestId' => String,
5
5
  'securityGroupInfo' => [{
6
6
  'groupDescription' => String,
7
+ 'groupId' => Fog::Nullable::String,
7
8
  'groupName' => String,
8
9
  'ipPermissions' => [{
9
- 'fromPort' => Integer,
10
- 'groups' => [{ 'groupName' => String, 'userId' => String }],
10
+ 'fromPort' => Fog::Nullable::Integer,
11
+ 'groups' => [{ 'groupName' => Fog::Nullable::String, 'userId' => String }],
11
12
  'ipProtocol' => String,
12
13
  'ipRanges' => [],
13
- 'toPort' => Integer,
14
+ 'toPort' => Fog::Nullable::Integer,
14
15
  }],
15
16
  'ipPermissionsEgress' => [],
16
- 'ownerId' => String
17
+ 'ownerId' => String,
18
+ 'vpcId' => Fog::Nullable::String
17
19
  }]
18
20
  }
19
21
 
@@ -28,6 +28,39 @@ class AWS
28
28
  'DescribeLoadBalancersResult' => {'LoadBalancerDescriptions' => [LOAD_BALANCER]}
29
29
  })
30
30
 
31
+ POLICY_ATTRIBUTE_DESCRIPTION = {
32
+ "AttributeName" => String,
33
+ "AttributeValue" => String
34
+ }
35
+
36
+ POLICY = {
37
+ "PolicyAttributeDescriptions" => [POLICY_ATTRIBUTE_DESCRIPTION],
38
+ "PolicyName" => String,
39
+ "PolicyTypeName" => String
40
+ }
41
+
42
+ DESCRIBE_LOAD_BALANCER_POLICIES = BASIC.merge({
43
+ 'DescribeLoadBalancerPoliciesResult' => { 'PolicyDescriptions' => [POLICY] }
44
+ })
45
+
46
+ POLICY_ATTRIBUTE_TYPE_DESCRIPTION = {
47
+ "AttributeName" => String,
48
+ "AttributeType" => String,
49
+ "Cardinality" => String,
50
+ "DefaultValue" => String,
51
+ "Description" => String
52
+ }
53
+
54
+ POLICY_TYPE = {
55
+ "Description" => String,
56
+ "PolicyAttributeTypeDescriptions" => [POLICY_ATTRIBUTE_TYPE_DESCRIPTION],
57
+ "PolicyTypeName" => String
58
+ }
59
+
60
+ DESCRIBE_LOAD_BALANCER_POLICY_TYPES = BASIC.merge({
61
+ 'DescribeLoadBalancerPolicyTypesResult' => { 'PolicyTypeDescriptions' => [POLICY_TYPE] }
62
+ })
63
+
31
64
  CONFIGURE_HEALTH_CHECK = BASIC.merge({
32
65
  'ConfigureHealthCheckResult' => {'HealthCheck' => {
33
66
  'Target' => String,
@@ -8,7 +8,7 @@ Shindo.tests('AWS::ELB | listener_tests', ['aws', 'elb']) do
8
8
 
9
9
  tests("#create_load_balancer_listeners").formats(AWS::ELB::Formats::BASIC) do
10
10
  listeners = [
11
- {'Protocol' => 'TCP', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['Arn']},
11
+ {'Protocol' => 'TCP','InstanceProtocol' => 'TCP', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['Arn']},
12
12
  {'Protocol' => 'HTTP', 'LoadBalancerPort' => 80, 'InstancePort' => 80}
13
13
  ]
14
14
  response = Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners).body
@@ -22,7 +22,7 @@ Shindo.tests('AWS::ELB | listener_tests', ['aws', 'elb']) do
22
22
 
23
23
  tests("#create_load_balancer_listeners with non-existant SSL certificate") do
24
24
  listeners = [
25
- {'Protocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => 'non-existant'},
25
+ {'Protocol' => 'HTTPS', 'InstanceProtocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => 'non-existant'},
26
26
  ]
27
27
  raises(Fog::AWS::IAM::NotFound) { Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners) }
28
28
  end
@@ -30,7 +30,7 @@ Shindo.tests('AWS::ELB | listener_tests', ['aws', 'elb']) do
30
30
  tests("#create_load_balancer_listeners with invalid SSL certificate").raises(Fog::AWS::IAM::NotFound) do
31
31
  sleep 8 unless Fog.mocking?
32
32
  listeners = [
33
- {'Protocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => "#{@certificate['Arn']}fake"},
33
+ {'Protocol' => 'HTTPS', 'InstanceProtocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => "#{@certificate['Arn']}fake"},
34
34
  ]
35
35
  Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners).body
36
36
  end
@@ -39,7 +39,25 @@ Shindo.tests('AWS::ELB | listener_tests', ['aws', 'elb']) do
39
39
  tests("#create_load_balancer_listeners with SSL certificate").formats(AWS::ELB::Formats::BASIC) do
40
40
  sleep 8 unless Fog.mocking?
41
41
  listeners = [
42
- {'Protocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['Arn']},
42
+ {'Protocol' => 'HTTPS', 'InstanceProtocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['Arn']},
43
+ ]
44
+ Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners).body
45
+ end
46
+
47
+ tests("#set_load_balancer_listener_ssl_certificate").formats(AWS::ELB::Formats::BASIC) do
48
+ Fog::AWS[:elb].set_load_balancer_listener_ssl_certificate(@load_balancer_id, 443, @certificate['Arn']).body
49
+ end
50
+
51
+ tests("#create_load_balancer_listeners with invalid Protocol and InstanceProtocol configuration").raises(Fog::AWS::ELB::ValidationError) do
52
+ listeners = [
53
+ {'Protocol' => 'HTTP', 'InstanceProtocol' => 'TCP', 'LoadBalancerPort' => 80, 'InstancePort' => 80},
54
+ ]
55
+ Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners).body
56
+ end
57
+
58
+ tests("#create_load_balancer_listeners with valid Protocol and InstanceProtocol configuration").formats(AWS::ELB::Formats::BASIC) do
59
+ listeners = [
60
+ {'Protocol' => 'HTTP', 'InstanceProtocol' => 'HTTPS', 'LoadBalancerPort' => 80, 'InstancePort' => 80},
43
61
  ]
44
62
  Fog::AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners).body
45
63
  end
@@ -21,6 +21,19 @@ Shindo.tests('AWS::ELB | policy_tests', ['aws', 'elb']) do
21
21
  Fog::AWS[:elb].create_lb_cookie_stickiness_policy(@load_balancer_id, policy).body
22
22
  end
23
23
 
24
+ tests("#describe_load_balancer_policy_types").formats(AWS::ELB::Formats::DESCRIBE_LOAD_BALANCER_POLICY_TYPES) do
25
+ @policy_types = Fog::AWS[:elb].describe_load_balancer_policy_types.body
26
+ end
27
+
28
+ tests("#create_load_balancer_policy").formats(AWS::ELB::Formats::BASIC) do
29
+ policy = 'fog-policy'
30
+ Fog::AWS[:elb].create_load_balancer_policy(@load_balancer_id, policy, 'PublicKeyPolicyType', {'PublicKey' => AWS::IAM::SERVER_CERT_PUBLIC_KEY}).body
31
+ end
32
+
33
+ tests("#describe_load_balancer_policies").formats(AWS::ELB::Formats::DESCRIBE_LOAD_BALANCER_POLICIES) do
34
+ Fog::AWS[:elb].describe_load_balancer_policies(@load_balancer_id).body
35
+ end
36
+
24
37
  tests("#delete_load_balancer_policy").formats(AWS::ELB::Formats::BASIC) do
25
38
  policy = 'fog-lb-no-expiry'
26
39
  Fog::AWS[:elb].delete_load_balancer_policy(@load_balancer_id, policy).body
@@ -1,8 +1,6 @@
1
1
  Shindo.tests('AWS::IAM | access key requests', ['aws']) do
2
2
 
3
- unless Fog.mocking?
4
- Fog::AWS[:iam].create_user('fog_access_key_tests')
5
- end
3
+ Fog::AWS[:iam].create_user('fog_access_key_tests')
6
4
 
7
5
  tests('success') do
8
6
 
@@ -17,7 +15,6 @@ Shindo.tests('AWS::IAM | access key requests', ['aws']) do
17
15
  }
18
16
 
19
17
  tests("#create_access_key('UserName' => 'fog_access_key_tests')").formats(@access_key_format) do
20
- pending if Fog.mocking?
21
18
  data = Fog::AWS[:iam].create_access_key('UserName' => 'fog_access_key_tests').body
22
19
  @access_key_id = data['AccessKey']['AccessKeyId']
23
20
  data
@@ -33,7 +30,6 @@ Shindo.tests('AWS::IAM | access key requests', ['aws']) do
33
30
  }
34
31
 
35
32
  tests("#list_access_keys('Username' => 'fog_access_key_tests')").formats(@access_keys_format) do
36
- pending if Fog.mocking?
37
33
  Fog::AWS[:iam].list_access_keys('UserName' => 'fog_access_key_tests').body
38
34
  end
39
35
 
@@ -43,7 +39,6 @@ Shindo.tests('AWS::IAM | access key requests', ['aws']) do
43
39
  end
44
40
 
45
41
  tests("#delete_access_key('#{@access_key_id}', 'UserName' => 'fog_access_key_tests)").formats(AWS::IAM::Formats::BASIC) do
46
- pending if Fog.mocking?
47
42
  Fog::AWS[:iam].delete_access_key(@access_key_id, 'UserName' => 'fog_access_key_tests').body
48
43
  end
49
44
 
@@ -57,4 +52,4 @@ Shindo.tests('AWS::IAM | access key requests', ['aws']) do
57
52
  Fog::AWS[:iam].delete_user('fog_access_key_tests')
58
53
  end
59
54
 
60
- end
55
+ end
@@ -13,7 +13,6 @@ Shindo.tests('AWS::IAM | group requests', ['aws']) do
13
13
  }
14
14
 
15
15
  tests("#create_group('fog_group')").formats(@group_format) do
16
- pending if Fog.mocking?
17
16
  Fog::AWS[:iam].create_group('fog_group').body
18
17
  end
19
18
 
@@ -29,12 +28,10 @@ Shindo.tests('AWS::IAM | group requests', ['aws']) do
29
28
  }
30
29
 
31
30
  tests("#list_groups").formats(@groups_format) do
32
- pending if Fog.mocking?
33
31
  Fog::AWS[:iam].list_groups.body
34
32
  end
35
33
 
36
34
  tests("#delete_group('fog_group')").formats(AWS::IAM::Formats::BASIC) do
37
- pending if Fog.mocking?
38
35
  Fog::AWS[:iam].delete_group('fog_group').body
39
36
  end
40
37
 
@@ -44,4 +41,4 @@ Shindo.tests('AWS::IAM | group requests', ['aws']) do
44
41
  test('failing conditions')
45
42
  end
46
43
 
47
- end
44
+ end
@@ -1,15 +1,12 @@
1
1
  Shindo.tests('AWS::IAM | user policy requests', ['aws']) do
2
2
 
3
- unless Fog.mocking?
4
- Fog::AWS[:iam].create_user('fog_user_policy_tests')
5
- end
3
+ Fog::AWS[:iam].create_user('fog_user_policy_tests')
6
4
 
7
5
  tests('success') do
8
6
 
9
7
  @policy = {"Statement" => [{"Effect" => "Allow", "Action" => "*", "Resource" => "*"}]}
10
8
 
11
9
  tests("#put_user_policy('fog_user_policy_tests', 'fog_policy', #{@policy.inspect})").formats(AWS::IAM::Formats::BASIC) do
12
- pending if Fog.mocking?
13
10
  Fog::AWS[:iam].put_user_policy('fog_user_policy_tests', 'fog_policy', @policy).body
14
11
  end
15
12
 
@@ -19,13 +16,11 @@ Shindo.tests('AWS::IAM | user policy requests', ['aws']) do
19
16
  'RequestId' => String
20
17
  }
21
18
 
22
- tests("list_user_policies('fog_user_policy_tests')").formats(@user_policies_format) do
23
- pending if Fog.mocking?
19
+ tests("#list_user_policies('fog_user_policy_tests')").formats(@user_policies_format) do
24
20
  Fog::AWS[:iam].list_user_policies('fog_user_policy_tests').body
25
21
  end
26
22
 
27
23
  tests("#delete_user_policy('fog_user_policy_tests', 'fog_policy')").formats(AWS::IAM::Formats::BASIC) do
28
- pending if Fog.mocking?
29
24
  Fog::AWS[:iam].delete_user_policy('fog_user_policy_tests', 'fog_policy').body
30
25
  end
31
26
 
@@ -35,8 +30,6 @@ Shindo.tests('AWS::IAM | user policy requests', ['aws']) do
35
30
  test('failing conditions')
36
31
  end
37
32
 
38
- unless Fog.mocking?
39
- Fog::AWS[:iam].delete_user('fog_user_policy_tests')
40
- end
33
+ Fog::AWS[:iam].delete_user('fog_user_policy_tests')
41
34
 
42
- end
35
+ end
@@ -1,8 +1,6 @@
1
1
  Shindo.tests('AWS::IAM | user requests', ['aws']) do
2
2
 
3
- unless Fog.mocking?
4
- Fog::AWS[:iam].create_group('fog_user_tests')
5
- end
3
+ Fog::AWS[:iam].create_group('fog_user_tests')
6
4
 
7
5
  tests('success') do
8
6
 
@@ -17,7 +15,6 @@ Shindo.tests('AWS::IAM | user requests', ['aws']) do
17
15
  }
18
16
 
19
17
  tests("#create_user('fog_user')").formats(@user_format) do
20
- pending if Fog.mocking?
21
18
  Fog::AWS[:iam].create_user('fog_user').body
22
19
  end
23
20
 
@@ -33,33 +30,43 @@ Shindo.tests('AWS::IAM | user requests', ['aws']) do
33
30
  }
34
31
 
35
32
  tests("#list_users").formats(@users_format) do
36
- pending if Fog.mocking?
37
33
  Fog::AWS[:iam].list_users.body
38
34
  end
39
35
 
40
36
  tests("#add_user_to_group('fog_user_tests', 'fog_user')").formats(AWS::IAM::Formats::BASIC) do
41
- pending if Fog.mocking?
42
37
  Fog::AWS[:iam].add_user_to_group('fog_user_tests', 'fog_user').body
43
38
  end
44
39
 
40
+ @groups_format = {
41
+ 'GroupsForUser' => [{
42
+ 'Arn' => String,
43
+ 'GroupId' => String,
44
+ 'GroupName' => String,
45
+ 'Path' => String
46
+ }],
47
+ 'IsTruncated' => Fog::Boolean,
48
+ 'RequestId' => String
49
+ }
50
+
51
+ tests("#list_groups_for_user('fog_user')").formats(@groups_format) do
52
+ Fog::AWS[:iam].list_groups_for_user('fog_user').body
53
+ end
54
+
45
55
  tests("#remove_user_from_group('fog_user_tests', 'fog_user')").formats(AWS::IAM::Formats::BASIC) do
46
- pending if Fog.mocking?
47
56
  Fog::AWS[:iam].remove_user_from_group('fog_user_tests', 'fog_user').body
48
57
  end
49
58
 
50
59
  tests("#delete_user('fog_user')").formats(AWS::IAM::Formats::BASIC) do
51
- pending if Fog.mocking?
52
60
  Fog::AWS[:iam].delete_user('fog_user').body
53
61
  end
54
62
 
63
+
55
64
  end
56
65
 
57
66
  tests('failure') do
58
67
  test('failing conditions')
59
68
  end
60
69
 
61
- unless Fog.mocking?
62
- Fog::AWS[:iam].delete_group('fog_user_tests')
63
- end
70
+ Fog::AWS[:iam].delete_group('fog_user_tests')
64
71
 
65
- end
72
+ end