fog 1.18.0 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +6 -0
  3. data/CONTRIBUTING.md +22 -0
  4. data/LICENSE.md +20 -0
  5. data/README.md +41 -60
  6. data/Rakefile +2 -0
  7. data/changelog.txt +262 -0
  8. data/fog.gemspec +3 -3
  9. data/lib/fog/aws.rb +9 -7
  10. data/lib/fog/aws/cloud_watch.rb +0 -1
  11. data/lib/fog/aws/compute.rb +2 -0
  12. data/lib/fog/aws/dns.rb +2 -1
  13. data/lib/fog/aws/elb.rb +2 -0
  14. data/lib/fog/aws/models/auto_scaling/configuration.rb +4 -0
  15. data/lib/fog/aws/models/compute/address.rb +6 -5
  16. data/lib/fog/aws/models/compute/flavors.rb +10 -0
  17. data/lib/fog/aws/models/compute/spot_request.rb +1 -1
  18. data/lib/fog/aws/models/compute/subnet.rb +4 -0
  19. data/lib/fog/aws/models/compute/vpc.rb +5 -0
  20. data/lib/fog/aws/models/dns/records.rb +1 -3
  21. data/lib/fog/aws/models/elb/load_balancer.rb +10 -0
  22. data/lib/fog/aws/models/glacier/vault.rb +1 -1
  23. data/lib/fog/aws/models/rds/server.rb +5 -2
  24. data/lib/fog/aws/models/rds/subnet_group.rb +15 -1
  25. data/lib/fog/aws/models/storage/file.rb +2 -2
  26. data/lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb +6 -0
  27. data/lib/fog/aws/parsers/compute/assign_private_ip_addresses.rb +25 -0
  28. data/lib/fog/aws/parsers/compute/describe_addresses.rb +1 -1
  29. data/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb +40 -0
  30. data/lib/fog/aws/parsers/rds/delete_db_subnet_group.rb +35 -0
  31. data/lib/fog/aws/rds.rb +3 -3
  32. data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +2 -0
  33. data/lib/fog/aws/requests/auto_scaling/describe_notification_configurations.rb +1 -1
  34. data/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb +60 -0
  35. data/lib/fog/aws/requests/compute/create_route.rb +1 -1
  36. data/lib/fog/aws/requests/compute/describe_images.rb +1 -1
  37. data/lib/fog/aws/requests/compute/describe_subnets.rb +8 -0
  38. data/lib/fog/aws/requests/compute/describe_vpcs.rb +8 -0
  39. data/lib/fog/aws/requests/compute/modify_vpc_attribute.rb +59 -0
  40. data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +26 -9
  41. data/lib/fog/aws/requests/dns/create_hosted_zone.rb +12 -3
  42. data/lib/fog/aws/requests/dns/delete_hosted_zone.rb +33 -0
  43. data/lib/fog/aws/requests/dns/get_change.rb +26 -0
  44. data/lib/fog/aws/requests/dns/get_hosted_zone.rb +1 -1
  45. data/lib/fog/aws/requests/dns/list_hosted_zones.rb +3 -8
  46. data/lib/fog/aws/requests/dns/list_resource_record_sets.rb +68 -0
  47. data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -0
  48. data/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb +54 -0
  49. data/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb +59 -0
  50. data/lib/fog/aws/requests/rds/create_db_instance.rb +7 -1
  51. data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +7 -1
  52. data/lib/fog/aws/requests/rds/delete_db_subnet_group.rb +42 -0
  53. data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +6 -4
  54. data/lib/fog/aws/requests/storage/put_bucket.rb +4 -1
  55. data/lib/fog/aws/sqs.rb +2 -4
  56. data/lib/fog/aws/storage.rb +14 -1
  57. data/lib/fog/bluebox/compute.rb +1 -1
  58. data/lib/fog/brightbox/compute.rb +7 -9
  59. data/lib/fog/brightbox/compute/image_selector.rb +1 -1
  60. data/lib/fog/brightbox/compute/shared.rb +8 -10
  61. data/lib/fog/brightbox/models/compute/api_client.rb +1 -1
  62. data/lib/fog/brightbox/models/compute/application.rb +1 -4
  63. data/lib/fog/brightbox/models/compute/cloud_ip.rb +8 -5
  64. data/lib/fog/brightbox/models/compute/collaboration.rb +0 -2
  65. data/lib/fog/brightbox/models/compute/collaborations.rb +1 -1
  66. data/lib/fog/brightbox/models/compute/firewall_policy.rb +2 -4
  67. data/lib/fog/brightbox/models/compute/firewall_rule.rb +1 -1
  68. data/lib/fog/brightbox/models/compute/image.rb +1 -3
  69. data/lib/fog/brightbox/models/compute/load_balancer.rb +11 -8
  70. data/lib/fog/brightbox/models/compute/server.rb +28 -20
  71. data/lib/fog/brightbox/models/compute/server_group.rb +9 -11
  72. data/lib/fog/brightbox/models/compute/zone.rb +1 -1
  73. data/lib/fog/brightbox/oauth2.rb +3 -3
  74. data/lib/fog/brightbox/requests/compute/update_server.rb +1 -1
  75. data/lib/fog/cloudstack.rb +1 -1
  76. data/lib/fog/compute.rb +2 -2
  77. data/lib/fog/core.rb +1 -1
  78. data/lib/fog/core/connection.rb +1 -2
  79. data/lib/fog/core/errors.rb +3 -3
  80. data/lib/fog/core/hmac.rb +3 -3
  81. data/lib/fog/core/mock.rb +9 -2
  82. data/lib/fog/core/scp.rb +1 -1
  83. data/lib/fog/core/wait_for.rb +1 -1
  84. data/lib/fog/core/{timeout.rb → wait_for_defaults.rb} +10 -0
  85. data/lib/fog/digitalocean/models/compute/server.rb +4 -0
  86. data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
  87. data/lib/fog/dnsimple/dns.rb +1 -1
  88. data/lib/fog/dreamhost/dns.rb +2 -4
  89. data/lib/fog/ecloud/compute.rb +1 -1
  90. data/lib/fog/ecloud/models/compute/environments.rb +5 -3
  91. data/lib/fog/google/compute.rb +105 -68
  92. data/lib/fog/google/examples/create.rb +1 -0
  93. data/lib/fog/google/models/compute/disk.rb +7 -1
  94. data/lib/fog/google/models/compute/operation.rb +42 -0
  95. data/lib/fog/google/models/compute/operations.rb +26 -0
  96. data/lib/fog/google/models/compute/server.rb +18 -2
  97. data/lib/fog/google/models/compute/servers.rb +2 -1
  98. data/lib/fog/google/models/compute/zones.rb +1 -1
  99. data/lib/fog/google/models/storage/file.rb +1 -1
  100. data/lib/fog/google/models/storage/files.rb +1 -1
  101. data/lib/fog/google/requests/compute/delete_disk.rb +22 -2
  102. data/lib/fog/google/requests/compute/delete_global_operation.rb +29 -0
  103. data/lib/fog/google/requests/compute/delete_server.rb +13 -9
  104. data/lib/fog/google/requests/compute/delete_zone_operation.rb +33 -0
  105. data/lib/fog/google/requests/compute/get_disk.rb +26 -2
  106. data/lib/fog/google/requests/compute/{delete_operation.rb → get_global_operation.rb} +5 -6
  107. data/lib/fog/google/requests/compute/get_image.rb +3 -3
  108. data/lib/fog/google/requests/compute/get_server.rb +1 -0
  109. data/lib/fog/google/requests/compute/get_zone_operation.rb +58 -0
  110. data/lib/fog/google/requests/compute/insert_disk.rb +43 -3
  111. data/lib/fog/google/requests/compute/insert_firewall.rb +2 -1
  112. data/lib/fog/google/requests/compute/insert_image.rb +2 -2
  113. data/lib/fog/google/requests/compute/insert_server.rb +64 -35
  114. data/lib/fog/google/requests/compute/list_disks.rb +8 -2
  115. data/lib/fog/google/requests/compute/list_images.rb +2 -2
  116. data/lib/fog/google/requests/compute/list_machine_types.rb +2 -2
  117. data/lib/fog/google/requests/compute/list_servers.rb +2 -2
  118. data/lib/fog/google/requests/compute/list_zone_operations.rb +2 -1
  119. data/lib/fog/google/requests/compute/list_zones.rb +1 -1
  120. data/lib/fog/google/requests/storage/copy_object.rb +1 -1
  121. data/lib/fog/hp.rb +1 -1
  122. data/lib/fog/hp/README.md +57 -0
  123. data/lib/fog/hp/articles/auth_caching.md +23 -0
  124. data/lib/fog/hp/docs/connect.md +152 -0
  125. data/lib/fog/hp/docs/install.md +133 -0
  126. data/lib/fog/hp/examples/block_storage.md +296 -0
  127. data/lib/fog/hp/examples/block_storage_v2.md +446 -0
  128. data/lib/fog/hp/examples/cdn.md +54 -0
  129. data/lib/fog/hp/examples/compute.md +794 -0
  130. data/lib/fog/hp/examples/compute_v2.md +848 -0
  131. data/lib/fog/hp/examples/getting_started_examples.md +30 -0
  132. data/lib/fog/hp/examples/networking.md +472 -0
  133. data/lib/fog/hp/examples/object_storage.md +387 -0
  134. data/lib/fog/json.rb +6 -3
  135. data/lib/fog/local/models/storage/directories.rb +8 -4
  136. data/lib/fog/openstack/compute.rb +3 -0
  137. data/lib/fog/openstack/examples/compute/basics.rb +74 -0
  138. data/lib/fog/openstack/identity.rb +2 -3
  139. data/lib/fog/openstack/image.rb +1 -4
  140. data/lib/fog/openstack/metering.rb +1 -4
  141. data/lib/fog/openstack/models/compute/host.rb +5 -1
  142. data/lib/fog/openstack/models/compute/security_group.rb +18 -4
  143. data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
  144. data/lib/fog/openstack/models/compute/security_group_rules.rb +22 -0
  145. data/lib/fog/openstack/models/volume/volume_type.rb +20 -0
  146. data/lib/fog/openstack/models/volume/volume_types.rb +26 -0
  147. data/lib/fog/openstack/network.rb +34 -6
  148. data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
  149. data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
  150. data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -1
  151. data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +1 -1
  152. data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
  153. data/lib/fog/openstack/requests/compute/create_key_pair.rb +1 -1
  154. data/lib/fog/openstack/requests/compute/create_security_group.rb +4 -4
  155. data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +2 -2
  156. data/lib/fog/openstack/requests/compute/create_server.rb +12 -5
  157. data/lib/fog/openstack/requests/compute/create_volume.rb +1 -1
  158. data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
  159. data/lib/fog/openstack/requests/compute/delete_security_group.rb +1 -1
  160. data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +2 -0
  161. data/lib/fog/openstack/requests/compute/get_security_group.rb +14 -24
  162. data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
  163. data/lib/fog/openstack/requests/compute/list_hosts.rb +3 -3
  164. data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
  165. data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
  166. data/lib/fog/openstack/requests/compute/update_quota.rb +1 -1
  167. data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +1 -1
  168. data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
  169. data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
  170. data/lib/fog/openstack/requests/identity/update_user.rb +1 -1
  171. data/lib/fog/openstack/requests/image/update_image_members.rb +1 -1
  172. data/lib/fog/openstack/requests/orchestration/create_stack.rb +2 -2
  173. data/lib/fog/openstack/requests/orchestration/update_stack.rb +1 -1
  174. data/lib/fog/openstack/requests/storage/get_object_http_url.rb +13 -0
  175. data/lib/fog/openstack/requests/storage/get_object_https_url.rb +0 -14
  176. data/lib/fog/openstack/requests/volume/create_volume.rb +1 -1
  177. data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +1 -1
  178. data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
  179. data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
  180. data/lib/fog/openstack/storage.rb +2 -0
  181. data/lib/fog/openstack/volume.rb +9 -5
  182. data/lib/fog/rackspace/compute.rb +1 -4
  183. data/lib/fog/rackspace/compute_v2.rb +1 -0
  184. data/lib/fog/rackspace/docs/auto_scale.md +9 -9
  185. data/lib/fog/rackspace/docs/getting_started.md +1 -0
  186. data/lib/fog/rackspace/docs/queues.md +312 -0
  187. data/lib/fog/rackspace/examples/queues/claim_messages.rb +60 -0
  188. data/lib/fog/rackspace/examples/queues/create_queue.rb +45 -0
  189. data/lib/fog/rackspace/examples/queues/delete_message.rb +72 -0
  190. data/lib/fog/rackspace/examples/queues/delete_queue.rb +53 -0
  191. data/lib/fog/rackspace/examples/queues/list_messages.rb +64 -0
  192. data/lib/fog/rackspace/examples/queues/post_message.rb +59 -0
  193. data/lib/fog/rackspace/models/compute_v2/key_pairs.rb +1 -1
  194. data/lib/fog/rackspace/models/compute_v2/server.rb +9 -3
  195. data/lib/fog/rackspace/models/compute_v2/servers.rb +2 -2
  196. data/lib/fog/rackspace/models/identity/service_catalog.rb +44 -59
  197. data/lib/fog/rackspace/models/queues/claim.rb +41 -1
  198. data/lib/fog/rackspace/models/queues/claims.rb +25 -0
  199. data/lib/fog/rackspace/models/queues/message.rb +43 -5
  200. data/lib/fog/rackspace/models/queues/messages.rb +37 -0
  201. data/lib/fog/rackspace/models/queues/queue.rb +66 -3
  202. data/lib/fog/rackspace/models/queues/queues.rb +15 -0
  203. data/lib/fog/rackspace/models/storage/file.rb +8 -1
  204. data/lib/fog/rackspace/requests/compute_v2/delete_keypair.rb +1 -1
  205. data/lib/fog/rackspace/requests/compute_v2/get_keypair.rb +1 -1
  206. data/lib/fog/rackspace/requests/queues/create_claim.rb +15 -0
  207. data/lib/fog/rackspace/requests/queues/create_message.rb +15 -0
  208. data/lib/fog/rackspace/requests/queues/create_queue.rb +11 -0
  209. data/lib/fog/rackspace/requests/queues/delete_claim.rb +12 -0
  210. data/lib/fog/rackspace/requests/queues/delete_message.rb +14 -0
  211. data/lib/fog/rackspace/requests/queues/delete_queue.rb +10 -0
  212. data/lib/fog/rackspace/requests/queues/get_claim.rb +11 -0
  213. data/lib/fog/rackspace/requests/queues/get_message.rb +12 -0
  214. data/lib/fog/rackspace/requests/queues/get_queue.rb +10 -0
  215. data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +10 -0
  216. data/lib/fog/rackspace/requests/queues/list_messages.rb +26 -0
  217. data/lib/fog/rackspace/requests/queues/list_queues.rb +17 -2
  218. data/lib/fog/rackspace/requests/queues/update_claim.rb +7 -0
  219. data/lib/fog/rackspace/service.rb +6 -2
  220. data/lib/fog/rackspace/storage.rb +1 -4
  221. data/lib/fog/riakcs.rb +2 -2
  222. data/lib/fog/riakcs/provisioning.rb +1 -3
  223. data/lib/fog/riakcs/requests/provisioning/create_user.rb +2 -2
  224. data/lib/fog/riakcs/requests/provisioning/get_user.rb +1 -1
  225. data/lib/fog/riakcs/requests/provisioning/list_users.rb +1 -1
  226. data/lib/fog/riakcs/requests/usage/get_usage.rb +1 -1
  227. data/lib/fog/riakcs/usage.rb +0 -2
  228. data/lib/fog/vcloud_director/README.md +2 -0
  229. data/lib/fog/vcloud_director/compute.rb +79 -8
  230. data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +91 -0
  231. data/lib/fog/vcloud_director/generators/compute/vapp.rb +30 -0
  232. data/lib/fog/vcloud_director/generators/compute/vm.rb +33 -0
  233. data/lib/fog/vcloud_director/models/compute/medias.rb +1 -1
  234. data/lib/fog/vcloud_director/models/compute/vm_customization.rb +2 -0
  235. data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +2 -0
  236. data/lib/fog/vcloud_director/requests/compute/delete_network.rb +64 -0
  237. data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +433 -333
  238. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +3 -1
  239. data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +1 -1
  240. data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +20 -2
  241. data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +176 -0
  242. data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +1 -1
  243. data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +1 -1
  244. data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +1 -1
  245. data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +1 -0
  246. data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +37 -0
  247. data/lib/fog/vcloud_director/requests/compute/put_vm.rb +39 -0
  248. data/lib/fog/version.rb +1 -1
  249. data/lib/fog/vsphere/compute.rb +3 -0
  250. data/lib/fog/vsphere/models/compute/datastore.rb +1 -0
  251. data/lib/fog/vsphere/models/compute/interface.rb +50 -2
  252. data/lib/fog/vsphere/models/compute/interfaces.rb +25 -10
  253. data/lib/fog/vsphere/models/compute/scsicontroller.rb +19 -0
  254. data/lib/fog/vsphere/models/compute/server.rb +27 -8
  255. data/lib/fog/vsphere/requests/compute/create_vm.rb +34 -8
  256. data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +26 -0
  257. data/lib/fog/vsphere/requests/compute/list_datastores.rb +9 -8
  258. data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +9 -6
  259. data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +19 -0
  260. data/lib/fog/xenserver.rb +2 -1
  261. data/lib/fog/xenserver/compute.rb +37 -1
  262. data/lib/fog/xenserver/models/compute/blob.rb +22 -0
  263. data/lib/fog/xenserver/models/compute/blobs.rb +25 -0
  264. data/lib/fog/xenserver/models/compute/bond.rb +23 -0
  265. data/lib/fog/xenserver/models/compute/bonds.rb +25 -0
  266. data/lib/fog/xenserver/models/compute/console.rb +3 -1
  267. data/lib/fog/xenserver/models/compute/crash_dump.rb +19 -0
  268. data/lib/fog/xenserver/models/compute/crash_dumps.rb +25 -0
  269. data/lib/fog/xenserver/models/compute/dr_task.rb +17 -0
  270. data/lib/fog/xenserver/models/compute/dr_tasks.rb +25 -0
  271. data/lib/fog/xenserver/models/compute/gpu_group.rb +22 -0
  272. data/lib/fog/xenserver/models/compute/gpu_groups.rb +25 -0
  273. data/lib/fog/xenserver/models/compute/guest_metrics.rb +2 -1
  274. data/lib/fog/xenserver/models/compute/host.rb +41 -8
  275. data/lib/fog/xenserver/models/compute/host_cpu.rb +2 -1
  276. data/lib/fog/xenserver/models/compute/host_crash_dump.rb +20 -0
  277. data/lib/fog/xenserver/models/compute/host_crash_dumps.rb +25 -0
  278. data/lib/fog/xenserver/models/compute/host_metrics.rb +1 -1
  279. data/lib/fog/xenserver/models/compute/host_patch.rb +25 -0
  280. data/lib/fog/xenserver/models/compute/host_patchs.rb +25 -0
  281. data/lib/fog/xenserver/models/compute/network.rb +7 -6
  282. data/lib/fog/xenserver/models/compute/pbd.rb +3 -1
  283. data/lib/fog/xenserver/models/compute/pci.rb +22 -0
  284. data/lib/fog/xenserver/models/compute/pcis.rb +25 -0
  285. data/lib/fog/xenserver/models/compute/pgpu.rb +20 -0
  286. data/lib/fog/xenserver/models/compute/pgpus.rb +25 -0
  287. data/lib/fog/xenserver/models/compute/pif.rb +19 -8
  288. data/lib/fog/xenserver/models/compute/pif_metrics.rb +28 -0
  289. data/lib/fog/xenserver/models/compute/pifs_metrics.rb +25 -0
  290. data/lib/fog/xenserver/models/compute/pool.rb +18 -1
  291. data/lib/fog/xenserver/models/compute/pool_patch.rb +24 -0
  292. data/lib/fog/xenserver/models/compute/pool_patchs.rb +25 -0
  293. data/lib/fog/xenserver/models/compute/role.rb +19 -0
  294. data/lib/fog/xenserver/models/compute/roles.rb +25 -0
  295. data/lib/fog/xenserver/models/compute/server.rb +59 -26
  296. data/lib/fog/xenserver/models/compute/server_appliance.rb +21 -0
  297. data/lib/fog/xenserver/models/compute/server_appliances.rb +25 -0
  298. data/lib/fog/xenserver/models/compute/storage_manager.rb +28 -0
  299. data/lib/fog/xenserver/models/compute/storage_managers.rb +25 -0
  300. data/lib/fog/xenserver/models/compute/storage_repository.rb +4 -1
  301. data/lib/fog/xenserver/models/compute/tunnel.rb +20 -0
  302. data/lib/fog/xenserver/models/compute/tunnels.rb +25 -0
  303. data/lib/fog/xenserver/models/compute/vbd.rb +3 -2
  304. data/lib/fog/xenserver/models/compute/vbd_metrics.rb +1 -1
  305. data/lib/fog/xenserver/models/compute/vdi.rb +4 -1
  306. data/lib/fog/xenserver/models/compute/vif.rb +11 -2
  307. data/lib/fog/xenserver/models/compute/vlan.rb +2 -1
  308. data/lib/fog/xenserver/models/compute/vmpp.rb +35 -0
  309. data/lib/fog/xenserver/models/compute/vmpps.rb +25 -0
  310. data/lib/fog/xenserver/models/compute/vtpm.rb +18 -0
  311. data/lib/fog/xenserver/models/compute/vtpms.rb +25 -0
  312. data/lib/fog/xenserver/requests/compute/reboot_server.rb +1 -1
  313. data/lib/tasks/changelog_task.rb +0 -1
  314. data/tests/aws/models/dns/record_tests.rb +1 -2
  315. data/tests/aws/models/dns/records_tests.rb +2 -7
  316. data/tests/aws/models/dns/zone_tests.rb +1 -1
  317. data/tests/aws/models/dns/zones_tests.rb +1 -1
  318. data/tests/aws/models/elb/model_tests.rb +10 -0
  319. data/tests/aws/models/storage/file_tests.rb +4 -0
  320. data/tests/aws/requests/compute/assign_private_ip_tests.rb +52 -0
  321. data/tests/aws/requests/compute/vpc_tests.rb +17 -1
  322. data/tests/aws/requests/dns/dns_tests.rb +1 -26
  323. data/tests/aws/requests/elb/load_balancer_tests.rb +6 -0
  324. data/tests/aws/requests/rds/{subnet_groups_test.rb → subnet_groups_tests.rb} +4 -0
  325. data/tests/aws/requests/storage/bucket_tests.rb +17 -0
  326. data/tests/aws/requests/storage/delete_multiple_objects_tests.rb +12 -0
  327. data/tests/brightbox/compute/schema.rb +0 -13
  328. data/tests/brightbox/models/compute/server_tests.rb +7 -9
  329. data/tests/brightbox/requests/compute/interface_tests.rb +7 -19
  330. data/tests/digitalocean/models/compute/server_tests.rb +4 -3
  331. data/tests/google/models/compute/disk_tests.rb +5 -0
  332. data/tests/google/models/compute/disks_tests.rb +5 -0
  333. data/tests/google/models/compute/server_tests.rb +5 -1
  334. data/tests/google/models/compute/servers_tests.rb +5 -0
  335. data/tests/google/requests/compute/disk_tests.rb +2 -1
  336. data/tests/google/requests/compute/firewall_tests.rb +1 -0
  337. data/tests/google/requests/compute/image_tests.rb +3 -0
  338. data/tests/google/requests/compute/network_tests.rb +1 -0
  339. data/tests/google/requests/compute/operation_tests.rb +1 -0
  340. data/tests/google/requests/compute/server_tests.rb +2 -3
  341. data/tests/google/requests/compute/zone_tests.rb +1 -6
  342. data/tests/helpers/collection_helper.rb +10 -2
  343. data/tests/helpers/mock_helper.rb +4 -5
  344. data/tests/local/models/directories_tests.rb +17 -0
  345. data/tests/openstack/models/compute/security_group_tests.rb +54 -0
  346. data/tests/openstack/requests/compute/security_group_tests.rb +22 -20
  347. data/tests/openstack/requests/network/network_tests.rb +8 -8
  348. data/tests/rackspace/compute_tests.rb +0 -5
  349. data/tests/rackspace/helper.rb +9 -4
  350. data/tests/rackspace/models/compute_v2/server_tests.rb +29 -1
  351. data/tests/rackspace/models/identity/service_catalog_tests.rb +87 -39
  352. data/tests/rackspace/models/queues/message_tests.rb +16 -0
  353. data/tests/rackspace/models/storage/file_tests.rb +29 -0
  354. data/tests/rackspace/requests/compute_v2/address_tests.rb +3 -1
  355. data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -2
  356. data/tests/rackspace/requests/compute_v2/server_tests.rb +3 -6
  357. data/tests/vcloud_director/models/compute/media_tests.rb +18 -5
  358. data/tests/vcloud_director/models/compute/vapp_tests.rb +3 -1
  359. data/tests/vcloud_director/models/compute/vms_tests.rb +2 -1
  360. data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +19 -10
  361. data/tests/vcloud_director/requests/compute/network_tests.rb +64 -3
  362. data/tests/vcloud_director/requests/compute/query_tests.rb +67 -2
  363. data/tests/vsphere/requests/compute/set_vm_customvalue_tests.rb +21 -0
  364. metadata +112 -11
  365. data/fogkeytest1.pem +0 -27
  366. data/lib/fog/hp/README_HP.rdoc +0 -61
