fog-google 1.9.1 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (273) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +40 -0
  4. data/README.md +1 -1
  5. data/SECURITY.md +16 -0
  6. data/ci/README.md +3 -2
  7. data/ci/build-head-pipeline.yml +173 -0
  8. data/ci/{pipeline.yml → integration-pipeline.yml} +0 -24
  9. data/ci/pipeline-dev.yml +58 -0
  10. data/ci/tasks/run-int.sh +20 -1
  11. data/ci/tasks/run-int.yml +2 -0
  12. data/examples/sql/flags.rb +10 -6
  13. data/examples/sql/instances.rb +38 -34
  14. data/examples/sql/operations.rb +20 -16
  15. data/examples/sql/ssl_certs.rb +32 -28
  16. data/examples/sql/tiers.rb +10 -6
  17. data/fog-google.gemspec +1 -1
  18. data/lib/fog/compute/google.rb +4 -0
  19. data/lib/fog/compute/google/mock.rb +2 -1
  20. data/lib/fog/compute/google/models/address.rb +15 -2
  21. data/lib/fog/compute/google/models/disk.rb +6 -2
  22. data/lib/fog/compute/google/models/images.rb +6 -1
  23. data/lib/fog/compute/google/models/instance_groups.rb +2 -2
  24. data/lib/fog/compute/google/models/server.rb +30 -6
  25. data/lib/fog/compute/google/real.rb +2 -1
  26. data/lib/fog/compute/google/requests/abandon_instances.rb +2 -0
  27. data/lib/fog/compute/google/requests/add_backend_service_backends.rb +2 -0
  28. data/lib/fog/compute/google/requests/add_instance_group_instances.rb +2 -0
  29. data/lib/fog/compute/google/requests/add_server_access_config.rb +2 -0
  30. data/lib/fog/compute/google/requests/add_target_pool_health_checks.rb +2 -0
  31. data/lib/fog/compute/google/requests/add_target_pool_instances.rb +2 -0
  32. data/lib/fog/compute/google/requests/attach_disk.rb +2 -0
  33. data/lib/fog/compute/google/requests/create_disk_snapshot.rb +2 -0
  34. data/lib/fog/compute/google/requests/delete_address.rb +2 -0
  35. data/lib/fog/compute/google/requests/delete_backend_service.rb +2 -0
  36. data/lib/fog/compute/google/requests/delete_disk.rb +2 -0
  37. data/lib/fog/compute/google/requests/delete_firewall.rb +2 -0
  38. data/lib/fog/compute/google/requests/delete_forwarding_rule.rb +2 -0
  39. data/lib/fog/compute/google/requests/delete_global_address.rb +2 -0
  40. data/lib/fog/compute/google/requests/delete_global_forwarding_rule.rb +2 -0
  41. data/lib/fog/compute/google/requests/delete_global_operation.rb +2 -0
  42. data/lib/fog/compute/google/requests/delete_http_health_check.rb +2 -0
  43. data/lib/fog/compute/google/requests/delete_image.rb +2 -0
  44. data/lib/fog/compute/google/requests/delete_instance_group.rb +2 -0
  45. data/lib/fog/compute/google/requests/delete_instance_group_manager.rb +2 -0
  46. data/lib/fog/compute/google/requests/delete_instance_template.rb +2 -0
  47. data/lib/fog/compute/google/requests/delete_network.rb +2 -0
  48. data/lib/fog/compute/google/requests/delete_region_operation.rb +2 -0
  49. data/lib/fog/compute/google/requests/delete_route.rb +2 -0
  50. data/lib/fog/compute/google/requests/delete_server.rb +2 -0
  51. data/lib/fog/compute/google/requests/delete_server_access_config.rb +2 -0
  52. data/lib/fog/compute/google/requests/delete_snapshot.rb +2 -0
  53. data/lib/fog/compute/google/requests/delete_ssl_certificate.rb +2 -0
  54. data/lib/fog/compute/google/requests/delete_subnetwork.rb +2 -0
  55. data/lib/fog/compute/google/requests/delete_target_http_proxy.rb +2 -0
  56. data/lib/fog/compute/google/requests/delete_target_https_proxy.rb +2 -0
  57. data/lib/fog/compute/google/requests/delete_target_instance.rb +2 -0
  58. data/lib/fog/compute/google/requests/delete_target_pool.rb +2 -0
  59. data/lib/fog/compute/google/requests/delete_url_map.rb +2 -0
  60. data/lib/fog/compute/google/requests/delete_zone_operation.rb +2 -0
  61. data/lib/fog/compute/google/requests/deprecate_image.rb +2 -0
  62. data/lib/fog/compute/google/requests/detach_disk.rb +2 -0
  63. data/lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb +2 -0
  64. data/lib/fog/compute/google/requests/get_address.rb +2 -0
  65. data/lib/fog/compute/google/requests/get_backend_service_health.rb +2 -0
  66. data/lib/fog/compute/google/requests/get_disk.rb +2 -0
  67. data/lib/fog/compute/google/requests/get_disk_type.rb +2 -0
  68. data/lib/fog/compute/google/requests/get_firewall.rb +2 -0
  69. data/lib/fog/compute/google/requests/get_forwarding_rule.rb +2 -0
  70. data/lib/fog/compute/google/requests/get_global_address.rb +2 -0
  71. data/lib/fog/compute/google/requests/get_global_forwarding_rule.rb +2 -0
  72. data/lib/fog/compute/google/requests/get_global_operation.rb +2 -0
  73. data/lib/fog/compute/google/requests/get_http_health_check.rb +2 -0
  74. data/lib/fog/compute/google/requests/get_image.rb +2 -0
  75. data/lib/fog/compute/google/requests/get_image_from_family.rb +2 -0
  76. data/lib/fog/compute/google/requests/get_instance_group.rb +2 -0
  77. data/lib/fog/compute/google/requests/get_instance_group_manager.rb +2 -0
  78. data/lib/fog/compute/google/requests/get_instance_template.rb +2 -0
  79. data/lib/fog/compute/google/requests/get_machine_type.rb +2 -0
  80. data/lib/fog/compute/google/requests/get_network.rb +2 -0
  81. data/lib/fog/compute/google/requests/get_project.rb +2 -0
  82. data/lib/fog/compute/google/requests/get_region.rb +2 -0
  83. data/lib/fog/compute/google/requests/get_route.rb +2 -0
  84. data/lib/fog/compute/google/requests/get_server.rb +2 -0
  85. data/lib/fog/compute/google/requests/get_server_serial_port_output.rb +2 -0
  86. data/lib/fog/compute/google/requests/get_snapshot.rb +2 -0
  87. data/lib/fog/compute/google/requests/get_ssl_certificate.rb +2 -0
  88. data/lib/fog/compute/google/requests/get_subnetwork.rb +2 -0
  89. data/lib/fog/compute/google/requests/get_target_http_proxy.rb +2 -0
  90. data/lib/fog/compute/google/requests/get_target_https_proxy.rb +2 -0
  91. data/lib/fog/compute/google/requests/get_target_instance.rb +2 -0
  92. data/lib/fog/compute/google/requests/get_target_pool.rb +2 -0
  93. data/lib/fog/compute/google/requests/get_target_pool_health.rb +2 -0
  94. data/lib/fog/compute/google/requests/get_url_map.rb +2 -0
  95. data/lib/fog/compute/google/requests/get_zone.rb +2 -0
  96. data/lib/fog/compute/google/requests/get_zone_operation.rb +2 -0
  97. data/lib/fog/compute/google/requests/insert_address.rb +2 -0
  98. data/lib/fog/compute/google/requests/insert_backend_service.rb +2 -0
  99. data/lib/fog/compute/google/requests/insert_disk.rb +8 -5
  100. data/lib/fog/compute/google/requests/insert_firewall.rb +2 -0
  101. data/lib/fog/compute/google/requests/insert_forwarding_rule.rb +2 -0
  102. data/lib/fog/compute/google/requests/insert_global_address.rb +2 -0
  103. data/lib/fog/compute/google/requests/insert_global_forwarding_rule.rb +2 -0
  104. data/lib/fog/compute/google/requests/insert_http_health_check.rb +2 -0
  105. data/lib/fog/compute/google/requests/insert_image.rb +2 -0
  106. data/lib/fog/compute/google/requests/insert_instance_group.rb +2 -0
  107. data/lib/fog/compute/google/requests/insert_instance_group_manager.rb +2 -0
  108. data/lib/fog/compute/google/requests/insert_instance_template.rb +2 -0
  109. data/lib/fog/compute/google/requests/insert_network.rb +2 -0
  110. data/lib/fog/compute/google/requests/insert_route.rb +2 -0
  111. data/lib/fog/compute/google/requests/insert_server.rb +2 -0
  112. data/lib/fog/compute/google/requests/insert_ssl_certificate.rb +2 -0
  113. data/lib/fog/compute/google/requests/insert_subnetwork.rb +2 -0
  114. data/lib/fog/compute/google/requests/insert_target_http_proxy.rb +2 -0
  115. data/lib/fog/compute/google/requests/insert_target_https_proxy.rb +2 -0
  116. data/lib/fog/compute/google/requests/insert_target_instance.rb +2 -0
  117. data/lib/fog/compute/google/requests/insert_target_pool.rb +2 -0
  118. data/lib/fog/compute/google/requests/insert_url_map.rb +2 -0
  119. data/lib/fog/compute/google/requests/invalidate_url_map_cache.rb +2 -0
  120. data/lib/fog/compute/google/requests/list_addresses.rb +2 -0
  121. data/lib/fog/compute/google/requests/list_aggregated_addresses.rb +2 -0
  122. data/lib/fog/compute/google/requests/list_aggregated_disk_types.rb +2 -0
  123. data/lib/fog/compute/google/requests/list_aggregated_disks.rb +2 -0
  124. data/lib/fog/compute/google/requests/list_aggregated_forwarding_rules.rb +2 -0
  125. data/lib/fog/compute/google/requests/list_aggregated_instance_group_managers.rb +2 -0
  126. data/lib/fog/compute/google/requests/list_aggregated_instance_groups.rb +2 -0
  127. data/lib/fog/compute/google/requests/list_aggregated_machine_types.rb +2 -0
  128. data/lib/fog/compute/google/requests/list_aggregated_servers.rb +2 -0
  129. data/lib/fog/compute/google/requests/list_aggregated_subnetworks.rb +2 -0
  130. data/lib/fog/compute/google/requests/list_aggregated_target_instances.rb +2 -0
  131. data/lib/fog/compute/google/requests/list_aggregated_target_pools.rb +2 -0
  132. data/lib/fog/compute/google/requests/list_disk_types.rb +2 -0
  133. data/lib/fog/compute/google/requests/list_disks.rb +2 -0
  134. data/lib/fog/compute/google/requests/list_firewalls.rb +2 -0
  135. data/lib/fog/compute/google/requests/list_forwarding_rules.rb +2 -0
  136. data/lib/fog/compute/google/requests/list_global_addresses.rb +2 -0
  137. data/lib/fog/compute/google/requests/list_global_forwarding_rules.rb +2 -0
  138. data/lib/fog/compute/google/requests/list_global_operations.rb +2 -0
  139. data/lib/fog/compute/google/requests/list_http_health_checks.rb +2 -0
  140. data/lib/fog/compute/google/requests/list_images.rb +2 -0
  141. data/lib/fog/compute/google/requests/list_instance_group_instances.rb +2 -0
  142. data/lib/fog/compute/google/requests/list_instance_group_managers.rb +2 -0
  143. data/lib/fog/compute/google/requests/list_instance_groups.rb +2 -0
  144. data/lib/fog/compute/google/requests/list_instance_templates.rb +2 -0
  145. data/lib/fog/compute/google/requests/list_machine_types.rb +2 -0
  146. data/lib/fog/compute/google/requests/list_networks.rb +2 -0
  147. data/lib/fog/compute/google/requests/list_region_operations.rb +2 -0
  148. data/lib/fog/compute/google/requests/list_regions.rb +2 -0
  149. data/lib/fog/compute/google/requests/list_routes.rb +2 -0
  150. data/lib/fog/compute/google/requests/list_servers.rb +2 -0
  151. data/lib/fog/compute/google/requests/list_snapshots.rb +2 -0
  152. data/lib/fog/compute/google/requests/list_ssl_certificates.rb +2 -0
  153. data/lib/fog/compute/google/requests/list_subnetworks.rb +2 -0
  154. data/lib/fog/compute/google/requests/list_target_http_proxies.rb +2 -0
  155. data/lib/fog/compute/google/requests/list_target_https_proxies.rb +2 -0
  156. data/lib/fog/compute/google/requests/list_target_instances.rb +2 -0
  157. data/lib/fog/compute/google/requests/list_target_pools.rb +2 -0
  158. data/lib/fog/compute/google/requests/list_url_maps.rb +2 -0
  159. data/lib/fog/compute/google/requests/list_zone_operations.rb +2 -0
  160. data/lib/fog/compute/google/requests/list_zones.rb +2 -0
  161. data/lib/fog/compute/google/requests/patch_firewall.rb +2 -0
  162. data/lib/fog/compute/google/requests/patch_url_map.rb +2 -0
  163. data/lib/fog/compute/google/requests/recreate_instances.rb +2 -0
  164. data/lib/fog/compute/google/requests/remove_instance_group_instances.rb +2 -0
  165. data/lib/fog/compute/google/requests/remove_target_pool_health_checks.rb +2 -0
  166. data/lib/fog/compute/google/requests/remove_target_pool_instance.rb +2 -0
  167. data/lib/fog/compute/google/requests/remove_target_pool_instances.rb +2 -0
  168. data/lib/fog/compute/google/requests/reset_server.rb +2 -0
  169. data/lib/fog/compute/google/requests/reset_windows_password.rb +154 -0
  170. data/lib/fog/compute/google/requests/set_common_instance_metadata.rb +2 -0
  171. data/lib/fog/compute/google/requests/set_forwarding_rule_target.rb +2 -0
  172. data/lib/fog/compute/google/requests/set_global_forwarding_rule_target.rb +2 -0
  173. data/lib/fog/compute/google/requests/set_instance_template.rb +2 -0
  174. data/lib/fog/compute/google/requests/set_server_disk_auto_delete.rb +2 -0
  175. data/lib/fog/compute/google/requests/set_server_machine_type.rb +23 -0
  176. data/lib/fog/compute/google/requests/set_server_metadata.rb +2 -0
  177. data/lib/fog/compute/google/requests/set_server_scheduling.rb +2 -0
  178. data/lib/fog/compute/google/requests/set_server_tags.rb +2 -0
  179. data/lib/fog/compute/google/requests/set_snapshot_labels.rb +2 -0
  180. data/lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb +2 -0
  181. data/lib/fog/compute/google/requests/set_target_http_proxy_url_map.rb +2 -0
  182. data/lib/fog/compute/google/requests/set_target_https_proxy_ssl_certificates.rb +2 -0
  183. data/lib/fog/compute/google/requests/set_target_https_proxy_url_map.rb +2 -0
  184. data/lib/fog/compute/google/requests/set_target_pool_backup.rb +2 -0
  185. data/lib/fog/compute/google/requests/start_server.rb +2 -0
  186. data/lib/fog/compute/google/requests/stop_server.rb +2 -0
  187. data/lib/fog/compute/google/requests/update_firewall.rb +2 -0
  188. data/lib/fog/compute/google/requests/update_http_health_check.rb +2 -0
  189. data/lib/fog/compute/google/requests/update_url_map.rb +2 -0
  190. data/lib/fog/compute/google/requests/validate_url_map.rb +2 -0
  191. data/lib/fog/dns/google/requests/create_change.rb +2 -0
  192. data/lib/fog/dns/google/requests/create_managed_zone.rb +2 -0
  193. data/lib/fog/dns/google/requests/delete_managed_zone.rb +2 -0
  194. data/lib/fog/dns/google/requests/get_change.rb +2 -0
  195. data/lib/fog/dns/google/requests/get_managed_zone.rb +2 -0
  196. data/lib/fog/dns/google/requests/get_project.rb +2 -0
  197. data/lib/fog/dns/google/requests/list_changes.rb +2 -0
  198. data/lib/fog/dns/google/requests/list_managed_zones.rb +2 -0
  199. data/lib/fog/dns/google/requests/list_resource_record_sets.rb +2 -0
  200. data/lib/fog/google/models/sql/ssl_cert.rb +7 -1
  201. data/lib/fog/google/models/sql/user.rb +2 -0
  202. data/lib/fog/google/requests/monitoring/create_metric_descriptor.rb +2 -0
  203. data/lib/fog/google/requests/monitoring/create_timeseries.rb +3 -1
  204. data/lib/fog/google/requests/monitoring/delete_metric_descriptor.rb +2 -0
  205. data/lib/fog/google/requests/monitoring/get_metric_descriptor.rb +2 -0
  206. data/lib/fog/google/requests/monitoring/list_monitored_resource_descriptors.rb +2 -0
  207. data/lib/fog/google/requests/monitoring/list_timeseries.rb +2 -0
  208. data/lib/fog/google/requests/sql/clone_instance.rb +2 -0
  209. data/lib/fog/google/requests/sql/delete_backup_run.rb +2 -0
  210. data/lib/fog/google/requests/sql/delete_instance.rb +2 -0
  211. data/lib/fog/google/requests/sql/delete_ssl_cert.rb +2 -0
  212. data/lib/fog/google/requests/sql/delete_user.rb +2 -0
  213. data/lib/fog/google/requests/sql/export_instance.rb +2 -0
  214. data/lib/fog/google/requests/sql/get_backup_run.rb +2 -0
  215. data/lib/fog/google/requests/sql/get_instance.rb +2 -0
  216. data/lib/fog/google/requests/sql/get_operation.rb +2 -0
  217. data/lib/fog/google/requests/sql/get_ssl_cert.rb +2 -0
  218. data/lib/fog/google/requests/sql/import_instance.rb +2 -0
  219. data/lib/fog/google/requests/sql/insert_backup_run.rb +2 -0
  220. data/lib/fog/google/requests/sql/insert_instance.rb +2 -0
  221. data/lib/fog/google/requests/sql/insert_ssl_cert.rb +2 -0
  222. data/lib/fog/google/requests/sql/insert_user.rb +2 -0
  223. data/lib/fog/google/requests/sql/list_backup_runs.rb +2 -0
  224. data/lib/fog/google/requests/sql/list_flags.rb +2 -0
  225. data/lib/fog/google/requests/sql/list_instances.rb +2 -0
  226. data/lib/fog/google/requests/sql/list_operations.rb +2 -0
  227. data/lib/fog/google/requests/sql/list_ssl_certs.rb +2 -0
  228. data/lib/fog/google/requests/sql/list_tiers.rb +2 -0
  229. data/lib/fog/google/requests/sql/list_users.rb +2 -0
  230. data/lib/fog/google/requests/sql/reset_instance_ssl_config.rb +2 -0
  231. data/lib/fog/google/requests/sql/restart_instance.rb +2 -0
  232. data/lib/fog/google/requests/sql/restore_instance_backup.rb +2 -0
  233. data/lib/fog/google/requests/sql/update_instance.rb +2 -0
  234. data/lib/fog/google/requests/sql/update_user.rb +2 -0
  235. data/lib/fog/google/version.rb +1 -1
  236. data/lib/fog/storage/google_json/requests/copy_object.rb +2 -0
  237. data/lib/fog/storage/google_json/requests/delete_bucket.rb +2 -0
  238. data/lib/fog/storage/google_json/requests/delete_object.rb +2 -0
  239. data/lib/fog/storage/google_json/requests/get_bucket.rb +2 -0
  240. data/lib/fog/storage/google_json/requests/get_bucket_acl.rb +2 -0
  241. data/lib/fog/storage/google_json/requests/get_object.rb +2 -0
  242. data/lib/fog/storage/google_json/requests/get_object_acl.rb +2 -0
  243. data/lib/fog/storage/google_json/requests/get_object_metadata.rb +2 -0
  244. data/lib/fog/storage/google_json/requests/list_bucket_acl.rb +2 -0
  245. data/lib/fog/storage/google_json/requests/list_buckets.rb +2 -0
  246. data/lib/fog/storage/google_json/requests/list_object_acl.rb +2 -0
  247. data/lib/fog/storage/google_json/requests/list_objects.rb +2 -0
  248. data/lib/fog/storage/google_json/requests/put_bucket.rb +2 -0
  249. data/lib/fog/storage/google_json/requests/put_bucket_acl.rb +2 -0
  250. data/lib/fog/storage/google_json/requests/put_object.rb +2 -0
  251. data/lib/fog/storage/google_json/requests/put_object_acl.rb +2 -0
  252. data/lib/fog/storage/google_xml/requests/put_bucket_acl.rb +2 -0
  253. data/tasks/test.rake +6 -2
  254. data/test/helpers/integration_test_helper.rb +2 -5
  255. data/test/helpers/test_helper.rb +1 -0
  256. data/test/integration/compute/core_compute/test_servers.rb +40 -0
  257. data/test/integration/compute/core_compute/test_zones.rb +1 -1
  258. data/test/integration/compute/core_networking/test_addresses.rb +23 -0
  259. data/test/integration/factories/{sql_v1_certs_factory.rb → sql_certs_factory.rb} +3 -3
  260. data/test/integration/factories/{sql_v1_instances_factory.rb → sql_instances_factory.rb} +3 -3
  261. data/test/integration/factories/{sql_v1_users_factory.rb → sql_users_factory.rb} +6 -3
  262. data/test/integration/monitoring/test_metric_descriptors.rb +2 -0
  263. data/test/integration/monitoring/test_timeseries.rb +3 -1
  264. data/test/integration/sql/{sqlv1/test_v1_certs.rb → test_certs.rb} +4 -3
  265. data/test/integration/sql/{sqlv1/test_common_flags.rb → test_common_flags.rb} +0 -0
  266. data/test/integration/sql/{sqlv1/test_common_tiers.rb → test_common_tiers.rb} +0 -0
  267. data/test/integration/sql/{sqlv1/test_coverage.rb → test_coverage.rb} +1 -1
  268. data/test/integration/sql/{sqlv2/test_v2_instances.rb → test_instances.rb} +22 -2
  269. data/test/integration/sql/{sqlv1/test_v1_users.rb → test_users.rb} +4 -4
  270. metadata +37 -32
  271. data/test/integration/factories/sql_v2_instances_factory.rb +0 -19
  272. data/test/integration/sql/sqlv1/test_v1_instances.rb +0 -31
  273. data/test/integration/sql/sqlv2/test_coverage.rb +0 -6
