fog-google 1.24.1 → 1.26.0

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.
Files changed (437) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/integration-compute-core.yml +2 -2
  3. data/.github/workflows/integration-compute-instance_groups.yml +2 -2
  4. data/.github/workflows/integration-compute-loadbalancing.yml +2 -2
  5. data/.github/workflows/integration-compute-networking.yml +2 -2
  6. data/.github/workflows/integration-monitoring.yml +2 -2
  7. data/.github/workflows/integration-pubsub.yml +2 -2
  8. data/.github/workflows/integration-sql.yml +2 -2
  9. data/.github/workflows/integration-storage.yml +2 -2
  10. data/.github/workflows/unit.yml +2 -2
  11. data/CHANGELOG.md +58 -27
  12. data/CONTRIBUTING.md +11 -11
  13. data/README.md +7 -7
  14. data/SECURITY.md +3 -14
  15. data/examples/create_instance_and_attach_disk_later.rb +6 -7
  16. data/examples/dns/project.rb +1 -1
  17. data/examples/dns/zones.rb +1 -1
  18. data/examples/storage.rb +1 -1
  19. data/examples/storage_json.rb +1 -1
  20. data/fog-google.gemspec +3 -4
  21. data/lib/fog/bin/google.rb +23 -25
  22. data/lib/fog/{compute/google → google/compute}/mock.rb +2 -2
  23. data/lib/fog/{compute/google → google/compute}/models/address.rb +8 -8
  24. data/lib/fog/{compute/google → google/compute}/models/addresses.rb +3 -3
  25. data/lib/fog/{compute/google → google/compute}/models/backend_service.rb +4 -4
  26. data/lib/fog/{compute/google → google/compute}/models/backend_services.rb +3 -3
  27. data/lib/fog/{compute/google → google/compute}/models/disk.rb +5 -5
  28. data/lib/fog/{compute/google → google/compute}/models/disk_type.rb +2 -2
  29. data/lib/fog/{compute/google → google/compute}/models/disk_types.rb +3 -3
  30. data/lib/fog/{compute/google → google/compute}/models/disks.rb +3 -3
  31. data/lib/fog/{compute/google → google/compute}/models/firewall.rb +6 -6
  32. data/lib/fog/{compute/google → google/compute}/models/firewalls.rb +3 -3
  33. data/lib/fog/{compute/google → google/compute}/models/forwarding_rule.rb +4 -4
  34. data/lib/fog/{compute/google → google/compute}/models/forwarding_rules.rb +3 -3
  35. data/lib/fog/{compute/google → google/compute}/models/global_address.rb +4 -4
  36. data/lib/fog/{compute/google → google/compute}/models/global_addresses.rb +3 -3
  37. data/lib/fog/{compute/google → google/compute}/models/global_forwarding_rule.rb +4 -4
  38. data/lib/fog/{compute/google → google/compute}/models/global_forwarding_rules.rb +3 -3
  39. data/lib/fog/{compute/google → google/compute}/models/http_health_check.rb +5 -5
  40. data/lib/fog/{compute/google → google/compute}/models/http_health_checks.rb +3 -3
  41. data/lib/fog/{compute/google → google/compute}/models/image.rb +4 -4
  42. data/lib/fog/{compute/google → google/compute}/models/images.rb +3 -3
  43. data/lib/fog/{compute/google → google/compute}/models/instance_group.rb +2 -2
  44. data/lib/fog/{compute/google → google/compute}/models/instance_group_manager.rb +3 -3
  45. data/lib/fog/{compute/google → google/compute}/models/instance_group_managers.rb +3 -3
  46. data/lib/fog/{compute/google → google/compute}/models/instance_groups.rb +5 -5
  47. data/lib/fog/{compute/google → google/compute}/models/instance_template.rb +4 -4
  48. data/lib/fog/{compute/google → google/compute}/models/instance_templates.rb +3 -3
  49. data/lib/fog/{compute/google → google/compute}/models/machine_type.rb +2 -2
  50. data/lib/fog/{compute/google → google/compute}/models/machine_types.rb +3 -3
  51. data/lib/fog/{compute/google → google/compute}/models/network.rb +4 -4
  52. data/lib/fog/{compute/google → google/compute}/models/networks.rb +3 -3
  53. data/lib/fog/{compute/google → google/compute}/models/operation.rb +2 -2
  54. data/lib/fog/{compute/google → google/compute}/models/operations.rb +3 -3
  55. data/lib/fog/{compute/google → google/compute}/models/project.rb +3 -3
  56. data/lib/fog/{compute/google → google/compute}/models/projects.rb +3 -3
  57. data/lib/fog/{compute/google → google/compute}/models/region.rb +2 -2
  58. data/lib/fog/{compute/google → google/compute}/models/regions.rb +3 -3
  59. data/lib/fog/{compute/google → google/compute}/models/route.rb +4 -4
  60. data/lib/fog/{compute/google → google/compute}/models/routes.rb +3 -3
  61. data/lib/fog/{compute/google → google/compute}/models/server.rb +19 -19
  62. data/lib/fog/{compute/google → google/compute}/models/servers.rb +3 -3
  63. data/lib/fog/{compute/google → google/compute}/models/snapshot.rb +3 -3
  64. data/lib/fog/{compute/google → google/compute}/models/snapshots.rb +3 -3
  65. data/lib/fog/{compute/google → google/compute}/models/ssl_certificate.rb +4 -4
  66. data/lib/fog/{compute/google → google/compute}/models/ssl_certificates.rb +3 -3
  67. data/lib/fog/{compute/google → google/compute}/models/subnetwork.rb +6 -6
  68. data/lib/fog/{compute/google → google/compute}/models/subnetworks.rb +3 -3
  69. data/lib/fog/{compute/google → google/compute}/models/target_http_proxies.rb +3 -3
  70. data/lib/fog/{compute/google → google/compute}/models/target_http_proxy.rb +5 -5
  71. data/lib/fog/{compute/google → google/compute}/models/target_https_proxies.rb +3 -3
  72. data/lib/fog/{compute/google → google/compute}/models/target_https_proxy.rb +7 -7
  73. data/lib/fog/{compute/google → google/compute}/models/target_instance.rb +4 -4
  74. data/lib/fog/{compute/google → google/compute}/models/target_instances.rb +3 -3
  75. data/lib/fog/{compute/google → google/compute}/models/target_pool.rb +8 -8
  76. data/lib/fog/{compute/google → google/compute}/models/target_pools.rb +3 -3
  77. data/lib/fog/{compute/google → google/compute}/models/url_map.rb +7 -7
  78. data/lib/fog/{compute/google → google/compute}/models/url_maps.rb +3 -3
  79. data/lib/fog/{compute/google → google/compute}/models/zone.rb +2 -2
  80. data/lib/fog/{compute/google → google/compute}/models/zones.rb +3 -3
  81. data/lib/fog/{compute/google → google/compute}/real.rb +2 -2
  82. data/lib/fog/{compute/google → google/compute}/requests/abandon_instances.rb +2 -2
  83. data/lib/fog/{compute/google → google/compute}/requests/add_backend_service_backends.rb +2 -2
  84. data/lib/fog/{compute/google → google/compute}/requests/add_instance_group_instances.rb +2 -2
  85. data/lib/fog/{compute/google → google/compute}/requests/add_server_access_config.rb +2 -2
  86. data/lib/fog/{compute/google → google/compute}/requests/add_target_pool_health_checks.rb +2 -2
  87. data/lib/fog/{compute/google → google/compute}/requests/add_target_pool_instances.rb +2 -2
  88. data/lib/fog/{compute/google → google/compute}/requests/attach_disk.rb +2 -2
  89. data/lib/fog/{compute/google → google/compute}/requests/create_disk_snapshot.rb +2 -2
  90. data/lib/fog/{compute/google → google/compute}/requests/delete_address.rb +2 -2
  91. data/lib/fog/{compute/google → google/compute}/requests/delete_backend_service.rb +2 -2
  92. data/lib/fog/{compute/google → google/compute}/requests/delete_disk.rb +2 -2
  93. data/lib/fog/{compute/google → google/compute}/requests/delete_firewall.rb +2 -2
  94. data/lib/fog/{compute/google → google/compute}/requests/delete_forwarding_rule.rb +2 -2
  95. data/lib/fog/{compute/google → google/compute}/requests/delete_global_address.rb +2 -2
  96. data/lib/fog/{compute/google → google/compute}/requests/delete_global_forwarding_rule.rb +2 -2
  97. data/lib/fog/{compute/google → google/compute}/requests/delete_global_operation.rb +2 -2
  98. data/lib/fog/{compute/google → google/compute}/requests/delete_http_health_check.rb +2 -2
  99. data/lib/fog/{compute/google → google/compute}/requests/delete_image.rb +2 -2
  100. data/lib/fog/{compute/google → google/compute}/requests/delete_instance_group.rb +2 -2
  101. data/lib/fog/{compute/google → google/compute}/requests/delete_instance_group_manager.rb +2 -2
  102. data/lib/fog/{compute/google → google/compute}/requests/delete_instance_template.rb +2 -2
  103. data/lib/fog/{compute/google → google/compute}/requests/delete_network.rb +2 -2
  104. data/lib/fog/{compute/google → google/compute}/requests/delete_region_operation.rb +2 -2
  105. data/lib/fog/{compute/google → google/compute}/requests/delete_route.rb +2 -2
  106. data/lib/fog/{compute/google → google/compute}/requests/delete_server.rb +2 -2
  107. data/lib/fog/{compute/google → google/compute}/requests/delete_server_access_config.rb +2 -2
  108. data/lib/fog/{compute/google → google/compute}/requests/delete_snapshot.rb +2 -2
  109. data/lib/fog/{compute/google → google/compute}/requests/delete_ssl_certificate.rb +2 -2
  110. data/lib/fog/{compute/google → google/compute}/requests/delete_subnetwork.rb +2 -2
  111. data/lib/fog/{compute/google → google/compute}/requests/delete_target_http_proxy.rb +2 -2
  112. data/lib/fog/{compute/google → google/compute}/requests/delete_target_https_proxy.rb +2 -2
  113. data/lib/fog/{compute/google → google/compute}/requests/delete_target_instance.rb +2 -2
  114. data/lib/fog/{compute/google → google/compute}/requests/delete_target_pool.rb +2 -2
  115. data/lib/fog/{compute/google → google/compute}/requests/delete_url_map.rb +2 -2
  116. data/lib/fog/{compute/google → google/compute}/requests/delete_zone_operation.rb +2 -2
  117. data/lib/fog/{compute/google → google/compute}/requests/deprecate_image.rb +2 -2
  118. data/lib/fog/{compute/google → google/compute}/requests/detach_disk.rb +2 -2
  119. data/lib/fog/{compute/google → google/compute}/requests/expand_subnetwork_ip_cidr_range.rb +2 -2
  120. data/lib/fog/{compute/google → google/compute}/requests/get_address.rb +2 -2
  121. data/lib/fog/{compute/google → google/compute}/requests/get_backend_service.rb +2 -2
  122. data/lib/fog/{compute/google → google/compute}/requests/get_backend_service_health.rb +2 -2
  123. data/lib/fog/{compute/google → google/compute}/requests/get_disk.rb +2 -2
  124. data/lib/fog/{compute/google → google/compute}/requests/get_disk_type.rb +2 -2
  125. data/lib/fog/{compute/google → google/compute}/requests/get_firewall.rb +2 -2
  126. data/lib/fog/{compute/google → google/compute}/requests/get_forwarding_rule.rb +2 -2
  127. data/lib/fog/{compute/google → google/compute}/requests/get_global_address.rb +2 -2
  128. data/lib/fog/{compute/google → google/compute}/requests/get_global_forwarding_rule.rb +2 -2
  129. data/lib/fog/{compute/google → google/compute}/requests/get_global_operation.rb +2 -2
  130. data/lib/fog/{compute/google → google/compute}/requests/get_http_health_check.rb +2 -2
  131. data/lib/fog/{compute/google → google/compute}/requests/get_image.rb +2 -2
  132. data/lib/fog/{compute/google → google/compute}/requests/get_image_from_family.rb +2 -2
  133. data/lib/fog/{compute/google → google/compute}/requests/get_instance_group.rb +2 -2
  134. data/lib/fog/{compute/google → google/compute}/requests/get_instance_group_manager.rb +2 -2
  135. data/lib/fog/{compute/google → google/compute}/requests/get_instance_template.rb +2 -2
  136. data/lib/fog/{compute/google → google/compute}/requests/get_machine_type.rb +2 -2
  137. data/lib/fog/{compute/google → google/compute}/requests/get_network.rb +2 -2
  138. data/lib/fog/{compute/google → google/compute}/requests/get_project.rb +2 -2
  139. data/lib/fog/{compute/google → google/compute}/requests/get_region.rb +2 -2
  140. data/lib/fog/{compute/google → google/compute}/requests/get_region_operation.rb +2 -2
  141. data/lib/fog/{compute/google → google/compute}/requests/get_route.rb +2 -2
  142. data/lib/fog/{compute/google → google/compute}/requests/get_server.rb +2 -2
  143. data/lib/fog/{compute/google → google/compute}/requests/get_server_serial_port_output.rb +2 -2
  144. data/lib/fog/{compute/google → google/compute}/requests/get_snapshot.rb +2 -2
  145. data/lib/fog/{compute/google → google/compute}/requests/get_ssl_certificate.rb +2 -2
  146. data/lib/fog/{compute/google → google/compute}/requests/get_subnetwork.rb +2 -2
  147. data/lib/fog/{compute/google → google/compute}/requests/get_target_http_proxy.rb +2 -2
  148. data/lib/fog/{compute/google → google/compute}/requests/get_target_https_proxy.rb +2 -2
  149. data/lib/fog/{compute/google → google/compute}/requests/get_target_instance.rb +2 -2
  150. data/lib/fog/{compute/google → google/compute}/requests/get_target_pool.rb +2 -2
  151. data/lib/fog/{compute/google → google/compute}/requests/get_target_pool_health.rb +2 -2
  152. data/lib/fog/{compute/google → google/compute}/requests/get_url_map.rb +2 -2
  153. data/lib/fog/{compute/google → google/compute}/requests/get_zone.rb +2 -2
  154. data/lib/fog/{compute/google → google/compute}/requests/get_zone_operation.rb +2 -2
  155. data/lib/fog/{compute/google → google/compute}/requests/insert_address.rb +2 -2
  156. data/lib/fog/{compute/google → google/compute}/requests/insert_backend_service.rb +2 -2
  157. data/lib/fog/{compute/google → google/compute}/requests/insert_disk.rb +2 -2
  158. data/lib/fog/{compute/google → google/compute}/requests/insert_firewall.rb +2 -2
  159. data/lib/fog/{compute/google → google/compute}/requests/insert_forwarding_rule.rb +2 -2
  160. data/lib/fog/{compute/google → google/compute}/requests/insert_global_address.rb +2 -2
  161. data/lib/fog/{compute/google → google/compute}/requests/insert_global_forwarding_rule.rb +2 -2
  162. data/lib/fog/{compute/google → google/compute}/requests/insert_http_health_check.rb +2 -2
  163. data/lib/fog/{compute/google → google/compute}/requests/insert_image.rb +2 -2
  164. data/lib/fog/{compute/google → google/compute}/requests/insert_instance_group.rb +2 -2
  165. data/lib/fog/{compute/google → google/compute}/requests/insert_instance_group_manager.rb +2 -2
  166. data/lib/fog/{compute/google → google/compute}/requests/insert_instance_template.rb +2 -2
  167. data/lib/fog/{compute/google → google/compute}/requests/insert_network.rb +2 -2
  168. data/lib/fog/{compute/google → google/compute}/requests/insert_route.rb +2 -2
  169. data/lib/fog/{compute/google → google/compute}/requests/insert_server.rb +3 -3
  170. data/lib/fog/{compute/google → google/compute}/requests/insert_ssl_certificate.rb +2 -2
  171. data/lib/fog/{compute/google → google/compute}/requests/insert_subnetwork.rb +2 -2
  172. data/lib/fog/{compute/google → google/compute}/requests/insert_target_http_proxy.rb +2 -2
  173. data/lib/fog/{compute/google → google/compute}/requests/insert_target_https_proxy.rb +2 -2
  174. data/lib/fog/{compute/google → google/compute}/requests/insert_target_instance.rb +2 -2
  175. data/lib/fog/{compute/google → google/compute}/requests/insert_target_pool.rb +2 -2
  176. data/lib/fog/{compute/google → google/compute}/requests/insert_url_map.rb +2 -2
  177. data/lib/fog/{compute/google → google/compute}/requests/invalidate_url_map_cache.rb +2 -2
  178. data/lib/fog/{compute/google → google/compute}/requests/list_addresses.rb +2 -2
  179. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_addresses.rb +2 -2
  180. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_disk_types.rb +2 -2
  181. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_disks.rb +2 -2
  182. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_forwarding_rules.rb +2 -2
  183. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_instance_group_managers.rb +2 -2
  184. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_instance_groups.rb +2 -2
  185. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_machine_types.rb +2 -2
  186. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_servers.rb +2 -2
  187. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_subnetworks.rb +2 -2
  188. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_target_instances.rb +2 -2
  189. data/lib/fog/{compute/google → google/compute}/requests/list_aggregated_target_pools.rb +2 -2
  190. data/lib/fog/{compute/google → google/compute}/requests/list_backend_services.rb +2 -2
  191. data/lib/fog/{compute/google → google/compute}/requests/list_disk_types.rb +2 -2
  192. data/lib/fog/{compute/google → google/compute}/requests/list_disks.rb +2 -2
  193. data/lib/fog/{compute/google → google/compute}/requests/list_firewalls.rb +2 -2
  194. data/lib/fog/{compute/google → google/compute}/requests/list_forwarding_rules.rb +2 -2
  195. data/lib/fog/{compute/google → google/compute}/requests/list_global_addresses.rb +2 -2
  196. data/lib/fog/{compute/google → google/compute}/requests/list_global_forwarding_rules.rb +2 -2
  197. data/lib/fog/{compute/google → google/compute}/requests/list_global_operations.rb +2 -2
  198. data/lib/fog/{compute/google → google/compute}/requests/list_http_health_checks.rb +2 -2
  199. data/lib/fog/{compute/google → google/compute}/requests/list_images.rb +2 -2
  200. data/lib/fog/{compute/google → google/compute}/requests/list_instance_group_instances.rb +2 -2
  201. data/lib/fog/{compute/google → google/compute}/requests/list_instance_group_managers.rb +2 -2
  202. data/lib/fog/{compute/google → google/compute}/requests/list_instance_groups.rb +2 -2
  203. data/lib/fog/{compute/google → google/compute}/requests/list_instance_templates.rb +2 -2
  204. data/lib/fog/{compute/google → google/compute}/requests/list_machine_types.rb +2 -2
  205. data/lib/fog/{compute/google → google/compute}/requests/list_networks.rb +2 -2
  206. data/lib/fog/{compute/google → google/compute}/requests/list_region_operations.rb +2 -2
  207. data/lib/fog/{compute/google → google/compute}/requests/list_regions.rb +2 -2
  208. data/lib/fog/{compute/google → google/compute}/requests/list_routes.rb +2 -2
  209. data/lib/fog/{compute/google → google/compute}/requests/list_servers.rb +2 -2
  210. data/lib/fog/{compute/google → google/compute}/requests/list_snapshots.rb +2 -2
  211. data/lib/fog/{compute/google → google/compute}/requests/list_ssl_certificates.rb +2 -2
  212. data/lib/fog/{compute/google → google/compute}/requests/list_subnetworks.rb +2 -2
  213. data/lib/fog/{compute/google → google/compute}/requests/list_target_http_proxies.rb +2 -2
  214. data/lib/fog/{compute/google → google/compute}/requests/list_target_https_proxies.rb +2 -2
  215. data/lib/fog/{compute/google → google/compute}/requests/list_target_instances.rb +2 -2
  216. data/lib/fog/{compute/google → google/compute}/requests/list_target_pools.rb +2 -2
  217. data/lib/fog/{compute/google → google/compute}/requests/list_url_maps.rb +2 -2
  218. data/lib/fog/{compute/google → google/compute}/requests/list_zone_operations.rb +2 -2
  219. data/lib/fog/{compute/google → google/compute}/requests/list_zones.rb +2 -2
  220. data/lib/fog/{compute/google → google/compute}/requests/patch_firewall.rb +2 -2
  221. data/lib/fog/{compute/google → google/compute}/requests/patch_url_map.rb +2 -2
  222. data/lib/fog/{compute/google → google/compute}/requests/recreate_instances.rb +2 -2
  223. data/lib/fog/{compute/google → google/compute}/requests/remove_instance_group_instances.rb +2 -2
  224. data/lib/fog/{compute/google → google/compute}/requests/remove_target_pool_health_checks.rb +2 -2
  225. data/lib/fog/{compute/google → google/compute}/requests/remove_target_pool_instance.rb +2 -2
  226. data/lib/fog/{compute/google → google/compute}/requests/remove_target_pool_instances.rb +2 -2
  227. data/lib/fog/{compute/google → google/compute}/requests/reset_server.rb +2 -2
  228. data/lib/fog/{compute/google → google/compute}/requests/reset_windows_password.rb +2 -2
  229. data/lib/fog/{compute/google → google/compute}/requests/set_common_instance_metadata.rb +2 -2
  230. data/lib/fog/{compute/google → google/compute}/requests/set_forwarding_rule_target.rb +2 -2
  231. data/lib/fog/{compute/google → google/compute}/requests/set_global_forwarding_rule_target.rb +2 -2
  232. data/lib/fog/{compute/google → google/compute}/requests/set_instance_template.rb +2 -2
  233. data/lib/fog/{compute/google → google/compute}/requests/set_server_disk_auto_delete.rb +2 -2
  234. data/lib/fog/{compute/google → google/compute}/requests/set_server_machine_type.rb +2 -2
  235. data/lib/fog/{compute/google → google/compute}/requests/set_server_metadata.rb +2 -2
  236. data/lib/fog/{compute/google → google/compute}/requests/set_server_scheduling.rb +2 -2
  237. data/lib/fog/{compute/google → google/compute}/requests/set_server_tags.rb +2 -2
  238. data/lib/fog/{compute/google → google/compute}/requests/set_snapshot_labels.rb +2 -2
  239. data/lib/fog/{compute/google → google/compute}/requests/set_subnetwork_private_ip_google_access.rb +2 -2
  240. data/lib/fog/{compute/google → google/compute}/requests/set_target_http_proxy_url_map.rb +2 -2
  241. data/lib/fog/{compute/google → google/compute}/requests/set_target_https_proxy_ssl_certificates.rb +2 -2
  242. data/lib/fog/{compute/google → google/compute}/requests/set_target_https_proxy_url_map.rb +2 -2
  243. data/lib/fog/{compute/google → google/compute}/requests/set_target_pool_backup.rb +2 -2
  244. data/lib/fog/{compute/google → google/compute}/requests/start_server.rb +2 -2
  245. data/lib/fog/{compute/google → google/compute}/requests/stop_server.rb +2 -2
  246. data/lib/fog/{compute/google → google/compute}/requests/update_firewall.rb +2 -2
  247. data/lib/fog/{compute/google → google/compute}/requests/update_http_health_check.rb +2 -2
  248. data/lib/fog/{compute/google → google/compute}/requests/update_url_map.rb +2 -2
  249. data/lib/fog/{compute/google → google/compute}/requests/validate_url_map.rb +2 -2
  250. data/lib/fog/{compute/google.rb → google/compute.rb} +6 -6
  251. data/lib/fog/{dns/google → google/dns}/mock.rb +2 -2
  252. data/lib/fog/{dns/google → google/dns}/models/change.rb +2 -2
  253. data/lib/fog/{dns/google → google/dns}/models/changes.rb +8 -6
  254. data/lib/fog/{dns/google → google/dns}/models/project.rb +2 -2
  255. data/lib/fog/{dns/google → google/dns}/models/projects.rb +4 -4
  256. data/lib/fog/{dns/google → google/dns}/models/record.rb +11 -11
  257. data/lib/fog/{dns/google → google/dns}/models/records.rb +8 -6
  258. data/lib/fog/{dns/google → google/dns}/models/zone.rb +7 -7
  259. data/lib/fog/{dns/google → google/dns}/models/zones.rb +6 -5
  260. data/lib/fog/{dns/google → google/dns}/real.rb +2 -2
  261. data/lib/fog/{dns/google → google/dns}/requests/create_change.rb +2 -2
  262. data/lib/fog/{dns/google → google/dns}/requests/create_managed_zone.rb +2 -2
  263. data/lib/fog/{dns/google → google/dns}/requests/delete_managed_zone.rb +2 -2
  264. data/lib/fog/{dns/google → google/dns}/requests/get_change.rb +2 -2
  265. data/lib/fog/{dns/google → google/dns}/requests/get_managed_zone.rb +2 -2
  266. data/lib/fog/{dns/google → google/dns}/requests/get_project.rb +2 -2
  267. data/lib/fog/{dns/google → google/dns}/requests/list_changes.rb +2 -2
  268. data/lib/fog/{dns/google → google/dns}/requests/list_managed_zones.rb +2 -2
  269. data/lib/fog/{dns/google → google/dns}/requests/list_resource_record_sets.rb +2 -2
  270. data/lib/fog/{dns/google.rb → google/dns.rb} +6 -6
  271. data/lib/fog/{parsers/storage/google → google/parsers/storage}/access_control_list.rb +3 -3
  272. data/lib/fog/{parsers/storage/google → google/parsers/storage}/copy_object.rb +3 -3
  273. data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket.rb +3 -3
  274. data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket_logging.rb +3 -3
  275. data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket_object_versions.rb +3 -3
  276. data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_bucket_versioning.rb +3 -3
  277. data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_request_payment.rb +3 -3
  278. data/lib/fog/{parsers/storage/google → google/parsers/storage}/get_service.rb +3 -3
  279. data/lib/fog/google/parsers/storage.rb +15 -0
  280. data/lib/fog/google/shared.rb +8 -7
  281. data/lib/fog/{storage/google_json → google/storage/storage_json}/mock.rb +2 -2
  282. data/lib/fog/{storage/google_json → google/storage/storage_json}/models/directories.rb +4 -3
  283. data/lib/fog/{storage/google_json → google/storage/storage_json}/models/directory.rb +3 -3
  284. data/lib/fog/{storage/google_json → google/storage/storage_json}/models/file.rb +2 -2
  285. data/lib/fog/{storage/google_json → google/storage/storage_json}/models/files.rb +8 -7
  286. data/lib/fog/{storage/google_json → google/storage/storage_json}/real.rb +6 -4
  287. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/copy_object.rb +2 -2
  288. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/delete_bucket.rb +2 -2
  289. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/delete_object.rb +2 -2
  290. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/delete_object_url.rb +2 -2
  291. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_bucket.rb +2 -2
  292. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_bucket_acl.rb +2 -2
  293. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object.rb +2 -2
  294. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_acl.rb +2 -2
  295. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_http_url.rb +2 -2
  296. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_https_url.rb +2 -2
  297. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_metadata.rb +2 -2
  298. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/get_object_url.rb +4 -4
  299. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_bucket_acl.rb +2 -2
  300. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_buckets.rb +2 -2
  301. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_object_acl.rb +2 -2
  302. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/list_objects.rb +2 -2
  303. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_bucket.rb +2 -2
  304. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_bucket_acl.rb +2 -2
  305. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_object.rb +2 -2
  306. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_object_acl.rb +2 -2
  307. data/lib/fog/{storage/google_json → google/storage/storage_json}/requests/put_object_url.rb +2 -2
  308. data/lib/fog/{storage/google_json → google/storage/storage_json}/utils.rb +8 -6
  309. data/lib/fog/{storage/google_json.rb → google/storage/storage_json.rb} +8 -8
  310. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/mock.rb +2 -2
  311. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/directories.rb +7 -7
  312. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/directory.rb +3 -3
  313. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/file.rb +2 -2
  314. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/models/files.rb +11 -11
  315. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/real.rb +6 -4
  316. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/copy_object.rb +3 -3
  317. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/delete_bucket.rb +2 -2
  318. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/delete_object.rb +2 -2
  319. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/delete_object_url.rb +2 -2
  320. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_bucket.rb +4 -4
  321. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_bucket_acl.rb +3 -3
  322. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object.rb +2 -2
  323. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_acl.rb +3 -3
  324. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_http_url.rb +2 -2
  325. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_https_url.rb +2 -2
  326. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_object_url.rb +4 -4
  327. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/get_service.rb +3 -3
  328. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/head_object.rb +2 -2
  329. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_bucket.rb +2 -2
  330. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_bucket_acl.rb +2 -2
  331. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_object.rb +2 -2
  332. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_object_acl.rb +2 -2
  333. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/requests/put_object_url.rb +2 -2
  334. data/lib/fog/{storage/google_xml → google/storage/storage_xml}/utils.rb +22 -19
  335. data/lib/fog/{storage/google_xml.rb → google/storage/storage_xml.rb} +7 -7
  336. data/lib/fog/{storage/google.rb → google/storage.rb} +5 -5
  337. data/lib/fog/google/version.rb +1 -1
  338. data/lib/fog/google.rb +30 -16
  339. metadata +322 -518
  340. data/.github/workflows/stale.yml +0 -23
  341. data/lib/fog/parsers/storage/google.rb +0 -15
  342. data/test/helpers/client_helper.rb +0 -63
  343. data/test/helpers/integration_test_helper.rb +0 -108
  344. data/test/helpers/test_collection.rb +0 -60
  345. data/test/helpers/test_helper.rb +0 -28
  346. data/test/integration/compute/core_compute/test_client_options.rb +0 -12
  347. data/test/integration/compute/core_compute/test_coverage.rb +0 -6
  348. data/test/integration/compute/core_compute/test_disk_types.rb +0 -43
  349. data/test/integration/compute/core_compute/test_disks.rb +0 -53
  350. data/test/integration/compute/core_compute/test_images.rb +0 -32
  351. data/test/integration/compute/core_compute/test_machine_types.rb +0 -55
  352. data/test/integration/compute/core_compute/test_operations.rb +0 -45
  353. data/test/integration/compute/core_compute/test_projects.rb +0 -19
  354. data/test/integration/compute/core_compute/test_regions.rb +0 -33
  355. data/test/integration/compute/core_compute/test_servers.rb +0 -235
  356. data/test/integration/compute/core_compute/test_snapshots.rb +0 -21
  357. data/test/integration/compute/core_compute/test_zones.rb +0 -35
  358. data/test/integration/compute/core_networking/test_addresses.rb +0 -107
  359. data/test/integration/compute/core_networking/test_coverage.rb +0 -6
  360. data/test/integration/compute/core_networking/test_firewalls.rb +0 -11
  361. data/test/integration/compute/core_networking/test_networks.rb +0 -30
  362. data/test/integration/compute/core_networking/test_routes.rb +0 -26
  363. data/test/integration/compute/core_networking/test_subnetworks.rb +0 -11
  364. data/test/integration/compute/instance_groups/test_coverage.rb +0 -6
  365. data/test/integration/compute/instance_groups/test_instance_group_managers.rb +0 -11
  366. data/test/integration/compute/instance_groups/test_instance_groups.rb +0 -11
  367. data/test/integration/compute/instance_groups/test_instance_templates.rb +0 -11
  368. data/test/integration/compute/loadbalancing/test_backend_services.rb +0 -11
  369. data/test/integration/compute/loadbalancing/test_coverage.rb +0 -6
  370. data/test/integration/compute/loadbalancing/test_forwarding_rules.rb +0 -11
  371. data/test/integration/compute/loadbalancing/test_global_addresses.rb +0 -11
  372. data/test/integration/compute/loadbalancing/test_global_forwarding_rules.rb +0 -11
  373. data/test/integration/compute/loadbalancing/test_http_health_checks.rb +0 -11
  374. data/test/integration/compute/loadbalancing/test_ssl_certificates.rb +0 -11
  375. data/test/integration/compute/loadbalancing/test_target_http_proxies.rb +0 -11
  376. data/test/integration/compute/loadbalancing/test_target_https_proxies.rb +0 -11
  377. data/test/integration/compute/loadbalancing/test_target_instances.rb +0 -11
  378. data/test/integration/compute/loadbalancing/test_target_pools.rb +0 -55
  379. data/test/integration/compute/loadbalancing/test_url_maps.rb +0 -11
  380. data/test/integration/factories/addresses_factory.rb +0 -20
  381. data/test/integration/factories/backend_services_factory.rb +0 -19
  382. data/test/integration/factories/collection_factory.rb +0 -52
  383. data/test/integration/factories/disks_factory.rb +0 -22
  384. data/test/integration/factories/firewalls_factory.rb +0 -13
  385. data/test/integration/factories/forwarding_rules_factory.rb +0 -25
  386. data/test/integration/factories/global_addresses_factory.rb +0 -15
  387. data/test/integration/factories/global_forwarding_rules_factory.rb +0 -20
  388. data/test/integration/factories/http_health_checks_factory.rb +0 -11
  389. data/test/integration/factories/images_factory.rb +0 -16
  390. data/test/integration/factories/instance_group_manager_factory.rb +0 -30
  391. data/test/integration/factories/instance_groups_factory.rb +0 -20
  392. data/test/integration/factories/instance_template_factory.rb +0 -24
  393. data/test/integration/factories/networks_factory.rb +0 -14
  394. data/test/integration/factories/servers_factory.rb +0 -30
  395. data/test/integration/factories/sql_certs_factory.rb +0 -20
  396. data/test/integration/factories/sql_instances_factory.rb +0 -19
  397. data/test/integration/factories/sql_users_factory.rb +0 -23
  398. data/test/integration/factories/ssl_certificates_factory.rb +0 -13
  399. data/test/integration/factories/subnetworks_factory.rb +0 -26
  400. data/test/integration/factories/target_http_proxies_factory.rb +0 -19
  401. data/test/integration/factories/target_https_proxies_factory.rb +0 -26
  402. data/test/integration/factories/target_instances_factory.rb +0 -24
  403. data/test/integration/factories/target_pools_factory.rb +0 -28
  404. data/test/integration/factories/url_maps_factory.rb +0 -19
  405. data/test/integration/monitoring/test_coverage.rb +0 -6
  406. data/test/integration/monitoring/test_metric_descriptors.rb +0 -131
  407. data/test/integration/monitoring/test_monitored_resource_descriptors.rb +0 -37
  408. data/test/integration/monitoring/test_timeseries.rb +0 -253
  409. data/test/integration/pubsub/pubsub_shared.rb +0 -75
  410. data/test/integration/pubsub/test_coverage.rb +0 -6
  411. data/test/integration/pubsub/test_pubsub_models.rb +0 -135
  412. data/test/integration/pubsub/test_pubsub_requests.rb +0 -105
  413. data/test/integration/sql/test_certs.rb +0 -50
  414. data/test/integration/sql/test_common_flags.rb +0 -31
  415. data/test/integration/sql/test_common_tiers.rb +0 -26
  416. data/test/integration/sql/test_coverage.rb +0 -6
  417. data/test/integration/sql/test_instances.rb +0 -101
  418. data/test/integration/sql/test_users.rb +0 -37
  419. data/test/integration/storage/storage_shared.rb +0 -101
  420. data/test/integration/storage/test_buckets.rb +0 -112
  421. data/test/integration/storage/test_coverage.rb +0 -6
  422. data/test/integration/storage/test_directories.rb +0 -67
  423. data/test/integration/storage/test_files.rb +0 -168
  424. data/test/integration/storage/test_objects.rb +0 -226
  425. data/test/integration/test_authentication.rb +0 -38
  426. data/test/unit/compute/test_common_collections.rb +0 -42
  427. data/test/unit/compute/test_common_models.rb +0 -35
  428. data/test/unit/compute/test_disk.rb +0 -26
  429. data/test/unit/compute/test_server.rb +0 -29
  430. data/test/unit/dns/test_common_collections.rb +0 -43
  431. data/test/unit/monitoring/test_comon_collections.rb +0 -44
  432. data/test/unit/pubsub/test_common_collections.rb +0 -35
  433. data/test/unit/sql/test_common_collections.rb +0 -46
  434. data/test/unit/storage/test_common_json_collections.rb +0 -38
  435. data/test/unit/storage/test_common_xml_collections.rb +0 -50
  436. data/test/unit/storage/test_json_requests.rb +0 -60
  437. data/test/unit/storage/test_xml_requests.rb +0 -60