@@ -2,6 +2,21 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation posts the specified message or messages.
7
+ # @note You can submit up to 10 messages in a single request.
8
+ #
9
+ # @param [String] client_id UUID for the client instance.
10
+ # @param [String] queue_name Specifies the name of the queue.
11
+ # @param [String, Hash, Array] body The body attribute specifies an arbitrary document that constitutes the body of the message being sent.
12
+ # The size of this body is limited to 256 KB, excluding whitespace. The document must be valid JSON.
13
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
14
+ # @return [Excon::Response] response
15
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
16
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
17
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
18
+ # @raise [Fog::Rackspace::Queues::ServiceError]
19
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/POST_postMessage__version__queues__queue_name__messages_message-operations-dle001.html
5
20
  def create_message(client_id, queue_name, body, ttl)
6
21
  data = [{
7
22
  :ttl => ttl,
@@ -2,6 +2,17 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation creates a new queue.
7
+ # The body of the request is empty.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @return [Excon::Response] response
11
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
12
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
13
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
14
+ # @raise [Fog::Rackspace::Queues::ServiceError]
15
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/PUT_createQueue__version__queues__queue_name__queue-operations-dle001.html
5
16
  def create_queue(queue_name)
6
17
  request(
7
18
  :body => Fog::JSON.encode({}),
@@ -2,6 +2,18 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation immediately releases a claim, making any remaining, undeleted) messages that are associated with the claim available to other workers.
7
+ # Claims with malformed IDs or claims that are not found by ID are ignored.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [String] claim_id Specifies the claim ID.
11
+ # @return [Excon::Response] response
12
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
13
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
14
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
15
+ # @raise [Fog::Rackspace::Queues::ServiceError]
16
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
5
17
  def delete_claim(queue_name, claim_id)
6
18
  request(
7
19
  :expects => 204,
@@ -2,6 +2,20 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation immediately deletes the specified message.
7
+ # @note If you do not specify claim_id, but the message is claimed, the operation fails. You can only delete claimed messages by providing an appropriate claim_id.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [String] message_id Specifies the message ID.
11
+ # @param [Hash] options
12
+ # @option options [Integer] :claim_id - Identifies the claim.
13
+ # @return [Excon::Response] response
14
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
15
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
16
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
17
+ # @raise [Fog::Rackspace::Queues::ServiceError]
18
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteMessage__version__queues__queue_name__messages__messageId__message-operations-dle001.html
5
19
  def delete_message(queue_name, message_id, options = {})
6
20
  query = {}
7
21
  query[:claim_id] = options[:claim_id] if options.has_key? :claim_id
@@ -2,6 +2,16 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation immediately deletes a queue and all of its existing messages.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @return [Excon::Response] response
10
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
11
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
12
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
13
+ # @raise [Fog::Rackspace::Queues::ServiceError]
14
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteQueue__version__queues__queue_name__queue-operations-dle001.html
5
15
  def delete_queue(queue_name)
6
16
  request(
7
17
  :expects => 204,
@@ -2,6 +2,17 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation queries the specified claim for the specified queue. Claims with malformed IDs or claims that are not found by ID are ignored.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @param [Integer] claim_id Specifies the claim ID.
10
+ # @return [Excon::Response] response
11
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
12
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
13
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
14
+ # @raise [Fog::Rackspace::Queues::ServiceError]
15
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_queryClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
5
16
  def get_claim(queue_name, claim_id)
6
17
  request(
7
18
  :expects => 200,
@@ -2,6 +2,18 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation gets the specified message from the specified queue.
7
+ #
8
+ # @param [String] client_id UUID for the client instance.
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [Integer] message_id Specifies the message ID.
11
+ # @return [Excon::Response] response
12
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
13
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
14
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
15
+ # @raise [Fog::Rackspace::Queues::ServiceError]
16
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getSpecificMessage__version__queues__queue_name__messages__messageId__message-operations-dle001.html
5
17
  def get_message(client_id, queue_name, message_id)
6
18
  request(
7
19
  :expects => 200,
@@ -2,6 +2,16 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation verifies whether the specified queue exists.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @return [Excon::Response] response
10
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
11
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
12
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
13
+ # @raise [Fog::Rackspace::Queues::ServiceError]
14
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_checkQueueExists__version__queues__queue_name__queue-operations-dle001.html
5
15
  def get_queue(queue_name)
6
16
  request(
7
17
  :expects => [200, 204],
@@ -2,6 +2,16 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation returns queue statistics, including how many messages are in the queue, categorized by status.
7
+ #
8
+ # @param [String] queue_name Specifies the name of the queue.
9
+ # @return [Excon::Response] response
10
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
11
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
12
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
13
+ # @raise [Fog::Rackspace::Queues::ServiceError]
14
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getQueueStats__version__queues__queue_name__stats_queue-operations-dle001.html
5
15
  def get_queue_stats(queue_name)
6
16
  request(
7
17
  :expects => 200,
@@ -2,6 +2,32 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation gets the message or messages in the specified queue.
7
+ #
8
+ # A request to list messages when the queue is not found or when messages are not found returns 204, instead of 200, because there was no information to send back.
9
+ # Messages with malformed IDs or messages that are not found by ID are ignored.
10
+ #
11
+ # @param [String] client_id UUID for the client instance.
12
+ # @param [String] queue_name Specifies the name of the queue.
13
+ # @param [Hash] options
14
+ # @option options [String] :marker - Specifies an opaque string that the client can use to request the next batch of messages. The marker parameter communicates to the
15
+ # server which messages the client has already received. If you do not specify a value, the API returns all messages at the head of the queue (up to the limit).
16
+ # @option options [Integer] :limit - When more messages are available than can be returned in a single request, the client can pick up the next batch of messages
17
+ # by simply using the URI template parameters returned from the previous call in the "next" field. Specifies up to 10 messages (the default value) to return.
18
+ # If you do not specify a value for the limit parameter, the default value of 10 is used.
19
+ # @option options [String] :echo - Determines whether the API returns a client's own messages. The echo parameter is a Boolean value (true or false) that determines
20
+ # whether the API returns a client's own messages, as determined by the uuid portion of the User-Agent header. If you do not specify a value, echo uses the default
21
+ # value of false. If you are experimenting with the API, you might want to set echo=true in order to see the messages that you posted.
22
+ # @option options [String] :include_claimed - Determines whether the API returns claimed messages and unclaimed messages. The include_claimed parameter is a Boolean
23
+ # value (true or false) that determines whether the API returns claimed messages and unclaimed messages. If you do not specify a value, include_claimed uses the
24
+ # default value of false (only unclaimed messages are returned).
25
+ # @return [Excon::Response] response
26
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
27
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
28
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
29
+ # @raise [Fog::Rackspace::Queues::ServiceError]
30
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_getMessages__version__queues__queue_name__messages_message-operations-dle001.html
5
31
  def list_messages(client_id, queue_name, options = {})
6
32
  request(
7
33
  :expects => [200, 204],
@@ -2,11 +2,26 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
- def list_queues
5
+
6
+ # This operation lists queues for the project. The queues are sorted alphabetically by name.
7
+ # @note A request to list queues when you have no queues in your account returns 204, instead of 200, because there was no information to send back.
8
+ #
9
+ # @param [Hash] options
10
+ # @option options [String] :marker - Specifies the name of the last queue received in a previous request, or none to get the first page of results.
11
+ # @option options [Integer] :limit - Specifies the name of the last queue received in a previous request, or none to get the first page of results.
12
+ # @option options [Boolean] :detailed - Determines whether queue metadata is included in the response. The default value for this parameter is false, which excludes t
13
+ # @return [Excon::Response] response
14
+ # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
15
+ # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
16
+ # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
17
+ # @raise [Fog::Rackspace::Queues::ServiceError]
18
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_listQueues__version__queues_.html
19
+ def list_queues(options={})
6
20
  request(
7
21
  :expects => [200, 204],
8
22
  :method => 'GET',
9
- :path => 'queues'
23
+ :path => 'queues',
24
+ :query => options
10
25
  )
11
26
  end
12
27
  end
@@ -2,6 +2,13 @@ module Fog
2
2
  module Rackspace
3
3
  class Queues
4
4
  class Real
5
+
6
+ # This operation posts the specified message or messages.
7
+ # @note You can submit up to 10 messages in a single request.
8
+ #
9
+ # @param [String] queue_name Specifies the name of the queue.
10
+ # @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
11
+ # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/PATCH_updateClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
5
12
  def update_claim(queue_name, claim_id, ttl)
6
13
  body = {
7
14
  :ttl => ttl
@@ -52,6 +52,10 @@ module Fog
52
52
  response
53
53
  end
54
54
 
55
+ def service_net?
56
+ false
57
+ end
58
+
55
59
  private
56
60
 
57
61
  def process_response(response)
@@ -62,7 +66,7 @@ module Fog
62
66
  Fog::Rackspace.json_response?(response)
63
67
  begin
64
68
  response.body = Fog::JSON.decode(response.body)
65
- rescue MultiJson::DecodeError => e
69
+ rescue Fog::JSON::DecodeError => e
66
70
  Fog::Logger.warning("Error Parsing response json - #{e}")
67
71
  response.body = {}
68
72
  end
@@ -118,7 +122,7 @@ module Fog
118
122
  end
119
123
 
120
124
  def endpoint_uri_v2
121
- @uri = @identity_service.service_catalog.get_endpoint(service_name, region)
125
+ @uri = @identity_service.service_catalog.get_endpoint(service_name, region, service_net?)
122
126
  end
123
127
 
124
128
  def auth_token
@@ -191,10 +191,7 @@ module Fog
191
191
 
192
192
  def endpoint_uri(service_endpoint_url=nil)
193
193
  return @uri if @uri
194
-
195
- @uri = super(@rackspace_storage_url || service_endpoint_url, :rackspace_storage_url)
196
- @uri.host = "snet-#{@uri.host}" if service_net?
197
- @uri
194
+ super(@rackspace_storage_url || service_endpoint_url, :rackspace_storage_url)
198
195
  end
199
196
 
200
197
  private
@@ -71,9 +71,9 @@ module Fog
71
71
 
72
72
  module UserUtils
73
73
  def update_riakcs_user(key_id, user)
74
- response = @s3_connection.put_object('riak-cs', "user/#{key_id}", MultiJson.encode(user), { 'Content-Type' => 'application/json' })
74
+ response = @s3_connection.put_object('riak-cs', "user/#{key_id}", Fog::JSON.encode(user), { 'Content-Type' => 'application/json' })
75
75
  if !response.body.empty?
76
- response.body = MultiJson.decode(response.body)
76
+ response.body = Fog::JSON.decode(response.body)
77
77
  end
78
78
  response
79
79
  end
@@ -47,8 +47,6 @@ module Fog
47
47
  include Utils
48
48
 
49
49
  def initialize(options = {})
50
- require 'multi_json'
51
-
52
50
  configure_uri_options(options)
53
51
  @riakcs_access_key_id = options[:riakcs_access_key_id]
54
52
  @riakcs_secret_access_key = options[:riakcs_secret_access_key]
@@ -89,7 +87,7 @@ module Fog
89
87
  end
90
88
  end
91
89
  if !response.body.empty? && parse_response
92
- response.body = MultiJson.decode(response.body)
90
+ response.body = Fog::JSON.decode(response.body)
93
91
  end
94
92
  response
95
93
  end
@@ -3,7 +3,7 @@ module Fog
3
3
  class Provisioning
4
4
  class Real
5
5
  def create_user(email, name, options = {})
6
- payload = MultiJson.encode({ :email => email, :name => name })
6
+ payload = Fog::JSON.encode({ :email => email, :name => name })
7
7
  headers = { 'Content-Type' => 'application/json' }
8
8
 
9
9
  if(options[:anonymous])
@@ -20,7 +20,7 @@ module Fog
20
20
  if !response.body.empty?
21
21
  case response.headers['Content-Type']
22
22
  when 'application/json'
23
- response.body = MultiJson.decode(response.body)
23
+ response.body = Fog::JSON.decode(response.body)
24
24
  end
25
25
  end
26
26
  response
@@ -7,7 +7,7 @@ module Fog
7
7
 
8
8
  def get_user(key_id)
9
9
  response = @s3_connection.get_object('riak-cs', "user/#{key_id}", { 'Accept' => 'application/json' })
10
- response.body = MultiJson.decode(response.body)
10
+ response.body = Fog::JSON.decode(response.body)
11
11
  response
12
12
  end
13
13
  end
@@ -10,7 +10,7 @@ module Fog
10
10
 
11
11
  boundary = extract_boundary(response.headers['Content-Type'])
12
12
  parts = parse(response.body, boundary)
13
- decoded = parts.map { |part| MultiJson.decode(part[:body]) }
13
+ decoded = parts.map { |part| Fog::JSON.decode(part[:body]) }
14
14
 
15
15
  response.body = decoded.flatten
16
16
 
@@ -37,7 +37,7 @@ module Fog
37
37
  response = @connection.get_object('riak-cs', ["usage", request_uri(access_key_id, options)].join("/"))
38
38
 
39
39
  if !response.body.empty?
40
- response.body = MultiJson.decode(response.body)
40
+ response.body = Fog::JSON.decode(response.body)
41
41
  end
42
42
  response
43
43
  end
@@ -41,8 +41,6 @@ module Fog
41
41
  include Utils
42
42
 
43
43
  def initialize(options = {})
44
- require 'multi_json'
45
-
46
44
  configure_uri_options(options)
47
45
  @riakcs_access_key_id = options[:riakcs_access_key_id]
48
46
  @riakcs_secret_access_key = options[:riakcs_secret_access_key]
@@ -386,6 +386,8 @@ vm.customization
386
386
  change_sid=false,
387
387
  join_domain_enabled=false,
388
388
  use_org_settings=false,
389
+ admin_password_auto=false,
390
+ admin_password='',
389
391
  admin_password_enabled=false,
390
392
  reset_password_required=false,
391
393
  virtual_machine_id="2ddeea36-ac71-470f-abc5-c6e3c2aca192",
@@ -84,6 +84,7 @@ module Fog
84
84
  request :delete_logout
85
85
  request :delete_media
86
86
  request :delete_media_metadata_item_metadata
87
+ request :delete_network
87
88
  request :delete_shadow_vm
88
89
  request :delete_vapp
89
90
  request :delete_vapp_metadata_item_metadata
@@ -202,6 +203,7 @@ module Fog
202
203
  request :post_configure_edge_gateway_services
203
204
  request :post_consolidate_vm_vapp
204
205
  request :post_consolidate_vm_vapp_template
206
+ request :post_create_org_vdc_network
205
207
  request :post_deploy_vapp
206
208
  request :post_detach_disk
207
209
  request :post_disable_nested_hv
@@ -244,7 +246,9 @@ module Fog
244
246
  request :put_metadata_value # deprecated
245
247
  request :put_network_connection_system_section_vapp
246
248
  request :put_vapp_metadata_item_metadata
249
+ request :put_vapp_name_and_description
247
250
  request :put_vapp_template_metadata_item_metadata
251
+ request :put_vm
248
252
  request :put_vm_capabilities
249
253
 
250
254
  class Model < Fog::Model
@@ -467,9 +471,12 @@ module Fog
467
471
  def data
468
472
  @@data ||= Hash.new do |hash, key|
469
473
 
470
- vdc_uuid = uuid
474
+ vdc1_uuid = uuid
475
+ vdc2_uuid = uuid
471
476
  default_network_uuid = uuid
472
- uplink_network_uuid = uuid
477
+ uplink_network_uuid = uuid
478
+ isolated_vdc1_network_uuid = uuid
479
+ isolated_vdc2_network_uuid = uuid
473
480
 
474
481
  hash[key] = {
475
482
  :catalogs => {
@@ -488,7 +495,7 @@ module Fog
488
495
  uuid => {
489
496
  :name => 'MockEdgeGateway',
490
497
  :networks => [uplink_network_uuid, default_network_uuid],
491
- :vdc => vdc_uuid,
498
+ :vdc => vdc1_uuid,
492
499
  :Configuration => {
493
500
  :GatewayBackingConfig => "compact",
494
501
  :GatewayInterfaces => {
@@ -506,9 +513,15 @@ module Fog
506
513
  }
507
514
  }
508
515
  },
516
+
509
517
  :medias => {},
518
+
510
519
  :networks => {
520
+
511
521
  default_network_uuid => {
522
+ :IsShared => true,
523
+ :vdc => vdc1_uuid,
524
+ :FenceMode => 'natRouted',
512
525
  :ApplyRateLimit => "false",
513
526
  :Description => 'Org Network for mocking',
514
527
  :Dns1 => '8.8.8.8',
@@ -530,8 +543,61 @@ module Fog
530
543
  },
531
544
  :UseForDefaultRoute => "false"
532
545
  },
546
+
547
+ isolated_vdc1_network_uuid => {
548
+ :IsShared => false,
549
+ :vdc => vdc1_uuid,
550
+ :ApplyRateLimit => "false",
551
+ :FenceMode => 'isolated',
552
+ :Description => 'Org Network for mocking',
553
+ :Dns1 => '8.8.8.8',
554
+ :Dns2 => '8.8.4.4',
555
+ :DnsSuffix => 'example.com',
556
+ :InterfaceType => "internal",
557
+ :IpRanges => [{
558
+ :StartAddress=>'10.1.0.100',
559
+ :EndAddress=>'10.1.0.200'
560
+ }],
561
+ :IsInherited => false,
562
+ :Netmask => '255.255.255.0',
563
+ :name => 'vDC1 backend network',
564
+ :SubnetParticipation => {
565
+ :Gateway => "192.168.1.0",
566
+ :Netmask => "255.255.0.0",
567
+ :IpAddress => "192.168.1.0"
568
+ },
569
+ :UseForDefaultRoute => "false"
570
+ },
571
+
572
+ isolated_vdc2_network_uuid => {
573
+ :IsShared => false,
574
+ :vdc => vdc2_uuid,
575
+ :ApplyRateLimit => "false",
576
+ :Description => 'Org Network for mocking',
577
+ :Dns1 => '8.8.8.8',
578
+ :Dns2 => '8.8.4.4',
579
+ :DnsSuffix => 'example.com',
580
+ :InterfaceType => "internal",
581
+ :IpRanges => [{
582
+ :StartAddress=>'10.2.0.100',
583
+ :EndAddress=>'10.2.0.200'
584
+ }],
585
+ :IsInherited => false,
586
+ :Netmask => '255.255.255.0',
587
+ :name => 'vDC2 backend network',
588
+ :SubnetParticipation => {
589
+ :Gateway => "192.168.1.0",
590
+ :Netmask => "255.255.0.0",
591
+ :IpAddress => "192.168.1.0"
592
+ },
593
+ :UseForDefaultRoute => "false"
594
+ },
595
+
533
596
  uplink_network_uuid => {
597
+ :IsShared => false,
598
+ :vdc => vdc1_uuid,
534
599
  :ApplyRateLimit => "false",
600
+ :FenceMode => 'bridged',
535
601
  :Description => 'Uplink Network for mocking',
536
602
  :Dns1 => '8.8.8.8',
537
603
  :Dns2 => '8.8.4.4',
@@ -558,6 +624,7 @@ module Fog
558
624
  },
559
625
  :UseForDefaultRoute => "true"
560
626
  }
627
+
561
628
  },
562
629
  :org => {
563
630
  :description => 'Organization for mocking',
@@ -573,14 +640,18 @@ module Fog
573
640
  :limit => 2 * 1024 * 1024,
574
641
  :name => 'DefaultMockStorageClass',
575
642
  :units => 'MB',
576
- :vdc => vdc_uuid,
643
+ :vdc => vdc1_uuid,
577
644
  }
578
645
  },
579
646
  :vdcs => {
580
- vdc_uuid => {
581
- :description => 'vDC for mocking',
582
- :name => 'MockVDC'
583
- }
647
+ vdc1_uuid => {
648
+ :description => 'vDC1 for mocking',
649
+ :name => 'MockVDC 1'
650
+ },
651
+ vdc2_uuid => {
652
+ :description => 'vDC2 for mocking',
653
+ :name => 'MockVDC 2'
654
+ },
584
655
  }
585
656
  }
586
657
  end[@vcloud_director_username]