@@ -1,9 +1,9 @@
1
1
  require "integration/factories/collection_factory"
2
- require "integration/factories/sql_v1_instances_factory"
2
+ require "integration/factories/sql_instances_factory"
3
3
 
4
- class SqlV1CertsFactory < CollectionFactory
4
+ class SqlCertsFactory < CollectionFactory
5
5
  def initialize(example)
6
- @instances = SqlV1InstancesFactory.new(example)
6
+ @instances = SqlInstancesFactory.new(example)
7
7
  super(Fog::Google[:sql].ssl_certs, example)
8
8
  end
9
9
 
@@ -1,6 +1,6 @@
1
1
  require "integration/factories/collection_factory"
2
2
 
3
- class SqlV1InstancesFactory < CollectionFactory
3
+ class SqlInstancesFactory < CollectionFactory
4
4
  def initialize(example)
5
5
  super(Fog::Google[:sql].instances, example)
6
6
  end
@@ -13,7 +13,7 @@ class SqlV1InstancesFactory < CollectionFactory
13
13
  # Name has a time suffix due to SQL resources API objects having
14
14
  # a _very_ long life on the backend (n(days)) after deletion.
15
15
  { :name => "#{resource_name}-#{Time.now.to_i}",
16
- :region => TEST_SQL_REGION_FIRST,
17
- :tier => TEST_SQL_TIER_FIRST }
16
+ :region => TEST_SQL_REGION,
17
+ :tier => TEST_SQL_TIER }
18
18
  end