@@ -1,23 +0,0 @@
1
- name: Mark stale issues and pull requests
2
-
3
- on:
4
- schedule:
5
- - cron: "30 1 * * *"
6
-
7
- jobs:
8
- stale:
9
-
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - uses: actions/stale@v9
14
- with:
15
- repo-token: ${{ secrets.GITHUB_TOKEN }}
16
- days-before-stale: 360
17
- days-before-close: 7
18
- exempt-issue-labels: 'pinned,security'
19
- exempt-pr-labels: 'pinned,security'
20
- stale-issue-message: 'This issue has been marked inactive and will be closed if no further activity occurs.'
21
- stale-pr-message: 'This pr has been marked inactive and will be closed if no further activity occurs.'
22
- stale-issue-label: 'no-issue-activity'
23
- stale-pr-label: 'no-pr-activity'
@@ -1,15 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module Storage
4
- module Google
5
- autoload :AccessControlList, File.expand_path("../google/access_control_list", __FILE__)
6
- autoload :CopyObject, File.expand_path("../google/copy_object", __FILE__)
7
- autoload :GetBucket, File.expand_path("../google/get_bucket", __FILE__)
8
- autoload :GetBucketLogging, File.expand_path("../google/get_bucket_logging", __FILE__)
9
- autoload :GetBucketObjectVersions, File.expand_path("../google/get_bucket_object_versions", __FILE__)
10
- autoload :GetRequestPayment, File.expand_path("../google/get_request_payment", __FILE__)
11
- autoload :GetService, File.expand_path("../google/get_service", __FILE__)
12
- end
13
- end
14
- end
15
- end
@@ -1,63 +0,0 @@
1
- ##
2
- # Helper mixin for tests (especially compute-based ones). Provide access to the
3
- # client in use via the #client method to use.
4
-
5
- module ClientHelper
6
- # Check to see if an compute operation is finished.
7
- #
8
- # @param op [Google::Apis::ComputeV1::Operation] the operation object returned from an api call
9
- # @return [Bolean] true if the operation is no longer executing, false
10
- # otherwise
11
- def operation_finished?(op)
12
- region = op.region
13
- zone = op.zone
14
- name = op.name
15
-
16
- if zone.nil?
17
- result = client.get_region_operation(region, name)
18
- else
19
- result = client.get_zone_operation(zone, name)
20
- end
21
- !%w(PENDING RUNNING).include?(result.status)
22
- end
23
-
24
- # Check to see if an SQL operation is finished.
25
- #
26
- # @param op [Google::Apis::SqladminV1beta4::Operation] the operation object
27
- # returned from an SQL Admin api call
28
- # @return [Boolean] true if the operation is no longer executing, false
29
- # otherwise
30
- def sql_operation_finished?(op)
31
- result = client.get_operation(op.name)
32
- !%w(PENDING RUNNING).include?(result.status)
33
- end
34
-
35
- # Pause execution until an operation (compute or sql) returned
36
- # from a passed block is finished.
37
- #
38
- # @example Pause until server is provisioned
39
- # @result = wait_until_complete { client.insert_server(name, zone, opts) }
40
- # @yieldreturn The resulting operation object from a block.
41
- # @return the result of the operation
42
-
43
- def wait_until_complete
44
- result = yield
45
-
46
- case result.kind
47
- when "compute#operation"
48
- region = result.region
49
- zone = result.zone
50
- Fog.wait_for { operation_finished?(result) }
51
- if zone.nil?
52
- client.get_region_operation(region, result.name)
53
- else
54
- client.get_zone_operation(zone, result.name)
55
- end
56
- when "sql#operation"
57
- Fog.wait_for { sql_operation_finished?(result) }
58
- client.get_operation(result.name)
59
- else
60
- result
61
- end
62
- end
63
- end
@@ -1,108 +0,0 @@
1
- require "helpers/test_helper"
2
- require "helpers/test_collection"
3
- require "retriable"
4
-
5
- # Use :test credentials in ~/.fog for live integration testing
6
- # XXX not sure if this will work on Travis CI or not
7
- Fog.credential = :test
8
-
9
- # Enable test debugging, providing additional information in some methods
10
- DEBUG = ENV['FOG_TEST_DEBUG'] || false
11
-
12
- # Helpers
13
-
14
- TEST_PROJECT = Fog.credentials[:google_project]
15
-
16
- TEST_ZONE = "us-central1-f".freeze
17
- TEST_REGION = "us-central1".freeze
18
- TEST_SIZE_GB = 10
19
- TEST_MACHINE_TYPE = "n1-standard-1".freeze
20
- TEST_IMAGE = "debian-11-bullseye-v20220920".freeze
21
- TEST_IMAGE_PROJECT = "debian-cloud".freeze
22
- TEST_IMAGE_FAMILY = "debian-11".freeze
23
-
24
- # XXX This depends on a public image in gs://fog-test-bucket; there may be a better way to do this
25
- # The image was created like so: https://cloud.google.com/compute/docs/images/export-image
26
- TEST_RAW_DISK_SOURCE = "https://storage.googleapis.com/fog-test-assets-bucket/fog-test-raw-disk-source.image.tar.gz".freeze
27
-
28
- TEST_SQL_TIER = "db-n1-standard-1".freeze
29
- TEST_SQL_REGION = TEST_REGION
30
-
31
- # Test certificate/key for SSL Proxy tests, generated via:
32
- # $ openssl genrsa -out example.key 2048
33
- # $ openssl req -new -key example.key -out example.csr
34
- # ...
35
- # Common Name (eg, fully qualified host name) []:example.com
36
- # Email Address []:admin@example.com
37
- # ...
38
- # $ openssl x509 -req -in example.csr -signkey example.key -out example.crt
39
-
40
- TEST_PEM_CERTIFICATE = <<CERT
41
- -----BEGIN CERTIFICATE-----
42
- MIIC7DCCAdQCCQCDSZQ3PYJW6zANBgkqhkiG9w0BAQUFADA4MRQwEgYDVQQDDAtl
43
- eGFtcGxlLmNvbTEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20wHhcN
44
- MTgwNjI4MDEzMzA5WhcNMTgwNzI4MDEzMzA5WjA4MRQwEgYDVQQDDAtleGFtcGxl
45
- LmNvbTEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20wggEiMA0GCSqG
46
- SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2DQkr6HBIoVsi7I+uHtmmge1KvbWP4nwg
47
- tmKe8FtprjyaBcY729Sc0LTgkOh0krVem9nsxd/Lea47jHTV/vM03xsOuEKRKy3S
48
- Horlr0TBRvB7tSmZCH0jn4x+V/k2qdLKhiDAtbLZ1UC3SWu3OjbE9ozf3fNPmssT
49
- bK2sNesa2XlydzL8wyZMajGLs8CEHVqpZwLSPTeGB3LAhdRjfzJLijqe124otVIb
50
- 3+tbxYZVY5GLVQIIR/DlwRzZLxptPALvHq3t3eOfC3eZImXqUzGmoug6nDrdKuEs
51
- C8yaoCNC3sSecoaV5Kyy70Hae+wFV7ocZGejm9AtuHXF1pgM4outAgMBAAEwDQYJ
52
- KoZIhvcNAQEFBQADggEBAFRYuOe7nwR8Sn7TDyzPcqau3yF2qYATtrDIzo7xmh3o
53
- T18FYCeX9gu/M9ytziM2lb/+WRqvcu55FrQiBz434E4wYH/IGUZK849V03dCro10
54
- Po5Hhayt5+tv5Ti0JqmJoC/HN0hNF+WQA8kikiteTTohIDj9rVX2uULA61rnHXSZ
55
- h6ZZRce3PdRKIUjOcQ4pIoI8QXSIToBsdY+Cieg9PHCt8mZhevU7COE1lfPFtdlY
56
- HJhg5xhHVUt40qsahpvUjnPBU8rJPPE06ougf5qjr0D8ZoYeuUQT0VJYwwacfpeb
57
- hs6AFOH5IAj6gjdIRhOWzYSxBYeyzJGfiPSbK4rowFM=
58
- -----END CERTIFICATE-----
59
- CERT
60
-
61
- TEST_PEM_CERTIFICATE_PRIVATE_KEY = <<KEY
62
- -----BEGIN RSA PRIVATE KEY-----
63
- MIIEpAIBAAKCAQEAtg0JK+hwSKFbIuyPrh7ZpoHtSr21j+J8ILZinvBbaa48mgXG
64
- O9vUnNC04JDodJK1XpvZ7MXfy3muO4x01f7zNN8bDrhCkSst0h6K5a9EwUbwe7Up
65
- mQh9I5+Mflf5NqnSyoYgwLWy2dVAt0lrtzo2xPaM393zT5rLE2ytrDXrGtl5cncy
66
- /MMmTGoxi7PAhB1aqWcC0j03hgdywIXUY38yS4o6ntduKLVSG9/rW8WGVWORi1UC
67
- CEfw5cEc2S8abTwC7x6t7d3jnwt3mSJl6lMxpqLoOpw63SrhLAvMmqAjQt7EnnKG
68
- leSssu9B2nvsBVe6HGRno5vQLbh1xdaYDOKLrQIDAQABAoIBAD5GA0cjwZT2rQgr
69
- R5LWNrmAZD1W246WeMNv4BhiO8LQuSYup3q+XeIuelD/AKUvsh7kzQzzOvSNcQ4p
70
- o6W4ClWho83LNeoWjRv9GqIq7Cf5LjYC6HHSt4vB/fsR+Mu8F8DzVKzW+pENI5AO
71
- 62vH3AhQFixV7e7jEmhYmqf34a5S9U3+0OkzRRbFVA5rBxKK4xLqrX/app4/TKs6
72
- msn+qCJUAVxggcKIACF0slzbGuKfCSOyfPM4dmKV1n857wDu2YB9QwaaI+aHtR9S
73
- rassm1TCcqirUIOsTcAaZ5szjkhAhH+pg/xVjl/2ppz1W/m9cfNQ4zwle1YuUmpS
74
- OxyqUcECgYEA8jQ0zZG4J7MOX29o2F+D4VI5I1kp6uLsfhb8KztEgpgdMy+nGNsK
75
- wlOd2fJU3hK51dg82HKSSEzHHPud7O39pWEo3iSmgdZ+pXhjXe95x+bVPfP01eSp
76
- CSyMP8t6c9RxVtpVU1IbrjMXROuwEIxaIzMhT4YYDGOoSj2xLn43N9kCgYEAwGuv
77
- MJeCDMI2Zr+OA1N3FUk6Py8q1zxJN3Wt3CwSjp57K3g2LaqN6gwgIbN3d1fEV9cM
78
- ATtjjsFC+toFrP8BZ1wj3DY8Q4OsOmXng1V4bw4Y5xsT6SxXh7E0gU2L8MCjUdri
79
- WUUu++yRRcUpWUGRRMYx6cN529HPNbAPm5Y8QfUCgYAGpCHShS1cgU9ilIZ2cGAI
80
- XJ3Od1Jr6176shyl/tEJF6ytS6A0UUVBQNOyNy/WiwLndy9r6/BQ5TIMfGW/KmNr
81
- FnftZ2ndY4lDdkKbP8bCEXVFZpwPBV8RLlSGJ0krReb5r7DpQPYbV7FKpX/FZGPQ
82
- VUWTjaS5Kj5iEsD5+mH/OQKBgQCKhftc8/V/0eDwHz7RTikQfeMc0Yv530CmWGWN
83
- d3z0h0sMhEIcpgf8UjZfjJ+YnuqOghX2XRbTEnZxuLsVS49rJX37bl/8CrLWZ74/
84
- YiyNZoyu82NmHbH10bCG1ZjE/SmWKAmDUrb8TdZXcBTQWM+Hv1b3fu4fPe/6KoFR
85
- 9Nn0cQKBgQC8BViTyfPTSuTEb8z7uzLEQk13MH+LTHFngFevWoq3OStEsmsIYK1K
86
- GcF1N9ZzPH024uwdcLjjwpul/avUHqzfp5ZILuI83Z/OqYYLiCQ0BbAQno7Cp5Be
87
- wLjafhPTSAIS0jijglJ7uzaSbFUW11fw1/EIqIFNe0R0Xf9lsyPxFA==
88
- -----END RSA PRIVATE KEY-----
89
- KEY
90
-
91
- # Retry module config - standard retriable gem settings
92
- # see: https://github.com/kamui/retriable
93
- RETRIABLE_TRIES = 3
94
- RETRIABLE_BASE_INTERVAL = 50
95
-
96
- class FogIntegrationTest < Minitest::Test
97
- def namespaced_name
98
- "#{self.class}_#{name}"
99
- end
100
-
101
- def retry_on(klass)
102
- Retriable.retriable(on: klass,
103
- tries: RETRIABLE_TRIES,
104
- base_interval: RETRIABLE_BASE_INTERVAL) do
105
- yield
106
- end
107
- end
108
- end
@@ -1,60 +0,0 @@
1
- module TestCollection
2
- # Anything that includes TestCollection must, during setup, assign @subject and @factory, where
3
- # @subject is the collection under test, (e.g. Fog::Compute[:google].servers)
4
- # @factory is a CollectionFactory
5
-
6
- def test_lifecycle
7
- one = @subject.new(@factory.params)
8
- one.save
9
- two = @subject.create(@factory.params)
10
-
11
- # XXX HACK compares identities
12
- # should be replaced with simple includes? when `==` is properly implemented in fog-core; see fog/fog-core#148
13
- assert_includes @subject.all.map(&:identity), one.identity
14
- assert_includes @subject.all.map(&:identity), two.identity
15
-
16
- assert_equal one.identity, @subject.get(one.identity).identity
17
- assert_equal two.identity, @subject.get(two.identity).identity
18
-
19
- # Some factories that have scoped parameters (zone, region) have a special
20
- # `get` method defined in the factory to pass the correct parameters in
21
- if @factory.respond_to?(:get)
22
- assert_equal one.identity, @factory.get(one.identity).identity
23
- assert_equal two.identity, @factory.get(two.identity).identity
24
- end
25
-
26
- # Some factories that have scoped parameters (zone, region) have a special
27
- # `all` method defined in the factory to pass the correct parameters in
28
- if @factory.respond_to?(:all)
29
- subject_list = @subject.all
30
- scoped_subject_list = @factory.all
31
-
32
- # Assert that whatever .all(scope) returns is a subset of .all
33
- assert(scoped_subject_list.all? { |x| subject_list.include? x },
34
- "Output of @factory.all must be a subset of @subject.all")
35
- end
36
-
37
- one.destroy
38
- two.destroy
39
-
40
- Fog.wait_for { !@subject.all.map(&:identity).include? one.identity }
41
- Fog.wait_for { !@subject.all.map(&:identity).include? two.identity }
42
- end
43
-
44
- def test_get_returns_nil_if_resource_does_not_exist
45
- assert_nil @factory.get("fog-test-fake-identity") if @factory.respond_to?(:get)
46
- assert_nil @subject.get("fog-test-fake-identity")
47
- end
48
-
49
- def test_enumerable
50
- assert_respond_to @subject, :each
51
- end
52
-
53
- def test_nil_get
54
- assert_nil @subject.get(nil)
55
- end
56
-
57
- def teardown
58
- @factory.cleanup
59
- end
60
- end
@@ -1,28 +0,0 @@
1
- # Configure simplecov for coverage tests
2
- # Note: needs to be done _before_ requiring minitest!
3
- if ENV["COVERAGE"]
4
- require "simplecov"
5
-
6
- require 'codecov'
7
- SimpleCov.formatter = SimpleCov::Formatter::Codecov
8
- SimpleCov.skip_token('no-coverage')
9
-
10
- SimpleCov.start do
11
- add_filter "/test/"
12
- end
13
- end
14
-
15
- # The next line was added to squelch a warning message in Ruby 1.9.
16
- # It ensures we're using the gem, not the built-in Minitest
17
- # See https://github.com/seattlerb/minitest/#install
18
- gem "minitest"
19
- require "minitest/autorun"
20
-
21
- # This is a workaround for RubyMine debugger that doesn't play nice with Minitest::Reporters
22
- unless ENV['RM_INFO']
23
- # Custom formatters to make the tests more legible in CI
24
- require "minitest/reporters"
25
- Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
26
- end
27
-
28
- require File.join(File.dirname(__FILE__), "../../lib/fog/google")
@@ -1,12 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- class TestComputeClient < FogIntegrationTest
4
- def test_client_options
5
- # XXX This is a very rudimentary test checking that proxy option is applied
6
- client_options = { proxy_url: "https://user:password@host:8080" }
7
- connection = Fog::Compute::Google.new(google_client_options: client_options)
8
-
9
- err = assert_raises(ArgumentError) { connection.servers.all }
10
- assert_match(/unsupported proxy/, err.message)
11
- end
12
- end
@@ -1,6 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- # This is a simple coverage helper that helps differentiate
4
- # the tests when run in parallel so the final coverage report
5
- # can be properly combined together from multiple runners
6
- SimpleCov.command_name "test:compute-core_compute" if ENV["COVERAGE"]
@@ -1,43 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- class TestDiskTypes < FogIntegrationTest
4
- NAMES = %w(local-ssd pd-ssd pd-standard).freeze
5
- # Testing in one random zone per region (region list as of May 2018)
6
- ZONES = %w(asia-east1-a asia-northeast1-b asia-south1-c asia-southeast1-a australia-southeast1-b
7
- europe-west1-c europe-west2-a europe-west3-b europe-west4-c northamerica-northeast1-a
8
- southamerica-east1-b us-central1-c us-east1-b us-east4-a us-west1-c).freeze
9
-
10
- def setup
11
- @subject = Fog::Compute[:google].disk_types
12
- end
13
-
14
- def test_all
15
- assert_operator(@subject.all.size, :>=, NAMES.size * ZONES.size,
16
- "Number of all disk type references should be greater or equal to test zones * disk types")
17
- end
18
-
19
- def test_scoped_all
20
- subject_list = @subject.all
21
- scoped_subject_list = @subject.all(zone: TEST_ZONE)
22
-
23
- # Assert that whatever .all(scope) returns is a subset of .all
24
- assert(scoped_subject_list.all? { |x| subject_list.include? x },
25
- "Output of @subject.all(zone:#{TEST_ZONE}) must be a subset of @subject.all")
26
- end
27
-
28
- def test_get
29
- NAMES.each do |name|
30
- ZONES.each do |zone|
31
- refute_nil @subject.get(name, zone)
32
- end
33
- end
34
- end
35
-
36
- def test_bad_get
37
- assert_nil @subject.get("bad-name")
38
- end
39
-
40
- def test_enumerable
41
- assert_respond_to @subject, :each
42
- end
43
- end
@@ -1,53 +0,0 @@
1
- require "helpers/integration_test_helper"
2
- require "integration/factories/disks_factory"
3
-
4
- class TestDisks < FogIntegrationTest
5
- include TestCollection
6
-
7
- def setup
8
- @subject = Fog::Compute[:google].disks
9
- @factory = DisksFactory.new(namespaced_name)
10
- end
11
-
12
- def test_get_as_configs
13
- disk = @factory.create
14
- disk.wait_for { ready? }
15
-
16
- example = disk.get_as_boot_disk
17
- config = { :auto_delete => false,
18
- :boot => true,
19
- :source => disk.self_link,
20
- :mode => "READ_WRITE",
21
- :type => "PERSISTENT" }
22
- assert_equal(example, config)
23
-
24
- example_with_params = disk.get_as_boot_disk(false, true)
25
- config_with_params = { :auto_delete => true,
26
- :boot => true,
27
- :source => disk.self_link,
28
- :mode => "READ_ONLY",
29
- :type => "PERSISTENT" }
30
- assert_equal(example_with_params, config_with_params)
31
- end
32
-
33
- def test_create_snapshot
34
- disk = @factory.create
35
- disk.wait_for { ready? }
36
-
37
- snapshot = disk.create_snapshot("fog-test-snapshot")
38
-
39
- assert(snapshot.is_a?(Fog::Compute::Google::Snapshot),
40
- "Resulting snapshot should be a snapshot object.")
41
-
42
- assert_raises(ArgumentError) { snapshot.set_labels(["bar", "test"]) }
43
-
44
- snapshot.set_labels(foo: "bar", fog: "test")
45
-
46
- assert_equal(snapshot.labels[:foo], "bar")
47
- assert_equal(snapshot.labels[:fog], "test")
48
-
49
- # Clean up the snapshot
50
- operation = snapshot.destroy
51
- operation.wait_for { ready? }
52
- end
53
- end
@@ -1,32 +0,0 @@
1
- require "helpers/integration_test_helper"
2
- require "integration/factories/images_factory"
3
-
4
- class TestImages < FogIntegrationTest
5
- include TestCollection
6
-
7
- def setup
8
- @subject = Fog::Compute[:google].images
9
- @factory = ImagesFactory.new(namespaced_name)
10
- end
11
-
12
- def test_get_specific_image
13
- image = @subject.get(TEST_IMAGE)
14
- refute_nil(image, "Images.get(#{TEST_IMAGE}) should not return nil")
15
- assert_equal(image.family, TEST_IMAGE_FAMILY)
16
- assert_equal(image.project, TEST_IMAGE_PROJECT)
17
- end
18
-
19
- def test_get_specific_image_from_project
20
- image = @subject.get(TEST_IMAGE,TEST_IMAGE_PROJECT)
21
- refute_nil(image, "Images.get(#{TEST_IMAGE}) should not return nil")
22
- assert_equal(image.family, TEST_IMAGE_FAMILY)
23
- assert_equal(image.project, TEST_IMAGE_PROJECT)
24
- end
25
-
26
- def test_get_from_family
27
- image = @subject.get_from_family(TEST_IMAGE_FAMILY)
28
- refute_nil(image,"Images.get_from_family(#{TEST_IMAGE_FAMILY}) should not return nil")
29
- assert_equal(image.family, TEST_IMAGE_FAMILY)
30
- assert_equal(image.project, TEST_IMAGE_PROJECT)
31
- end
32
- end
@@ -1,55 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- class TestMachineTypes < FogIntegrationTest
4
- # List of machine types - not a complete sampling since beefier ones do not
5
- # exist in all zones (list last updated June 2018)
6
- NAMES = %w(f1-micro g1-small n1-highcpu-16 n1-highcpu-2 n1-highcpu-4
7
- n1-highcpu-8 n1-highmem-16 n1-highmem-2 n1-highmem-32 n1-highmem-4
8
- n1-highmem-8 n1-standard-1 n1-standard-16 n1-standard-2
9
- n1-standard-32 n1-standard-4 n1-standard-8 ).freeze
10
-
11
- # Testing in one random zone per region (list last updated May 2018)
12
- ZONES = %w(asia-east1-a asia-northeast1-b asia-south1-c asia-southeast1-a
13
- australia-southeast1-b europe-west1-c europe-west2-a europe-west3-b
14
- europe-west4-c northamerica-northeast1-a southamerica-east1-b
15
- us-central1-c us-east1-b us-east4-a us-west1-c).freeze
16
-
17
- def setup
18
- @subject = Fog::Compute[:google].machine_types
19
- end
20
-
21
- def test_all
22
- assert_operator(@subject.all.size, :>=, NAMES.size * ZONES.size,
23
- "Number of all machine types should be greater or equal to test zones * machine_types")
24
- end
25
-
26
- def test_scoped_all
27
- subject_list = @subject.all
28
- scoped_subject_list = @subject.all(zone: TEST_ZONE)
29
-
30
- # Assert that whatever .all(scope) returns is a subset of .all
31
- assert(scoped_subject_list.all? { |x| subject_list.include? x },
32
- "Output of @subject.all(zone:#{TEST_ZONE}) must be a subset of @subject.all")
33
- end
34
-
35
- def test_get
36
- # This tests only in last zone since not all zones contain all machine types
37
- NAMES.each do |name|
38
- ZONES.each do |zone|
39
- refute_nil @subject.get(name, zone)
40
- end
41
- end
42
- end
43
-
44
- def test_bad_get
45
- assert_nil @subject.get("bad-name", ZONES.first)
46
- end
47
-
48
- def test_enumerable
49
- assert_respond_to @subject, :each
50
- end
51
-
52
- def test_nil_get
53
- assert_nil @subject.get(nil)
54
- end
55
- end
@@ -1,45 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- class TestOperations < FogIntegrationTest
4
- def setup
5
- @subject = Fog::Compute[:google].operations
6
- end
7
-
8
- def test_all
9
- # TODO: what if this test runs first on a brand new project?
10
- assert_operator(@subject.all.size, :>=, 2,
11
- "There should be at least 2 operations in the project")
12
- end
13
-
14
- def test_get
15
- @subject.all do |operation|
16
- refute_nil @subject.get(operation.name)
17
- end
18
- end
19
-
20
- def test_zone_scoped_all
21
- subject_list = @subject.all
22
- scoped_subject_list = @subject.all(zone: TEST_ZONE)
23
-
24
- # Assert that whatever .all(scope) returns is a subset of .all
25
- assert(scoped_subject_list.all? { |x| subject_list.include? x },
26
- "Output of @subject.all(zone:#{TEST_ZONE}) must be a subset of @subject.all")
27
- end
28
-
29
- def test_region_scoped_all
30
- subject_list = @subject.all
31
- scoped_subject_list = @subject.all(region: TEST_REGION)
32
-
33
- # Assert that whatever .all(scope) returns is a subset of .all
34
- assert(scoped_subject_list.all? { |x| subject_list.include? x },
35
- "Output of @subject.all(region:#{TEST_REGION}) must be a subset of @subject.all")
36
- end
37
-
38
- def test_bad_get
39
- assert_nil @subject.get("bad-name")
40
- end
41
-
42
- def test_enumerable
43
- assert_respond_to @subject, :each
44
- end
45
- end
@@ -1,19 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- class TestProjects < FogIntegrationTest
4
- def setup
5
- @subject = Fog::Compute[:google].projects
6
- end
7
-
8
- def test_get
9
- assert @subject.get(TEST_PROJECT)
10
- end
11
-
12
- def test_bad_get
13
- assert_nil @subject.get("bad-name")
14
- end
15
-
16
- def test_enumerable
17
- assert_respond_to @subject, :each
18
- end
19
- end
@@ -1,33 +0,0 @@
1
- require "helpers/integration_test_helper"
2
-
3
- class TestRegions < FogIntegrationTest
4
- EXAMPLE_NAMES = %w(asia-east1 asia-northeast1 europe-west1 us-central1 us-east1 us-west1).freeze
5
-
6
- def setup
7
- @subject = Fog::Compute[:google].regions
8
- end
9
-
10
- def test_all
11
- assert_operator(@subject.all.size, :>=, EXAMPLE_NAMES.size)
12
- end
13
-
14
- def test_get
15
- EXAMPLE_NAMES.each do |region|
16
- refute_nil @subject.get(region)
17
- end
18
- end
19
-
20
- def test_up
21
- EXAMPLE_NAMES.each do |region|
22
- assert @subject.get(region).up?
23
- end
24
- end
25
-
26
- def test_bad_get
27
- assert_nil @subject.get("bad-name")
28
- end
29
-
30
- def test_enumerable
31
- assert_respond_to @subject, :each
32
- end
33
- end