fog-cosmic 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (440) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +29 -0
  3. data/.gitignore +18 -0
  4. data/.travis.yml +7 -0
  5. data/CHANGELOG.md +8 -0
  6. data/CONTRIBUTORS.md +2 -0
  7. data/Gemfile +4 -0
  8. data/Gemfile.lock +49 -0
  9. data/LICENSE.md +21 -0
  10. data/README.md +44 -0
  11. data/Rakefile +10 -0
  12. data/fog-cosmic.gemspec +32 -0
  13. data/lib/fog/cosmic.rb +45 -0
  14. data/lib/fog/cosmic/compute.rb +861 -0
  15. data/lib/fog/cosmic/models/compute/address.rb +17 -0
  16. data/lib/fog/cosmic/models/compute/disk_offering.rb +44 -0
  17. data/lib/fog/cosmic/models/compute/disk_offerings.rb +24 -0
  18. data/lib/fog/cosmic/models/compute/egress_firewall_rule.rb +38 -0
  19. data/lib/fog/cosmic/models/compute/egress_firewall_rules.rb +25 -0
  20. data/lib/fog/cosmic/models/compute/firewall_rule.rb +24 -0
  21. data/lib/fog/cosmic/models/compute/firewall_rules.rb +25 -0
  22. data/lib/fog/cosmic/models/compute/flavor.rb +36 -0
  23. data/lib/fog/cosmic/models/compute/flavors.rb +25 -0
  24. data/lib/fog/cosmic/models/compute/image.rb +72 -0
  25. data/lib/fog/cosmic/models/compute/images.rb +37 -0
  26. data/lib/fog/cosmic/models/compute/job.rb +51 -0
  27. data/lib/fog/cosmic/models/compute/jobs.rb +25 -0
  28. data/lib/fog/cosmic/models/compute/network.rb +73 -0
  29. data/lib/fog/cosmic/models/compute/network_offering.rb +25 -0
  30. data/lib/fog/cosmic/models/compute/network_offerings.rb +39 -0
  31. data/lib/fog/cosmic/models/compute/networks.rb +38 -0
  32. data/lib/fog/cosmic/models/compute/port_forwarding_rule.rb +25 -0
  33. data/lib/fog/cosmic/models/compute/port_forwarding_rules.rb +25 -0
  34. data/lib/fog/cosmic/models/compute/project.rb +58 -0
  35. data/lib/fog/cosmic/models/compute/projects.rb +39 -0
  36. data/lib/fog/cosmic/models/compute/public_ip_address.rb +96 -0
  37. data/lib/fog/cosmic/models/compute/public_ip_addresses.rb +27 -0
  38. data/lib/fog/cosmic/models/compute/server.rb +151 -0
  39. data/lib/fog/cosmic/models/compute/servers.rb +39 -0
  40. data/lib/fog/cosmic/models/compute/snapshot.rb +46 -0
  41. data/lib/fog/cosmic/models/compute/snapshots.rb +23 -0
  42. data/lib/fog/cosmic/models/compute/volume.rb +121 -0
  43. data/lib/fog/cosmic/models/compute/volumes.rb +26 -0
  44. data/lib/fog/cosmic/models/compute/zone.rb +36 -0
  45. data/lib/fog/cosmic/models/compute/zones.rb +29 -0
  46. data/lib/fog/cosmic/requests/compute/activate_project.rb +25 -0
  47. data/lib/fog/cosmic/requests/compute/add_account_to_project.rb +25 -0
  48. data/lib/fog/cosmic/requests/compute/add_cluster.rb +29 -0
  49. data/lib/fog/cosmic/requests/compute/add_guest_os.rb +26 -0
  50. data/lib/fog/cosmic/requests/compute/add_guest_os_mapping.rb +27 -0
  51. data/lib/fog/cosmic/requests/compute/add_host.rb +30 -0
  52. data/lib/fog/cosmic/requests/compute/add_image_store.rb +25 -0
  53. data/lib/fog/cosmic/requests/compute/add_ip_to_nic.rb +25 -0
  54. data/lib/fog/cosmic/requests/compute/add_ldap_configuration.rb +26 -0
  55. data/lib/fog/cosmic/requests/compute/add_network_device.rb +24 -0
  56. data/lib/fog/cosmic/requests/compute/add_network_service_provider.rb +26 -0
  57. data/lib/fog/cosmic/requests/compute/add_nic_to_virtual_machine.rb +26 -0
  58. data/lib/fog/cosmic/requests/compute/add_nicira_nvp_device.rb +29 -0
  59. data/lib/fog/cosmic/requests/compute/add_region.rb +27 -0
  60. data/lib/fog/cosmic/requests/compute/add_resource_detail.rb +27 -0
  61. data/lib/fog/cosmic/requests/compute/add_secondary_storage.rb +25 -0
  62. data/lib/fog/cosmic/requests/compute/add_traffic_type.rb +26 -0
  63. data/lib/fog/cosmic/requests/compute/add_vpn_user.rb +26 -0
  64. data/lib/fog/cosmic/requests/compute/archive_alerts.rb +24 -0
  65. data/lib/fog/cosmic/requests/compute/archive_events.rb +24 -0
  66. data/lib/fog/cosmic/requests/compute/assign_cert_to_load_balancer.rb +26 -0
  67. data/lib/fog/cosmic/requests/compute/assign_to_load_balancer_rule.rb +25 -0
  68. data/lib/fog/cosmic/requests/compute/assign_virtual_machine.rb +27 -0
  69. data/lib/fog/cosmic/requests/compute/associate_ip_address.rb +55 -0
  70. data/lib/fog/cosmic/requests/compute/attach_iso.rb +26 -0
  71. data/lib/fog/cosmic/requests/compute/attach_volume.rb +76 -0
  72. data/lib/fog/cosmic/requests/compute/cancel_host_maintenance.rb +25 -0
  73. data/lib/fog/cosmic/requests/compute/cancel_storage_maintenance.rb +25 -0
  74. data/lib/fog/cosmic/requests/compute/change_service_for_router.rb +26 -0
  75. data/lib/fog/cosmic/requests/compute/change_service_for_system_vm.rb +26 -0
  76. data/lib/fog/cosmic/requests/compute/change_service_for_virtual_machine.rb +26 -0
  77. data/lib/fog/cosmic/requests/compute/clean_vmreservations.rb +24 -0
  78. data/lib/fog/cosmic/requests/compute/configure_virtual_router_element.rb +26 -0
  79. data/lib/fog/cosmic/requests/compute/copy_iso.rb +26 -0
  80. data/lib/fog/cosmic/requests/compute/copy_template.rb +26 -0
  81. data/lib/fog/cosmic/requests/compute/create_account.rb +30 -0
  82. data/lib/fog/cosmic/requests/compute/create_affinity_group.rb +26 -0
  83. data/lib/fog/cosmic/requests/compute/create_disk_offering.rb +56 -0
  84. data/lib/fog/cosmic/requests/compute/create_domain.rb +25 -0
  85. data/lib/fog/cosmic/requests/compute/create_egress_firewall_rule.rb +44 -0
  86. data/lib/fog/cosmic/requests/compute/create_firewall_rule.rb +48 -0
  87. data/lib/fog/cosmic/requests/compute/create_instance_group.rb +25 -0
  88. data/lib/fog/cosmic/requests/compute/create_ip_forwarding_rule.rb +27 -0
  89. data/lib/fog/cosmic/requests/compute/create_lb_health_check_policy.rb +25 -0
  90. data/lib/fog/cosmic/requests/compute/create_lb_stickiness_policy.rb +27 -0
  91. data/lib/fog/cosmic/requests/compute/create_load_balancer_rule.rb +28 -0
  92. data/lib/fog/cosmic/requests/compute/create_network.rb +30 -0
  93. data/lib/fog/cosmic/requests/compute/create_network_acl.rb +25 -0
  94. data/lib/fog/cosmic/requests/compute/create_network_acl_list.rb +26 -0
  95. data/lib/fog/cosmic/requests/compute/create_network_offering.rb +55 -0
  96. data/lib/fog/cosmic/requests/compute/create_physical_network.rb +26 -0
  97. data/lib/fog/cosmic/requests/compute/create_pod.rb +29 -0
  98. data/lib/fog/cosmic/requests/compute/create_port_forwarding_rule.rb +55 -0
  99. data/lib/fog/cosmic/requests/compute/create_private_gateway.rb +29 -0
  100. data/lib/fog/cosmic/requests/compute/create_project.rb +26 -0
  101. data/lib/fog/cosmic/requests/compute/create_remote_access_vpn.rb +25 -0
  102. data/lib/fog/cosmic/requests/compute/create_secondary_staging_store.rb +25 -0
  103. data/lib/fog/cosmic/requests/compute/create_service_offering.rb +55 -0
  104. data/lib/fog/cosmic/requests/compute/create_snapshot.rb +48 -0
  105. data/lib/fog/cosmic/requests/compute/create_ssh_key_pair.rb +27 -0
  106. data/lib/fog/cosmic/requests/compute/create_static_route.rb +26 -0
  107. data/lib/fog/cosmic/requests/compute/create_storage_network_ip_range.rb +28 -0
  108. data/lib/fog/cosmic/requests/compute/create_storage_pool.rb +27 -0
  109. data/lib/fog/cosmic/requests/compute/create_tags.rb +27 -0
  110. data/lib/fog/cosmic/requests/compute/create_template.rb +27 -0
  111. data/lib/fog/cosmic/requests/compute/create_user.rb +30 -0
  112. data/lib/fog/cosmic/requests/compute/create_virtual_router_element.rb +25 -0
  113. data/lib/fog/cosmic/requests/compute/create_vlan_ip_range.rb +24 -0
  114. data/lib/fog/cosmic/requests/compute/create_vm_snapshot.rb +25 -0
  115. data/lib/fog/cosmic/requests/compute/create_volume.rb +69 -0
  116. data/lib/fog/cosmic/requests/compute/create_vpc.rb +29 -0
  117. data/lib/fog/cosmic/requests/compute/create_vpcoffering.rb +27 -0
  118. data/lib/fog/cosmic/requests/compute/create_vpn_connection.rb +26 -0
  119. data/lib/fog/cosmic/requests/compute/create_vpn_customer_gateway.rb +29 -0
  120. data/lib/fog/cosmic/requests/compute/create_vpn_gateway.rb +25 -0
  121. data/lib/fog/cosmic/requests/compute/create_zone.rb +28 -0
  122. data/lib/fog/cosmic/requests/compute/dedicate_cluster.rb +26 -0
  123. data/lib/fog/cosmic/requests/compute/dedicate_guest_vlan_range.rb +28 -0
  124. data/lib/fog/cosmic/requests/compute/dedicate_host.rb +26 -0
  125. data/lib/fog/cosmic/requests/compute/dedicate_pod.rb +26 -0
  126. data/lib/fog/cosmic/requests/compute/dedicate_public_ip_range.rb +27 -0
  127. data/lib/fog/cosmic/requests/compute/dedicate_zone.rb +26 -0
  128. data/lib/fog/cosmic/requests/compute/delete_account.rb +25 -0
  129. data/lib/fog/cosmic/requests/compute/delete_account_from_project.rb +26 -0
  130. data/lib/fog/cosmic/requests/compute/delete_affinity_group.rb +24 -0
  131. data/lib/fog/cosmic/requests/compute/delete_alerts.rb +24 -0
  132. data/lib/fog/cosmic/requests/compute/delete_cluster.rb +25 -0
  133. data/lib/fog/cosmic/requests/compute/delete_disk_offering.rb +33 -0
  134. data/lib/fog/cosmic/requests/compute/delete_domain.rb +25 -0
  135. data/lib/fog/cosmic/requests/compute/delete_egress_firewall_rule.rb +34 -0
  136. data/lib/fog/cosmic/requests/compute/delete_events.rb +24 -0
  137. data/lib/fog/cosmic/requests/compute/delete_firewall_rule.rb +34 -0
  138. data/lib/fog/cosmic/requests/compute/delete_host.rb +25 -0
  139. data/lib/fog/cosmic/requests/compute/delete_image_store.rb +25 -0
  140. data/lib/fog/cosmic/requests/compute/delete_instance_group.rb +25 -0
  141. data/lib/fog/cosmic/requests/compute/delete_ip_forwarding_rule.rb +25 -0
  142. data/lib/fog/cosmic/requests/compute/delete_iso.rb +25 -0
  143. data/lib/fog/cosmic/requests/compute/delete_lb_health_check_policy.rb +25 -0
  144. data/lib/fog/cosmic/requests/compute/delete_lb_stickiness_policy.rb +25 -0
  145. data/lib/fog/cosmic/requests/compute/delete_ldap_configuration.rb +25 -0
  146. data/lib/fog/cosmic/requests/compute/delete_load_balancer_rule.rb +25 -0
  147. data/lib/fog/cosmic/requests/compute/delete_network.rb +25 -0
  148. data/lib/fog/cosmic/requests/compute/delete_network_acl.rb +25 -0
  149. data/lib/fog/cosmic/requests/compute/delete_network_acl_list.rb +25 -0
  150. data/lib/fog/cosmic/requests/compute/delete_network_device.rb +25 -0
  151. data/lib/fog/cosmic/requests/compute/delete_network_offering.rb +34 -0
  152. data/lib/fog/cosmic/requests/compute/delete_network_service_provider.rb +25 -0
  153. data/lib/fog/cosmic/requests/compute/delete_nicira_nvp_device.rb +25 -0
  154. data/lib/fog/cosmic/requests/compute/delete_physical_network.rb +25 -0
  155. data/lib/fog/cosmic/requests/compute/delete_pod.rb +25 -0
  156. data/lib/fog/cosmic/requests/compute/delete_port_forwarding_rule.rb +25 -0
  157. data/lib/fog/cosmic/requests/compute/delete_private_gateway.rb +25 -0
  158. data/lib/fog/cosmic/requests/compute/delete_project.rb +25 -0
  159. data/lib/fog/cosmic/requests/compute/delete_project_invitation.rb +25 -0
  160. data/lib/fog/cosmic/requests/compute/delete_remote_access_vpn.rb +25 -0
  161. data/lib/fog/cosmic/requests/compute/delete_secondary_staging_store.rb +25 -0
  162. data/lib/fog/cosmic/requests/compute/delete_service_offering.rb +34 -0
  163. data/lib/fog/cosmic/requests/compute/delete_snapshot.rb +61 -0
  164. data/lib/fog/cosmic/requests/compute/delete_ssh_key_pair.rb +27 -0
  165. data/lib/fog/cosmic/requests/compute/delete_ssl_cert.rb +25 -0
  166. data/lib/fog/cosmic/requests/compute/delete_static_route.rb +25 -0
  167. data/lib/fog/cosmic/requests/compute/delete_storage_network_ip_range.rb +25 -0
  168. data/lib/fog/cosmic/requests/compute/delete_storage_pool.rb +25 -0
  169. data/lib/fog/cosmic/requests/compute/delete_tags.rb +26 -0
  170. data/lib/fog/cosmic/requests/compute/delete_template.rb +25 -0
  171. data/lib/fog/cosmic/requests/compute/delete_traffic_type.rb +25 -0
  172. data/lib/fog/cosmic/requests/compute/delete_user.rb +25 -0
  173. data/lib/fog/cosmic/requests/compute/delete_vlan_ip_range.rb +25 -0
  174. data/lib/fog/cosmic/requests/compute/delete_vm_snapshot.rb +25 -0
  175. data/lib/fog/cosmic/requests/compute/delete_volume.rb +45 -0
  176. data/lib/fog/cosmic/requests/compute/delete_vpc.rb +25 -0
  177. data/lib/fog/cosmic/requests/compute/delete_vpcoffering.rb +25 -0
  178. data/lib/fog/cosmic/requests/compute/delete_vpn_connection.rb +25 -0
  179. data/lib/fog/cosmic/requests/compute/delete_vpn_customer_gateway.rb +25 -0
  180. data/lib/fog/cosmic/requests/compute/delete_vpn_gateway.rb +25 -0
  181. data/lib/fog/cosmic/requests/compute/delete_zone.rb +25 -0
  182. data/lib/fog/cosmic/requests/compute/deploy_virtual_machine.rb +127 -0
  183. data/lib/fog/cosmic/requests/compute/destroy_router.rb +25 -0
  184. data/lib/fog/cosmic/requests/compute/destroy_system_vm.rb +25 -0
  185. data/lib/fog/cosmic/requests/compute/destroy_virtual_machine.rb +54 -0
  186. data/lib/fog/cosmic/requests/compute/detach_iso.rb +25 -0
  187. data/lib/fog/cosmic/requests/compute/detach_volume.rb +64 -0
  188. data/lib/fog/cosmic/requests/compute/disable_account.rb +25 -0
  189. data/lib/fog/cosmic/requests/compute/disable_static_nat.rb +51 -0
  190. data/lib/fog/cosmic/requests/compute/disable_user.rb +25 -0
  191. data/lib/fog/cosmic/requests/compute/disassociate_ip_address.rb +35 -0
  192. data/lib/fog/cosmic/requests/compute/enable_account.rb +24 -0
  193. data/lib/fog/cosmic/requests/compute/enable_static_nat.rb +69 -0
  194. data/lib/fog/cosmic/requests/compute/enable_storage_maintenance.rb +25 -0
  195. data/lib/fog/cosmic/requests/compute/enable_user.rb +25 -0
  196. data/lib/fog/cosmic/requests/compute/expunge_virtual_machine.rb +25 -0
  197. data/lib/fog/cosmic/requests/compute/extract_iso.rb +26 -0
  198. data/lib/fog/cosmic/requests/compute/extract_template.rb +65 -0
  199. data/lib/fog/cosmic/requests/compute/extract_volume.rb +27 -0
  200. data/lib/fog/cosmic/requests/compute/find_hosts_for_migration.rb +25 -0
  201. data/lib/fog/cosmic/requests/compute/find_storage_pools_for_migration.rb +25 -0
  202. data/lib/fog/cosmic/requests/compute/generate_alert.rb +27 -0
  203. data/lib/fog/cosmic/requests/compute/get_api_limit.rb +24 -0
  204. data/lib/fog/cosmic/requests/compute/get_cloud_identifier.rb +25 -0
  205. data/lib/fog/cosmic/requests/compute/get_user.rb +25 -0
  206. data/lib/fog/cosmic/requests/compute/get_virtual_machine_user_data.rb +25 -0
  207. data/lib/fog/cosmic/requests/compute/get_vm_password.rb +25 -0
  208. data/lib/fog/cosmic/requests/compute/import_ldap_users.rb +25 -0
  209. data/lib/fog/cosmic/requests/compute/ldap_create_account.rb +26 -0
  210. data/lib/fog/cosmic/requests/compute/list_accounts.rb +24 -0
  211. data/lib/fog/cosmic/requests/compute/list_affinity_group_types.rb +24 -0
  212. data/lib/fog/cosmic/requests/compute/list_affinity_groups.rb +24 -0
  213. data/lib/fog/cosmic/requests/compute/list_alerts.rb +24 -0
  214. data/lib/fog/cosmic/requests/compute/list_apis.rb +24 -0
  215. data/lib/fog/cosmic/requests/compute/list_async_jobs.rb +36 -0
  216. data/lib/fog/cosmic/requests/compute/list_capabilities.rb +24 -0
  217. data/lib/fog/cosmic/requests/compute/list_capacity.rb +24 -0
  218. data/lib/fog/cosmic/requests/compute/list_clusters.rb +24 -0
  219. data/lib/fog/cosmic/requests/compute/list_configurations.rb +24 -0
  220. data/lib/fog/cosmic/requests/compute/list_dedicated_clusters.rb +24 -0
  221. data/lib/fog/cosmic/requests/compute/list_dedicated_guest_vlan_ranges.rb +24 -0
  222. data/lib/fog/cosmic/requests/compute/list_dedicated_hosts.rb +24 -0
  223. data/lib/fog/cosmic/requests/compute/list_dedicated_pods.rb +24 -0
  224. data/lib/fog/cosmic/requests/compute/list_dedicated_zones.rb +24 -0
  225. data/lib/fog/cosmic/requests/compute/list_deployment_planners.rb +24 -0
  226. data/lib/fog/cosmic/requests/compute/list_disk_offerings.rb +32 -0
  227. data/lib/fog/cosmic/requests/compute/list_domain_children.rb +24 -0
  228. data/lib/fog/cosmic/requests/compute/list_domains.rb +24 -0
  229. data/lib/fog/cosmic/requests/compute/list_egress_firewall_rules.rb +35 -0
  230. data/lib/fog/cosmic/requests/compute/list_event_types.rb +24 -0
  231. data/lib/fog/cosmic/requests/compute/list_events.rb +24 -0
  232. data/lib/fog/cosmic/requests/compute/list_firewall_rules.rb +35 -0
  233. data/lib/fog/cosmic/requests/compute/list_guest_os_mapping.rb +24 -0
  234. data/lib/fog/cosmic/requests/compute/list_hosts.rb +24 -0
  235. data/lib/fog/cosmic/requests/compute/list_hypervisor_capabilities.rb +24 -0
  236. data/lib/fog/cosmic/requests/compute/list_hypervisors.rb +24 -0
  237. data/lib/fog/cosmic/requests/compute/list_image_stores.rb +24 -0
  238. data/lib/fog/cosmic/requests/compute/list_instance_groups.rb +24 -0
  239. data/lib/fog/cosmic/requests/compute/list_ip_forwarding_rules.rb +24 -0
  240. data/lib/fog/cosmic/requests/compute/list_iso_permissions.rb +25 -0
  241. data/lib/fog/cosmic/requests/compute/list_isos.rb +24 -0
  242. data/lib/fog/cosmic/requests/compute/list_lb_health_check_policies.rb +24 -0
  243. data/lib/fog/cosmic/requests/compute/list_lb_stickiness_policies.rb +24 -0
  244. data/lib/fog/cosmic/requests/compute/list_ldap_configurations.rb +24 -0
  245. data/lib/fog/cosmic/requests/compute/list_ldap_users.rb +24 -0
  246. data/lib/fog/cosmic/requests/compute/list_load_balancer_rule_instances.rb +25 -0
  247. data/lib/fog/cosmic/requests/compute/list_load_balancer_rules.rb +24 -0
  248. data/lib/fog/cosmic/requests/compute/list_network_acl_lists.rb +24 -0
  249. data/lib/fog/cosmic/requests/compute/list_network_acls.rb +24 -0
  250. data/lib/fog/cosmic/requests/compute/list_network_device.rb +24 -0
  251. data/lib/fog/cosmic/requests/compute/list_network_isolation_methods.rb +24 -0
  252. data/lib/fog/cosmic/requests/compute/list_network_offerings.rb +31 -0
  253. data/lib/fog/cosmic/requests/compute/list_network_service_providers.rb +24 -0
  254. data/lib/fog/cosmic/requests/compute/list_networks.rb +28 -0
  255. data/lib/fog/cosmic/requests/compute/list_nicira_nvp_device_networks.rb +25 -0
  256. data/lib/fog/cosmic/requests/compute/list_nicira_nvp_devices.rb +24 -0
  257. data/lib/fog/cosmic/requests/compute/list_nics.rb +25 -0
  258. data/lib/fog/cosmic/requests/compute/list_os_categories.rb +24 -0
  259. data/lib/fog/cosmic/requests/compute/list_os_types.rb +32 -0
  260. data/lib/fog/cosmic/requests/compute/list_physical_networks.rb +24 -0
  261. data/lib/fog/cosmic/requests/compute/list_pods.rb +24 -0
  262. data/lib/fog/cosmic/requests/compute/list_port_forwarding_rules.rb +40 -0
  263. data/lib/fog/cosmic/requests/compute/list_private_gateways.rb +24 -0
  264. data/lib/fog/cosmic/requests/compute/list_project_accounts.rb +25 -0
  265. data/lib/fog/cosmic/requests/compute/list_project_invitations.rb +24 -0
  266. data/lib/fog/cosmic/requests/compute/list_projects.rb +24 -0
  267. data/lib/fog/cosmic/requests/compute/list_public_ip_addresses.rb +45 -0
  268. data/lib/fog/cosmic/requests/compute/list_regions.rb +24 -0
  269. data/lib/fog/cosmic/requests/compute/list_remote_access_vpns.rb +24 -0
  270. data/lib/fog/cosmic/requests/compute/list_resource_details.rb +25 -0
  271. data/lib/fog/cosmic/requests/compute/list_resource_limits.rb +24 -0
  272. data/lib/fog/cosmic/requests/compute/list_routers.rb +24 -0
  273. data/lib/fog/cosmic/requests/compute/list_secondary_staging_stores.rb +24 -0
  274. data/lib/fog/cosmic/requests/compute/list_service_offerings.rb +44 -0
  275. data/lib/fog/cosmic/requests/compute/list_snapshots.rb +43 -0
  276. data/lib/fog/cosmic/requests/compute/list_ssh_key_pairs.rb +26 -0
  277. data/lib/fog/cosmic/requests/compute/list_ssl_certs.rb +24 -0
  278. data/lib/fog/cosmic/requests/compute/list_static_routes.rb +24 -0
  279. data/lib/fog/cosmic/requests/compute/list_storage_network_ip_range.rb +24 -0
  280. data/lib/fog/cosmic/requests/compute/list_storage_pools.rb +24 -0
  281. data/lib/fog/cosmic/requests/compute/list_storage_providers.rb +25 -0
  282. data/lib/fog/cosmic/requests/compute/list_supported_network_services.rb +24 -0
  283. data/lib/fog/cosmic/requests/compute/list_system_vms.rb +24 -0
  284. data/lib/fog/cosmic/requests/compute/list_tags.rb +24 -0
  285. data/lib/fog/cosmic/requests/compute/list_template_permissions.rb +25 -0
  286. data/lib/fog/cosmic/requests/compute/list_templates.rb +42 -0
  287. data/lib/fog/cosmic/requests/compute/list_traffic_types.rb +25 -0
  288. data/lib/fog/cosmic/requests/compute/list_users.rb +24 -0
  289. data/lib/fog/cosmic/requests/compute/list_virtual_machines.rb +32 -0
  290. data/lib/fog/cosmic/requests/compute/list_virtual_router_elements.rb +24 -0
  291. data/lib/fog/cosmic/requests/compute/list_vlan_ip_ranges.rb +24 -0
  292. data/lib/fog/cosmic/requests/compute/list_vm_snapshot.rb +26 -0
  293. data/lib/fog/cosmic/requests/compute/list_volumes.rb +43 -0
  294. data/lib/fog/cosmic/requests/compute/list_vpc_offerings.rb +24 -0
  295. data/lib/fog/cosmic/requests/compute/list_vpcs.rb +24 -0
  296. data/lib/fog/cosmic/requests/compute/list_vpn_connections.rb +24 -0
  297. data/lib/fog/cosmic/requests/compute/list_vpn_customer_gateways.rb +24 -0
  298. data/lib/fog/cosmic/requests/compute/list_vpn_gateways.rb +24 -0
  299. data/lib/fog/cosmic/requests/compute/list_vpn_users.rb +24 -0
  300. data/lib/fog/cosmic/requests/compute/list_zones.rb +37 -0
  301. data/lib/fog/cosmic/requests/compute/lock_account.rb +26 -0
  302. data/lib/fog/cosmic/requests/compute/lock_user.rb +25 -0
  303. data/lib/fog/cosmic/requests/compute/mark_default_zone_for_account.rb +27 -0
  304. data/lib/fog/cosmic/requests/compute/migrate_system_vm.rb +26 -0
  305. data/lib/fog/cosmic/requests/compute/migrate_virtual_machine.rb +25 -0
  306. data/lib/fog/cosmic/requests/compute/migrate_virtual_machine_with_volume.rb +26 -0
  307. data/lib/fog/cosmic/requests/compute/migrate_volume.rb +26 -0
  308. data/lib/fog/cosmic/requests/compute/prepare_host_for_maintenance.rb +25 -0
  309. data/lib/fog/cosmic/requests/compute/prepare_template.rb +26 -0
  310. data/lib/fog/cosmic/requests/compute/query_async_job_result.rb +38 -0
  311. data/lib/fog/cosmic/requests/compute/reboot_router.rb +25 -0
  312. data/lib/fog/cosmic/requests/compute/reboot_system_vm.rb +25 -0
  313. data/lib/fog/cosmic/requests/compute/reboot_virtual_machine.rb +35 -0
  314. data/lib/fog/cosmic/requests/compute/reconnect_host.rb +25 -0
  315. data/lib/fog/cosmic/requests/compute/recover_virtual_machine.rb +25 -0
  316. data/lib/fog/cosmic/requests/compute/register_iso.rb +28 -0
  317. data/lib/fog/cosmic/requests/compute/register_ssh_key_pair.rb +28 -0
  318. data/lib/fog/cosmic/requests/compute/register_template.rb +45 -0
  319. data/lib/fog/cosmic/requests/compute/register_user_keys.rb +25 -0
  320. data/lib/fog/cosmic/requests/compute/release_dedicated_cluster.rb +25 -0
  321. data/lib/fog/cosmic/requests/compute/release_dedicated_guest_vlan_range.rb +25 -0
  322. data/lib/fog/cosmic/requests/compute/release_dedicated_host.rb +25 -0
  323. data/lib/fog/cosmic/requests/compute/release_dedicated_pod.rb +25 -0
  324. data/lib/fog/cosmic/requests/compute/release_dedicated_zone.rb +25 -0
  325. data/lib/fog/cosmic/requests/compute/release_host_reservation.rb +25 -0
  326. data/lib/fog/cosmic/requests/compute/release_public_ip_range.rb +25 -0
  327. data/lib/fog/cosmic/requests/compute/remove_cert_from_load_balancer.rb +25 -0
  328. data/lib/fog/cosmic/requests/compute/remove_from_load_balancer_rule.rb +25 -0
  329. data/lib/fog/cosmic/requests/compute/remove_guest_os.rb +25 -0
  330. data/lib/fog/cosmic/requests/compute/remove_guest_os_mapping.rb +25 -0
  331. data/lib/fog/cosmic/requests/compute/remove_ip_from_nic.rb +25 -0
  332. data/lib/fog/cosmic/requests/compute/remove_nic_from_virtual_machine.rb +26 -0
  333. data/lib/fog/cosmic/requests/compute/remove_region.rb +25 -0
  334. data/lib/fog/cosmic/requests/compute/remove_resource_detail.rb +26 -0
  335. data/lib/fog/cosmic/requests/compute/remove_vpn_user.rb +25 -0
  336. data/lib/fog/cosmic/requests/compute/replace_network_acl_list.rb +25 -0
  337. data/lib/fog/cosmic/requests/compute/reset_api_limit.rb +24 -0
  338. data/lib/fog/cosmic/requests/compute/reset_password_for_virtual_machine.rb +25 -0
  339. data/lib/fog/cosmic/requests/compute/reset_ssh_key_for_virtual_machine.rb +28 -0
  340. data/lib/fog/cosmic/requests/compute/reset_vpn_connection.rb +25 -0
  341. data/lib/fog/cosmic/requests/compute/resize_volume.rb +25 -0
  342. data/lib/fog/cosmic/requests/compute/restart_network.rb +25 -0
  343. data/lib/fog/cosmic/requests/compute/restart_vpc.rb +25 -0
  344. data/lib/fog/cosmic/requests/compute/restore_virtual_machine.rb +25 -0
  345. data/lib/fog/cosmic/requests/compute/revert_snapshot.rb +25 -0
  346. data/lib/fog/cosmic/requests/compute/revert_to_vm_snapshot.rb +25 -0
  347. data/lib/fog/cosmic/requests/compute/scale_system_vm.rb +26 -0
  348. data/lib/fog/cosmic/requests/compute/scale_virtual_machine.rb +26 -0
  349. data/lib/fog/cosmic/requests/compute/start_router.rb +25 -0
  350. data/lib/fog/cosmic/requests/compute/start_system_vm.rb +25 -0
  351. data/lib/fog/cosmic/requests/compute/start_virtual_machine.rb +25 -0
  352. data/lib/fog/cosmic/requests/compute/stop_router.rb +25 -0
  353. data/lib/fog/cosmic/requests/compute/stop_system_vm.rb +25 -0
  354. data/lib/fog/cosmic/requests/compute/stop_virtual_machine.rb +25 -0
  355. data/lib/fog/cosmic/requests/compute/suspend_project.rb +25 -0
  356. data/lib/fog/cosmic/requests/compute/update_account.rb +25 -0
  357. data/lib/fog/cosmic/requests/compute/update_cluster.rb +25 -0
  358. data/lib/fog/cosmic/requests/compute/update_configuration.rb +25 -0
  359. data/lib/fog/cosmic/requests/compute/update_default_nic_for_virtual_machine.rb +26 -0
  360. data/lib/fog/cosmic/requests/compute/update_disk_offering.rb +25 -0
  361. data/lib/fog/cosmic/requests/compute/update_domain.rb +25 -0
  362. data/lib/fog/cosmic/requests/compute/update_egress_firewall_rule.rb +25 -0
  363. data/lib/fog/cosmic/requests/compute/update_firewall_rule.rb +25 -0
  364. data/lib/fog/cosmic/requests/compute/update_guest_os.rb +26 -0
  365. data/lib/fog/cosmic/requests/compute/update_guest_os_mapping.rb +26 -0
  366. data/lib/fog/cosmic/requests/compute/update_host.rb +25 -0
  367. data/lib/fog/cosmic/requests/compute/update_host_password.rb +26 -0
  368. data/lib/fog/cosmic/requests/compute/update_hypervisor_capabilities.rb +24 -0
  369. data/lib/fog/cosmic/requests/compute/update_instance_group.rb +25 -0
  370. data/lib/fog/cosmic/requests/compute/update_ip_address.rb +25 -0
  371. data/lib/fog/cosmic/requests/compute/update_iso.rb +25 -0
  372. data/lib/fog/cosmic/requests/compute/update_iso_permissions.rb +25 -0
  373. data/lib/fog/cosmic/requests/compute/update_lb_health_check_policy.rb +25 -0
  374. data/lib/fog/cosmic/requests/compute/update_lb_stickiness_policy.rb +25 -0
  375. data/lib/fog/cosmic/requests/compute/update_load_balancer_rule.rb +25 -0
  376. data/lib/fog/cosmic/requests/compute/update_network.rb +25 -0
  377. data/lib/fog/cosmic/requests/compute/update_network_acl_item.rb +25 -0
  378. data/lib/fog/cosmic/requests/compute/update_network_acl_list.rb +25 -0
  379. data/lib/fog/cosmic/requests/compute/update_network_offering.rb +24 -0
  380. data/lib/fog/cosmic/requests/compute/update_network_service_provider.rb +25 -0
  381. data/lib/fog/cosmic/requests/compute/update_physical_network.rb +25 -0
  382. data/lib/fog/cosmic/requests/compute/update_pod.rb +25 -0
  383. data/lib/fog/cosmic/requests/compute/update_port_forwarding_rule.rb +25 -0
  384. data/lib/fog/cosmic/requests/compute/update_project.rb +25 -0
  385. data/lib/fog/cosmic/requests/compute/update_project_invitation.rb +25 -0
  386. data/lib/fog/cosmic/requests/compute/update_region.rb +25 -0
  387. data/lib/fog/cosmic/requests/compute/update_remote_access_vpn.rb +25 -0
  388. data/lib/fog/cosmic/requests/compute/update_resource_count.rb +25 -0
  389. data/lib/fog/cosmic/requests/compute/update_resource_limit.rb +25 -0
  390. data/lib/fog/cosmic/requests/compute/update_service_offering.rb +25 -0
  391. data/lib/fog/cosmic/requests/compute/update_storage_network_ip_range.rb +25 -0
  392. data/lib/fog/cosmic/requests/compute/update_storage_pool.rb +25 -0
  393. data/lib/fog/cosmic/requests/compute/update_template.rb +25 -0
  394. data/lib/fog/cosmic/requests/compute/update_template_permissions.rb +25 -0
  395. data/lib/fog/cosmic/requests/compute/update_user.rb +25 -0
  396. data/lib/fog/cosmic/requests/compute/update_virtual_machine.rb +25 -0
  397. data/lib/fog/cosmic/requests/compute/update_vm_affinity_group.rb +25 -0
  398. data/lib/fog/cosmic/requests/compute/update_volume.rb +24 -0
  399. data/lib/fog/cosmic/requests/compute/update_vpc.rb +25 -0
  400. data/lib/fog/cosmic/requests/compute/update_vpcoffering.rb +25 -0
  401. data/lib/fog/cosmic/requests/compute/update_vpn_connection.rb +25 -0
  402. data/lib/fog/cosmic/requests/compute/update_vpn_customer_gateway.rb +30 -0
  403. data/lib/fog/cosmic/requests/compute/update_vpn_gateway.rb +25 -0
  404. data/lib/fog/cosmic/requests/compute/update_zone.rb +25 -0
  405. data/lib/fog/cosmic/requests/compute/upgrade_router_template.rb +24 -0
  406. data/lib/fog/cosmic/requests/compute/upload_custom_certificate.rb +26 -0
  407. data/lib/fog/cosmic/requests/compute/upload_ssl_cert.rb +26 -0
  408. data/lib/fog/cosmic/requests/compute/upload_volume.rb +30 -0
  409. data/lib/fog/cosmic/version.rb +5 -0
  410. data/tests/compute/models/disk_offering_tests.rb +7 -0
  411. data/tests/compute/models/egress_firewall_rule_tests.rb +9 -0
  412. data/tests/compute/models/public_ip_address_tests.rb +42 -0
  413. data/tests/compute/models/public_ip_addresses_tests.rb +3 -0
  414. data/tests/compute/models/server_tests.rb +20 -0
  415. data/tests/compute/models/snapshot_tests.rb +17 -0
  416. data/tests/compute/models/volume_tests.rb +46 -0
  417. data/tests/compute/models/volumes_tests.rb +14 -0
  418. data/tests/helper.rb +5 -0
  419. data/tests/helpers/collection_helper.rb +91 -0
  420. data/tests/helpers/formats_helper.rb +98 -0
  421. data/tests/helpers/mock_helper.rb +20 -0
  422. data/tests/helpers/model_helper.rb +31 -0
  423. data/tests/helpers/responds_to_helper.rb +11 -0
  424. data/tests/helpers/succeeds_helper.rb +9 -0
  425. data/tests/requests/disk_offering_tests.rb +29 -0
  426. data/tests/requests/egress_firewall_rule_tests.rb +25 -0
  427. data/tests/requests/firewall_rule_tests.rb +29 -0
  428. data/tests/requests/network_offering_tests.rb +32 -0
  429. data/tests/requests/os_type_tests.rb +37 -0
  430. data/tests/requests/port_forwarding_rule_tests.rb +33 -0
  431. data/tests/requests/public_ip_address_tests.rb +38 -0
  432. data/tests/requests/service_offering_tests.rb +31 -0
  433. data/tests/requests/snapshot_tests.rb +32 -0
  434. data/tests/requests/ssh_key_pair_tests.rb +23 -0
  435. data/tests/requests/template_tests.rb +52 -0
  436. data/tests/requests/virtual_machine_tests.rb +66 -0
  437. data/tests/requests/volume_tests.rb +47 -0
  438. data/tests/requests/zone_tests.rb +32 -0
  439. data/tests/signed_params_tests.rb +12 -0
  440. metadata +583 -0
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists resource limits.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listResourceLimits.html]
9
+ def list_resource_limits(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listResourceLimits')
14
+ else
15
+ options.merge!('command' => 'listResourceLimits')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List routers.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listRouters.html]
9
+ def list_routers(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listRouters')
14
+ else
15
+ options.merge!('command' => 'listRouters')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists secondary staging stores.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listSecondaryStagingStores.html]
9
+ def list_secondary_staging_stores(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listSecondaryStagingStores')
14
+ else
15
+ options.merge!('command' => 'listSecondaryStagingStores')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,44 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists all available service offerings.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listServiceOfferings.html]
9
+ def list_service_offerings(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listServiceOfferings')
14
+ else
15
+ options.merge!('command' => 'listServiceOfferings')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ class Mock
22
+
23
+ def list_service_offerings(options={})
24
+ id = options['id']
25
+ if id && self.data[:flavors][id].nil?
26
+ # received 'id' filter for element that does not exist
27
+ response = { "listserviceofferingsresponse" => { "count" => 0, "serviceoffering" => []}}
28
+ elsif self.data[:flavors][id]
29
+ # received 'id' filter for a specific element
30
+ flavors = { id => self.data[:flavors][id] }
31
+ response = { "listserviceofferingsresponse" => { "count" => flavors.size, "serviceoffering"=> flavors.values}}
32
+ else
33
+ # no filter specified
34
+ flavors = self.data[:flavors]
35
+ response = { "listserviceofferingsresponse" => { "count" => flavors.size, "serviceoffering"=> flavors.values}}
36
+ end
37
+
38
+ return response
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+
@@ -0,0 +1,43 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists all available snapshots for the account.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listSnapshots.html]
9
+ def list_snapshots(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listSnapshots')
14
+ else
15
+ options.merge!('command' => 'listSnapshots')
16
+ end
17
+ # add project id if we have one
18
+ @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil
19
+ request(options)
20
+ end
21
+ end
22
+
23
+ class Mock
24
+ def list_snapshots(options={})
25
+ snapshot_id = options.delete('id')
26
+ if snapshot_id
27
+ snapshots = [self.data[:snapshots][snapshot_id]]
28
+ else
29
+ snapshots = self.data[:snapshots].values
30
+ end
31
+
32
+ {
33
+ 'listsnapshotsresponse' => {
34
+ 'count' => snapshots.size,
35
+ 'snapshot' => snapshots
36
+ }
37
+ }
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+
@@ -0,0 +1,26 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List registered keypairs
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listSSHKeyPairs.html]
9
+ def list_ssh_key_pairs(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listSSHKeyPairs')
14
+ else
15
+ options.merge!('command' => 'listSSHKeyPairs')
16
+ end
17
+ # add project id if we have one
18
+ @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil
19
+ request(options)
20
+ end
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists SSL certificates
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listSslCerts.html]
9
+ def list_ssl_certs(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listSslCerts')
14
+ else
15
+ options.merge!('command' => 'listSslCerts')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists all static routes
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listStaticRoutes.html]
9
+ def list_static_routes(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listStaticRoutes')
14
+ else
15
+ options.merge!('command' => 'listStaticRoutes')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List a storage network IP range.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listStorageNetworkIpRange.html]
9
+ def list_storage_network_ip_range(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listStorageNetworkIpRange')
14
+ else
15
+ options.merge!('command' => 'listStorageNetworkIpRange')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists storage pools.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listStoragePools.html]
9
+ def list_storage_pools(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listStoragePools')
14
+ else
15
+ options.merge!('command' => 'listStoragePools')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,25 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists storage providers.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listStorageProviders.html]
9
+ def list_storage_providers(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listStorageProviders')
14
+ else
15
+ options.merge!('command' => 'listStorageProviders',
16
+ 'type' => args[0])
17
+ end
18
+ request(options)
19
+ end
20
+ end
21
+
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # Lists all network services provided by Cosmic or for the given provider.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listSupportedNetworkServices.html]
9
+ def list_supported_network_services(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listSupportedNetworkServices')
14
+ else
15
+ options.merge!('command' => 'listSupportedNetworkServices')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List system virtual machines.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listSystemVms.html]
9
+ def list_system_vms(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listSystemVms')
14
+ else
15
+ options.merge!('command' => 'listSystemVms')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List resource tag(s)
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listTags.html]
9
+ def list_tags(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listTags')
14
+ else
15
+ options.merge!('command' => 'listTags')
16
+ end
17
+ request(options)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,25 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List template visibility and all accounts that have permissions to view this template.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listTemplatePermissions.html]
9
+ def list_template_permissions(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listTemplatePermissions')
14
+ else
15
+ options.merge!('command' => 'listTemplatePermissions',
16
+ 'id' => args[0])
17
+ end
18
+ request(options)
19
+ end
20
+ end
21
+
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,42 @@
1
+ module Fog
2
+ module Cosmic
3
+ class Compute
4
+
5
+ class Real
6
+ # List all public, private, and privileged templates.
7
+ #
8
+ # {Cosmic API Reference}[https://apidoc.mcc.schubergphilis.com/root_admin/listTemplates.html]
9
+ def list_templates(*args)
10
+ options = {}
11
+ if args[0].is_a? Hash
12
+ options = args[0]
13
+ options.merge!('command' => 'listTemplates')
14
+ else
15
+ options.merge!('command' => 'listTemplates',
16
+ 'templatefilter' => args[0])
17
+ end
18
+
19
+ # add project id if we have one
20
+ @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil
21
+
22
+ request(options)
23
+ end
24
+ end
25
+
26
+ class Mock
27
+ def list_templates(options={})
28
+ templates = self.data[:images].values
29
+
30
+ {
31
+ "listtemplatesresponse" =>
32
+ {
33
+ "count" => templates.size,
34
+ "template"=> templates
35
+ }
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+