19
19
  end
@@ -1,9 +1,9 @@
1
1
  require "integration/factories/collection_factory"
2
- require "integration/factories/sql_v1_instances_factory"
2
+ require "integration/factories/sql_instances_factory"
3
3
 
4
- class SqlV1UsersFactory < CollectionFactory
4
+ class SqlUsersFactory < CollectionFactory
5
5
  def initialize(example)
6
- @instances = SqlV1InstancesFactory.new(example)
6
+ @instances = SqlInstancesFactory.new(example)
7
7
  super(Fog::Google[:sql].users, example)
8
8
  end
9
9
 
@@ -15,6 +15,9 @@ class SqlV1UsersFactory < CollectionFactory
15
15
  def params
16
16
  # Username should not be longer than 16 characters
17
17
  { :name => resource_name[0..15],
18
+ # TODO: Consider removing host when Users.list API issue is resolved
19
+ # See https://github.com/fog/fog-google/issues/462
20
+ :host => "%",
18
21
  :instance => @instances.create.name }
19
22
  end
20
23
  end
@@ -104,7 +104,9 @@ class TestMetricDescriptors < FogIntegrationTest
104
104
  descriptors = @client.metric_descriptors.all
105
105
  assert_operator(descriptors.size, :>, 0,
106
106
  "metric descriptor count should be positive")
107
+ end
107
108
 
109
+ def test_metric_descriptors_all_page_size
108
110
  descriptors = @client.metric_descriptors.all(
109
111
  :filter => 'metric.type = starts_with("compute.googleapis.com")',
110
112
  :page_size => 5
@@ -151,6 +151,8 @@ class TestMetricDescriptors < FogIntegrationTest
151
151
  :page_size => 1
152
152
  )
153
153
  end
154
+
155
+ refute_nil(resp.time_series, "expected timeseries to not be nil")
154
156
  assert_equal(resp.time_series.size, 1,
155
157
  "expected timeseries count to be equal to page size 1")
156
158
 
@@ -164,7 +166,7 @@ class TestMetricDescriptors < FogIntegrationTest
164
166
  "expected timeseries count to be equal to page size 1")
165
167
  labels = resp.time_series.first.metric.labels
166
168
  labels_next = next_resp.time_series.first.metric.labels
167
- assert(labels != labels_next,
169
+ refute_equal(labels, labels_next,
168
170
  "expected different timeseries when using page_token")
169
171
 
170
172
  # Test filter
@@ -1,12 +1,13 @@
1
1
  require "helpers/integration_test_helper"
2
- require "integration/factories/sql_v1_certs_factory"
2
+ require "integration/factories/sql_certs_factory"
3
+ require "pry"
3
4
 
4
- class TestSQLV1Certs < FogIntegrationTest
5
+ class TestSQLCerts < FogIntegrationTest
5
6
  # This test doesn't include TestCollection as certs are not an independent resource.
6
7
 
7
8
  def setup
8
9
  @subject = Fog::Google[:sql].ssl_certs
9
- @factory = SqlV1CertsFactory.new(namespaced_name)
10
+ @factory = SqlCertsFactory.new(namespaced_name)
10
11
  @client = Fog::Google::SQL.new
11
12
  end
12
13
 
@@ -3,4 +3,4 @@ require "helpers/integration_test_helper"
3
3
  # This is a simple coverage helper that helps differentiate
4
4
  # the tests when run in parallel so the final coverage report
5
5
  # can be properly combined together from multiple runners
6
- SimpleCov.command_name "test:sqlv1" if ENV["COVERAGE"]
6
+ SimpleCov.command_name "test:sql" if ENV["COVERAGE"]
@@ -1,5 +1,5 @@
1
1
  require "helpers/integration_test_helper"
2
- require "integration/factories/sql_v2_instances_factory"
2
+ require "integration/factories/sql_instances_factory"
3
3
  # Client helper is imported for `wait_until_complete`
4
4
  # TODO: Remove when fog-google#339 or fog-google#340 is resolved
5
5
  require "helpers/client_helper"
@@ -12,13 +12,33 @@ class TestSQLV2Instances < FogIntegrationTest
12
12
 
13
13
  def setup
14
14
  @subject = Fog::Google[:sql].instances
15
- @factory = SqlV2InstancesFactory.new(namespaced_name)
15
+ @factory = SqlInstancesFactory.new(namespaced_name)
16
16
  @backup_runs = Fog::Google[:sql].backup_runs
17
17
  # TODO: Remove after BackupRuns get save/reload - fog-google#339
18
18
  # See https://github.com/fog/fog-google/issues/339
19
19
  @client = Fog::Google::SQL.new
20
20
  end
21
21
 
22
+ def test_update
23
+ instance = @factory.create
24
+
25
+ settings_version = instance.settings_version
26
+ labels = {
27
+ :foo => "bar"
28
+ }
29
+ instance.settings[:user_labels] = labels
30
+ instance.save
31
+
32
+ updated = @subject.get(instance.name)
33
+ assert_equal(labels, updated.settings[:user_labels])
34
+ assert_operator(updated.settings_version, :>, settings_version)
35
+ end
36
+
37
+ def test_default_settings
38
+ instance = @factory.create
39
+ assert_equal([], instance.ssl_certs, "new instance should have 0 initial ssl certs")
40
+ end
41
+
22
42
  def test_restore_backup_run
23
43
  instance = @factory.create
24
44
 
@@ -1,8 +1,8 @@
1
1
  require "helpers/integration_test_helper"
2
- require "integration/factories/sql_v1_instances_factory"
3
- require "integration/factories/sql_v1_users_factory"
2
+ require "integration/factories/sql_instances_factory"
3
+ require "integration/factories/sql_users_factory"
4
4
 
5
- class TestSQLV1Users < FogIntegrationTest
5
+ class TestSQLUsers < FogIntegrationTest
6
6
  # This test doesn't include TestCollection as Users is not a
7
7
  # classical Fog model, as it's tied to a particular instance
8
8
  # I.e.:
@@ -12,7 +12,7 @@ class TestSQLV1Users < FogIntegrationTest
12
12
 
13
13
  def setup
14
14
  @subject = Fog::Google[:sql].users
15
- @factory = SqlV1UsersFactory.new(namespaced_name)
15
+ @factory = SqlUsersFactory.new(namespaced_name)
16
16
  end
17
17
 
18
18
  def teardown
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nat Welch
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-03-28 00:00:00.000000000 Z
12
+ date: 2020-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog-core
@@ -57,16 +57,22 @@ dependencies:
57
57
  name: google-api-client
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0.32'
63
+ - - "<"
61
64
  - !ruby/object:Gem::Version
62
- version: 0.23.0
65
+ version: '0.34'
63
66
  type: :runtime
64
67
  prerelease: false
65
68
  version_requirements: !ruby/object:Gem::Requirement
66
69
  requirements:
67
- - - "~>"
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0.32'
73
+ - - "<"
68
74
  - !ruby/object:Gem::Version
69
- version: 0.23.0
75
+ version: '0.34'
70
76
  - !ruby/object:Gem::Dependency
71
77
  name: pry
72
78
  requirement: !ruby/object:Gem::Requirement
@@ -204,11 +210,14 @@ files:
204
210
  - MIGRATING.md
205
211
  - README.md
206
212
  - Rakefile
213
+ - SECURITY.md
207
214
  - ci/.gitignore
208
215
  - ci/README.md
216
+ - ci/build-head-pipeline.yml
209
217
  - ci/credentials.yml.template
210
218
  - ci/docker-image/Dockerfile
211
- - ci/pipeline.yml
219
+ - ci/integration-pipeline.yml
220
+ - ci/pipeline-dev.yml
212
221
  - ci/tasks/run-int.sh
213
222
  - ci/tasks/run-int.yml
214
223
  - ci/tasks/utils.sh
@@ -447,11 +456,13 @@ files:
447
456
  - lib/fog/compute/google/requests/remove_target_pool_instance.rb
448
457
  - lib/fog/compute/google/requests/remove_target_pool_instances.rb
449
458
  - lib/fog/compute/google/requests/reset_server.rb
459
+ - lib/fog/compute/google/requests/reset_windows_password.rb
450
460
  - lib/fog/compute/google/requests/set_common_instance_metadata.rb
451
461
  - lib/fog/compute/google/requests/set_forwarding_rule_target.rb
452
462
  - lib/fog/compute/google/requests/set_global_forwarding_rule_target.rb
453
463
  - lib/fog/compute/google/requests/set_instance_template.rb
454
464
  - lib/fog/compute/google/requests/set_server_disk_auto_delete.rb
465
+ - lib/fog/compute/google/requests/set_server_machine_type.rb
455
466
  - lib/fog/compute/google/requests/set_server_metadata.rb
456
467
  - lib/fog/compute/google/requests/set_server_scheduling.rb
457
468
  - lib/fog/compute/google/requests/set_server_tags.rb
@@ -694,10 +705,9 @@ files:
694
705
  - test/integration/factories/instance_template_factory.rb
695
706
  - test/integration/factories/networks_factory.rb
696
707
  - test/integration/factories/servers_factory.rb
697
- - test/integration/factories/sql_v1_certs_factory.rb
698
- - test/integration/factories/sql_v1_instances_factory.rb
699
- - test/integration/factories/sql_v1_users_factory.rb
700
- - test/integration/factories/sql_v2_instances_factory.rb
708
+ - test/integration/factories/sql_certs_factory.rb
709
+ - test/integration/factories/sql_instances_factory.rb
710
+ - test/integration/factories/sql_users_factory.rb
701
711
  - test/integration/factories/ssl_certificates_factory.rb
702
712
  - test/integration/factories/subnetworks_factory.rb
703
713
  - test/integration/factories/target_http_proxies_factory.rb
@@ -713,14 +723,12 @@ files:
713
723
  - test/integration/pubsub/test_coverage.rb
714
724
  - test/integration/pubsub/test_pubsub_models.rb
715
725
  - test/integration/pubsub/test_pubsub_requests.rb
716
- - test/integration/sql/sqlv1/test_common_flags.rb
717
- - test/integration/sql/sqlv1/test_common_tiers.rb
718
- - test/integration/sql/sqlv1/test_coverage.rb
719
- - test/integration/sql/sqlv1/test_v1_certs.rb
720
- - test/integration/sql/sqlv1/test_v1_instances.rb
721
- - test/integration/sql/sqlv1/test_v1_users.rb
722
- - test/integration/sql/sqlv2/test_coverage.rb
723
- - test/integration/sql/sqlv2/test_v2_instances.rb
726
+ - test/integration/sql/test_certs.rb
727
+ - test/integration/sql/test_common_flags.rb
728
+ - test/integration/sql/test_common_tiers.rb
729
+ - test/integration/sql/test_coverage.rb
730
+ - test/integration/sql/test_instances.rb
731
+ - test/integration/sql/test_users.rb
724
732
  - test/integration/storage/storage_shared.rb
725
733
  - test/integration/storage/test_buckets.rb
726
734
  - test/integration/storage/test_coverage.rb
@@ -759,7 +767,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
759
767
  version: '0'
760
768
  requirements: []
761
769
  rubyforge_project:
762
- rubygems_version: 2.6.14.3
770
+ rubygems_version: 2.6.14.4
763
771
  signing_key:
764
772
  specification_version: 4
765
773
  summary: Module for the 'fog' gem to support Google.
@@ -817,10 +825,9 @@ test_files:
817
825
  - test/integration/factories/instance_template_factory.rb
818
826
  - test/integration/factories/networks_factory.rb
819
827
  - test/integration/factories/servers_factory.rb
820
- - test/integration/factories/sql_v1_certs_factory.rb
821
- - test/integration/factories/sql_v1_instances_factory.rb
822
- - test/integration/factories/sql_v1_users_factory.rb
823
- - test/integration/factories/sql_v2_instances_factory.rb
828
+ - test/integration/factories/sql_certs_factory.rb
829
+ - test/integration/factories/sql_instances_factory.rb
830
+ - test/integration/factories/sql_users_factory.rb
824
831
  - test/integration/factories/ssl_certificates_factory.rb
825
832
  - test/integration/factories/subnetworks_factory.rb
826
833
  - test/integration/factories/target_http_proxies_factory.rb
@@ -836,14 +843,12 @@ test_files:
836
843
  - test/integration/pubsub/test_coverage.rb
837
844
  - test/integration/pubsub/test_pubsub_models.rb
838
845
  - test/integration/pubsub/test_pubsub_requests.rb
839
- - test/integration/sql/sqlv1/test_common_flags.rb
840
- - test/integration/sql/sqlv1/test_common_tiers.rb
841
- - test/integration/sql/sqlv1/test_coverage.rb
842
- - test/integration/sql/sqlv1/test_v1_certs.rb
843
- - test/integration/sql/sqlv1/test_v1_instances.rb
844
- - test/integration/sql/sqlv1/test_v1_users.rb
845
- - test/integration/sql/sqlv2/test_coverage.rb
846
- - test/integration/sql/sqlv2/test_v2_instances.rb
846
+ - test/integration/sql/test_certs.rb
847
+ - test/integration/sql/test_common_flags.rb
848
+ - test/integration/sql/test_common_tiers.rb
849
+ - test/integration/sql/test_coverage.rb
850
+ - test/integration/sql/test_instances.rb
851
+ - test/integration/sql/test_users.rb
847
852
  - test/integration/storage/storage_shared.rb
848
853
  - test/integration/storage/test_buckets.rb
849
854
  - test/integration/storage/test_coverage.rb
@@ -1,19 +0,0 @@
1
- require "integration/factories/collection_factory"
2
-
3
- class SqlV2InstancesFactory < CollectionFactory
4
- def initialize(example)
5
- super(Fog::Google[:sql].instances, example)
6
- end
7
-
8
- def cleanup
9
- super
10
- end
11
-
12
- def params
13
- # Name has a time suffix due to SQL resources API objects having
14
- # a _very_ long life on the backend (n(days)) after deletion.
15
- { :name => "#{resource_name}-#{Time.now.to_i}",
16
- :region => TEST_SQL_REGION_SECOND,
17
- :tier => TEST_SQL_TIER_SECOND }
18
- end
19
- end
@@ -1,31 +0,0 @@
1
- require "helpers/integration_test_helper"
2
- require "integration/factories/sql_v1_instances_factory"
3
-
4
- class TestSQLV1Instances < FogIntegrationTest
5
- include TestCollection
6
-
7
- def setup
8
- @subject = Fog::Google[:sql].instances
9
- @factory = SqlV1InstancesFactory.new(namespaced_name)
10
- end
11
-
12
- def test_update
13
- instance = @factory.create
14
-
15
- settings_version = instance.settings_version
16
- labels = {
17
- :foo => "bar"
18
- }
19
- instance.settings[:user_labels] = labels
20
- instance.save
21
-
22
- updated = @subject.get(instance.name)
23
- assert_equal(labels, updated.settings[:user_labels])
24
- assert_operator(updated.settings_version, :>, settings_version)
25
- end
26
-
27
- def test_default_settings
28
- instance = @factory.create
29
- assert_equal([], instance.ssl_certs, "new instance should have 0 initial ssl certs")
30
- end
31
- 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:sqlv2" if ENV["COVERAGE"]