diff --git a/Rakefile b/Rakefile index f426cf43a..627ba2a9c 100644 --- a/Rakefile +++ b/Rakefile @@ -73,9 +73,6 @@ namespace :test do task :openvz do sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/openvz") end - task :cloudstack do - sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/cloudstack") - end task :vcloud_director do sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/vcloud_director") end diff --git a/fog.gemspec b/fog.gemspec index 7300cdcc4..d574cde96 100644 --- a/fog.gemspec +++ b/fog.gemspec @@ -59,6 +59,7 @@ Gem::Specification.new do |s| s.add_dependency("fog-aws", ">= 0.6.0") s.add_dependency("fog-brightbox", "~> 0.4") s.add_dependency("fog-cloudatcost", "~> 0.4") + s.add_dependency("fog-cloudstack", "~> 0.1.0") s.add_dependency("fog-digitalocean", ">= 0.3.0") s.add_dependency("fog-dnsimple", "~> 2.1") s.add_dependency("fog-dynect", "~> 0.0.2") diff --git a/lib/fog.rb b/lib/fog.rb index cbeba8ff1..ecd2a6c76 100644 --- a/lib/fog.rb +++ b/lib/fog.rb @@ -22,8 +22,8 @@ require 'fog/core/deprecated_connection_accessors' require 'fog/atmos' require 'fog/aws' require 'fog/brightbox' -require 'fog/cloudstack' require 'fog/clodo' +require 'fog/cloudstack' require 'fog/digitalocean' require 'fog/dnsimple' require 'fog/dnsmadeeasy' diff --git a/lib/fog/bin.rb b/lib/fog/bin.rb index 3b7d9f236..8dee4369b 100644 --- a/lib/fog/bin.rb +++ b/lib/fog/bin.rb @@ -54,8 +54,8 @@ end require 'fog/bin/atmos' require 'fog/bin/aws' require 'fog/bin/brightbox' -require 'fog/bin/cloudstack' require 'fog/bin/clodo' +require 'fog/bin/cloudstack' require 'fog/bin/digitalocean' require 'fog/bin/dnsimple' require 'fog/bin/dnsmadeeasy' diff --git a/lib/fog/bin/cloudstack.rb b/lib/fog/bin/cloudstack.rb deleted file mode 100644 index 0dc3ee481..000000000 --- a/lib/fog/bin/cloudstack.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Cloudstack < Fog::Bin - class << self - def class_for(key) - case key - when :compute - Fog::Compute::Cloudstack - else - raise ArgumentError, "Unrecognized service: #{key}" - end - end - - def [](service) - @@connections ||= Hash.new do |hash, key| - hash[key] = case key - when :compute - Fog::Compute.new(:provider => 'Cloudstack') - else - raise ArgumentError, "Unrecognized service: #{key.inspect}" - end - end - @@connections[service] - end - - def services - Fog::Cloudstack.services - end - end -end diff --git a/lib/fog/cloudstack.rb b/lib/fog/cloudstack.rb deleted file mode 100644 index 2489de8e3..000000000 --- a/lib/fog/cloudstack.rb +++ /dev/null @@ -1 +0,0 @@ -require 'fog/cloudstack/compute' diff --git a/lib/fog/cloudstack/compute.rb b/lib/fog/cloudstack/compute.rb deleted file mode 100644 index c79aa3750..000000000 --- a/lib/fog/cloudstack/compute.rb +++ /dev/null @@ -1,996 +0,0 @@ -require 'fog/cloudstack/core' -require 'digest/md5' - -module Fog - module Compute - class Cloudstack < Fog::Service - - class BadRequest < Fog::Compute::Cloudstack::Error; end - class Unauthorized < Fog::Compute::Cloudstack::Error; end - - requires :cloudstack_host - - recognizes :cloudstack_api_key, :cloudstack_secret_access_key, :cloudstack_session_key, :cloudstack_session_id, - :cloudstack_port, :cloudstack_path, :cloudstack_scheme, :cloudstack_persistent, :cloudstack_project_id - - model_path 'fog/cloudstack/models/compute' - request_path 'fog/cloudstack/requests/compute' - - model :address - model :disk_offering - collection :disk_offerings - model :egress_firewall_rule - collection :egress_firewall_rules - model :firewall_rule - collection :firewall_rules - model :flavor - collection :flavors - model :image - collection :images - model :job - collection :jobs - model :network - collection :networks - model :network_offering - collection :network_offerings - model :public_ip_address - collection :public_ip_addresses - model :port_forwarding_rule - collection :port_forwarding_rules - model :project - collection :projects - model :security_group - collection :security_groups - model :security_group_rule - collection :security_group_rules - model :server - collection :servers - model :volume - collection :volumes - model :snapshot - collection :snapshots - model :zone - collection :zones - - request :activate_project - request :add_account_to_project - request :add_baremetal_dhcp - request :add_baremetal_host - request :add_baremetal_pxe_kick_start_server - request :add_baremetal_pxe_ping_server - request :add_big_switch_vns_device - request :add_cisco_asa1000v_resource - request :add_cisco_vnmc_resource - request :add_cluster - request :add_external_firewall - request :add_external_load_balancer - request :add_f5_load_balancer - request :add_guest_os - request :add_guest_os_mapping - request :add_host - request :add_image_store - request :add_ip_to_nic - request :add_ldap_configuration - request :add_netscaler_load_balancer - request :add_network_device - request :add_network_service_provider - request :add_nic_to_virtual_machine - request :add_nicira_nvp_device - request :add_open_daylight_controller - request :add_palo_alto_firewall - request :add_region - request :add_resource_detail - request :add_s3 - request :add_secondary_storage - request :add_srx_firewall - request :add_stratosphere_ssp - request :add_swift - request :add_traffic_monitor - request :add_traffic_type - request :add_ucs_manager - request :add_vmware_dc - request :add_vpn_user - request :archive_alerts - request :archive_events - request :assign_cert_to_load_balancer - request :assign_to_global_load_balancer_rule - request :assign_to_load_balancer_rule - request :assign_virtual_machine - request :associate_ip_address - request :associate_ucs_profile_to_blade - request :attach_iso - request :attach_volume - request :authorize_security_group_egress - request :authorize_security_group_ingress - request :cancel_host_maintenance - request :cancel_storage_maintenance - request :change_service_for_router - request :change_service_for_system_vm - request :change_service_for_virtual_machine - request :clean_vmreservations - request :configure_f5_load_balancer - request :configure_internal_load_balancer_element - request :configure_netscaler_load_balancer - request :configure_ovs_element - request :configure_palo_alto_firewall - request :configure_srx_firewall - request :configure_virtual_router_element - request :copy_iso - request :copy_template - request :create_account - request :create_affinity_group - request :create_auto_scale_policy - request :create_auto_scale_vm_group - request :create_auto_scale_vm_profile - request :create_condition - request :create_counter - request :create_disk_offering - request :create_domain - request :create_egress_firewall_rule - request :create_firewall_rule - request :create_global_load_balancer_rule - request :create_instance_group - request :create_internal_load_balancer_element - request :create_ip_forwarding_rule - request :create_lb_health_check_policy - request :create_lb_stickiness_policy - request :create_load_balancer - request :create_load_balancer_rule - request :create_network - request :create_network_acl - request :create_network_acl_list - request :create_network_offering - request :create_physical_network - request :create_pod - request :create_port_forwarding_rule - request :create_portable_ip_range - request :create_private_gateway - request :create_project - request :create_remote_access_vpn - request :create_secondary_staging_store - request :create_security_group - request :create_service_instance - request :create_service_offering - request :create_snapshot - request :create_snapshot_policy - request :create_ssh_key_pair - request :create_static_route - request :create_storage_network_ip_range - request :create_storage_pool - request :create_tags - request :create_template - request :create_user - request :create_virtual_router_element - request :create_vlan_ip_range - request :create_vm_snapshot - request :create_volume - request :create_vpc - request :create_vpcoffering - request :create_vpn_connection - request :create_vpn_customer_gateway - request :create_vpn_gateway - request :create_zone - request :dedicate_cluster - request :dedicate_guest_vlan_range - request :dedicate_host - request :dedicate_pod - request :dedicate_public_ip_range - request :dedicate_zone - request :delete_account - request :delete_account_from_project - request :delete_affinity_group - request :delete_alerts - request :delete_auto_scale_policy - request :delete_auto_scale_vm_group - request :delete_auto_scale_vm_profile - request :delete_big_switch_vns_device - request :delete_cisco_asa1000v_resource - request :delete_cisco_nexus_vsm - request :delete_cisco_vnmc_resource - request :delete_cluster - request :delete_condition - request :delete_counter - request :delete_disk_offering - request :delete_domain - request :delete_egress_firewall_rule - request :delete_events - request :delete_external_firewall - request :delete_external_load_balancer - request :delete_f5_load_balancer - request :delete_firewall_rule - request :delete_global_load_balancer_rule - request :delete_host - request :delete_image_store - request :delete_instance_group - request :delete_ip_forwarding_rule - request :delete_iso - request :delete_lb_health_check_policy - request :delete_lb_stickiness_policy - request :delete_ldap_configuration - request :delete_load_balancer - request :delete_load_balancer_rule - request :delete_netscaler_load_balancer - request :delete_network - request :delete_network_acl - request :delete_network_acl_list - request :delete_network_device - request :delete_network_offering - request :delete_network_service_provider - request :delete_nicira_nvp_device - request :delete_open_daylight_controller - request :delete_palo_alto_firewall - request :delete_physical_network - request :delete_pod - request :delete_port_forwarding_rule - request :delete_portable_ip_range - request :delete_private_gateway - request :delete_project - request :delete_project_invitation - request :delete_remote_access_vpn - request :delete_secondary_staging_store - request :delete_security_group - request :delete_service_offering - request :delete_snapshot - request :delete_snapshot_policies - request :delete_srx_firewall - request :delete_ssh_key_pair - request :delete_ssl_cert - request :delete_static_route - request :delete_storage_network_ip_range - request :delete_storage_pool - request :delete_tags - request :delete_template - request :delete_traffic_monitor - request :delete_traffic_type - request :delete_user - request :delete_vlan_ip_range - request :delete_vm_snapshot - request :delete_volume - request :delete_vpc - request :delete_vpcoffering - request :delete_vpn_connection - request :delete_vpn_customer_gateway - request :delete_vpn_gateway - request :delete_zone - request :deploy_virtual_machine - request :destroy_router - request :destroy_system_vm - request :destroy_virtual_machine - request :detach_iso - request :detach_volume - request :disable_account - request :disable_auto_scale_vm_group - request :disable_cisco_nexus_vsm - request :disable_static_nat - request :disable_user - request :disassociate_ip_address - request :enable_account - request :enable_auto_scale_vm_group - request :enable_cisco_nexus_vsm - request :enable_static_nat - request :enable_storage_maintenance - request :enable_user - request :expunge_virtual_machine - request :extract_iso - request :extract_template - request :extract_volume - request :find_hosts_for_migration - request :find_storage_pools_for_migration - request :generate_alert - request :generate_usage_records - request :get_api_limit - request :get_cloud_identifier - request :get_user - request :get_virtual_machine_user_data - request :get_vm_password - request :import_ldap_users - request :ldap_create_account - request :list_accounts - request :list_affinity_group_types - request :list_affinity_groups - request :list_alerts - request :list_apis - request :list_async_jobs - request :list_auto_scale_policies - request :list_auto_scale_vm_groups - request :list_auto_scale_vm_profiles - request :list_baremetal_dhcp - request :list_baremetal_pxe_servers - request :list_big_switch_vns_devices - request :list_capabilities - request :list_capacity - request :list_cisco_asa1000v_resources - request :list_cisco_nexus_vsms - request :list_cisco_vnmc_resources - request :list_clusters - request :list_conditions - request :list_configurations - request :list_counters - request :list_dedicated_clusters - request :list_dedicated_guest_vlan_ranges - request :list_dedicated_hosts - request :list_dedicated_pods - request :list_dedicated_zones - request :list_deployment_planners - request :list_disk_offerings - request :list_domain_children - request :list_domains - request :list_egress_firewall_rules - request :list_event_types - request :list_events - request :list_external_firewalls - request :list_external_load_balancers - request :list_f5_load_balancer_networks - request :list_f5_load_balancers - request :list_firewall_rules - request :list_global_load_balancer_rules - request :list_guest_os_mapping - request :list_hosts - request :list_hypervisor_capabilities - request :list_hypervisors - request :list_image_stores - request :list_instance_groups - request :list_internal_load_balancer_elements - request :list_internal_load_balancer_vms - request :list_ip_forwarding_rules - request :list_iso_permissions - request :list_isos - request :list_lb_health_check_policies - request :list_lb_stickiness_policies - request :list_ldap_configurations - request :list_ldap_users - request :list_load_balancer_rule_instances - request :list_load_balancer_rules - request :list_load_balancers - request :list_netscaler_load_balancer_networks - request :list_netscaler_load_balancers - request :list_network_acl_lists - request :list_network_acls - request :list_network_device - request :list_network_isolation_methods - request :list_network_offerings - request :list_network_service_providers - request :list_networks - request :list_nicira_nvp_device_networks - request :list_nicira_nvp_devices - request :list_nics - request :list_open_daylight_controllers - request :list_os_categories - request :list_os_types - request :list_ovs_elements - request :list_palo_alto_firewall_networks - request :list_palo_alto_firewalls - request :list_physical_networks - request :list_pods - request :list_port_forwarding_rules - request :list_portable_ip_ranges - request :list_private_gateways - request :list_project_accounts - request :list_project_invitations - request :list_projects - request :list_public_ip_addresses - request :list_regions - request :list_remote_access_vpns - request :list_resource_details - request :list_resource_limits - request :list_routers - request :list_s3s - request :list_secondary_staging_stores - request :list_security_groups - request :list_service_offerings - request :list_snapshot_policies - request :list_snapshots - request :list_srx_firewall_networks - request :list_srx_firewalls - request :list_ssh_key_pairs - request :list_ssl_certs - request :list_static_routes - request :list_storage_network_ip_range - request :list_storage_pools - request :list_storage_providers - request :list_supported_network_services - request :list_swifts - request :list_system_vms - request :list_tags - request :list_template_permissions - request :list_templates - request :list_traffic_monitors - request :list_traffic_type_implementors - request :list_traffic_types - request :list_ucs_blades - request :list_ucs_managers - request :list_ucs_profiles - request :list_usage_records - request :list_usage_types - request :list_users - request :list_virtual_machines - request :list_virtual_router_elements - request :list_vlan_ip_ranges - request :list_vm_snapshot - request :list_vmware_dcs - request :list_volumes - request :list_vpc_offerings - request :list_vpcs - request :list_vpn_connections - request :list_vpn_customer_gateways - request :list_vpn_gateways - request :list_vpn_users - request :list_zones - request :lock_account - request :lock_user - request :mark_default_zone_for_account - request :migrate_system_vm - request :migrate_virtual_machine - request :migrate_virtual_machine_with_volume - request :migrate_volume - request :prepare_host_for_maintenance - request :prepare_template - request :query_async_job_result - request :reboot_router - request :reboot_system_vm - request :reboot_virtual_machine - request :reconnect_host - request :recover_virtual_machine - request :register_iso - request :register_ssh_key_pair - request :register_template - request :register_user_keys - request :release_dedicated_cluster - request :release_dedicated_guest_vlan_range - request :release_dedicated_host - request :release_dedicated_pod - request :release_dedicated_zone - request :release_host_reservation - request :release_public_ip_range - request :remove_cert_from_load_balancer - request :remove_from_global_load_balancer_rule - request :remove_from_load_balancer_rule - request :remove_guest_os - request :remove_guest_os_mapping - request :remove_ip_from_nic - request :remove_nic_from_virtual_machine - request :remove_region - request :remove_resource_detail - request :remove_vmware_dc - request :remove_vpn_user - request :replace_network_acl_list - request :reset_api_limit - request :reset_password_for_virtual_machine - request :reset_ssh_key_for_virtual_machine - request :reset_vpn_connection - request :resize_volume - request :restart_network - request :restart_vpc - request :restore_virtual_machine - request :revert_snapshot - request :revert_to_vm_snapshot - request :revoke_security_group_egress - request :revoke_security_group_ingress - request :scale_system_vm - request :scale_virtual_machine - request :start_internal_load_balancer_vm - request :start_router - request :start_system_vm - request :start_virtual_machine - request :stop_internal_load_balancer_vm - request :stop_router - request :stop_system_vm - request :stop_virtual_machine - request :suspend_project - request :update_account - request :update_auto_scale_policy - request :update_auto_scale_vm_group - request :update_auto_scale_vm_profile - request :update_cloud_to_use_object_store - request :update_cluster - request :update_configuration - request :update_default_nic_for_virtual_machine - request :update_disk_offering - request :update_domain - request :update_egress_firewall_rule - request :update_firewall_rule - request :update_global_load_balancer_rule - request :update_guest_os - request :update_guest_os_mapping - request :update_host - request :update_host_password - request :update_hypervisor_capabilities - request :update_instance_group - request :update_ip_address - request :update_iso - request :update_iso_permissions - request :update_lb_health_check_policy - request :update_lb_stickiness_policy - request :update_load_balancer - request :update_load_balancer_rule - request :update_network - request :update_network_acl_item - request :update_network_acl_list - request :update_network_offering - request :update_network_service_provider - request :update_physical_network - request :update_pod - request :update_port_forwarding_rule - request :update_project - request :update_project_invitation - request :update_region - request :update_remote_access_vpn - request :update_resource_count - request :update_resource_limit - request :update_service_offering - request :update_storage_network_ip_range - request :update_storage_pool - request :update_template - request :update_template_permissions - request :update_traffic_type - request :update_user - request :update_virtual_machine - request :update_vm_affinity_group - request :update_volume - request :update_vpc - request :update_vpcoffering - request :update_vpn_connection - request :update_vpn_customer_gateway - request :update_vpn_gateway - request :update_zone - request :upgrade_router_template - request :upload_custom_certificate - request :upload_ssl_cert - request :upload_volume - - - class Real - - def initialize(options={}) - @cloudstack_api_key = options[:cloudstack_api_key] - @cloudstack_secret_access_key = options[:cloudstack_secret_access_key] - @cloudstack_session_id = options[:cloudstack_session_id] - @cloudstack_session_key = options[:cloudstack_session_key] - @cloudstack_project_id = options[:cloudstack_project_id] - @host = options[:cloudstack_host] - @path = options[:cloudstack_path] || '/client/api' - @port = options[:cloudstack_port] || 443 - @scheme = options[:cloudstack_scheme] || 'https' - @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", options[:cloudstack_persistent], {:ssl_verify_peer => false}) - end - - def reload - @connection.reset - end - - def login(username,password,domain) - response = issue_request({ - 'response' => 'json', - 'command' => 'login', - 'username' => username, - 'password' => Digest::MD5.hexdigest(password), - 'domain' => domain - }) - - # Parse response cookies to retrive JSESSIONID token - cookies = CGI::Cookie.parse(response.headers['Set-Cookie']) - sessionid = cookies['JSESSIONID'].first - - # Decode the login response - response = Fog::JSON.decode(response.body) - - user = response['loginresponse'] - user.merge!('sessionid' => sessionid) - - @cloudstack_session_id = user['sessionid'] - @cloudstack_session_key = user['sessionkey'] - - user - end - - def request(params) - params.reject!{|k,v| v.nil?} - - params.merge!('response' => 'json') - - if has_session? - params, headers = authorize_session(params) - elsif has_keys? - params, headers = authorize_api_keys(params) - end - - response = issue_request(params,headers) - response = Fog::JSON.decode(response.body) unless response.body.empty? - response - end - - private - def has_session? - @cloudstack_session_id && @cloudstack_session_key - end - - def has_keys? - @cloudstack_api_key && @cloudstack_secret_access_key - end - - def authorize_session(params) - # set the session id cookie for the request - headers = {'Cookie' => "JSESSIONID=#{@cloudstack_session_id};"} - # set the sesion key for the request, params are not signed using session auth - params.merge!('sessionkey' => @cloudstack_session_key) - - return params, headers - end - - def authorize_api_keys(params) - headers = {} - # merge the api key into the params - params.merge!('apiKey' => @cloudstack_api_key) - # sign the request parameters - signature = Fog::Cloudstack.signed_params(@cloudstack_secret_access_key,params) - # merge signature into request param - params.merge!({'signature' => signature}) - - return params, headers - end - - def issue_request(params={},headers={},method='GET',expects=200) - begin - @connection.request({ - :query => params, - :headers => headers, - :method => method, - :expects => expects - }) - - rescue Excon::Errors::HTTPStatusError => error - error_response = Fog::JSON.decode(error.response.body) - - error_code = error_response.values.first['errorcode'] - error_text = error_response.values.first['errortext'] - - case error_code - when 401 - raise Fog::Compute::Cloudstack::Unauthorized, error_text - when 431 - raise Fog::Compute::Cloudstack::BadRequest, error_text - else - raise Fog::Compute::Cloudstack::Error, error_text - end - end - - end - end # Real - - class Mock - def initialize(options={}) - @cloudstack_api_key = options[:cloudstack_api_key] - @cloudstack_project_id = Fog.credentials[:cloudstack_project_id] || Fog::Cloudstack.uuid - end - - def self.data - @data ||= begin - zone_id = Fog.credentials[:cloudstack_zone_id] || Fog::Cloudstack.uuid - image_id = Fog.credentials[:cloudstack_template_id] || Fog::Cloudstack.uuid - flavor_id = Fog.credentials[:cloudstack_service_offering_id] || Fog::Cloudstack.uuid - network_id = (Array(Fog.credentials[:cloudstack_network_ids]) || [Fog::Cloudstack.uuid]).first - domain_name = "exampleorg" - account_id, user_id, domain_id = Fog::Cloudstack.uuid, Fog::Cloudstack.uuid, Fog::Cloudstack.uuid - domain = { - "id" => domain_id, - "name" => domain_name, - "level" => 1, - "parentdomainid" => Fog::Cloudstack.uuid, - "parentdomainname" => "ROOT", - "haschild" => false, - "path" => "ROOT/accountname" - } - user = { - "id" => user_id, - "username" => "username", - "firstname" => "Bob", - "lastname" => "Lastname", - "email" => "email@example.com", - "created" => "2012-05-14T16:25:17-0500", - "state" => "enabled", - "account" => "accountname", - "accounttype" => 2, - "domainid" => domain_id, - "domain" => domain_name, - "apikey" => Fog::Cloudstack.uuid, - "secretkey" => Fog::Cloudstack.uuid - } - { - :users => { user_id => user }, - :networks => { network_id => { - "id" => network_id, - "name" => "10.56.23.0/26", - "displaytext" => "10.56.23.0/26", - "broadcastdomaintype" => "Vlan", - "traffictype" => "Guest", - "gateway" => "10.56.23.1", - "netmask" => "255.255.255.192", - "cidr" => "10.56.23.0/26", - "zoneid" => zone_id, - "zonename" => "zone-00", - "networkofferingid" => "af0c9bd5-a1b2-4ad0-bf4b-d6fa9b1b9d5b", - "networkofferingname" => "DefaultSharedNetworkOffering", - "networkofferingdisplaytext" => "Offering for Shared networks", - "networkofferingavailability" => "Optional", - "issystem" => false, - "state" => "Setup", - "related" => "86bbc9fc-d92e-49db-9fdc-296189090017", - "broadcasturi" => "vlan://800", - "dns1" => "10.0.80.11", - "type" => "Shared", - "vlan" => "800", - "acltype" => "Domain", - "subdomainaccess" => true, - "domainid" => domain_id, - "domain" => "ROOT", - "service" => [ - {"name" => "UserData"}, - {"name" => "Dhcp"}, - { - "name" => "Dns", - "capability" => [ - { - "name" => "AllowDnsSuffixModification", - "value" => "true", - "canchooseservicecapability" => false - } - ] - }], - "networkdomain" => "cs1cloud.internal", - "physicalnetworkid" => "8f4627c5-1fdd-4504-8a92-f61b4e9cb3e3", - "restartrequired" => false, - "specifyipranges" => true} - }, - :public_ip_addresses => { "0e276270-7950-4483-bf21-3dc897dbe08a" => { - "id" => "0e276270-7950-4483-bf21-3dc897dbe08a", - "ipaddress" => "192.168.200.2", - "allocated" => "2014-11-26T22:32:39+0000", - "zoneid" => "0e276270-7950-4483-bf21-3dc897dbe08a", - "zonename" => "Toronto", - "issourcenat" => false, - "projectid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "project" => "TestProject", - "domainid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "domain" => "TestDomain", - "forvirtualnetwork" => true, - "isstaticnat" => false, - "issystem" => false, - "associatednetworkid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "associatednetworkname" => "TestNetwork", - "networkid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "state" => "Allocated", - "physicalnetworkid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "tags" => [] - }}, - :zones => { zone_id => { - "id" => zone_id, - "name" => "zone-00", - "domainid" => 1, - "domainname" => "ROOT", - "networktype" => "Advanced", - "securitygroupsenabled" => false, - "allocationstate" => "Enabled", - "zonetoken" => Fog::Cloudstack.uuid, - "dhcpprovider" => "VirtualRouter"}}, - :images => { image_id => { - "id" => image_id, - "name" => "CentOS 5.6(64-bit) no GUI (XenServer)", - "displaytext" => "CentOS 5.6(64-bit) no GUI (XenServer)", - "ispublic" => true, - "created" => "2012-05-09T15:29:33-0500", - "isready" => true, - "passwordenabled" => false, - "format" => "VHD", - "isfeatured" => true, - "crossZones" => true, - "ostypeid" => "a6a6694a-18f5-4765-8418-2b7a5f37cd0f", - "ostypename" => "CentOS 5.3 (64-bit)", - "account" => "system", - "zoneid" => zone_id, - "zonename" => "zone-00", - "status" => "Download Complete", - "size" => 21474836480, - "templatetype" => "BUILTIN", - "domain" => "ROOT", - "domainid" => "6023b6fe-5bef-4358-bc76-9f4e75afa52f", - "isextractable" => true, - "checksum" => "905cec879afd9c9d22ecc8036131a180", - "hypervisor" => "Xen" - }}, - :flavors => { flavor_id => { - "id" => flavor_id, - "name" => "Medium Instance", - "displaytext" => "Medium Instance", - "cpunumber" => 1, - "cpuspeed" => 1000, - "memory" => 1024, - "created" => "2012-05-09T14:48:36-0500", - "storagetype" => "shared", - "offerha" => false, - "limitcpuuse" => false, - "issystem" => false, - "defaultuse" => false - }}, - :accounts => { account_id => { - "id" => account_id, - "name" => "accountname", - "accounttype" => 2, - "domainid" => domain_id, - "domain" => domain_name, - "receivedbytes" => 0, - "sentbytes" => 0, - "vmlimit" => "Unlimited", - "vmtotal" => 0, - "vmavailable" => "Unlimited", - "iplimit" => "Unlimited", - "iptotal" => 0, - "ipavailable" => "Unlimited", - "volumelimit" => "Unlimited", - "volumetotal" => 0, - "volumeavailable" => "Unlimited", - "snapshotlimit" => "Unlimited", - "snapshottotal" => 0, - "snapshotavailable" => "Unlimited", - "templatelimit" => "Unlimited", - "templatetotal" => 0, - "templateavailable" => "Unlimited", - "vmstopped" => 0, - "vmrunning" => 0, - "projectlimit" => "Unlimited", - "projecttotal" => 1, - "projectavailable" => "Unlimited", - "networklimit" => "Unlimited", - "networktotal" => 0, - "networkavailable" => "Unlimited", - "state" => "enabled", - "user" => [user]} - }, - :domains => {domain_id => domain}, - :servers => {}, - :jobs => {}, - :volumes => { - "89198f7c-0245-aa1d-136a-c5f479ef9db7" => { - "id"=> "89198f7c-0245-aa1d-136a-c5f479ef9db7", - "name"=>"test volume", - "zoneid"=> zone_id, - "zonename"=>"zone-00", - "type"=>"DATADISK", - "deviceid"=>1, - "virtualmachineid"=> "51dcffee-5f9f-29a4-acee-2717e1a3656b", - "vmname"=>"i-2824-11621-VM", - "vmdisplayname"=>"test vm", - "vmstate"=>"Running", - "size"=>17179869184, - "created"=>"2013-04-16T12:33:41+0000", - "state"=>"Ready", - "account"=> 'accountname', - "domainid"=> domain_id, - "domain"=> domain_name, - "storagetype"=>"shared", - "hypervisor"=>"KVM", - "diskofferingid"=> "cc4de87d-672d-4353-abb5-6a8a4c0abf59", - "diskofferingname"=>"Small Disk", - "diskofferingdisplaytext"=>"Small Disk [16GB Disk]", - "storage"=>"ps1", - "attached"=>"2013-04-16T12:34:07+0000", - "destroyed"=>false, - "isextractable"=>false - }, - }, - :security_groups => {}, - :snapshots => {}, - :disk_offerings => { - "cc4de87d-672d-4353-abb5-6a8a4c0abf59" => { - "id" => "cc4de87d-672d-4353-abb5-6a8a4c0abf59", - "domainid" => domain_id, - "domain" => domain_name, - "name" => "Small Disk", - "displaytext" => "Small Disk [16GB Disk]", - "disksize" => 16, - "created" => "2013-02-21T03:12:520300", - "iscustomized" => false, - "storagetype" => "shared" - }, - "d5deeb0c-de03-4ebf-820a-dc74221bcaeb" => { - "id" => "d5deeb0c-de03-4ebf-820a-dc74221bcaeb", - "domainid" => domain_id, - "domain" => domain_name, - "name" => "Medium Disk", - "displaytext" => "Medium Disk [32GB Disk]", - "disksize" => 32, - "created" => "2013-02-21T03:12:520300", - "iscustomized" => false, - "storagetype" => "shared" - } - }, - :network_offerings => { - "cc4de87d-672d-4353-abb5-6a8a4c0abf59" => { - "id" => "cc4de87d-672d-4353-abb5-6a8a4c0abf59", - "name" => "Shared Network With Security Groups", - "displaytext" => "Shared Network With Security Groups", - "traffictype" => "Guest", - "isdefault" => true, - "specifyvlan" => true, - "conservemode" => true, - "specifyipranges" => true, - "availability" => "Optional", - "networkrate" => 200, - "state" => "Enabled", - "guestiptype" => "Shared", - "serviceofferingid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1" - } - }, - :firewall_rules => { - "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1" => { - "id"=> "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "protocol"=> "tcp", - "startport" => "443", - "endport" => "443", - "ipaddressid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "networkid"=> "31c4b26e-4be9-11e4-8304-00163e5b5f54", - "ipaddress" => "192.168.200.1", - "state" => "Active", - "cidrlist" => "255.255.255.0/24", - "tags" => [] - } - }, - :egress_firewall_rules => { - "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1" => { - "id"=>"f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "protocol"=>"tcp", - "networkid"=> "31c4b26e-4be9-11e4-8304-00163e5b5f54", - "state"=>"Active", - "cidrlist"=>"10.2.1.0/24", - "tags"=>[] - } - }, - :port_forwarding_rules => { - "8f4627c5-1fdd-4504-8a92-f61b4e9cb3e3" => { - 'id' => "8f4627c5-1fdd-4504-8a92-f61b4e9cb3e3", - 'privateport' => "25", - 'privateendport' => "25", - 'protocol' => "tcp", - 'publicport' => "25", - 'publicendport' => "25", - 'virtualmachineid' => "8f4627c5-1fdd-4504-8a92-f61b4e9cb3e3", - 'virtualmachinename' => "LoadBalancer", - 'virtualmachinedisplayname' => "LoadBalancer", - 'ipaddressid' => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - 'ipaddress' => "192.168.200.200", - 'state' => "Active", - 'cidrlist' => "", - 'tags' => [] - } - }, - :os_types => { - "51ef854d-279e-4e68-9059-74980fd7b29b" => { - "id" => "51ef854d-279e-4e68-9059-74980fd7b29b", - "oscategoryid" => "56f67279-e082-45c3-a01c-d290d6cd4ce2", - "description" => "Asianux 3(32-bit)" - }, - "daf124c8-95d8-4756-8e1c-1871b073babb" => { - "id" => "daf124c8-95d8-4756-8e1c-1871b073babb", - "oscategoryid" => "56f67279-e082-45c3-a01c-d290d6cd4ce2", - "description" => "Asianux 3(64-bit)" - } - } - } - end - end - - def self.reset - @data = nil - end - - def data - self.class.data - end - - def reset_data - self.class.data.delete(@cloudstack_api_key) - end - - end - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/core.rb b/lib/fog/cloudstack/core.rb deleted file mode 100644 index c4554b155..000000000 --- a/lib/fog/cloudstack/core.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'fog/core' -require 'fog/json' -require 'uri' - -module Fog - module Cloudstack - extend Fog::Provider - - service(:compute, 'Compute') - - @@digest = OpenSSL::Digest.new('sha1') - - def self.escape(string) - string = CGI::escape(string) - string = string.gsub("+","%20") - # Escaped asterisk will cause malformed request - string = string.gsub("%2A","*") - string - end - - def self.signed_params(key,params) - query = params.map{|k,v| [k.to_s, v]}.sort.map{|c| "#{c[0]}=#{escape(c[1].to_s)}"}.join('&').downcase - - signed_string = Base64.encode64(OpenSSL::HMAC.digest(@@digest,key,query)).strip - - signed_string - end - - def self.uuid - [8,4,4,4,12].map{|i| Fog::Mock.random_hex(i)}.join("-") - end - - def self.ip_address - 4.times.map{ Fog::Mock.random_numbers(3) }.join(".") - end - - def self.mac_address - 6.times.map{ Fog::Mock.random_numbers(2) }.join(":") - end - end -end diff --git a/lib/fog/cloudstack/models/compute/address.rb b/lib/fog/cloudstack/models/compute/address.rb deleted file mode 100644 index e3924cdf1..000000000 --- a/lib/fog/cloudstack/models/compute/address.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Address < Fog::Model - identity :id, :aliases => 'id' - attribute :network_id, :aliases => 'networkid' - attribute :ip_address, :aliases => 'ipaddress' - attribute :traffic_type, :aliases => 'traffictype' - attribute :is_default, :aliases => 'isdefault' - attribute :mac_address, :aliases => 'macaddress' - attribute :netmask - attribute :gateway - attribute :type - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/disk_offering.rb b/lib/fog/cloudstack/models/compute/disk_offering.rb deleted file mode 100644 index 0a91c9a41..000000000 --- a/lib/fog/cloudstack/models/compute/disk_offering.rb +++ /dev/null @@ -1,44 +0,0 @@ -module Fog - module Compute - class Cloudstack - class DiskOffering < Fog::Model - identity :id, :aliases => 'id' - attribute :created - attribute :disk_size, :aliases => 'disk_size' - attribute :display_text, :aliases => 'display_text' - attribute :domain - attribute :domain_id, :aliases => 'domainid' - attribute :is_customized, :aliases => 'iscustomized' - attribute :name - attribute :storage_type, :aliases => 'storagetype' - attribute :tags - - def save - requires :display_text, :name - - options = { - 'displaytext' => display_text, - 'name' => name, - 'customized' => is_customized, - 'disksize' => disk_size, - 'domain_id' => domain_id, - 'storagetype' => storage_type, - 'tags' => tags - } - - response = service.create_disk_offering(options) - merge_attributes(response['creatediskofferingresponse']) - end - - def destroy - requires :id - - response = service.delete_disk_offering('id' => id ) - success_status = response['deletediskofferingresponse']['success'] - - success_status == 'true' - end - end # DiskOffering - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/disk_offerings.rb b/lib/fog/cloudstack/models/compute/disk_offerings.rb deleted file mode 100644 index 29932ec89..000000000 --- a/lib/fog/cloudstack/models/compute/disk_offerings.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/disk_offering' - -module Fog - module Compute - class Cloudstack - class DiskOfferings < Fog::Collection - model Fog::Compute::Cloudstack::DiskOffering - - def all(options = {}) - response = service.list_disk_offerings(options) - disk_offerings_data = response["listdiskofferingsresponse"]["diskoffering"] || [] - load(disk_offerings_data) - end - - def get(disk_offering_id) - response = service.list_disk_offerings('id' => disk_offering_id) - disk_offering_data = response["listdiskofferingsresponse"]["diskoffering"].first - new(disk_offering_data) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/egress_firewall_rule.rb b/lib/fog/cloudstack/models/compute/egress_firewall_rule.rb deleted file mode 100644 index 64a679cc8..000000000 --- a/lib/fog/cloudstack/models/compute/egress_firewall_rule.rb +++ /dev/null @@ -1,38 +0,0 @@ -module Fog - module Compute - class Cloudstack - class EgressFirewallRule < Fog::Model - identity :id, :aliases => 'id' - attribute :protocol, :aliases => 'protocol' - attribute :network_id, :aliases => 'networkid' - attribute :state, :aliases => 'state' - attribute :cidr_list, :aliases => 'cidrlist' - attribute :tags, :type => :array - attribute :job_id, :aliases => 'jobid' # only on create - - def save - requires :protocol, :network_id - - options = { - 'protocol' => protocol, - 'networkid' => network_id, - 'cidrlist' => cidr_list, - } - - response = service.create_egress_firewall_rule(options) - merge_attributes(response['createegressfirewallruleresponse']) - end - - def destroy - requires :id - - response = service.delete_egress_firewall_rule('id' => id ) - success_status = response['deleteegressfirewallruleresponse']['success'] - - success_status == 'true' - end - - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/egress_firewall_rules.rb b/lib/fog/cloudstack/models/compute/egress_firewall_rules.rb deleted file mode 100644 index 8144b64fa..000000000 --- a/lib/fog/cloudstack/models/compute/egress_firewall_rules.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/egress_firewall_rule' - -module Fog - module Compute - class Cloudstack - class EgressFirewallRules < Fog::Collection - model Fog::Compute::Cloudstack::EgressFirewallRule - - def all(options = {}) - response = service.list_egress_firewall_rules(options) - egress_firewall_rules = response["listegressfirewallrulesresponse"]["firewallrule"] || [] - load(egress_firewall_rules) - end - - def get(address_id) - options = { 'id' => address_id } - response = service.list_egress_firewall_rules(options) - egress_firewall_rules = response["listegressfirewallrulesresponse"]["firewallrule"].first - new(egress_firewall_rules) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/firewall_rule.rb b/lib/fog/cloudstack/models/compute/firewall_rule.rb deleted file mode 100644 index 7cf0ce902..000000000 --- a/lib/fog/cloudstack/models/compute/firewall_rule.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - class FirewallRule < Fog::Model - identity :id, :aliases => 'id' - attribute :cidr_list, :aliases => 'cidrlist' - attribute :start_port, :aliases => 'startport', :type => :integer - attribute :end_port, :aliases => 'endport', :type => :integer - attribute :icmp_code, :aliases => 'icmpcode' - attribute :icmp_type, :aliases => 'icmptype' - attribute :ip_address, :aliases => 'ipaddress' - attribute :ip_address_id, :aliases => 'ipaddressid' - attribute :network_id, :aliases => 'networkid' - attribute :protocol - attribute :state - attribute :tags, :type => :array - - # def save - # end - - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/firewall_rules.rb b/lib/fog/cloudstack/models/compute/firewall_rules.rb deleted file mode 100644 index 445c2ec80..000000000 --- a/lib/fog/cloudstack/models/compute/firewall_rules.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/firewall_rule' - -module Fog - module Compute - class Cloudstack - class FirewallRules < Fog::Collection - model Fog::Compute::Cloudstack::FirewallRule - - def all(options = {}) - response = service.list_firewall_rules(options) - firewall_rules = response["listfirewallrulesresponse"]["firewallrule"] || [] - load(firewall_rules) - end - - def get(address_id) - options = { 'id' => address_id } - response = service.list_firewall_rules(options) - firewall_rules = response["listfirewallrulesresponse"]["firewallrule"].first - new(firewall_rules) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/flavor.rb b/lib/fog/cloudstack/models/compute/flavor.rb deleted file mode 100644 index a00a1f576..000000000 --- a/lib/fog/cloudstack/models/compute/flavor.rb +++ /dev/null @@ -1,36 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Flavor < Fog::Model - identity :id, :aliases => 'id' - attribute :cpu_number, :aliases => 'cpunumber' - attribute :cpu_speed, :aliases => 'cpuspeed' - attribute :created, :type => :time - attribute :default_use, :aliases => 'defaultuse' - attribute :display_text, :aliases => 'display_text' - attribute :domain - attribute :host_tags, :aliases => 'host_tags' - attribute :is_system, :aliases => 'issystem', :type => :boolean - attribute :is_volatile, :aliases => 'isvolatile', :type => :boolean - attribute :is_customized, :aliases => 'iscustomized', :type => :boolean - attribute :limit_cpu_use, :aliases => 'limitcpuuse' - attribute :tags - attribute :system_vm_type, :aliases => 'systemvm' - attribute :storage_type, :aliases => 'storagetype' - attribute :offer_ha, :aliases => 'offerha' - attribute :network_rate, :aliases => 'networkrate' - attribute :name - attribute :memory - - def save - raise Fog::Errors::Error.new('Creating a flavor is not supported') - end - - def destroy - raise Fog::Errors::Error.new('Destroying a flavor is not supported') - end - - end # Flavor - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/flavors.rb b/lib/fog/cloudstack/models/compute/flavors.rb deleted file mode 100644 index 5ccabc13c..000000000 --- a/lib/fog/cloudstack/models/compute/flavors.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/flavor' - -module Fog - module Compute - class Cloudstack - class Flavors < Fog::Collection - model Fog::Compute::Cloudstack::Flavor - - def all - data = service.list_service_offerings["listserviceofferingsresponse"]["serviceoffering"] || [] - load(data) - end - - def get(flavor_id) - if flavor = service.list_service_offerings('id' => flavor_id)["listserviceofferingsresponse"]["serviceoffering"].first - new(flavor) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/image.rb b/lib/fog/cloudstack/models/compute/image.rb deleted file mode 100644 index a6d51c96d..000000000 --- a/lib/fog/cloudstack/models/compute/image.rb +++ /dev/null @@ -1,72 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Image < Fog::Model - identity :id, :aliases => 'id' - attribute :account - attribute :account_id, :aliases => 'accountid' - attribute :bootable - attribute :checksum - attribute :created, :type => :time - attribute :cross_zones, :aliases => 'crossZones' - attribute :details - attribute :display_text, :aliases => 'displaytext' - attribute :domain - attribute :domain_id, :aliases => 'domainid' - attribute :format - attribute :host_id, :aliases => 'hostid' - attribute :host_name, :aliases => 'hostname' - attribute :hypervisor - attribute :job_id, :aliases => 'jobid' - attribute :job_status, :aliases => 'jobstatus' - attribute :is_extractable, :aliases => 'isextractable', :type => :boolean - attribute :is_featured, :aliases => 'isfeatured', :type => :boolean - attribute :is_public, :aliases => 'ispublic', :type => :boolean - attribute :is_ready, :aliases => 'isready', :type => :boolean - attribute :name - attribute :os_type_id, :aliases => 'ostypeid' - attribute :os_type_name, :aliases => 'ostypename' - attribute :password_enabled, :aliases => 'passwordenabled' - attribute :project - attribute :project_id, :aliases => 'projectid' - attribute :removed - attribute :size - attribute :source_template_id, :aliases => 'sourcetemplateid' - attribute :status - attribute :template_tag, :aliases => 'templatetag' - attribute :template_type, :aliases => 'templatetype' - attribute :zone_id, :aliases => 'zoneid' - attribute :zone_name, :aliases => 'zonename' - - attr_accessor :bits, :requires_hvm, :snapshot_id, :url, :virtual_machine_id, :volume_id - - def save - options = { - 'displaytext' => display_text, - 'name' => name, - 'ostypeid' => os_type_id, - 'bits' => bits, - 'details' => details, - 'isfeatured' => is_featured, - 'ispublic' => is_public, - 'passwordenabled' => password_enabled, - 'requireshvm' => requires_hvm, - 'snapshotid' => snapshot_id, - 'templatetag' => template_tag, - 'url' => url, - 'virtualmachineid' => virtual_machine_id, - 'volumeid' => volume_id - } - data = service.create_template(options) - merge_attributes(data['createtemplateresponse']) - end - - def destroy - requires :id - service.delete_template('id' => self.id) - true - end - end # Server - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/images.rb b/lib/fog/cloudstack/models/compute/images.rb deleted file mode 100644 index b512d6fb2..000000000 --- a/lib/fog/cloudstack/models/compute/images.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/image' - -module Fog - module Compute - class Cloudstack - class Images < Fog::Collection - model Fog::Compute::Cloudstack::Image - - def all(filters={}) - options = get_filter_options(filters) - data = service.list_templates(options)["listtemplatesresponse"]["template"] || [] - load(data) - end - - def get(template_id, filters={}) - filter_option = get_filter_options(filters) - options = filter_option.merge('id' => template_id) - if template = service.list_templates(options)["listtemplatesresponse"]["template"].first - new(template) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - - private - - def get_filter_options(filters) - default_filter = { - 'templatefilter' => 'self' - } - default_filter.merge(filters) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/job.rb b/lib/fog/cloudstack/models/compute/job.rb deleted file mode 100644 index 79cc01914..000000000 --- a/lib/fog/cloudstack/models/compute/job.rb +++ /dev/null @@ -1,51 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Job < Fog::Model - identity :id, :aliases => 'jobid' - attribute :user_id, :aliases => 'userid' - attribute :account_id, :aliases => 'accountid' - attribute :cmd - attribute :job_status, :aliases => 'jobstatus', :type => :integer - attribute :job_result_type, :aliases => 'jobresulttype' - attribute :job_result_code, :aliases => 'jobresultcode', :type => :integer - attribute :job_proc_status, :aliases => 'jobprocstatus', :type => :integer - - attribute :created_at, :aliases => 'created', :type => :time - attribute :job_result, :aliases => 'jobresult' - - def reload - requires :id - merge_attributes(service.query_async_job_result('jobid' => self.id)['queryasyncjobresultresponse']) - end - - def ready? - self.job_status != 0 - end - - def successful? - self.job_result_code == 0 - end - - # so dirty - def result - if successful? && model = Fog::Compute::Cloudstack.constants.find{|c| c.to_s.downcase == self.job_result.keys.first.to_s}.to_s - collection = model.gsub(/.[A-Z]/){|w| "#{w[0,1]}_#{w[1,1].downcase}"}.downcase + "s" # cheap underscorize, assume simple pluralization - service.send(collection).new(self.job_result.values.first) - else self.job_result - end - end - - def save - raise Fog::Errors::Error.new('Creating a job is not supported') - end - - def destroy - raise Fog::Errors::Error.new('Destroying a job is not supported') - end - - - end # Job - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/jobs.rb b/lib/fog/cloudstack/models/compute/jobs.rb deleted file mode 100644 index a82844b6d..000000000 --- a/lib/fog/cloudstack/models/compute/jobs.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/job' - -module Fog - module Compute - class Cloudstack - class Jobs < Fog::Collection - model Fog::Compute::Cloudstack::Job - - def all - data = service.list_async_jobs["listasyncjobsresponse"]["asyncjobs"] || [] - load(data) - end - - def get(job_id) - if job = service.query_async_job_result('jobid' => job_id)["queryasyncjobresultresponse"] - new(job) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/network.rb b/lib/fog/cloudstack/models/compute/network.rb deleted file mode 100644 index a0509a5d0..000000000 --- a/lib/fog/cloudstack/models/compute/network.rb +++ /dev/null @@ -1,73 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Network < Fog::Model - identity :id, :aliases => 'id' - attribute :name, :aliases => 'name' - attribute :display_text, :aliases => 'displaytext' - - attribute :broadcast_domain_type, :aliases => 'broadcastdomaintype' - attribute :traffic_type, :aliases => 'traffictype' - attribute :gateway, :aliases => 'gateway' - attribute :cidr, :aliases => 'cidr' - attribute :zone_id, :aliases => 'zoneid' - attribute :zone_name, :aliases => 'zonename' - - attribute :network_offering_id, :aliases => 'networkofferingid' - attribute :network_offering_name, :aliases => 'networkofferingname' - attribute :network_offering_display_text, :aliases => 'networkofferingdisplaytext' - attribute :network_offering_conserve_mode, :aliases => 'networkofferingconservemode' - attribute :network_offering_availability, :aliases => 'networkofferingavailability' - attribute :is_system, :aliases => 'issystem', :type => :boolean - attribute :state, :aliases => 'state' - - attribute :related, :aliases => 'related' - attribute :dns1, :aliases => 'dns1' - attribute :dns2, :aliases => 'dns2' - attribute :type, :aliases => 'type' - attribute :acl_type, :aliases => 'acltype' - attribute :project_id, :aliases => 'projectid' - attribute :domain_id, :aliases => 'domainid' - attribute :domain, :aliases => 'domain' - - # attribute :service, :aliases => 'service' - attribute :network_domain, :aliases => 'domain' - attribute :physical_network_id, :aliases => 'physicalnetworkid' - attribute :restart_required, :aliases => 'restartrequired' - attribute :specify_ip_ranges, :aliases => 'specifyipranges' - attribute :canuse_for_deploy, :aliases => 'canusefordeploy' - attribute :is_persistent, :aliases => 'ispersistent', :type => :boolean - attribute :display_network, :aliases => 'displaynetwork' - attribute :is_default, :aliases => 'isdefault', :type => :boolean - - # restart network - will return a job - def restart(options={}) - response = service.restart_network( options.merge({'id'=> self.id})) - service.jobs.new(response['restartnetworkresponse']) - end - - # create a new network - def save - requires :display_text, :name, :network_offering_id, :zone_id - - options = { - 'displaytext' => display_text, - 'name' => name, - 'zoneid' => zone_id, - 'networkofferingid' => network_offering_id - } - - response = service.create_network(options) - merge_attributes(response['createnetworkresponse']['network']) - end - - # delete given network - will return a job - def destroy(options={}) - response = service.delete_network(options.merge({'id'=> self.id})) - service.jobs.new(response["deletenetworkresponse"]) - end - - end # Network - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/network_offering.rb b/lib/fog/cloudstack/models/compute/network_offering.rb deleted file mode 100644 index 06a639caa..000000000 --- a/lib/fog/cloudstack/models/compute/network_offering.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - class NetworkOffering < Fog::Model - identity :id, :aliases => 'id' - attribute :name, :aliases => 'name' - attribute :display_text, :aliases => 'displaytext' - attribute :traffic_type, :aliases => 'traffictype' - attribute :is_default, :aliases => 'isdefault', :type => :boolean - attribute :specify_vlan, :aliases => 'specifyvlan' - attribute :conserve_mode, :aliases => 'conservemode' - attribute :specify_ip_ranges, :aliases => 'specifyipranges' - attribute :availability, :aliases => 'availability' - attribute :network_rate, :aliases => 'networkrate' - attribute :state, :aliases => 'state' - attribute :guest_ip_type, :aliases => 'guestiptype' - attribute :service_offering_id, :aliases => 'serviceofferingid' - attribute :service, :aliases => 'service' - attribute :for_vpc, :aliases => 'forvpc' - attribute :is_persistent, :aliases => 'ispersistent', :type => :boolean - attribute :egress_default_policy, :aliases => 'egressdefaultpolicy' - end # NetworkOffering - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/network_offerings.rb b/lib/fog/cloudstack/models/compute/network_offerings.rb deleted file mode 100644 index d2963f724..000000000 --- a/lib/fog/cloudstack/models/compute/network_offerings.rb +++ /dev/null @@ -1,39 +0,0 @@ - - -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/network_offering' - -module Fog - module Compute - class Cloudstack - class NetworkOfferings < Fog::Collection - model Fog::Compute::Cloudstack::NetworkOffering - - def all(filters={}) - options = get_filter_options(filters) - data = service.list_network_offerings(options)["listnetworkofferingsresponse"]["networkoffering"] || [] - load(data) - end - - def get(network_offering_id, filters={}) - filter_option = get_filter_options(filters) - options = filter_option.merge('id' => network_offering_id) - if data = service.list_network_offerings(options)["listnetworkofferingsresponse"]["networkoffering"].first - new(data) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - - private - - def get_filter_options(filters) - default_filter = { - 'projectfilter' => 'self' - } - default_filter.merge(filters) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/networks.rb b/lib/fog/cloudstack/models/compute/networks.rb deleted file mode 100644 index 59e3ec41a..000000000 --- a/lib/fog/cloudstack/models/compute/networks.rb +++ /dev/null @@ -1,38 +0,0 @@ - -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/network' - -module Fog - module Compute - class Cloudstack - class Networks < Fog::Collection - model Fog::Compute::Cloudstack::Network - - def all(filters={}) - options = get_filter_options(filters) - data = service.list_networks(options)["listnetworksresponse"]["network"] || [] - load(data) - end - - def get(network_id, filters={}) - filter_option = get_filter_options(filters) - options = filter_option.merge('id' => network_id) - if data = service.list_networks(options)["listnetworksresponse"]["network"].first - new(data) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - - private - - def get_filter_options(filters) - default_filter = { - 'projectfilter' => 'self' - } - default_filter.merge(filters) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/port_forwarding_rule.rb b/lib/fog/cloudstack/models/compute/port_forwarding_rule.rb deleted file mode 100644 index 8e89607e5..000000000 --- a/lib/fog/cloudstack/models/compute/port_forwarding_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - class PortForwardingRule < Fog::Model - identity :id, :aliases => 'id' - - attribute :private_port, :aliases => 'privateport' - attribute :private_end_port, :aliases => 'privateendport' - attribute :protocol, :aliases => 'protocol' - attribute :public_port, :aliases => 'publicport' - attribute :public_end_port, :aliases => 'publicendport' - attribute :virtual_machine_id, :aliases => 'virtualmachineid' - attribute :virtualmachinename, :aliases => 'virtualmachinename' - attribute :virtualmachinedisplayname, :aliases => 'virtualmachinedisplayname' - attribute :ipaddressid, :aliases => 'ipaddressid' - attribute :ipaddress, :aliases => 'ipaddress' - attribute :state, :aliases => 'state' - attribute :cidrlist, :aliases => 'cidrlist' - attribute :vmguestip, :aliases => 'vmguestip' - attribute :networkid, :aliases => 'networkid' - attribute :tags, :type => :array - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/port_forwarding_rules.rb b/lib/fog/cloudstack/models/compute/port_forwarding_rules.rb deleted file mode 100644 index 784179658..000000000 --- a/lib/fog/cloudstack/models/compute/port_forwarding_rules.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/port_forwarding_rule' - -module Fog - module Compute - class Cloudstack - class PortForwardingRules < Fog::Collection - model Fog::Compute::Cloudstack::PortForwardingRule - - def all(options = {}) - response = service.list_port_forwarding_rules(options) - port_forwarding_rules = response["listportforwardingrulesresponse"]["portforwardingrule"] || [] - load(port_forwarding_rules) - end - - def get(address_id) - options = { 'id' => address_id } - response = service.list_port_forwarding_rules(options) - port_forwarding_rules = response["listportforwardingrulesresponse"]["portforwardingrule"].first - new(port_forwarding_rules) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/project.rb b/lib/fog/cloudstack/models/compute/project.rb deleted file mode 100644 index 62e5c21f0..000000000 --- a/lib/fog/cloudstack/models/compute/project.rb +++ /dev/null @@ -1,58 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Project < Fog::Model - identity :id, :aliases => 'id' - attribute :name, :aliases => 'name' - attribute :display_text, :aliases => 'displaytext' - attribute :domain_id, :aliases => 'domainid' - attribute :domain, :aliases => 'domain' - attribute :account, :aliases => 'account' - attribute :state, :aliases => 'state' - attribute :tags, :aliases => 'tags' - attribute :network_limit, :aliases => 'networklimit' - attribute :network_total, :aliases => 'networktotal', :type => :integer - attribute :network_available, :aliases => 'networkavailable' - attribute :vpc_limit, :aliases => 'vpclimit' - attribute :vpc_total, :aliases => 'vpctotal', :type => :integer - attribute :vpc_available, :aliases => 'vpcavailable' - attribute :cpu_limit, :aliases => 'cpulimit' - attribute :cpu_total, :aliases => 'cputotal', :type => :integer - attribute :cpu_available, :aliases => 'cpuavailable' - attribute :memory_limit, :aliases => 'memorylimit' - attribute :memory_total, :aliases => 'memorytotal', :type => :integer - attribute :memory_available, :aliases => 'memoryavailable' - attribute :primary_storage_limit, :aliases => 'primarystoragelimit' - attribute :primary_storage_total, :aliases => 'primarystoragetotal', :type => :integer - attribute :primary_storage_available, :aliases => 'primarystorageavailable' - attribute :secondary_storage_limit, :aliases => 'secondarystoragelimit' - attribute :secondary_storage_total, :aliases => 'secondarystoragetotal', :type => :integer - attribute :secondary_storage_available, :aliases => 'secondarystorageavailable' - attribute :vm_limit, :aliases => 'vmlimit' - attribute :vm_total, :aliases => 'vmtotal', :type => :integer - attribute :vm_available, :aliases => 'vmavailable' - attribute :ip_limit, :aliases => 'iplimit' - attribute :ip_total, :aliases => 'iptotal', :type => :integer - attribute :ip_available, :aliases => 'ipavailable' - attribute :volume_limit, :aliases => 'volumelimit' - attribute :volume_total, :aliases => 'volumetotal', :type => :integer - attribute :volume_available, :aliases => 'volumeavailable' - attribute :snapshot_limit, :aliases => 'snapshotlimit' - attribute :snapshot_total, :aliases => 'snapshottotal', :type => :integer - attribute :snapshot_available, :aliases => 'snapshotavailable' - attribute :template_limit, :aliases => 'templatelimit' - attribute :template_total, :aliases => 'templatetotal', :type => :integer - attribute :template_available, :aliases => 'templateavailable' - - def save - raise Fog::Errors::Error.new('Creating a project is not supported') - end - - def destroy - raise Fog::Errors::Error.new('Destroying a project is not supported') - end - - end # Project - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/projects.rb b/lib/fog/cloudstack/models/compute/projects.rb deleted file mode 100644 index 40a5e7673..000000000 --- a/lib/fog/cloudstack/models/compute/projects.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/project' - -module Fog - module Compute - class Cloudstack - class Projects < Fog::Collection - model Fog::Compute::Cloudstack::Project - - def all(filters={}) - options = get_filter_options(filters) - - data = service.list_projects(options)["listprojectsresponse"]["project"] || [] - load(data) - end - - def get(project_id, filters={}) - filter_option = get_filter_options(filters) - options = filter_option.merge('id' => project_id) - - if template = service.list_projects(options)["listprojectsresponse"]["project"].first - new(template) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - - private - - def get_filter_options(filters) - default_filter = { - 'projectfilter' => 'self' - } - default_filter.merge(filters) - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/public_ip_address.rb b/lib/fog/cloudstack/models/compute/public_ip_address.rb deleted file mode 100644 index 75e6a95c0..000000000 --- a/lib/fog/cloudstack/models/compute/public_ip_address.rb +++ /dev/null @@ -1,96 +0,0 @@ -module Fog - module Compute - class Cloudstack - class PublicIpAddress < Fog::Model - identity :id - - attribute :account - attribute :allocated, :type => :time - attribute :associated_network_id, :aliases => 'associatednetworkid' - attribute :associated_network_name, :aliases => 'associatednetworkname' - attribute :domain - attribute :domain_id, :aliases => 'domainid' - attribute :for_virtual_network, :type => :boolean, :aliases => 'forvirtualnetwork' - attribute :ip_address, :aliases => 'ipaddress' - attribute :is_portable, :type => :boolean, :aliases => 'isportable' - attribute :is_source_nat, :type => :boolean, :aliases => 'issourcenat' - attribute :is_static_nat, :type => :boolean, :aliases => 'isstaticnat' - attribute :is_system, :type => :boolean, :aliases => 'issystem' - attribute :network_id, :type => :boolean, :aliases => 'networkid' - attribute :physical_network_id, :aliases => 'physicalnetworkid' - attribute :project - attribute :project_id, :aliases => 'projectid' - attribute :purpose - attribute :state - attribute :server_display_name, :aliases => 'virtualmachinedisplayname' - attribute :server_id, :aliases => 'virtualmachineid' - attribute :server_name, :aliases => 'virtualmachinename' - attribute :vlan_id, :aliases => 'vlanid' - attribute :vlan_name, :aliases => 'vlanname' - attribute :server_ip_address, :aliases => 'vmipaddress' - attribute :vpc_id, :aliases => 'vpcid' - attribute :zone_id, :aliases => 'zoneid' - attribute :zone_name, :aliases => 'zonename' - attribute :tags, :type => :array - attribute :job_id, :aliases => 'jobid' # only on associate - - def initialize(attributes = {}) - # assign server first to prevent race condition with persisted? - self.server = attributes.delete(:server) - super - end - - def ready? - state == 'Allocated' - end - - def destroy - requires :identity - service.disassociate_ip_address('id' => id) - true - end - - def server=(new_server) - @server = new_server - if persisted? - if !server_id.nil? && (new_server.nil? || server_id != new_server.id) - service.disable_static_nat('ipaddressid' => id) - self.server_display_name = nil - self.server_id = nil - self.server_name = nil - self.server_ip_address = nil - self.is_static_nat = false - end - unless new_server.nil? - service.enable_static_nat( - 'ipaddressid' => id, 'virtualmachineid' => new_server.id) - end - end - end - - def server - service.servers.get(server_id) - end - - def save - raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted? - options = { - 'account' => account, - 'domainid' => domain_id, - 'isportable' => is_portable, - 'networkid' => network_id, - 'projectid' => project_id, - 'vpcid' => vpc_id, - 'zoneid' => zone_id, - } - response = service.associate_ip_address(options) - merge_attributes(response['associateipaddressresponse']) - if @server - self.server = @server - end - true - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/public_ip_addresses.rb b/lib/fog/cloudstack/models/compute/public_ip_addresses.rb deleted file mode 100644 index 4e4cc3ca2..000000000 --- a/lib/fog/cloudstack/models/compute/public_ip_addresses.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/public_ip_address' - -module Fog - module Compute - class Cloudstack - class PublicIpAddresses < Fog::Collection - model Fog::Compute::Cloudstack::PublicIpAddress - - def all(options = {}) - response = service.list_public_ip_addresses(options) - public_ip_addresses = response["listpublicipaddressesresponse"]["publicipaddress"] || [] - load(public_ip_addresses) - end - - def get(address_id) - response = service.list_public_ip_addresses('id' => address_id) - if public_ip_address = response["listpublicipaddressesresponse"]["publicipaddress"].first - new(public_ip_address) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/security_group.rb b/lib/fog/cloudstack/models/compute/security_group.rb deleted file mode 100644 index 84b6137cd..000000000 --- a/lib/fog/cloudstack/models/compute/security_group.rb +++ /dev/null @@ -1,50 +0,0 @@ -module Fog - module Compute - class Cloudstack - class SecurityGroup < Fog::Model - identity :id, :aliases => 'id' - attribute :name, :type => :string - attribute :description, :type => :string - attribute :account, :type => :string - attribute :domain_id, :aliases => "domainid", :type => :string - attribute :domain_name, :aliases => "domain", :type => :string - attribute :project_id, :aliases => "projectid", :type => :string - attribute :project_name, :aliases => "project", :type => :string - attribute :ingress_rules, :aliases => "ingressrule", :type => :array - attribute :egress_rules, :aliases => "egressrule", :type => :array - - def destroy - requires :id - service.delete_security_group('id' => self.id) - true - end - - def egress_rules - attributes[:egress_rules] || [] - end - - def ingress_rules - attributes[:ingress_rules] || [] - end - - def save - requires :name - - options = { - 'name' => self.name, - 'account' => self.account, - 'description' => self.description, - 'projectid' => self.project_id, - 'domainid' => self.domain_id, - } - data = service.create_security_group(options) - merge_attributes(data['createsecuritygroupresponse']['securitygroup']) - end - - def rules - service.security_group_rules.all("security_group_id" => self.id) - end - end # SecurityGroup - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/security_group_rule.rb b/lib/fog/cloudstack/models/compute/security_group_rule.rb deleted file mode 100644 index 37ae8f731..000000000 --- a/lib/fog/cloudstack/models/compute/security_group_rule.rb +++ /dev/null @@ -1,60 +0,0 @@ -module Fog - module Compute - class Cloudstack - class SecurityGroupRule < Fog::Model - identity :id, :aliases => 'ruleid' - - attribute :security_group_id, :type => :string - attribute :protocol, :type => :string - attribute :start_port, :type => :integer, :aliases => 'startport' - attribute :end_port, :type => :integer, :aliases => 'endport' - attribute :cidr, :type => :string - attribute :direction, :type => :string - - def destroy - data = service.send("revoke_security_group_#{self.direction}", "id" => self.id) - job = service.jobs.new(data["revokesecuritygroup#{self.direction}"]) - job.wait_for { ready? } - job.successful? - end - - def port_range - (self.start_port..self.end_port) - end - - def save - requires :security_group_id, :cidr, :direction - - data = service.send("authorize_security_group_#{self.direction}".to_sym, params) - job = service.jobs.new(data["authorizesecuritygroup#{self.direction}response"]) - job.wait_for { ready? } - # durty - merge_attributes(job.result.send("#{self.direction}_rules").last) - self - end - - def security_group - service.security_groups.get(self.security_group_id) - end - - def reload - requires :id, :security_group_id, :cidr - - merge_attributes(security_group.rules.get(self.id)) - end - - private - - def params - options = { - "securitygroupid" => self.security_group_id, - "protocol" => self.protocol, - "cidrlist" => self.cidr - } - options.merge!("startport" => self.start_port) unless self.start_port.nil? - options.merge("endport" => self.end_port) unless self.end_port.nil? - end - end # SecurityGroupRule - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/security_group_rules.rb b/lib/fog/cloudstack/models/compute/security_group_rules.rb deleted file mode 100644 index e8b23799a..000000000 --- a/lib/fog/cloudstack/models/compute/security_group_rules.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/security_group_rule' - -module Fog - module Compute - class Cloudstack - class SecurityGroupRules < Fog::Collection - model Fog::Compute::Cloudstack::SecurityGroupRule - - attribute :security_group_id, :type => :string - - def security_group - service.security_groups.get(self.security_group_id) - end - - def create(attributes) - model = self.new(attributes.merge(:security_group_id => self.security_group_id)) - model.save - end - - def all(options={}) - merge_attributes(options) - security_group = self.security_group - rules = security_group.ingress_rules.map{|r| r.merge("direction" => "ingress", "security_group_id" => security_group_id)} - rules += security_group.egress_rules.map{|r| r.merge("direction" => "egress", "security_group_id" => security_group_id)} - load(rules) - end - - def get(rule_id) - all.find{|r| r.id == rule_id} - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/security_groups.rb b/lib/fog/cloudstack/models/compute/security_groups.rb deleted file mode 100644 index 43ad1eca1..000000000 --- a/lib/fog/cloudstack/models/compute/security_groups.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/security_group' - -module Fog - module Compute - class Cloudstack - class SecurityGroups < Fog::Collection - model Fog::Compute::Cloudstack::SecurityGroup - - def all(options={}) - data = service.list_security_groups(options)["listsecuritygroupsresponse"]["securitygroup"] || [] - load(data) - end - - def get(security_group_id) - if security_group = service.list_security_groups('id' => security_group_id)["listsecuritygroupsresponse"]["securitygroup"].first - new(security_group) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/server.rb b/lib/fog/cloudstack/models/compute/server.rb deleted file mode 100644 index 23daba77f..000000000 --- a/lib/fog/cloudstack/models/compute/server.rb +++ /dev/null @@ -1,162 +0,0 @@ -require 'fog/compute/models/server' - -module Fog - module Compute - class Cloudstack - class Server < Fog::Compute::Server - identity :id, :aliases => 'id' - attribute :name - attribute :account_name, :aliases => 'account' - attribute :domain_name, :aliases => 'domain' - attribute :created, :type => :time - attribute :state - attribute :haenable - attribute :memory - attribute :display_name, :aliases => 'displayname' - attribute :domain_id, :aliases => 'domainid' - attribute :host_id, :aliases => 'hostid' - attribute :host_name, :aliases => 'hostname' - attribute :project_id, :aliases => 'projectid' - attribute :zone_id, :aliases => 'zoneid' - attribute :zone_name, :aliases => 'zonename' - attribute :image_id, :aliases => ['templateid', :template_id] - attribute :image_name, :aliases => ['templatename', :template_name] - attribute :templated_display_text, :aliases => 'templatedisplaytext' - attribute :password_enabled, :aliases => 'passwordenabled' - attribute :flavor_id, :aliases => ['serviceofferingid', :service_offering_id] - attribute :flavor_name, :aliases => ['serviceofferingname', :service_offering_name] - attribute :cpu_number, :aliases => 'cpunumber' - attribute :cpu_speed, :aliases => 'cpuspeed' - attribute :cpu_used, :aliases => 'cpuused' - attribute :network_kbs_read, :aliases => 'networkkbsread' - attribute :network_kbs_write, :aliases => 'networkkbswrite' - attribute :guest_os_id, :aliases => 'guestosid' - attribute :root_device_id, :aliases => 'rootdeviceid' - attribute :root_device_type, :aliases => 'rootdevicetype' - attribute :group - attribute :key_name, :aliases => 'keypair' - attribute :user_data, :aliases => 'userdata' - attribute :security_group_list, :type => :array, :aliases => 'securitygroup' - attribute :nics, :type => :array, :aliases => 'nic' - attribute :job_id, :aliases => 'jobid' # only on create - attribute :size, :type => :integer - attribute :root_disk_size, :type => :integer - - attr_accessor :network_ids, :disk_offering_id, :ip_address, :ip_to_network_list - attr_writer :security_group_ids - - alias_method :public_ip_address, :ip_address - alias_method :public_ip_address=, :ip_address= - - def addresses - nics.map{|nic| Address.new(nic)} - end - - def ip_addresses - addresses.map(&:ip_address) - end - - def volumes - requires :id - service.volumes.all('virtualmachineid' => id) - end - - def reset_password - requires :id - data = service.reset_password_for_virtual_machine(id) - service.jobs.new(data['resetpasswordforvirtualmachineresponse']) - end - - def public_ip_addresses - if public_ip_address.nil? then [public_ip_address] else [] end - end - - def private_ip_addresses - ip_addresses - public_ip_addresses - end - - def private_ip_address - private_ip_addresses.first - end - - def destroy(options={}) - requires :id - data = service.destroy_virtual_machine(options.merge({'id'=> self.id})) - service.jobs.new(data["destroyvirtualmachineresponse"]) - end - - def flavor - service.flavors.get(self.flavor_id) - end - - def ready? - state == 'Running' - end - - def reboot - requires :id - data = service.reboot_virtual_machine('id' => self.id) # FIXME: does this ever fail? - service.jobs.new(data["rebootvirtualmachineresponse"]) - end - - def security_groups=(security_groups) - self.security_group_ids= Array(security_groups).map(&:id) - end - - def security_group_ids - @security_group_ids || (self.security_group_list || []).map{|sg| sg["id"]} - end - - def security_groups - security_group_ids.map{|id| service.security_groups.get(id)} - end - - def save - requires :image_id, :flavor_id, :zone_id - - options = { - 'templateid' => image_id, - 'serviceofferingid' => flavor_id, - 'zoneid' => zone_id, - 'networkids' => network_ids, - 'diskofferingid' => disk_offering_id, - 'name' => name, - 'displayname' => display_name, - 'group' => group, - 'domainid' => domain_id, - 'hostid' => host_id, - 'ipaddress' => ip_address, - 'iptonetworklist' => ip_to_network_list, - 'projectid' => project_id, - 'keypair' => key_name, - 'userdata' => user_data, - 'size' => size, - } - - options.merge!('rootdisksize' => root_disk_size) if root_disk_size - options.merge!('networkids' => network_ids) if network_ids - options.merge!('securitygroupids' => security_group_ids) unless security_group_ids.empty? - - data = service.deploy_virtual_machine(options) - merge_attributes(data['deployvirtualmachineresponse']) - end - - def start - requires :id - data = service.start_virtual_machine("id" => self.id) - service.jobs.new(data["startvirtualmachineresponse"]) - end - - def stop(options={}) - requires :id - unless options.is_a?(Hash) - Fog::Logger.deprecation("Passing force as a boolean option has been deprecated. Please pass a hash with 'force' => (true|false)") - options = {'force' => options} - end - data = service.stop_virtual_machine(options.merge({'id' => self.id})) - service.jobs.new(data["stopvirtualmachineresponse"]) - end - end # Server - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/servers.rb b/lib/fog/cloudstack/models/compute/servers.rb deleted file mode 100644 index 5c7e1f15e..000000000 --- a/lib/fog/cloudstack/models/compute/servers.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/server' - -module Fog - module Compute - class Cloudstack - class Servers < Fog::Collection - model Fog::Compute::Cloudstack::Server - - def all(attributes={}) - # add project id if we have one - response = service.list_virtual_machines(attributes) - data = response["listvirtualmachinesresponse"]["virtualmachine"] || [] - load(data) - end - - def bootstrap(new_attributes = {}) - server = create(new_attributes) - server.wait_for { ready? } - server - end - - def get(server_id) - attributes = {'id' => server_id} - # add project id if we have one - servers = service.list_virtual_machines(attributes)["listvirtualmachinesresponse"]["virtualmachine"] - if servers.nil? || servers.empty? - servers = service.list_virtual_machines('id' => server_id, 'projectid' => '-1')["listvirtualmachinesresponse"]["virtualmachine"] - end - unless servers.nil? || servers.empty? - new(servers.first) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/snapshot.rb b/lib/fog/cloudstack/models/compute/snapshot.rb deleted file mode 100644 index 022adaa11..000000000 --- a/lib/fog/cloudstack/models/compute/snapshot.rb +++ /dev/null @@ -1,46 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Snapshot < Fog::Model - identity :id, :aliases => 'id' - - attribute :name, :aliases => 'name' - attribute :volume_type, :aliases => 'volumetype' - attribute :volume_name, :aliases => 'volumename' - attribute :volume_id, :aliases => 'volumeid' - attribute :created, :aliases => 'created' - attribute :state, :aliases => 'state' - attribute :account, :aliases => 'account' - attribute :domain_id, :aliases => 'domainid' - attribute :domain, :aliases => 'domain' - attribute :snapshot_type, :aliases => 'snapshot_type' - attribute :interval_type, :aliases => 'interval_type' - - def save - requires :volume_id - - options = { - 'volumeid' => volume_id, - 'domainid' => domain_id - } - data = service.create_snapshot(options) - merge_attributes(data['createsnapshotresponse']) - end - - def ready? - state == 'BackedUp' - end - - def volume - service.volumes.get(volume_id) if volume_id - end - - def destroy - requires :id - service.delete_snapshot('id' => id) - true - end - end # Snapshot - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/snapshots.rb b/lib/fog/cloudstack/models/compute/snapshots.rb deleted file mode 100644 index e3208fba8..000000000 --- a/lib/fog/cloudstack/models/compute/snapshots.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/snapshot' - -module Fog - module Compute - class Cloudstack - class Snapshots < Fog::Collection - model Fog::Compute::Cloudstack::Snapshot - - def all(attributes = {}) - response = service.list_snapshots(attributes) - data = response["listsnapshotsresponse"]["snapshot"] || [] - load(data) - end - - def get(snapshot_id) - snapshot = service.list_snapshots('id' => snapshot_id)["listsnapshotsresponse"]["snapshot"].first - new(snapshot) if snapshot - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/volume.rb b/lib/fog/cloudstack/models/compute/volume.rb deleted file mode 100644 index d83d8823a..000000000 --- a/lib/fog/cloudstack/models/compute/volume.rb +++ /dev/null @@ -1,121 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Volume < Fog::Model - identity :id, :aliases => 'id' - - attribute :name, :aliases => 'name' - attribute :zone_id, :aliases => 'zoneid' - attribute :zone_name, :aliases => 'zonename' - attribute :type, :aliases => 'type' - attribute :size, :aliases => 'size' - attribute :created, :aliases => 'created' - attribute :state, :aliases => 'state' - attribute :account, :aliases => 'account' - attribute :domain_id, :aliases => 'domainid' - attribute :domain, :aliases => 'domain' - attribute :storage_type, :aliases => 'storagetype' - attribute :hypervisor, :aliases => 'hypervisor' - attribute :disk_offering_id, :aliases => 'diskofferingid' - attribute :disk_offering_name, :aliases => 'diskofferingname' - attribute :disk_offering_display_text, :aliases => 'diskofferingdisplaytext' - attribute :storage, :aliases => 'storage' - attribute :destroyed, :aliases => 'destroyed' - attribute :is_extractable, :aliases => 'isextractable', :type => :boolean - attribute :server_id, :aliases => 'virtualmachineid' - attribute :server_name, :aliases => 'vmname' - attribute :server_display_name, :aliases => 'vmdisplayname' - attribute :job_id, :aliases => 'jobid' # only on create - - attr_accessor :snapshot_id, :project_id - - def save - requires :name, :disk_offering_id, :zone_id - - options = { - 'size' => size, - 'name' => name, - 'diskofferingid' => disk_offering_id, - 'zoneid' => zone_id, - 'snapshotid' => snapshot_id, - 'projectid' => project_id - } - - data = service.create_volume(options) - merge_attributes(data['createvolumeresponse']) - end - - def ready? - state == 'Allocated' || state == 'Ready' - end - - def flavor - service.disk_offerings.get(self.disk_offering_id) - end - alias_method :disk_offering, :flavor - - def server - if server_id - service.servers.get(server_id) - end - end - - def snapshots - requires :id - service.snapshots.all('volumeid' => id) - end - - def reload - requires :identity - - return unless data = begin - collection.get(identity) - rescue Excon::Errors::SocketError - nil - end - - new_attributes = { - 'virtualmachineid' => nil, - 'vmname' => nil, - 'vmdisplayname' => nil - }.merge(data.attributes) - - merge_attributes(new_attributes) - self - end - - def attach(instance_or_id, mountpoint=nil) - requires :id - instance_id = instance_or_id.is_a?(Server) ? instance_or_id.id : instance_or_id - unless instance_id - raise ArgumentError, "Missing required argument: instance_or_id" - end - - options = { - 'id' => id, - 'virtualmachineid' => instance_id, - } - options.merge!('deviceid' => mountpoint) if mountpoint - - data = service.attach_volume(options) - - service.jobs.new(data["attachvolumeresponse"]) - end - - def detach - requires :id - - data = service.detach_volume('id' => id) - - service.jobs.new(data["detachvolumeresponse"]) - end - - def destroy - requires :id - service.delete_volume('id' => id) - true - end - end # Volume - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/volumes.rb b/lib/fog/cloudstack/models/compute/volumes.rb deleted file mode 100644 index b5df36d14..000000000 --- a/lib/fog/cloudstack/models/compute/volumes.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/volume' - -module Fog - module Compute - class Cloudstack - class Volumes < Fog::Collection - model Fog::Compute::Cloudstack::Volume - - def all(attributes = {}) - response = service.list_volumes(attributes) - data = response["listvolumesresponse"]["volume"] || [] - load(data) - end - - def get(volume_id) - if volume = service.list_volumes('id' => volume_id)["listvolumesresponse"]["volume"].first - new(volume) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/models/compute/zone.rb b/lib/fog/cloudstack/models/compute/zone.rb deleted file mode 100644 index 00cfca359..000000000 --- a/lib/fog/cloudstack/models/compute/zone.rb +++ /dev/null @@ -1,38 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Zone < Fog::Model - identity :id, :aliases => 'id' - attribute :name - attribute :domain_id, :aliases => 'domainid' - attribute :domain_name, :aliases => ['domainname', 'domain'] - attribute :network_type, :aliases => 'networktype' - attribute :security_groups_enabled, :aliases => ['securitygroupsenabled', 'securitygroupenabled'] - attribute :allocation_state, :aliases => 'allocationstate' - attribute :zone_token, :aliases => 'zonetoken' - attribute :dhcp_provider, :aliases => 'dhcpprovider' - - attr_accessor :dns1, :dns2, :internaldns1, :internaldns2, :guest_cidr_address - - def save - options = { - 'dns1' => dns1, - 'internaldns1' => internaldns1, - 'name' => name, - 'networktype' => network_type, - 'allocationstate' => allocation_state, - 'dns2' => dns2, - 'domain' => domain_name, - 'domainid' => domain_id, - 'guestcidraddress' => guest_cidr_address, - 'internaldns2' => internaldns2, - 'securitygroupenabled' => security_groups_enabled, - } - data = service.create_zone(options) - merge_attributes(data['createzoneresponse']) - end - - end # Zone - end # Cloudstack - end # Compute -end # Fog diff --git a/lib/fog/cloudstack/models/compute/zones.rb b/lib/fog/cloudstack/models/compute/zones.rb deleted file mode 100644 index 5a547cdc3..000000000 --- a/lib/fog/cloudstack/models/compute/zones.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'fog/core/collection' -require 'fog/cloudstack/models/compute/zone' - -module Fog - module Compute - class Cloudstack - class Zones < Fog::Collection - model Fog::Compute::Cloudstack::Zone - - def all(filters={}) - options = { - 'templatefilter' => 'self' - }.merge(filters) - - data = service.list_zones(options)["listzonesresponse"]["zone"] || [] - load(data) - end - - def get(zone_id) - if zone = service.list_zones('id' => zone_id)["listzonesresponse"]["zone"].first - new(zone) - end - rescue Fog::Compute::Cloudstack::BadRequest - nil - end - end - end - end -end diff --git a/lib/fog/cloudstack/requests/compute/acquire_ip_address.rb b/lib/fog/cloudstack/requests/compute/acquire_ip_address.rb deleted file mode 100644 index 9a786441c..000000000 --- a/lib/fog/cloudstack/requests/compute/acquire_ip_address.rb +++ /dev/null @@ -1,18 +0,0 @@ -module Fog - module Compute - class Cloudstack - class Real - # Creates an account. - # - # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/associateIpAddress.html] - def acquire_ip_address(options={}) - options.merge!( - 'command' => 'associateIpAddress' - ) - - request(options) - end - end - end - end -end diff --git a/lib/fog/cloudstack/requests/compute/activate_project.rb b/lib/fog/cloudstack/requests/compute/activate_project.rb deleted file mode 100644 index 466652313..000000000 --- a/lib/fog/cloudstack/requests/compute/activate_project.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Activates a project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/activateProject.html] - def activate_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'activateProject') - else - options.merge!('command' => 'activateProject', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_account_to_project.rb b/lib/fog/cloudstack/requests/compute/add_account_to_project.rb deleted file mode 100644 index 2e98605d3..000000000 --- a/lib/fog/cloudstack/requests/compute/add_account_to_project.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds acoount to a project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addAccountToProject.html] - def add_account_to_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addAccountToProject') - else - options.merge!('command' => 'addAccountToProject', - 'projectid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_baremetal_dhcp.rb b/lib/fog/cloudstack/requests/compute/add_baremetal_dhcp.rb deleted file mode 100644 index e60744d7b..000000000 --- a/lib/fog/cloudstack/requests/compute/add_baremetal_dhcp.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # adds a baremetal dhcp server - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addBaremetalDhcp.html] - def add_baremetal_dhcp(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addBaremetalDhcp') - else - options.merge!('command' => 'addBaremetalDhcp', - 'dhcpservertype' => args[0], - 'username' => args[1], - 'url' => args[2], - 'physicalnetworkid' => args[3], - 'password' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_baremetal_host.rb b/lib/fog/cloudstack/requests/compute/add_baremetal_host.rb deleted file mode 100644 index c9952534f..000000000 --- a/lib/fog/cloudstack/requests/compute/add_baremetal_host.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # add a baremetal host - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addBaremetalHost.html] - def add_baremetal_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addBaremetalHost') - else - options.merge!('command' => 'addBaremetalHost', - 'podid' => args[0], - 'url' => args[1], - 'hypervisor' => args[2], - 'username' => args[3], - 'zoneid' => args[4], - 'password' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_baremetal_pxe_kick_start_server.rb b/lib/fog/cloudstack/requests/compute/add_baremetal_pxe_kick_start_server.rb deleted file mode 100644 index 183430a33..000000000 --- a/lib/fog/cloudstack/requests/compute/add_baremetal_pxe_kick_start_server.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # add a baremetal pxe server - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addBaremetalPxeKickStartServer.html] - def add_baremetal_pxe_kick_start_server(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addBaremetalPxeKickStartServer') - else - options.merge!('command' => 'addBaremetalPxeKickStartServer', - 'url' => args[0], - 'username' => args[1], - 'tftpdir' => args[2], - 'pxeservertype' => args[3], - 'password' => args[4], - 'physicalnetworkid' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_baremetal_pxe_ping_server.rb b/lib/fog/cloudstack/requests/compute/add_baremetal_pxe_ping_server.rb deleted file mode 100644 index 7c9ac09c4..000000000 --- a/lib/fog/cloudstack/requests/compute/add_baremetal_pxe_ping_server.rb +++ /dev/null @@ -1,32 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # add a baremetal ping pxe server - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addBaremetalPxePingServer.html] - def add_baremetal_pxe_ping_server(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addBaremetalPxePingServer') - else - options.merge!('command' => 'addBaremetalPxePingServer', - 'physicalnetworkid' => args[0], - 'pxeservertype' => args[1], - 'pingstorageserverip' => args[2], - 'url' => args[3], - 'tftpdir' => args[4], - 'password' => args[5], - 'pingdir' => args[6], - 'username' => args[7]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_big_switch_vns_device.rb b/lib/fog/cloudstack/requests/compute/add_big_switch_vns_device.rb deleted file mode 100644 index 601b4609e..000000000 --- a/lib/fog/cloudstack/requests/compute/add_big_switch_vns_device.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a BigSwitch VNS device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addBigSwitchVnsDevice.html] - def add_big_switch_vns_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addBigSwitchVnsDevice') - else - options.merge!('command' => 'addBigSwitchVnsDevice', - 'hostname' => args[0], - 'physicalnetworkid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_cisco_asa1000v_resource.rb b/lib/fog/cloudstack/requests/compute/add_cisco_asa1000v_resource.rb deleted file mode 100644 index b9f5301df..000000000 --- a/lib/fog/cloudstack/requests/compute/add_cisco_asa1000v_resource.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a Cisco Asa 1000v appliance - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addCiscoAsa1000vResource.html] - def add_cisco_asa1000v_resource(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addCiscoAsa1000vResource') - else - options.merge!('command' => 'addCiscoAsa1000vResource', - 'hostname' => args[0], - 'physicalnetworkid' => args[1], - 'insideportprofile' => args[2], - 'clusterid' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_cisco_vnmc_resource.rb b/lib/fog/cloudstack/requests/compute/add_cisco_vnmc_resource.rb deleted file mode 100644 index 7d2774cd3..000000000 --- a/lib/fog/cloudstack/requests/compute/add_cisco_vnmc_resource.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a Cisco Vnmc Controller - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addCiscoVnmcResource.html] - def add_cisco_vnmc_resource(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addCiscoVnmcResource') - else - options.merge!('command' => 'addCiscoVnmcResource', - 'username' => args[0], - 'hostname' => args[1], - 'password' => args[2], - 'physicalnetworkid' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_cluster.rb b/lib/fog/cloudstack/requests/compute/add_cluster.rb deleted file mode 100644 index dc306a429..000000000 --- a/lib/fog/cloudstack/requests/compute/add_cluster.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a new cluster - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addCluster.html] - def add_cluster(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addCluster') - else - options.merge!('command' => 'addCluster', - 'clustertype' => args[0], - 'hypervisor' => args[1], - 'clustername' => args[2], - 'podid' => args[3], - 'zoneid' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_external_firewall.rb b/lib/fog/cloudstack/requests/compute/add_external_firewall.rb deleted file mode 100644 index dac97f3bc..000000000 --- a/lib/fog/cloudstack/requests/compute/add_external_firewall.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds an external firewall appliance - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addExternalFirewall.html] - def add_external_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addExternalFirewall') - else - options.merge!('command' => 'addExternalFirewall', - 'url' => args[0], - 'username' => args[1], - 'password' => args[2], - 'zoneid' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_external_load_balancer.rb b/lib/fog/cloudstack/requests/compute/add_external_load_balancer.rb deleted file mode 100644 index b6ad9d7a5..000000000 --- a/lib/fog/cloudstack/requests/compute/add_external_load_balancer.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds F5 external load balancer appliance. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addExternalLoadBalancer.html] - def add_external_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addExternalLoadBalancer') - else - options.merge!('command' => 'addExternalLoadBalancer', - 'zoneid' => args[0], - 'url' => args[1], - 'password' => args[2], - 'username' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_f5_load_balancer.rb b/lib/fog/cloudstack/requests/compute/add_f5_load_balancer.rb deleted file mode 100644 index 184518add..000000000 --- a/lib/fog/cloudstack/requests/compute/add_f5_load_balancer.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a F5 BigIP load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addF5LoadBalancer.html] - def add_f5_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addF5LoadBalancer') - else - options.merge!('command' => 'addF5LoadBalancer', - 'password' => args[0], - 'physicalnetworkid' => args[1], - 'networkdevicetype' => args[2], - 'username' => args[3], - 'url' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_guest_os.rb b/lib/fog/cloudstack/requests/compute/add_guest_os.rb deleted file mode 100644 index 729954d21..000000000 --- a/lib/fog/cloudstack/requests/compute/add_guest_os.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Add a new guest OS type - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addGuestOs.html] - def add_guest_os(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addGuestOs') - else - options.merge!('command' => 'addGuestOs', - 'osdisplayname' => args[0], - 'oscategoryid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_guest_os_mapping.rb b/lib/fog/cloudstack/requests/compute/add_guest_os_mapping.rb deleted file mode 100644 index 63e501742..000000000 --- a/lib/fog/cloudstack/requests/compute/add_guest_os_mapping.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a guest OS name to hypervisor OS name mapping - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addGuestOsMapping.html] - def add_guest_os_mapping(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addGuestOsMapping') - else - options.merge!('command' => 'addGuestOsMapping', - 'hypervisor' => args[0], - 'osnameforhypervisor' => args[1], - 'hypervisorversion' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_host.rb b/lib/fog/cloudstack/requests/compute/add_host.rb deleted file mode 100644 index b04435910..000000000 --- a/lib/fog/cloudstack/requests/compute/add_host.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a new host. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addHost.html] - def add_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addHost') - else - options.merge!('command' => 'addHost', - 'url' => args[0], - 'zoneid' => args[1], - 'username' => args[2], - 'password' => args[3], - 'hypervisor' => args[4], - 'podid' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_image_store.rb b/lib/fog/cloudstack/requests/compute/add_image_store.rb deleted file mode 100644 index 8acc8a3d7..000000000 --- a/lib/fog/cloudstack/requests/compute/add_image_store.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds backup image store. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addImageStore.html] - def add_image_store(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addImageStore') - else - options.merge!('command' => 'addImageStore', - 'provider' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_ip_to_nic.rb b/lib/fog/cloudstack/requests/compute/add_ip_to_nic.rb deleted file mode 100644 index edab2a037..000000000 --- a/lib/fog/cloudstack/requests/compute/add_ip_to_nic.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Assigns secondary IP to NIC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addIpToNic.html] - def add_ip_to_nic(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addIpToNic') - else - options.merge!('command' => 'addIpToNic', - 'nicid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_ldap_configuration.rb b/lib/fog/cloudstack/requests/compute/add_ldap_configuration.rb deleted file mode 100644 index 0b99674a5..000000000 --- a/lib/fog/cloudstack/requests/compute/add_ldap_configuration.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Add a new Ldap Configuration - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addLdapConfiguration.html] - def add_ldap_configuration(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addLdapConfiguration') - else - options.merge!('command' => 'addLdapConfiguration', - 'port' => args[0], - 'hostname' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_netscaler_load_balancer.rb b/lib/fog/cloudstack/requests/compute/add_netscaler_load_balancer.rb deleted file mode 100644 index e4b27c99e..000000000 --- a/lib/fog/cloudstack/requests/compute/add_netscaler_load_balancer.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a netscaler load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addNetscalerLoadBalancer.html] - def add_netscaler_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addNetscalerLoadBalancer') - else - options.merge!('command' => 'addNetscalerLoadBalancer', - 'username' => args[0], - 'networkdevicetype' => args[1], - 'password' => args[2], - 'physicalnetworkid' => args[3], - 'url' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_network_device.rb b/lib/fog/cloudstack/requests/compute/add_network_device.rb deleted file mode 100644 index 02cf1bf74..000000000 --- a/lib/fog/cloudstack/requests/compute/add_network_device.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a network device of one of the following types: ExternalDhcp, ExternalFirewall, ExternalLoadBalancer, PxeServer - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addNetworkDevice.html] - def add_network_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addNetworkDevice') - else - options.merge!('command' => 'addNetworkDevice') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_network_service_provider.rb b/lib/fog/cloudstack/requests/compute/add_network_service_provider.rb deleted file mode 100644 index 250b887c5..000000000 --- a/lib/fog/cloudstack/requests/compute/add_network_service_provider.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a network serviceProvider to a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addNetworkServiceProvider.html] - def add_network_service_provider(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addNetworkServiceProvider') - else - options.merge!('command' => 'addNetworkServiceProvider', - 'name' => args[0], - 'physicalnetworkid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_nic_to_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/add_nic_to_virtual_machine.rb deleted file mode 100644 index a02fcd733..000000000 --- a/lib/fog/cloudstack/requests/compute/add_nic_to_virtual_machine.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds VM to specified network by creating a NIC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addNicToVirtualMachine.html] - def add_nic_to_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addNicToVirtualMachine') - else - options.merge!('command' => 'addNicToVirtualMachine', - 'virtualmachineid' => args[0], - 'networkid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_nicira_nvp_device.rb b/lib/fog/cloudstack/requests/compute/add_nicira_nvp_device.rb deleted file mode 100644 index 58e783d60..000000000 --- a/lib/fog/cloudstack/requests/compute/add_nicira_nvp_device.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a Nicira NVP device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addNiciraNvpDevice.html] - def add_nicira_nvp_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addNiciraNvpDevice') - else - options.merge!('command' => 'addNiciraNvpDevice', - 'physicalnetworkid' => args[0], - 'transportzoneuuid' => args[1], - 'username' => args[2], - 'password' => args[3], - 'hostname' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_open_daylight_controller.rb b/lib/fog/cloudstack/requests/compute/add_open_daylight_controller.rb deleted file mode 100644 index 3bfaae065..000000000 --- a/lib/fog/cloudstack/requests/compute/add_open_daylight_controller.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds an OpenDyalight controler - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addOpenDaylightController.html] - def add_open_daylight_controller(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addOpenDaylightController') - else - options.merge!('command' => 'addOpenDaylightController', - 'physicalnetworkid' => args[0], - 'url' => args[1], - 'password' => args[2], - 'username' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_palo_alto_firewall.rb b/lib/fog/cloudstack/requests/compute/add_palo_alto_firewall.rb deleted file mode 100644 index c714344f6..000000000 --- a/lib/fog/cloudstack/requests/compute/add_palo_alto_firewall.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a Palo Alto firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addPaloAltoFirewall.html] - def add_palo_alto_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addPaloAltoFirewall') - else - options.merge!('command' => 'addPaloAltoFirewall', - 'username' => args[0], - 'networkdevicetype' => args[1], - 'password' => args[2], - 'physicalnetworkid' => args[3], - 'url' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_region.rb b/lib/fog/cloudstack/requests/compute/add_region.rb deleted file mode 100644 index f42231a25..000000000 --- a/lib/fog/cloudstack/requests/compute/add_region.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a Region - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addRegion.html] - def add_region(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addRegion') - else - options.merge!('command' => 'addRegion', - 'id' => args[0], - 'name' => args[1], - 'endpoint' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_resource_detail.rb b/lib/fog/cloudstack/requests/compute/add_resource_detail.rb deleted file mode 100644 index c025e7b01..000000000 --- a/lib/fog/cloudstack/requests/compute/add_resource_detail.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds detail for the Resource. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addResourceDetail.html] - def add_resource_detail(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addResourceDetail') - else - options.merge!('command' => 'addResourceDetail', - 'resourcetype' => args[0], - 'details' => args[1], - 'resourceid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_s3.rb b/lib/fog/cloudstack/requests/compute/add_s3.rb deleted file mode 100644 index bc2ddb4b2..000000000 --- a/lib/fog/cloudstack/requests/compute/add_s3.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds S3 - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addS3.html] - def add_s3(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addS3') - else - options.merge!('command' => 'addS3', - 'accesskey' => args[0], - 'bucket' => args[1], - 'secretkey' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_secondary_storage.rb b/lib/fog/cloudstack/requests/compute/add_secondary_storage.rb deleted file mode 100644 index c7f5c45e5..000000000 --- a/lib/fog/cloudstack/requests/compute/add_secondary_storage.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds secondary storage. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addSecondaryStorage.html] - def add_secondary_storage(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addSecondaryStorage') - else - options.merge!('command' => 'addSecondaryStorage', - 'url' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_srx_firewall.rb b/lib/fog/cloudstack/requests/compute/add_srx_firewall.rb deleted file mode 100644 index bec9531ba..000000000 --- a/lib/fog/cloudstack/requests/compute/add_srx_firewall.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a SRX firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addSrxFirewall.html] - def add_srx_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addSrxFirewall') - else - options.merge!('command' => 'addSrxFirewall', - 'username' => args[0], - 'networkdevicetype' => args[1], - 'physicalnetworkid' => args[2], - 'password' => args[3], - 'url' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_stratosphere_ssp.rb b/lib/fog/cloudstack/requests/compute/add_stratosphere_ssp.rb deleted file mode 100644 index 8dd4d1bf8..000000000 --- a/lib/fog/cloudstack/requests/compute/add_stratosphere_ssp.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds stratosphere ssp server - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addStratosphereSsp.html] - def add_stratosphere_ssp(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addStratosphereSsp') - else - options.merge!('command' => 'addStratosphereSsp', - 'url' => args[0], - 'zoneid' => args[1], - 'name' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_swift.rb b/lib/fog/cloudstack/requests/compute/add_swift.rb deleted file mode 100644 index cfcad4dec..000000000 --- a/lib/fog/cloudstack/requests/compute/add_swift.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds Swift. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addSwift.html] - def add_swift(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addSwift') - else - options.merge!('command' => 'addSwift', - 'url' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_traffic_monitor.rb b/lib/fog/cloudstack/requests/compute/add_traffic_monitor.rb deleted file mode 100644 index 7a978c2fe..000000000 --- a/lib/fog/cloudstack/requests/compute/add_traffic_monitor.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds Traffic Monitor Host for Direct Network Usage - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addTrafficMonitor.html] - def add_traffic_monitor(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addTrafficMonitor') - else - options.merge!('command' => 'addTrafficMonitor', - 'zoneid' => args[0], - 'url' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_traffic_type.rb b/lib/fog/cloudstack/requests/compute/add_traffic_type.rb deleted file mode 100644 index 6b30e0662..000000000 --- a/lib/fog/cloudstack/requests/compute/add_traffic_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds traffic type to a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addTrafficType.html] - def add_traffic_type(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addTrafficType') - else - options.merge!('command' => 'addTrafficType', - 'traffictype' => args[0], - 'physicalnetworkid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_ucs_manager.rb b/lib/fog/cloudstack/requests/compute/add_ucs_manager.rb deleted file mode 100644 index 79b1577f5..000000000 --- a/lib/fog/cloudstack/requests/compute/add_ucs_manager.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a Ucs manager - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addUcsManager.html] - def add_ucs_manager(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addUcsManager') - else - options.merge!('command' => 'addUcsManager', - 'url' => args[0], - 'password' => args[1], - 'username' => args[2], - 'zoneid' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_vmware_dc.rb b/lib/fog/cloudstack/requests/compute/add_vmware_dc.rb deleted file mode 100644 index 34e41f540..000000000 --- a/lib/fog/cloudstack/requests/compute/add_vmware_dc.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds a VMware datacenter to specified zone - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addVmwareDc.html] - def add_vmware_dc(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addVmwareDc') - else - options.merge!('command' => 'addVmwareDc', - 'zoneid' => args[0], - 'vcenter' => args[1], - 'name' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/add_vpn_user.rb b/lib/fog/cloudstack/requests/compute/add_vpn_user.rb deleted file mode 100644 index ff94098b2..000000000 --- a/lib/fog/cloudstack/requests/compute/add_vpn_user.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds vpn users - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/addVpnUser.html] - def add_vpn_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'addVpnUser') - else - options.merge!('command' => 'addVpnUser', - 'password' => args[0], - 'username' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/archive_alerts.rb b/lib/fog/cloudstack/requests/compute/archive_alerts.rb deleted file mode 100644 index d6e5b1cfa..000000000 --- a/lib/fog/cloudstack/requests/compute/archive_alerts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Archive one or more alerts. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/archiveAlerts.html] - def archive_alerts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'archiveAlerts') - else - options.merge!('command' => 'archiveAlerts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/archive_events.rb b/lib/fog/cloudstack/requests/compute/archive_events.rb deleted file mode 100644 index 65cde99af..000000000 --- a/lib/fog/cloudstack/requests/compute/archive_events.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Archive one or more events. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/archiveEvents.html] - def archive_events(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'archiveEvents') - else - options.merge!('command' => 'archiveEvents') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/assign_cert_to_load_balancer.rb b/lib/fog/cloudstack/requests/compute/assign_cert_to_load_balancer.rb deleted file mode 100644 index ff030b81b..000000000 --- a/lib/fog/cloudstack/requests/compute/assign_cert_to_load_balancer.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Assigns a certificate to a Load Balancer Rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/assignCertToLoadBalancer.html] - def assign_cert_to_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'assignCertToLoadBalancer') - else - options.merge!('command' => 'assignCertToLoadBalancer', - 'lbruleid' => args[0], - 'certid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/assign_to_global_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/assign_to_global_load_balancer_rule.rb deleted file mode 100644 index 1e104c86e..000000000 --- a/lib/fog/cloudstack/requests/compute/assign_to_global_load_balancer_rule.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Assign load balancer rule or list of load balancer rules to a global load balancer rules. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/assignToGlobalLoadBalancerRule.html] - def assign_to_global_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'assignToGlobalLoadBalancerRule') - else - options.merge!('command' => 'assignToGlobalLoadBalancerRule', - 'id' => args[0], - 'loadbalancerrulelist' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb deleted file mode 100644 index 9b243ef14..000000000 --- a/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Assigns virtual machine or a list of virtual machines to a load balancer rule. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/assignToLoadBalancerRule.html] - def assign_to_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'assignToLoadBalancerRule') - else - options.merge!('command' => 'assignToLoadBalancerRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/assign_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/assign_virtual_machine.rb deleted file mode 100644 index 646b2a14c..000000000 --- a/lib/fog/cloudstack/requests/compute/assign_virtual_machine.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Change ownership of a VM from one account to another. This API is available for Basic zones with security groups and Advanced zones with guest networks. A root administrator can reassign a VM from any account to any other account in any domain. A domain administrator can reassign a VM to any account in the same domain. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/assignVirtualMachine.html] - def assign_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'assignVirtualMachine') - else - options.merge!('command' => 'assignVirtualMachine', - 'account' => args[0], - 'virtualmachineid' => args[1], - 'domainid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/associate_ip_address.rb b/lib/fog/cloudstack/requests/compute/associate_ip_address.rb deleted file mode 100644 index 42fa5141b..000000000 --- a/lib/fog/cloudstack/requests/compute/associate_ip_address.rb +++ /dev/null @@ -1,55 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Acquires and associates a public IP to an account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/associateIpAddress.html] - def associate_ip_address(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'associateIpAddress') - else - options.merge!('command' => 'associateIpAddress') - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - class Mock - def associate_ip_address(*args) - public_ip_address_id = Fog::Cloudstack.uuid - public_ip_address = { - "id" => public_ip_address_id, - "ipaddress" => "192.168.200.3", - "allocated" => "2014-12-22T22:32:39+0000", - "zoneid" => "0e276270-7950-4483-bf21-3dc897dbe08a", - "zonename" => "Toronto", - "issourcenat" => false, - "projectid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "project" => "TestProject", - "domainid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "domain" => "TestDomain", - "forvirtualnetwork" => true, - "isstaticnat" => false, - "issystem" => false, - "associatednetworkid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "associatednetworkname" => "TestNetwork", - "networkid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "state" => "Allocated", - "physicalnetworkid" => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - "tags" => [] - - } - self.data[:public_ip_addresses][public_ip_address_id]= public_ip_address - {'associateipaddressresponse' => public_ip_address} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/associate_lun.rb b/lib/fog/cloudstack/requests/compute/associate_lun.rb deleted file mode 100644 index 02e527a5d..000000000 --- a/lib/fog/cloudstack/requests/compute/associate_lun.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Associate a LUN with a guest IQN - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/associateLun.html] - def associate_lun(iqn, name, options={}) - options.merge!( - 'command' => 'associateLun', - 'iqn' => iqn, - 'name' => name - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/associate_ucs_profile_to_blade.rb b/lib/fog/cloudstack/requests/compute/associate_ucs_profile_to_blade.rb deleted file mode 100644 index ddc23205c..000000000 --- a/lib/fog/cloudstack/requests/compute/associate_ucs_profile_to_blade.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # associate a profile to a blade - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/associateUcsProfileToBlade.html] - def associate_ucs_profile_to_blade(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'associateUcsProfileToBlade') - else - options.merge!('command' => 'associateUcsProfileToBlade', - 'profiledn' => args[0], - 'ucsmanagerid' => args[1], - 'bladeid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/attach_iso.rb b/lib/fog/cloudstack/requests/compute/attach_iso.rb deleted file mode 100644 index 60799541d..000000000 --- a/lib/fog/cloudstack/requests/compute/attach_iso.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Attaches an ISO to a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/attachIso.html] - def attach_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'attachIso') - else - options.merge!('command' => 'attachIso', - 'virtualmachineid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/attach_volume.rb b/lib/fog/cloudstack/requests/compute/attach_volume.rb deleted file mode 100644 index 5e83f411b..000000000 --- a/lib/fog/cloudstack/requests/compute/attach_volume.rb +++ /dev/null @@ -1,76 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Attaches a disk volume to a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/attachVolume.html] - def attach_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'attachVolume') - else - options.merge!('command' => 'attachVolume', - 'virtualmachineid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - class Mock - - def attach_volume(options={}) - volume_id = options['id'] - server_id = options['virtualmachineid'] - - volume = self.data[:volumes][volume_id] - unless volume - raise Fog::Compute::Cloudstack::BadRequest.new("Unable to execute API command attachvolume due to invalid value. Object volumes(uuid: #{volume_id}) does not exist.") - end - - server = self.data[:servers][server_id] - unless server - raise Fog::Compute::Cloudstack::BadRequest.new("Unable to execute API command attachvolume due to invalid value. Object vm_instance(uuid: #{server_id}) does not exist.") - end - - volume['virtualmachineid']= server['id'] - volume['vmname']= server['name'] - volume['vmdisplayname']= server['displayname'] - - job_id = Fog::Cloudstack.uuid - - # FIXME: need to determine current user - account_id = self.data[:accounts].first - user_id = self.data[:users].first - - job = { - "accountid" => account_id, - "userid" => user_id, - "cmd" => "com.cloud.api.commands.AttachVolumeCmd", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => - {"volume" => volume} - } - - self.data[:jobs][job_id]= job - - { - "attachvolumeresponse" => { - "jobid" => job_id - } - } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/authorize_security_group_egress.rb b/lib/fog/cloudstack/requests/compute/authorize_security_group_egress.rb deleted file mode 100644 index b76c988ad..000000000 --- a/lib/fog/cloudstack/requests/compute/authorize_security_group_egress.rb +++ /dev/null @@ -1,78 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Authorizes a particular egress rule for this security group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/authorizeSecurityGroupEgress.html] - def authorize_security_group_egress(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'authorizeSecurityGroupEgress') - else - options.merge!('command' => 'authorizeSecurityGroupEgress') - end - request(options) - end - end - - class Mock - def authorize_security_group_egress(options={}) - security_group_id = options['securitygroupid'] - security_group_rule_id = Fog::Cloudstack.uuid - - unless cidr = options['cidrlist'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter cidr') - end - - unless start_port = options['startport'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter start_port') - end - - unless end_port = options['endport'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter end_port') - end - - unless protocol = options['protocol'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter protocol') - end - - rule = { - "ruleid" => security_group_rule_id, - "cidr" => cidr, - "startport" => start_port, - "endport" => end_port, - "protocol" => protocol - } - - unless security_group = self.data[:security_groups][security_group_id] - raise Fog::Compute::Cloudstack::BadRequest.new("Security group id #{security_group_id} does not exist") - end - - security_group["egressrule"] ||= [] - security_group["egressrule"] << rule - - job_id = Fog::Cloudstack.uuid - job = { - "cmd" => "com.cloud.api.commands.authorizeSecurityGroupEgress", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => { "securitygroup" => security_group } - } - - self.data[:jobs][job_id]= job - - { "authorizesecuritygroupegressresponse" => { "jobid" => job_id } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/authorize_security_group_ingress.rb b/lib/fog/cloudstack/requests/compute/authorize_security_group_ingress.rb deleted file mode 100644 index 52e4a8275..000000000 --- a/lib/fog/cloudstack/requests/compute/authorize_security_group_ingress.rb +++ /dev/null @@ -1,78 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Authorizes a particular ingress rule for this security group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/authorizeSecurityGroupIngress.html] - def authorize_security_group_ingress(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'authorizeSecurityGroupIngress') - else - options.merge!('command' => 'authorizeSecurityGroupIngress') - end - request(options) - end - end - - class Mock - def authorize_security_group_ingress(options={}) - security_group_id = options['securitygroupid'] - security_group_rule_id = Fog::Cloudstack.uuid - - unless cidr = options['cidrlist'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter cidr') - end - - unless start_port = options['startport'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter start_port') - end - - unless end_port = options['endport'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter end_port') - end - - unless protocol = options['protocol'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter protocol') - end - - rule = { - "ruleid" => security_group_rule_id, - "cidr" => cidr, - "startport" => start_port, - "endport" => end_port, - "protocol" => protocol - } - - unless security_group = self.data[:security_groups][security_group_id] - raise Fog::Compute::Cloudstack::BadRequest.new("Security group id #{security_group_id} does not exist") - end - - security_group["ingressrule"] ||= [] - security_group["ingressrule"] << rule - - job_id = Fog::Cloudstack.uuid - job = { - "cmd" => "com.cloud.api.commands.authorizeSecurityGroupIngress", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => { "securitygroup" => security_group } - } - - self.data[:jobs][job_id]= job - - { "authorizesecuritygroupingressresponse" => { "jobid" => job_id } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/cancel_host_maintenance.rb b/lib/fog/cloudstack/requests/compute/cancel_host_maintenance.rb deleted file mode 100644 index dd16db107..000000000 --- a/lib/fog/cloudstack/requests/compute/cancel_host_maintenance.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Cancels host maintenance. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/cancelHostMaintenance.html] - def cancel_host_maintenance(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'cancelHostMaintenance') - else - options.merge!('command' => 'cancelHostMaintenance', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/cancel_storage_maintenance.rb b/lib/fog/cloudstack/requests/compute/cancel_storage_maintenance.rb deleted file mode 100644 index 61d163e74..000000000 --- a/lib/fog/cloudstack/requests/compute/cancel_storage_maintenance.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Cancels maintenance for primary storage - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/cancelStorageMaintenance.html] - def cancel_storage_maintenance(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'cancelStorageMaintenance') - else - options.merge!('command' => 'cancelStorageMaintenance', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/change_service_for_router.rb b/lib/fog/cloudstack/requests/compute/change_service_for_router.rb deleted file mode 100644 index e3c187a93..000000000 --- a/lib/fog/cloudstack/requests/compute/change_service_for_router.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Upgrades domain router to a new service offering - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/changeServiceForRouter.html] - def change_service_for_router(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'changeServiceForRouter') - else - options.merge!('command' => 'changeServiceForRouter', - 'serviceofferingid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/change_service_for_system_vm.rb b/lib/fog/cloudstack/requests/compute/change_service_for_system_vm.rb deleted file mode 100644 index 5fa5f1053..000000000 --- a/lib/fog/cloudstack/requests/compute/change_service_for_system_vm.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Changes the service offering for a system vm (console proxy or secondary storage). The system vm must be in a "Stopped" state for this command to take effect. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/changeServiceForSystemVm.html] - def change_service_for_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'changeServiceForSystemVm') - else - options.merge!('command' => 'changeServiceForSystemVm', - 'id' => args[0], - 'serviceofferingid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/change_service_for_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/change_service_for_virtual_machine.rb deleted file mode 100644 index 65b7abbd3..000000000 --- a/lib/fog/cloudstack/requests/compute/change_service_for_virtual_machine.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Changes the service offering for a virtual machine. The virtual machine must be in a "Stopped" state for this command to take effect. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/changeServiceForVirtualMachine.html] - def change_service_for_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'changeServiceForVirtualMachine') - else - options.merge!('command' => 'changeServiceForVirtualMachine', - 'serviceofferingid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/clean_vmreservations.rb b/lib/fog/cloudstack/requests/compute/clean_vmreservations.rb deleted file mode 100644 index 06d3a2619..000000000 --- a/lib/fog/cloudstack/requests/compute/clean_vmreservations.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Cleanups VM reservations in the database. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/cleanVMReservations.html] - def clean_vmreservations(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'cleanVMReservations') - else - options.merge!('command' => 'cleanVMReservations') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_f5_load_balancer.rb b/lib/fog/cloudstack/requests/compute/configure_f5_load_balancer.rb deleted file mode 100644 index 67053108e..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_f5_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # configures a F5 load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configureF5LoadBalancer.html] - def configure_f5_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configureF5LoadBalancer') - else - options.merge!('command' => 'configureF5LoadBalancer', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_internal_load_balancer_element.rb b/lib/fog/cloudstack/requests/compute/configure_internal_load_balancer_element.rb deleted file mode 100644 index a74eb432c..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_internal_load_balancer_element.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Configures an Internal Load Balancer element. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configureInternalLoadBalancerElement.html] - def configure_internal_load_balancer_element(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configureInternalLoadBalancerElement') - else - options.merge!('command' => 'configureInternalLoadBalancerElement', - 'id' => args[0], - 'enabled' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_netscaler_load_balancer.rb b/lib/fog/cloudstack/requests/compute/configure_netscaler_load_balancer.rb deleted file mode 100644 index 5f0706e91..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_netscaler_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # configures a netscaler load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configureNetscalerLoadBalancer.html] - def configure_netscaler_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configureNetscalerLoadBalancer') - else - options.merge!('command' => 'configureNetscalerLoadBalancer', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_ovs_element.rb b/lib/fog/cloudstack/requests/compute/configure_ovs_element.rb deleted file mode 100644 index 3a6cff359..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_ovs_element.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Configures an ovs element. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configureOvsElement.html] - def configure_ovs_element(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configureOvsElement') - else - options.merge!('command' => 'configureOvsElement', - 'id' => args[0], - 'enabled' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_palo_alto_firewall.rb b/lib/fog/cloudstack/requests/compute/configure_palo_alto_firewall.rb deleted file mode 100644 index 940250dfc..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_palo_alto_firewall.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Configures a Palo Alto firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configurePaloAltoFirewall.html] - def configure_palo_alto_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configurePaloAltoFirewall') - else - options.merge!('command' => 'configurePaloAltoFirewall', - 'fwdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_srx_firewall.rb b/lib/fog/cloudstack/requests/compute/configure_srx_firewall.rb deleted file mode 100644 index 190ebee07..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_srx_firewall.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Configures a SRX firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configureSrxFirewall.html] - def configure_srx_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configureSrxFirewall') - else - options.merge!('command' => 'configureSrxFirewall', - 'fwdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/configure_virtual_router_element.rb b/lib/fog/cloudstack/requests/compute/configure_virtual_router_element.rb deleted file mode 100644 index 610858a65..000000000 --- a/lib/fog/cloudstack/requests/compute/configure_virtual_router_element.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Configures a virtual router element. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/configureVirtualRouterElement.html] - def configure_virtual_router_element(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'configureVirtualRouterElement') - else - options.merge!('command' => 'configureVirtualRouterElement', - 'id' => args[0], - 'enabled' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/copy_iso.rb b/lib/fog/cloudstack/requests/compute/copy_iso.rb deleted file mode 100644 index 1c0aa8b12..000000000 --- a/lib/fog/cloudstack/requests/compute/copy_iso.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Copies an iso from one zone to another. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/copyIso.html] - def copy_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'copyIso') - else - options.merge!('command' => 'copyIso', - 'destzoneid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/copy_template.rb b/lib/fog/cloudstack/requests/compute/copy_template.rb deleted file mode 100644 index 46bb237e8..000000000 --- a/lib/fog/cloudstack/requests/compute/copy_template.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Copies a template from one zone to another. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/copyTemplate.html] - def copy_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'copyTemplate') - else - options.merge!('command' => 'copyTemplate', - 'id' => args[0], - 'destzoneid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_account.rb b/lib/fog/cloudstack/requests/compute/create_account.rb deleted file mode 100644 index 85c723f14..000000000 --- a/lib/fog/cloudstack/requests/compute/create_account.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createAccount.html] - def create_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createAccount') - else - options.merge!('command' => 'createAccount', - 'accounttype' => args[0], - 'lastname' => args[1], - 'email' => args[2], - 'firstname' => args[3], - 'username' => args[4], - 'password' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_affinity_group.rb b/lib/fog/cloudstack/requests/compute/create_affinity_group.rb deleted file mode 100644 index 87c3f39bf..000000000 --- a/lib/fog/cloudstack/requests/compute/create_affinity_group.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates an affinity/anti-affinity group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createAffinityGroup.html] - def create_affinity_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createAffinityGroup') - else - options.merge!('command' => 'createAffinityGroup', - 'type' => args[0], - 'name' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_auto_scale_policy.rb b/lib/fog/cloudstack/requests/compute/create_auto_scale_policy.rb deleted file mode 100644 index 6af375063..000000000 --- a/lib/fog/cloudstack/requests/compute/create_auto_scale_policy.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates an autoscale policy for a provision or deprovision action, the action is taken when the all the conditions evaluates to true for the specified duration. The policy is in effect once it is attached to a autscale vm group. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createAutoScalePolicy.html] - def create_auto_scale_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createAutoScalePolicy') - else - options.merge!('command' => 'createAutoScalePolicy', - 'duration' => args[0], - 'conditionids' => args[1], - 'action' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_auto_scale_vm_group.rb b/lib/fog/cloudstack/requests/compute/create_auto_scale_vm_group.rb deleted file mode 100644 index 2834495af..000000000 --- a/lib/fog/cloudstack/requests/compute/create_auto_scale_vm_group.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates and automatically starts a virtual machine based on a service offering, disk offering, and template. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createAutoScaleVmGroup.html] - def create_auto_scale_vm_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createAutoScaleVmGroup') - else - options.merge!('command' => 'createAutoScaleVmGroup', - 'minmembers' => args[0], - 'scaleuppolicyids' => args[1], - 'scaledownpolicyids' => args[2], - 'maxmembers' => args[3], - 'vmprofileid' => args[4], - 'lbruleid' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_auto_scale_vm_profile.rb b/lib/fog/cloudstack/requests/compute/create_auto_scale_vm_profile.rb deleted file mode 100644 index d7ad294f8..000000000 --- a/lib/fog/cloudstack/requests/compute/create_auto_scale_vm_profile.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a profile that contains information about the virtual machine which will be provisioned automatically by autoscale feature. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createAutoScaleVmProfile.html] - def create_auto_scale_vm_profile(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createAutoScaleVmProfile') - else - options.merge!('command' => 'createAutoScaleVmProfile', - 'templateid' => args[0], - 'zoneid' => args[1], - 'serviceofferingid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_condition.rb b/lib/fog/cloudstack/requests/compute/create_condition.rb deleted file mode 100644 index 7c41f85bb..000000000 --- a/lib/fog/cloudstack/requests/compute/create_condition.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a condition - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createCondition.html] - def create_condition(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createCondition') - else - options.merge!('command' => 'createCondition', - 'threshold' => args[0], - 'relationaloperator' => args[1], - 'counterid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_counter.rb b/lib/fog/cloudstack/requests/compute/create_counter.rb deleted file mode 100644 index 030f62102..000000000 --- a/lib/fog/cloudstack/requests/compute/create_counter.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Adds metric counter - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createCounter.html] - def create_counter(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createCounter') - else - options.merge!('command' => 'createCounter', - 'name' => args[0], - 'value' => args[1], - 'source' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_disk_offering.rb b/lib/fog/cloudstack/requests/compute/create_disk_offering.rb deleted file mode 100644 index 1d86b44ca..000000000 --- a/lib/fog/cloudstack/requests/compute/create_disk_offering.rb +++ /dev/null @@ -1,56 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a disk offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createDiskOffering.html] - def create_disk_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createDiskOffering') - else - options.merge!('command' => 'createDiskOffering', - 'displaytext' => args[0], - 'name' => args[1]) - end - request(options) - end - end - - class Mock - - def create_disk_offering(options={}) - disk_offering_id = Fog::Cloudstack.uuid - - first_domain_data = data[:domains].first.last - domain_id = options['domainid'] || first_domain_data['id'] - domain_name = data[:domains][domain_id]['name'] - - storage_type = options['storagetype'] || 'shared' - customized = options['customized'] || false - disk_size = options['disk_size'] || 1 - - disk_offering = { - "id" => disk_offering_id, - "domainid" => domain_id, - "domain" => domain_name, - "name" => options['name'], - "displaytext" => options['display_text'], - "disksize" => disk_size, - "created" => Time.now.iso8601, - "iscustomized" => customized, - "storagetype" => storage_type - } - - self.data[:disk_offerings][disk_offering_id] = disk_offering - - {'creatediskofferingresponse' => disk_offering} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_domain.rb b/lib/fog/cloudstack/requests/compute/create_domain.rb deleted file mode 100644 index 5388b8e64..000000000 --- a/lib/fog/cloudstack/requests/compute/create_domain.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a domain - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createDomain.html] - def create_domain(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createDomain') - else - options.merge!('command' => 'createDomain', - 'name' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_egress_firewall_rule.rb b/lib/fog/cloudstack/requests/compute/create_egress_firewall_rule.rb deleted file mode 100644 index efe620518..000000000 --- a/lib/fog/cloudstack/requests/compute/create_egress_firewall_rule.rb +++ /dev/null @@ -1,44 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a egress firewall rule for a given network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createEgressFirewallRule.html] - def create_egress_firewall_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createEgressFirewallRule') - else - options.merge!('command' => 'createEgressFirewallRule', - 'networkid' => args[0], - 'protocol' => args[1]) - end - request(options) - end - end - - class Mock - def create_egress_firewall_rule(*args) - egress_firewall_rule_id = Fog::Cloudstack.uuid - - egress_firewall_rule = { - "id" => egress_firewall_rule_id, - "protocol" => "tcp", - "networkid" => "f1f1f1-f1f1-f1f1f1-f1f1f1f1f1", - "state" => "Active", - "cidrlist" => "10.2.1.0/24", - } - - self.data[:egress_firewall_rules][egress_firewall_rule_id] = egress_firewall_rule - - {'createegressfirewallruleresponse' => egress_firewall_rule} - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_firewall_rule.rb b/lib/fog/cloudstack/requests/compute/create_firewall_rule.rb deleted file mode 100644 index 971a83c82..000000000 --- a/lib/fog/cloudstack/requests/compute/create_firewall_rule.rb +++ /dev/null @@ -1,48 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a firewall rule for a given ip address - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createFirewallRule.html] - def create_firewall_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createFirewallRule') - else - options.merge!('command' => 'createFirewallRule', - 'ipaddressid' => args[0], - 'protocol' => args[1]) - end - request(options) - end - end - - class Mock - def create_firewall_rule(options={}) - firewall_rule_id = Fog::Cloudstack.uuid - - firewall_rule = { - "id" => network_offering_id, - "protocol" => "tcp", - "startport" => 80, - "endport" => 80, - "ipaddressid" => "f1f1f1f1-f1f1-f1f1-f1f1f1f1f1f1", - "networkid" => "f1f1f1f1-f1f1-f1f1-f1f1f1f1f1f1", - "ipaddress" => "10.1.1.253", - "state" => "Active", - "cidrlist" => "255.255.255.0/24" - } - - self.data[:firewall_rules][firewall_rule_id] = firewall_ruleetwork_offering - - {'createfirewallruleresponse' => firewall_rule} - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_global_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/create_global_load_balancer_rule.rb deleted file mode 100644 index e210ef2a5..000000000 --- a/lib/fog/cloudstack/requests/compute/create_global_load_balancer_rule.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a global load balancer rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createGlobalLoadBalancerRule.html] - def create_global_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createGlobalLoadBalancerRule') - else - options.merge!('command' => 'createGlobalLoadBalancerRule', - 'gslbdomainname' => args[0], - 'gslbservicetype' => args[1], - 'regionid' => args[2], - 'name' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_instance_group.rb b/lib/fog/cloudstack/requests/compute/create_instance_group.rb deleted file mode 100644 index 4194455cc..000000000 --- a/lib/fog/cloudstack/requests/compute/create_instance_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a vm group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createInstanceGroup.html] - def create_instance_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createInstanceGroup') - else - options.merge!('command' => 'createInstanceGroup', - 'name' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_internal_load_balancer_element.rb b/lib/fog/cloudstack/requests/compute/create_internal_load_balancer_element.rb deleted file mode 100644 index caf77a59d..000000000 --- a/lib/fog/cloudstack/requests/compute/create_internal_load_balancer_element.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create an Internal Load Balancer element. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createInternalLoadBalancerElement.html] - def create_internal_load_balancer_element(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createInternalLoadBalancerElement') - else - options.merge!('command' => 'createInternalLoadBalancerElement', - 'nspid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_ip_forwarding_rule.rb b/lib/fog/cloudstack/requests/compute/create_ip_forwarding_rule.rb deleted file mode 100644 index f10f9e7d4..000000000 --- a/lib/fog/cloudstack/requests/compute/create_ip_forwarding_rule.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates an ip forwarding rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createIpForwardingRule.html] - def create_ip_forwarding_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createIpForwardingRule') - else - options.merge!('command' => 'createIpForwardingRule', - 'ipaddressid' => args[0], - 'protocol' => args[1], - 'startport' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_lb_health_check_policy.rb b/lib/fog/cloudstack/requests/compute/create_lb_health_check_policy.rb deleted file mode 100644 index cfe652284..000000000 --- a/lib/fog/cloudstack/requests/compute/create_lb_health_check_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a Load Balancer healthcheck policy - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createLBHealthCheckPolicy.html] - def create_lb_health_check_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createLBHealthCheckPolicy') - else - options.merge!('command' => 'createLBHealthCheckPolicy', - 'lbruleid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_lb_stickiness_policy.rb b/lib/fog/cloudstack/requests/compute/create_lb_stickiness_policy.rb deleted file mode 100644 index 1996ca38c..000000000 --- a/lib/fog/cloudstack/requests/compute/create_lb_stickiness_policy.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a Load Balancer stickiness policy - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createLBStickinessPolicy.html] - def create_lb_stickiness_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createLBStickinessPolicy') - else - options.merge!('command' => 'createLBStickinessPolicy', - 'methodname' => args[0], - 'name' => args[1], - 'lbruleid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_load_balancer.rb b/lib/fog/cloudstack/requests/compute/create_load_balancer.rb deleted file mode 100644 index 504373882..000000000 --- a/lib/fog/cloudstack/requests/compute/create_load_balancer.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a Load Balancer - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createLoadBalancer.html] - def create_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createLoadBalancer') - else - options.merge!('command' => 'createLoadBalancer', - 'sourceipaddressnetworkid' => args[0], - 'algorithm' => args[1], - 'networkid' => args[2], - 'instanceport' => args[3], - 'scheme' => args[4], - 'name' => args[5], - 'sourceport' => args[6]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/create_load_balancer_rule.rb deleted file mode 100644 index 32042b786..000000000 --- a/lib/fog/cloudstack/requests/compute/create_load_balancer_rule.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a load balancer rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createLoadBalancerRule.html] - def create_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createLoadBalancerRule') - else - options.merge!('command' => 'createLoadBalancerRule', - 'name' => args[0], - 'privateport' => args[1], - 'algorithm' => args[2], - 'publicport' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_lun_on_filer.rb b/lib/fog/cloudstack/requests/compute/create_lun_on_filer.rb deleted file mode 100644 index efb2fc50a..000000000 --- a/lib/fog/cloudstack/requests/compute/create_lun_on_filer.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create a LUN from a pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/createLunOnFiler.html] - def create_lun_on_filer(size, name, options={}) - options.merge!( - 'command' => 'createLunOnFiler', - 'size' => size, - 'name' => name - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_network.rb b/lib/fog/cloudstack/requests/compute/create_network.rb deleted file mode 100644 index 5b19cc8a7..000000000 --- a/lib/fog/cloudstack/requests/compute/create_network.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createNetwork.html] - def create_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createNetwork') - else - options.merge!('command' => 'createNetwork', - 'displaytext' => args[0], - 'zoneid' => args[1], - 'name' => args[2], - 'networkofferingid' => args[3]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_network_acl.rb b/lib/fog/cloudstack/requests/compute/create_network_acl.rb deleted file mode 100644 index a4e47f215..000000000 --- a/lib/fog/cloudstack/requests/compute/create_network_acl.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a ACL rule in the given network (the network has to belong to VPC) - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createNetworkACL.html] - def create_network_acl(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createNetworkACL') - else - options.merge!('command' => 'createNetworkACL', - 'protocol' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_network_acl_list.rb b/lib/fog/cloudstack/requests/compute/create_network_acl_list.rb deleted file mode 100644 index 3471a3c3e..000000000 --- a/lib/fog/cloudstack/requests/compute/create_network_acl_list.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a Network ACL for the given VPC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createNetworkACLList.html] - def create_network_acl_list(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createNetworkACLList') - else - options.merge!('command' => 'createNetworkACLList', - 'name' => args[0], - 'vpcid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_network_offering.rb b/lib/fog/cloudstack/requests/compute/create_network_offering.rb deleted file mode 100644 index 1aace4557..000000000 --- a/lib/fog/cloudstack/requests/compute/create_network_offering.rb +++ /dev/null @@ -1,55 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a network offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createNetworkOffering.html] - def create_network_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createNetworkOffering') - else - options.merge!('command' => 'createNetworkOffering', - 'traffictype' => args[0], - 'guestiptype' => args[1], - 'name' => args[2], - 'supportedservices' => args[3], - 'displaytext' => args[4]) - end - request(options) - end - end - - class Mock - def create_network_offering(options={}) - network_offering_id = Fog::Cloudstack.uuid - - network_offering = { - "id" => network_offering_id, - "name" => "Isolated Network for VPC", - "displaytext" => "Isolated Network for VPC", - "traffictype" => "Guest", - "isdefault" => true, - "specifyvlan" => true, - "conservemode" => true, - "specifyipranges" => false, - "availability" => "Optional", - "networkrate" => 200, - "state" => "Enabled", - "guestiptype" => "Isolated", - "serviceofferingid" => "eaec129c-f1f1-f1f1-f1f1-a379f6b2897d" - } - - self.data[:network_offerings][network_offering_id] = network_offering - - {'createnetworkofferingresponse' => network_offering} - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_physical_network.rb b/lib/fog/cloudstack/requests/compute/create_physical_network.rb deleted file mode 100644 index 4ab133392..000000000 --- a/lib/fog/cloudstack/requests/compute/create_physical_network.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createPhysicalNetwork.html] - def create_physical_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createPhysicalNetwork') - else - options.merge!('command' => 'createPhysicalNetwork', - 'name' => args[0], - 'zoneid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_pod.rb b/lib/fog/cloudstack/requests/compute/create_pod.rb deleted file mode 100644 index ab0823cc0..000000000 --- a/lib/fog/cloudstack/requests/compute/create_pod.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a new Pod. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createPod.html] - def create_pod(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createPod') - else - options.merge!('command' => 'createPod', - 'netmask' => args[0], - 'zoneid' => args[1], - 'name' => args[2], - 'gateway' => args[3], - 'startip' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_pool.rb b/lib/fog/cloudstack/requests/compute/create_pool.rb deleted file mode 100644 index 19ff70cd8..000000000 --- a/lib/fog/cloudstack/requests/compute/create_pool.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create a pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/createPool.html] - def create_pool(algorithm, name, options={}) - options.merge!( - 'command' => 'createPool', - 'algorithm' => algorithm, - 'name' => name - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_port_forwarding_rule.rb b/lib/fog/cloudstack/requests/compute/create_port_forwarding_rule.rb deleted file mode 100644 index f69d949f2..000000000 --- a/lib/fog/cloudstack/requests/compute/create_port_forwarding_rule.rb +++ /dev/null @@ -1,55 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a port forwarding rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createPortForwardingRule.html] - def create_port_forwarding_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createPortForwardingRule') - else - options.merge!('command' => 'createPortForwardingRule', - 'virtualmachineid' => args[0], - 'protocol' => args[1], - 'privateport' => args[2], - 'ipaddressid' => args[3], - 'publicport' => args[4]) - end - request(options) - end - end - - class Mock - def create_port_forwarding_rule(*args) - port_forwarding_rule_id = "43192143-5828-6831-58286837474" - port_forwarding_rule = { - 'id' => port_forwarding_rule_id, - 'privateport' => "110", - 'privateendport' => "110", - 'protocol' => "tcp", - 'publicport' => "111", - 'publicendport' => "111", - 'virtualmachineid' => "8f4627c5-1fdd-4504-8a92-f61b4e9cb3e3", - 'virtualmachinename' => "Pop3LoadBalancer", - 'virtualmachinedisplayname' => "Pop3LoadBalancer", - 'ipaddressid' => "f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1", - 'ipaddress' => "192.168.200.201", - 'state' => "Active", - 'cidrlist' => "", - 'tags' => [] - } - - self.data[:port_forwarding_rules][port_forwarding_rule_id]= port_forwarding_rule - {'createportforwardingruleresponse' => port_forwarding_rule} - - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_portable_ip_range.rb b/lib/fog/cloudstack/requests/compute/create_portable_ip_range.rb deleted file mode 100644 index 9b081281f..000000000 --- a/lib/fog/cloudstack/requests/compute/create_portable_ip_range.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # adds a range of portable public IP's to a region - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createPortableIpRange.html] - def create_portable_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createPortableIpRange') - else - options.merge!('command' => 'createPortableIpRange', - 'startip' => args[0], - 'netmask' => args[1], - 'regionid' => args[2], - 'gateway' => args[3], - 'endip' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_private_gateway.rb b/lib/fog/cloudstack/requests/compute/create_private_gateway.rb deleted file mode 100644 index 03003dd2c..000000000 --- a/lib/fog/cloudstack/requests/compute/create_private_gateway.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a private gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createPrivateGateway.html] - def create_private_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createPrivateGateway') - else - options.merge!('command' => 'createPrivateGateway', - 'ipaddress' => args[0], - 'vlan' => args[1], - 'netmask' => args[2], - 'vpcid' => args[3], - 'gateway' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_project.rb b/lib/fog/cloudstack/requests/compute/create_project.rb deleted file mode 100644 index 30099d1b4..000000000 --- a/lib/fog/cloudstack/requests/compute/create_project.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createProject.html] - def create_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createProject') - else - options.merge!('command' => 'createProject', - 'displaytext' => args[0], - 'name' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_remote_access_vpn.rb b/lib/fog/cloudstack/requests/compute/create_remote_access_vpn.rb deleted file mode 100644 index 470ff3b8d..000000000 --- a/lib/fog/cloudstack/requests/compute/create_remote_access_vpn.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a l2tp/ipsec remote access vpn - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createRemoteAccessVpn.html] - def create_remote_access_vpn(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createRemoteAccessVpn') - else - options.merge!('command' => 'createRemoteAccessVpn', - 'publicipid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_secondary_staging_store.rb b/lib/fog/cloudstack/requests/compute/create_secondary_staging_store.rb deleted file mode 100644 index 009c30cbd..000000000 --- a/lib/fog/cloudstack/requests/compute/create_secondary_staging_store.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # create secondary staging store. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createSecondaryStagingStore.html] - def create_secondary_staging_store(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createSecondaryStagingStore') - else - options.merge!('command' => 'createSecondaryStagingStore', - 'url' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_security_group.rb b/lib/fog/cloudstack/requests/compute/create_security_group.rb deleted file mode 100644 index d2811caea..000000000 --- a/lib/fog/cloudstack/requests/compute/create_security_group.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a security group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createSecurityGroup.html] - def create_security_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createSecurityGroup') - else - options.merge!('command' => 'createSecurityGroup', - 'name' => args[0]) - end - request(options) - end - end - - class Mock - def create_security_group(options={}) - security_group_id = Fog::Cloudstack.uuid - - security_group = { - "id" => security_group_id, - }.merge(options) - - self.data[:security_groups][security_group_id]= security_group - {"createsecuritygroupresponse" => { "securitygroup" => security_group}} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_service_instance.rb b/lib/fog/cloudstack/requests/compute/create_service_instance.rb deleted file mode 100644 index 3d326aad9..000000000 --- a/lib/fog/cloudstack/requests/compute/create_service_instance.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a system virtual-machine that implements network services - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createServiceInstance.html] - def create_service_instance(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createServiceInstance') - else - options.merge!('command' => 'createServiceInstance', - 'name' => args[0], - 'rightnetworkid' => args[1], - 'serviceofferingid' => args[2], - 'leftnetworkid' => args[3], - 'templateid' => args[4], - 'zoneid' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_service_offering.rb b/lib/fog/cloudstack/requests/compute/create_service_offering.rb deleted file mode 100644 index c1af066d5..000000000 --- a/lib/fog/cloudstack/requests/compute/create_service_offering.rb +++ /dev/null @@ -1,55 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a service offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createServiceOffering.html] - def create_service_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createServiceOffering') - else - options.merge!('command' => 'createServiceOffering', - 'name' => args[0], - 'displaytext' => args[1]) - end - request(options) - end - end - - class Mock - - def create_service_offering(options={}) - flavour_id = Fog::Cloudstack.uuid - - flavour = { - "id" => flavour_id, - "name" => "4CPU, 4 GB RAM, High Availability", - "displaytext" => "4CPU, 4 GB RAM, High Availability", - "cpunumber" => 4, - "cpuspeed" => 2000, - "memory" => 4096, - "created" => Time.now.iso8601, - "storagetype" => "shared", - "offerha" => true, - "limitcpuuse" => false, - "isvolatile" => false, - "issytem" => false, - "defaultuse" => false, - "iscustomized" => false, - "tags" => [] - } - - self.data[:flavours][flavour_id] = flavour - - {'createserviceofferingresponse' => flavour} - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_snapshot.rb b/lib/fog/cloudstack/requests/compute/create_snapshot.rb deleted file mode 100644 index 5673548cb..000000000 --- a/lib/fog/cloudstack/requests/compute/create_snapshot.rb +++ /dev/null @@ -1,48 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates an instant snapshot of a volume. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createSnapshot.html] - def create_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createSnapshot') - else - options.merge!('command' => 'createSnapshot', - 'volumeid' => args[0]) - end - request(options) - end - end - - class Mock - def create_snapshot(options={}) - snapshot_id = Fog::Cloudstack.uuid - - unless volume_id = options['volumeid'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command createsnapshot due to missing parameter volumeid') - end - - snapshot = { - "id" => snapshot_id, - "name" => "ROOT-6", - "created" => "2013-05-22T14:52:55-0500", - "state" => "BackedUp", - "account" => "accountname", - "domainid" => "6023b6fe-5bef-4358-bc76-9f4e75afa52f", - "domain" => "ROOT", - "intervaltype" => "weekly" - } - - self.data[:snapshots][snapshot_id]= snapshot - {'createsnapshotresponse' => snapshot} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_snapshot_policy.rb b/lib/fog/cloudstack/requests/compute/create_snapshot_policy.rb deleted file mode 100644 index cafc7ac41..000000000 --- a/lib/fog/cloudstack/requests/compute/create_snapshot_policy.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a snapshot policy for the account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createSnapshotPolicy.html] - def create_snapshot_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createSnapshotPolicy') - else - options.merge!('command' => 'createSnapshotPolicy', - 'volumeid' => args[0], - 'maxsnaps' => args[1], - 'timezone' => args[2], - 'intervaltype' => args[3], - 'schedule' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb b/lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb deleted file mode 100644 index 8ee895f03..000000000 --- a/lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create a new keypair and returns the private key - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createSSHKeyPair.html] - def create_ssh_key_pair(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createSSHKeyPair') - else - options.merge!('command' => 'createSSHKeyPair', - 'name' => args[0]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_static_route.rb b/lib/fog/cloudstack/requests/compute/create_static_route.rb deleted file mode 100644 index 8dc437659..000000000 --- a/lib/fog/cloudstack/requests/compute/create_static_route.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a static route - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createStaticRoute.html] - def create_static_route(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createStaticRoute') - else - options.merge!('command' => 'createStaticRoute', - 'gatewayid' => args[0], - 'cidr' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_storage_network_ip_range.rb b/lib/fog/cloudstack/requests/compute/create_storage_network_ip_range.rb deleted file mode 100644 index 6e3faad97..000000000 --- a/lib/fog/cloudstack/requests/compute/create_storage_network_ip_range.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a Storage network IP range. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createStorageNetworkIpRange.html] - def create_storage_network_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createStorageNetworkIpRange') - else - options.merge!('command' => 'createStorageNetworkIpRange', - 'podid' => args[0], - 'netmask' => args[1], - 'gateway' => args[2], - 'startip' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_storage_pool.rb b/lib/fog/cloudstack/requests/compute/create_storage_pool.rb deleted file mode 100644 index 34c99b409..000000000 --- a/lib/fog/cloudstack/requests/compute/create_storage_pool.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a storage pool. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createStoragePool.html] - def create_storage_pool(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createStoragePool') - else - options.merge!('command' => 'createStoragePool', - 'url' => args[0], - 'name' => args[1], - 'zoneid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_tags.rb b/lib/fog/cloudstack/requests/compute/create_tags.rb deleted file mode 100644 index 90c475aca..000000000 --- a/lib/fog/cloudstack/requests/compute/create_tags.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates resource tag(s) - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createTags.html] - def create_tags(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createTags') - else - options.merge!('command' => 'createTags', - 'tags' => args[0], - 'resourcetype' => args[1], - 'resourceids' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_template.rb b/lib/fog/cloudstack/requests/compute/create_template.rb deleted file mode 100644 index 19d0b98c7..000000000 --- a/lib/fog/cloudstack/requests/compute/create_template.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createTemplate.html] - def create_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createTemplate') - else - options.merge!('command' => 'createTemplate', - 'ostypeid' => args[0], - 'name' => args[1], - 'displaytext' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_user.rb b/lib/fog/cloudstack/requests/compute/create_user.rb deleted file mode 100644 index e19296fdb..000000000 --- a/lib/fog/cloudstack/requests/compute/create_user.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a user for an account that already exists - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createUser.html] - def create_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createUser') - else - options.merge!('command' => 'createUser', - 'email' => args[0], - 'username' => args[1], - 'lastname' => args[2], - 'password' => args[3], - 'firstname' => args[4], - 'account' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_virtual_router_element.rb b/lib/fog/cloudstack/requests/compute/create_virtual_router_element.rb deleted file mode 100644 index d0ba5dd88..000000000 --- a/lib/fog/cloudstack/requests/compute/create_virtual_router_element.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create a virtual router element. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVirtualRouterElement.html] - def create_virtual_router_element(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVirtualRouterElement') - else - options.merge!('command' => 'createVirtualRouterElement', - 'nspid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vlan_ip_range.rb b/lib/fog/cloudstack/requests/compute/create_vlan_ip_range.rb deleted file mode 100644 index d967d6dcc..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vlan_ip_range.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a VLAN IP range. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVlanIpRange.html] - def create_vlan_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVlanIpRange') - else - options.merge!('command' => 'createVlanIpRange') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vm_snapshot.rb b/lib/fog/cloudstack/requests/compute/create_vm_snapshot.rb deleted file mode 100644 index ea1a3eb9e..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vm_snapshot.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates snapshot for a vm. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVMSnapshot.html] - def create_vm_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVMSnapshot') - else - options.merge!('command' => 'createVMSnapshot', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_volume.rb b/lib/fog/cloudstack/requests/compute/create_volume.rb deleted file mode 100644 index 78ac05ed4..000000000 --- a/lib/fog/cloudstack/requests/compute/create_volume.rb +++ /dev/null @@ -1,69 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVolume.html] - def create_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVolume') - else - options.merge!('command' => 'createVolume', - 'name' => args[0]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - class Mock - def create_volume(options={}) - volume_id = Fog::Cloudstack.uuid - - unless volume_name = options['name'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command createvolume due to missing parameter name') - end - - unless zone_id = options['zoneid'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command createvolume due to missing parameter zoneid') - end - - unless disk_offering_id = options['diskofferingid'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command createvolume due to missing parameter diskofferingid') - end - - volume = { - "id" => volume_id, - "name" => volume_name, - "zoneid" => zone_id, - "zonename" => "ey-wdc-00", - "type" => "DATADISK", - "size" => 5368709120, - "created" => "2012-05-22T14:52:55-0500", - "state" => "Allocated", - "account" => "accountname", - "domainid" => "6023b6fe-5bef-4358-bc76-9f4e75afa52f", - "domain" => "ROOT", - "storagetype" => "shared", - "hypervisor" => "None", - "diskofferingid" => disk_offering_id, - "diskofferingname" => "Small", - "diskofferingdisplaytext" => "Small Disk, 5 GB", - "storage" => "none", - "destroyed" => false, - "isextractable" => false - } - - self.data[:volumes][volume_id]= volume - {'createvolumeresponse' => volume} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_volume_on_filer.rb b/lib/fog/cloudstack/requests/compute/create_volume_on_filer.rb deleted file mode 100644 index afdc457db..000000000 --- a/lib/fog/cloudstack/requests/compute/create_volume_on_filer.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create a volume - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/createVolumeOnFiler.html] - def create_volume_on_filer(password, ipaddress, size, volumename, username, poolname, aggregatename, options={}) - options.merge!( - 'command' => 'createVolumeOnFiler', - 'password' => password, - 'ipaddress' => ipaddress, - 'size' => size, - 'volumename' => volumename, - 'username' => username, - 'poolname' => poolname, - 'aggregatename' => aggregatename - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vpc.rb b/lib/fog/cloudstack/requests/compute/create_vpc.rb deleted file mode 100644 index 0e7cc9961..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vpc.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a VPC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVPC.html] - def create_vpc(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVPC') - else - options.merge!('command' => 'createVPC', - 'vpcofferingid' => args[0], - 'zoneid' => args[1], - 'name' => args[2], - 'cidr' => args[3], - 'displaytext' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vpcoffering.rb b/lib/fog/cloudstack/requests/compute/create_vpcoffering.rb deleted file mode 100644 index 40c1da185..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vpcoffering.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates VPC offering - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVPCOffering.html] - def create_vpcoffering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVPCOffering') - else - options.merge!('command' => 'createVPCOffering', - 'supportedservices' => args[0], - 'name' => args[1], - 'displaytext' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vpn_connection.rb b/lib/fog/cloudstack/requests/compute/create_vpn_connection.rb deleted file mode 100644 index 08f8c7166..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vpn_connection.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Create site to site vpn connection - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVpnConnection.html] - def create_vpn_connection(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVpnConnection') - else - options.merge!('command' => 'createVpnConnection', - 's2svpngatewayid' => args[0], - 's2scustomergatewayid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vpn_customer_gateway.rb b/lib/fog/cloudstack/requests/compute/create_vpn_customer_gateway.rb deleted file mode 100644 index e192f543c..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vpn_customer_gateway.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates site to site vpn customer gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVpnCustomerGateway.html] - def create_vpn_customer_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVpnCustomerGateway') - else - options.merge!('command' => 'createVpnCustomerGateway', - 'esppolicy' => args[0], - 'cidrlist' => args[1], - 'ikepolicy' => args[2], - 'gateway' => args[3], - 'ipsecpsk' => args[4]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_vpn_gateway.rb b/lib/fog/cloudstack/requests/compute/create_vpn_gateway.rb deleted file mode 100644 index 0526d6a30..000000000 --- a/lib/fog/cloudstack/requests/compute/create_vpn_gateway.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates site to site vpn local gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createVpnGateway.html] - def create_vpn_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createVpnGateway') - else - options.merge!('command' => 'createVpnGateway', - 'vpcid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/create_zone.rb b/lib/fog/cloudstack/requests/compute/create_zone.rb deleted file mode 100644 index 38a5751b6..000000000 --- a/lib/fog/cloudstack/requests/compute/create_zone.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a Zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createZone.html] - def create_zone(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'createZone') - else - options.merge!('command' => 'createZone', - 'dns1' => args[0], - 'internaldns1' => args[1], - 'networktype' => args[2], - 'name' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dedicate_cluster.rb b/lib/fog/cloudstack/requests/compute/dedicate_cluster.rb deleted file mode 100644 index 9406e274a..000000000 --- a/lib/fog/cloudstack/requests/compute/dedicate_cluster.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dedicate an existing cluster - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/dedicateCluster.html] - def dedicate_cluster(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'dedicateCluster') - else - options.merge!('command' => 'dedicateCluster', - 'clusterid' => args[0], - 'domainid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dedicate_guest_vlan_range.rb b/lib/fog/cloudstack/requests/compute/dedicate_guest_vlan_range.rb deleted file mode 100644 index d905f8fd2..000000000 --- a/lib/fog/cloudstack/requests/compute/dedicate_guest_vlan_range.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dedicates a guest vlan range to an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/dedicateGuestVlanRange.html] - def dedicate_guest_vlan_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'dedicateGuestVlanRange') - else - options.merge!('command' => 'dedicateGuestVlanRange', - 'account' => args[0], - 'domainid' => args[1], - 'vlanrange' => args[2], - 'physicalnetworkid' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dedicate_host.rb b/lib/fog/cloudstack/requests/compute/dedicate_host.rb deleted file mode 100644 index 1543406d6..000000000 --- a/lib/fog/cloudstack/requests/compute/dedicate_host.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dedicates a host. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/dedicateHost.html] - def dedicate_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'dedicateHost') - else - options.merge!('command' => 'dedicateHost', - 'hostid' => args[0], - 'domainid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dedicate_pod.rb b/lib/fog/cloudstack/requests/compute/dedicate_pod.rb deleted file mode 100644 index 93d3ead1d..000000000 --- a/lib/fog/cloudstack/requests/compute/dedicate_pod.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dedicates a Pod. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/dedicatePod.html] - def dedicate_pod(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'dedicatePod') - else - options.merge!('command' => 'dedicatePod', - 'podid' => args[0], - 'domainid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dedicate_public_ip_range.rb b/lib/fog/cloudstack/requests/compute/dedicate_public_ip_range.rb deleted file mode 100644 index 362487bc5..000000000 --- a/lib/fog/cloudstack/requests/compute/dedicate_public_ip_range.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dedicates a Public IP range to an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/dedicatePublicIpRange.html] - def dedicate_public_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'dedicatePublicIpRange') - else - options.merge!('command' => 'dedicatePublicIpRange', - 'domainid' => args[0], - 'account' => args[1], - 'id' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dedicate_zone.rb b/lib/fog/cloudstack/requests/compute/dedicate_zone.rb deleted file mode 100644 index c063dc876..000000000 --- a/lib/fog/cloudstack/requests/compute/dedicate_zone.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dedicates a zones. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/dedicateZone.html] - def dedicate_zone(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'dedicateZone') - else - options.merge!('command' => 'dedicateZone', - 'domainid' => args[0], - 'zoneid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_account.rb b/lib/fog/cloudstack/requests/compute/delete_account.rb deleted file mode 100644 index 98af8861b..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_account.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a account, and all users associated with this account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAccount.html] - def delete_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAccount') - else - options.merge!('command' => 'deleteAccount', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_account_from_project.rb b/lib/fog/cloudstack/requests/compute/delete_account_from_project.rb deleted file mode 100644 index 338e2820a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_account_from_project.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes account from the project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAccountFromProject.html] - def delete_account_from_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAccountFromProject') - else - options.merge!('command' => 'deleteAccountFromProject', - 'projectid' => args[0], - 'account' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_affinity_group.rb b/lib/fog/cloudstack/requests/compute/delete_affinity_group.rb deleted file mode 100644 index 5030d6853..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_affinity_group.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes affinity group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAffinityGroup.html] - def delete_affinity_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAffinityGroup') - else - options.merge!('command' => 'deleteAffinityGroup') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_alerts.rb b/lib/fog/cloudstack/requests/compute/delete_alerts.rb deleted file mode 100644 index 8e0ece4e4..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_alerts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete one or more alerts. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAlerts.html] - def delete_alerts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAlerts') - else - options.merge!('command' => 'deleteAlerts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_auto_scale_policy.rb b/lib/fog/cloudstack/requests/compute/delete_auto_scale_policy.rb deleted file mode 100644 index 4376ca828..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_auto_scale_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a autoscale policy. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAutoScalePolicy.html] - def delete_auto_scale_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAutoScalePolicy') - else - options.merge!('command' => 'deleteAutoScalePolicy', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_auto_scale_vm_group.rb b/lib/fog/cloudstack/requests/compute/delete_auto_scale_vm_group.rb deleted file mode 100644 index 035a8c552..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_auto_scale_vm_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a autoscale vm group. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAutoScaleVmGroup.html] - def delete_auto_scale_vm_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAutoScaleVmGroup') - else - options.merge!('command' => 'deleteAutoScaleVmGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_auto_scale_vm_profile.rb b/lib/fog/cloudstack/requests/compute/delete_auto_scale_vm_profile.rb deleted file mode 100644 index 76594c71d..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_auto_scale_vm_profile.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a autoscale vm profile. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteAutoScaleVmProfile.html] - def delete_auto_scale_vm_profile(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteAutoScaleVmProfile') - else - options.merge!('command' => 'deleteAutoScaleVmProfile', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_big_switch_vns_device.rb b/lib/fog/cloudstack/requests/compute/delete_big_switch_vns_device.rb deleted file mode 100644 index 70001e0f3..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_big_switch_vns_device.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a bigswitch vns device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteBigSwitchVnsDevice.html] - def delete_big_switch_vns_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteBigSwitchVnsDevice') - else - options.merge!('command' => 'deleteBigSwitchVnsDevice', - 'vnsdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_cisco_asa1000v_resource.rb b/lib/fog/cloudstack/requests/compute/delete_cisco_asa1000v_resource.rb deleted file mode 100644 index ccdce1598..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_cisco_asa1000v_resource.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Cisco ASA 1000v appliance - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteCiscoAsa1000vResource.html] - def delete_cisco_asa1000v_resource(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteCiscoAsa1000vResource') - else - options.merge!('command' => 'deleteCiscoAsa1000vResource', - 'resourceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_cisco_nexus_vsm.rb b/lib/fog/cloudstack/requests/compute/delete_cisco_nexus_vsm.rb deleted file mode 100644 index cee0c7304..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_cisco_nexus_vsm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a Cisco Nexus VSM device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteCiscoNexusVSM.html] - def delete_cisco_nexus_vsm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteCiscoNexusVSM') - else - options.merge!('command' => 'deleteCiscoNexusVSM', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_cisco_vnmc_resource.rb b/lib/fog/cloudstack/requests/compute/delete_cisco_vnmc_resource.rb deleted file mode 100644 index bd9489415..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_cisco_vnmc_resource.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Cisco Vnmc controller - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteCiscoVnmcResource.html] - def delete_cisco_vnmc_resource(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteCiscoVnmcResource') - else - options.merge!('command' => 'deleteCiscoVnmcResource', - 'resourceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_cluster.rb b/lib/fog/cloudstack/requests/compute/delete_cluster.rb deleted file mode 100644 index e068cf30a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_cluster.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a cluster. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteCluster.html] - def delete_cluster(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteCluster') - else - options.merge!('command' => 'deleteCluster', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_condition.rb b/lib/fog/cloudstack/requests/compute/delete_condition.rb deleted file mode 100644 index bb1ed0dd2..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_condition.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes a condition - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteCondition.html] - def delete_condition(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteCondition') - else - options.merge!('command' => 'deleteCondition', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_counter.rb b/lib/fog/cloudstack/requests/compute/delete_counter.rb deleted file mode 100644 index 3d12c4f7d..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_counter.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a counter - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteCounter.html] - def delete_counter(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteCounter') - else - options.merge!('command' => 'deleteCounter', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_disk_offering.rb b/lib/fog/cloudstack/requests/compute/delete_disk_offering.rb deleted file mode 100644 index f9a148997..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_disk_offering.rb +++ /dev/null @@ -1,33 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a disk offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteDiskOffering.html] - def delete_disk_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteDiskOffering') - else - options.merge!('command' => 'deleteDiskOffering', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_disk_offering(options={}) - disk_offering_id = options['id'] - data[:disk_offerings].delete(disk_offering_id) if data[:disk_offerings][disk_offering_id] - - { 'deletediskofferingresponse' => { 'success' => 'true' } } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_domain.rb b/lib/fog/cloudstack/requests/compute/delete_domain.rb deleted file mode 100644 index f480c7f0a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_domain.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a specified domain - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteDomain.html] - def delete_domain(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteDomain') - else - options.merge!('command' => 'deleteDomain', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_egress_firewall_rule.rb b/lib/fog/cloudstack/requests/compute/delete_egress_firewall_rule.rb deleted file mode 100644 index 27b393978..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_egress_firewall_rule.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes an ggress firewall rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteEgressFirewallRule.html] - def delete_egress_firewall_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteEgressFirewallRule') - else - options.merge!('command' => 'deleteEgressFirewallRule', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_egress_firewall_rule(options={}) - egress_firewall_rule_id = options['id'] - data[:egress_firewall_rules].delete(egress_firewall_rule_id) if data[:egress_firewall_rules][egress_firewall_rule_id] - - { 'deleteegressfirewallruleresponse' => { 'success' => 'true' } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_events.rb b/lib/fog/cloudstack/requests/compute/delete_events.rb deleted file mode 100644 index 2063f1a88..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_events.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete one or more events. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteEvents.html] - def delete_events(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteEvents') - else - options.merge!('command' => 'deleteEvents') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_external_firewall.rb b/lib/fog/cloudstack/requests/compute/delete_external_firewall.rb deleted file mode 100644 index 7bc83c96a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_external_firewall.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes an external firewall appliance. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteExternalFirewall.html] - def delete_external_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteExternalFirewall') - else - options.merge!('command' => 'deleteExternalFirewall', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_external_load_balancer.rb b/lib/fog/cloudstack/requests/compute/delete_external_load_balancer.rb deleted file mode 100644 index 5ed05f6f1..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_external_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a F5 external load balancer appliance added in a zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteExternalLoadBalancer.html] - def delete_external_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteExternalLoadBalancer') - else - options.merge!('command' => 'deleteExternalLoadBalancer', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_f5_load_balancer.rb b/lib/fog/cloudstack/requests/compute/delete_f5_load_balancer.rb deleted file mode 100644 index e18d71b91..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_f5_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a F5 load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteF5LoadBalancer.html] - def delete_f5_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteF5LoadBalancer') - else - options.merge!('command' => 'deleteF5LoadBalancer', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_firewall_rule.rb b/lib/fog/cloudstack/requests/compute/delete_firewall_rule.rb deleted file mode 100644 index 83e5ac16c..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_firewall_rule.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a firewall rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteFirewallRule.html] - def delete_firewall_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteFirewallRule') - else - options.merge!('command' => 'deleteFirewallRule', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_firewall_rule(options={}) - firewall_rule_id = options['id'] - data[:firewall_rules].delete(firewall_rule_id) if data[:firewall_rules][firewall_rule_id] - - { 'deletefirewallruleresponse' => { 'success' => 'true' } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_global_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/delete_global_load_balancer_rule.rb deleted file mode 100644 index a6fb01332..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_global_load_balancer_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a global load balancer rule. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteGlobalLoadBalancerRule.html] - def delete_global_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteGlobalLoadBalancerRule') - else - options.merge!('command' => 'deleteGlobalLoadBalancerRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_host.rb b/lib/fog/cloudstack/requests/compute/delete_host.rb deleted file mode 100644 index f9b7af255..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_host.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a host. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteHost.html] - def delete_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteHost') - else - options.merge!('command' => 'deleteHost', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_image_store.rb b/lib/fog/cloudstack/requests/compute/delete_image_store.rb deleted file mode 100644 index 7a0f77291..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_image_store.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes an image store . - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteImageStore.html] - def delete_image_store(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteImageStore') - else - options.merge!('command' => 'deleteImageStore', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_instance_group.rb b/lib/fog/cloudstack/requests/compute/delete_instance_group.rb deleted file mode 100644 index 2df364da8..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_instance_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a vm group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteInstanceGroup.html] - def delete_instance_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteInstanceGroup') - else - options.merge!('command' => 'deleteInstanceGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_ip_forwarding_rule.rb b/lib/fog/cloudstack/requests/compute/delete_ip_forwarding_rule.rb deleted file mode 100644 index a2026cd9c..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_ip_forwarding_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes an ip forwarding rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteIpForwardingRule.html] - def delete_ip_forwarding_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteIpForwardingRule') - else - options.merge!('command' => 'deleteIpForwardingRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_iso.rb b/lib/fog/cloudstack/requests/compute/delete_iso.rb deleted file mode 100644 index 9cc235283..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_iso.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes an ISO file. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteIso.html] - def delete_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteIso') - else - options.merge!('command' => 'deleteIso', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_lb_health_check_policy.rb b/lib/fog/cloudstack/requests/compute/delete_lb_health_check_policy.rb deleted file mode 100644 index 854b8da70..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_lb_health_check_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a load balancer HealthCheck policy. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteLBHealthCheckPolicy.html] - def delete_lb_health_check_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteLBHealthCheckPolicy') - else - options.merge!('command' => 'deleteLBHealthCheckPolicy', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_lb_stickiness_policy.rb b/lib/fog/cloudstack/requests/compute/delete_lb_stickiness_policy.rb deleted file mode 100644 index e51b31eb6..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_lb_stickiness_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a LB stickiness policy. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteLBStickinessPolicy.html] - def delete_lb_stickiness_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteLBStickinessPolicy') - else - options.merge!('command' => 'deleteLBStickinessPolicy', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_ldap_configuration.rb b/lib/fog/cloudstack/requests/compute/delete_ldap_configuration.rb deleted file mode 100644 index f6698f302..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_ldap_configuration.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Remove an Ldap Configuration - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteLdapConfiguration.html] - def delete_ldap_configuration(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteLdapConfiguration') - else - options.merge!('command' => 'deleteLdapConfiguration', - 'hostname' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_load_balancer.rb b/lib/fog/cloudstack/requests/compute/delete_load_balancer.rb deleted file mode 100644 index a3bd7f514..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a load balancer - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteLoadBalancer.html] - def delete_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteLoadBalancer') - else - options.merge!('command' => 'deleteLoadBalancer', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/delete_load_balancer_rule.rb deleted file mode 100644 index ee89426de..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_load_balancer_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a load balancer rule. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteLoadBalancerRule.html] - def delete_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteLoadBalancerRule') - else - options.merge!('command' => 'deleteLoadBalancerRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_netscaler_load_balancer.rb b/lib/fog/cloudstack/requests/compute/delete_netscaler_load_balancer.rb deleted file mode 100644 index 4019a35ed..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_netscaler_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a netscaler load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetscalerLoadBalancer.html] - def delete_netscaler_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetscalerLoadBalancer') - else - options.merge!('command' => 'deleteNetscalerLoadBalancer', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_network.rb b/lib/fog/cloudstack/requests/compute/delete_network.rb deleted file mode 100644 index d4186189c..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_network.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetwork.html] - def delete_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetwork') - else - options.merge!('command' => 'deleteNetwork', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_network_acl.rb b/lib/fog/cloudstack/requests/compute/delete_network_acl.rb deleted file mode 100644 index 8c59f479e..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_network_acl.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Network ACL - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetworkACL.html] - def delete_network_acl(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetworkACL') - else - options.merge!('command' => 'deleteNetworkACL', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_network_acl_list.rb b/lib/fog/cloudstack/requests/compute/delete_network_acl_list.rb deleted file mode 100644 index a6dbfd491..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_network_acl_list.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Network ACL - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetworkACLList.html] - def delete_network_acl_list(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetworkACLList') - else - options.merge!('command' => 'deleteNetworkACLList', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_network_device.rb b/lib/fog/cloudstack/requests/compute/delete_network_device.rb deleted file mode 100644 index 84f90c0d0..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_network_device.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes network device. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetworkDevice.html] - def delete_network_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetworkDevice') - else - options.merge!('command' => 'deleteNetworkDevice', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_network_offering.rb b/lib/fog/cloudstack/requests/compute/delete_network_offering.rb deleted file mode 100644 index c52e219e2..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_network_offering.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a network offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetworkOffering.html] - def delete_network_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetworkOffering') - else - options.merge!('command' => 'deleteNetworkOffering', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_network_offering(options={}) - network_offering_id = options['id'] - data[:network_offerings].delete(network_offering_id) if data[:network_offerings][network_offering_id] - - { 'deletenetworkofferingresponse' => { 'success' => 'true' } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_network_service_provider.rb b/lib/fog/cloudstack/requests/compute/delete_network_service_provider.rb deleted file mode 100644 index 916f289d3..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_network_service_provider.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Network Service Provider. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNetworkServiceProvider.html] - def delete_network_service_provider(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNetworkServiceProvider') - else - options.merge!('command' => 'deleteNetworkServiceProvider', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_nicira_nvp_device.rb b/lib/fog/cloudstack/requests/compute/delete_nicira_nvp_device.rb deleted file mode 100644 index a2796a851..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_nicira_nvp_device.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a nicira nvp device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteNiciraNvpDevice.html] - def delete_nicira_nvp_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteNiciraNvpDevice') - else - options.merge!('command' => 'deleteNiciraNvpDevice', - 'nvpdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_open_daylight_controller.rb b/lib/fog/cloudstack/requests/compute/delete_open_daylight_controller.rb deleted file mode 100644 index f9310601a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_open_daylight_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes an OpenDyalight controler - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteOpenDaylightController.html] - def delete_open_daylight_controller(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteOpenDaylightController') - else - options.merge!('command' => 'deleteOpenDaylightController', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_palo_alto_firewall.rb b/lib/fog/cloudstack/requests/compute/delete_palo_alto_firewall.rb deleted file mode 100644 index 768782ac0..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_palo_alto_firewall.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a Palo Alto firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deletePaloAltoFirewall.html] - def delete_palo_alto_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deletePaloAltoFirewall') - else - options.merge!('command' => 'deletePaloAltoFirewall', - 'fwdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_physical_network.rb b/lib/fog/cloudstack/requests/compute/delete_physical_network.rb deleted file mode 100644 index fb2eb97f8..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_physical_network.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Physical Network. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deletePhysicalNetwork.html] - def delete_physical_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deletePhysicalNetwork') - else - options.merge!('command' => 'deletePhysicalNetwork', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_pod.rb b/lib/fog/cloudstack/requests/compute/delete_pod.rb deleted file mode 100644 index 6c1b87f20..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_pod.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Pod. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deletePod.html] - def delete_pod(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deletePod') - else - options.merge!('command' => 'deletePod', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_pool.rb b/lib/fog/cloudstack/requests/compute/delete_pool.rb deleted file mode 100644 index 8035e9802..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_pool.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete a pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/deletePool.html] - def delete_pool(poolname, options={}) - options.merge!( - 'command' => 'deletePool', - 'poolname' => poolname - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_port_forwarding_rule.rb b/lib/fog/cloudstack/requests/compute/delete_port_forwarding_rule.rb deleted file mode 100644 index b5b9a9a43..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_port_forwarding_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a port forwarding rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deletePortForwardingRule.html] - def delete_port_forwarding_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deletePortForwardingRule') - else - options.merge!('command' => 'deletePortForwardingRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_portable_ip_range.rb b/lib/fog/cloudstack/requests/compute/delete_portable_ip_range.rb deleted file mode 100644 index 7a3b9abd8..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_portable_ip_range.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # deletes a range of portable public IP's associated with a region - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deletePortableIpRange.html] - def delete_portable_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deletePortableIpRange') - else - options.merge!('command' => 'deletePortableIpRange', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_private_gateway.rb b/lib/fog/cloudstack/requests/compute/delete_private_gateway.rb deleted file mode 100644 index 36205d1b2..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_private_gateway.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Private gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deletePrivateGateway.html] - def delete_private_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deletePrivateGateway') - else - options.merge!('command' => 'deletePrivateGateway', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_project.rb b/lib/fog/cloudstack/requests/compute/delete_project.rb deleted file mode 100644 index 3300243ff..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_project.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteProject.html] - def delete_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteProject') - else - options.merge!('command' => 'deleteProject', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_project_invitation.rb b/lib/fog/cloudstack/requests/compute/delete_project_invitation.rb deleted file mode 100644 index ee07771e6..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_project_invitation.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Accepts or declines project invitation - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteProjectInvitation.html] - def delete_project_invitation(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteProjectInvitation') - else - options.merge!('command' => 'deleteProjectInvitation', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_remote_access_vpn.rb b/lib/fog/cloudstack/requests/compute/delete_remote_access_vpn.rb deleted file mode 100644 index 20765408a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_remote_access_vpn.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Destroys a l2tp/ipsec remote access vpn - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteRemoteAccessVpn.html] - def delete_remote_access_vpn(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteRemoteAccessVpn') - else - options.merge!('command' => 'deleteRemoteAccessVpn', - 'publicipid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_secondary_staging_store.rb b/lib/fog/cloudstack/requests/compute/delete_secondary_staging_store.rb deleted file mode 100644 index a17b96ce3..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_secondary_staging_store.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a secondary staging store . - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSecondaryStagingStore.html] - def delete_secondary_staging_store(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSecondaryStagingStore') - else - options.merge!('command' => 'deleteSecondaryStagingStore', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_security_group.rb b/lib/fog/cloudstack/requests/compute/delete_security_group.rb deleted file mode 100644 index 186b45e29..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_security_group.rb +++ /dev/null @@ -1,39 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes security group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSecurityGroup.html] - def delete_security_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSecurityGroup') - else - options.merge!('command' => 'deleteSecurityGroup') - end - request(options) - end - end - - class Mock - def delete_security_group(options={}) - security_group_id = options['id'] - if self.data[:security_groups][security_group_id] - self.data[:security_groups].delete(security_group_id) - { - "deletesecuritygroupresponse" => { - "success" => "true" - } - } - else - raise Fog::Compute::Cloudstack::BadRequest.new('No security_group found') - end - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_service_offering.rb b/lib/fog/cloudstack/requests/compute/delete_service_offering.rb deleted file mode 100644 index 82dd4e12b..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_service_offering.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a service offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteServiceOffering.html] - def delete_service_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteServiceOffering') - else - options.merge!('command' => 'deleteServiceOffering', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_service_offering(options={}) - service_offering_id = options['id'] - data[:favours].delete(service_offering_id) if data[:flavours][service_offering_id] - - { 'deleteserviceofferingresponse' => { 'success' => 'true' } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_snapshot.rb b/lib/fog/cloudstack/requests/compute/delete_snapshot.rb deleted file mode 100644 index 03183a75a..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_snapshot.rb +++ /dev/null @@ -1,61 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a snapshot of a disk volume. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSnapshot.html] - def delete_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSnapshot') - else - options.merge!('command' => 'deleteSnapshot', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_snapshot(options={}) - snapshot_id = options['id'] - snapshots = self.data[:snapshots] - - if snapshots[snapshot_id] - - snapshots.delete(snapshot_id) - job_id = add_delete_snapshot_job(snapshot_id) - - {'deletesnapshotresponse' => {'jobid' => job_id}} - end - # TODO add cases for empty or wrong id - end - - def add_delete_snapshot_job(snapshot_id) - job_id = Fog::Cloudstack.uuid - - job = { - 'id' => job_id, - 'user_id' => self.data[:users].first, # TODO use current user - 'account_id' => self.data[:accounts].first, # TODO use current user - 'cmd' => 'com.cloud.api.commands.DeleteSnapshotCmd', - 'job_status'=> 1, - 'job_result_type' => nil, - 'job_result_code' => 0, - 'job_proc_status' => 0, - 'created_at' => Time.now.iso8601, - 'job_result' => { "success" => true } - } - - self.data[:jobs][job_id] = job - job_id - end - - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_snapshot_policies.rb b/lib/fog/cloudstack/requests/compute/delete_snapshot_policies.rb deleted file mode 100644 index 0a44cbf0c..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_snapshot_policies.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes snapshot policies for the account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSnapshotPolicies.html] - def delete_snapshot_policies(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSnapshotPolicies') - else - options.merge!('command' => 'deleteSnapshotPolicies') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_srx_firewall.rb b/lib/fog/cloudstack/requests/compute/delete_srx_firewall.rb deleted file mode 100644 index 29ddf2b2f..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_srx_firewall.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # delete a SRX firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSrxFirewall.html] - def delete_srx_firewall(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSrxFirewall') - else - options.merge!('command' => 'deleteSrxFirewall', - 'fwdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_ssh_key_pair.rb b/lib/fog/cloudstack/requests/compute/delete_ssh_key_pair.rb deleted file mode 100644 index 86b46dba7..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_ssh_key_pair.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a keypair by name - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSSHKeyPair.html] - def delete_ssh_key_pair(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSSHKeyPair') - else - options.merge!('command' => 'deleteSSHKeyPair', - 'name' => args[0]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_ssl_cert.rb b/lib/fog/cloudstack/requests/compute/delete_ssl_cert.rb deleted file mode 100644 index 9c4832de3..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_ssl_cert.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete a certificate to cloudstack - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteSslCert.html] - def delete_ssl_cert(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteSslCert') - else - options.merge!('command' => 'deleteSslCert', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_static_route.rb b/lib/fog/cloudstack/requests/compute/delete_static_route.rb deleted file mode 100644 index 3e2f376bc..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_static_route.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a static route - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteStaticRoute.html] - def delete_static_route(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteStaticRoute') - else - options.merge!('command' => 'deleteStaticRoute', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_storage_network_ip_range.rb b/lib/fog/cloudstack/requests/compute/delete_storage_network_ip_range.rb deleted file mode 100644 index fc51804c1..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_storage_network_ip_range.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a storage network IP Range. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteStorageNetworkIpRange.html] - def delete_storage_network_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteStorageNetworkIpRange') - else - options.merge!('command' => 'deleteStorageNetworkIpRange', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_storage_pool.rb b/lib/fog/cloudstack/requests/compute/delete_storage_pool.rb deleted file mode 100644 index 734f7d4e6..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_storage_pool.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a storage pool. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteStoragePool.html] - def delete_storage_pool(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteStoragePool') - else - options.merge!('command' => 'deleteStoragePool', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_tags.rb b/lib/fog/cloudstack/requests/compute/delete_tags.rb deleted file mode 100644 index 05e1642d6..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_tags.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deleting resource tag(s) - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteTags.html] - def delete_tags(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteTags') - else - options.merge!('command' => 'deleteTags', - 'resourceids' => args[0], - 'resourcetype' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_template.rb b/lib/fog/cloudstack/requests/compute/delete_template.rb deleted file mode 100644 index e1ad05c29..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_template.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a template from the system. All virtual machines using the deleted template will not be affected. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteTemplate.html] - def delete_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteTemplate') - else - options.merge!('command' => 'deleteTemplate', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_traffic_monitor.rb b/lib/fog/cloudstack/requests/compute/delete_traffic_monitor.rb deleted file mode 100644 index 3866a7a03..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_traffic_monitor.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes an traffic monitor host. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteTrafficMonitor.html] - def delete_traffic_monitor(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteTrafficMonitor') - else - options.merge!('command' => 'deleteTrafficMonitor', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_traffic_type.rb b/lib/fog/cloudstack/requests/compute/delete_traffic_type.rb deleted file mode 100644 index 1f473c739..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_traffic_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes traffic type of a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteTrafficType.html] - def delete_traffic_type(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteTrafficType') - else - options.merge!('command' => 'deleteTrafficType', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_ucs_manager.rb b/lib/fog/cloudstack/requests/compute/delete_ucs_manager.rb deleted file mode 100644 index 0de887639..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_ucs_manager.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete a Ucs manager - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/deleteUcsManager.html] - def delete_ucs_manager(ucsmanagerid, options={}) - options.merge!( - 'command' => 'deleteUcsManager', - 'ucsmanagerid' => ucsmanagerid - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_user.rb b/lib/fog/cloudstack/requests/compute/delete_user.rb deleted file mode 100644 index c5ab74e4f..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a user for an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteUser.html] - def delete_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteUser') - else - options.merge!('command' => 'deleteUser', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vlan_ip_range.rb b/lib/fog/cloudstack/requests/compute/delete_vlan_ip_range.rb deleted file mode 100644 index 6582bedad..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vlan_ip_range.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates a VLAN IP range. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVlanIpRange.html] - def delete_vlan_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVlanIpRange') - else - options.merge!('command' => 'deleteVlanIpRange', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vm_snapshot.rb b/lib/fog/cloudstack/requests/compute/delete_vm_snapshot.rb deleted file mode 100644 index cf49d29d3..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vm_snapshot.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a vmsnapshot. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVMSnapshot.html] - def delete_vm_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVMSnapshot') - else - options.merge!('command' => 'deleteVMSnapshot', - 'vmsnapshotid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_volume.rb b/lib/fog/cloudstack/requests/compute/delete_volume.rb deleted file mode 100644 index e9638f95d..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_volume.rb +++ /dev/null @@ -1,45 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a detached disk volume. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVolume.html] - def delete_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVolume') - else - options.merge!('command' => 'deleteVolume', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def delete_volume(options={}) - volume_id = options['id'] - if self.data[:volumes][volume_id] - self.data[:volumes].delete(volume_id) - { - "deletevolumeresponse" => { - "success" => "true" - } - } - else # FIXME: mayhaps - self.data[:volumes].delete(volume_id) - { - "deletevolumeresponse" => { - "success" => "false" - } - } - end - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vpc.rb b/lib/fog/cloudstack/requests/compute/delete_vpc.rb deleted file mode 100644 index 87b8b0fc8..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vpc.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a VPC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVPC.html] - def delete_vpc(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVPC') - else - options.merge!('command' => 'deleteVPC', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vpcoffering.rb b/lib/fog/cloudstack/requests/compute/delete_vpcoffering.rb deleted file mode 100644 index a3f9113f9..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vpcoffering.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes VPC offering - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVPCOffering.html] - def delete_vpcoffering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVPCOffering') - else - options.merge!('command' => 'deleteVPCOffering', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vpn_connection.rb b/lib/fog/cloudstack/requests/compute/delete_vpn_connection.rb deleted file mode 100644 index 5da4ebc8e..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vpn_connection.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete site to site vpn connection - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVpnConnection.html] - def delete_vpn_connection(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVpnConnection') - else - options.merge!('command' => 'deleteVpnConnection', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vpn_customer_gateway.rb b/lib/fog/cloudstack/requests/compute/delete_vpn_customer_gateway.rb deleted file mode 100644 index c2d24dcce..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vpn_customer_gateway.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete site to site vpn customer gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVpnCustomerGateway.html] - def delete_vpn_customer_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVpnCustomerGateway') - else - options.merge!('command' => 'deleteVpnCustomerGateway', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_vpn_gateway.rb b/lib/fog/cloudstack/requests/compute/delete_vpn_gateway.rb deleted file mode 100644 index d40d524c9..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_vpn_gateway.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Delete site to site vpn gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteVpnGateway.html] - def delete_vpn_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteVpnGateway') - else - options.merge!('command' => 'deleteVpnGateway', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/delete_zone.rb b/lib/fog/cloudstack/requests/compute/delete_zone.rb deleted file mode 100644 index bb58a2f61..000000000 --- a/lib/fog/cloudstack/requests/compute/delete_zone.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a Zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deleteZone.html] - def delete_zone(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deleteZone') - else - options.merge!('command' => 'deleteZone', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb deleted file mode 100644 index 8fbe57545..000000000 --- a/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb +++ /dev/null @@ -1,125 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates and automatically starts a virtual machine based on a service offering, disk offering, and template. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/deployVirtualMachine.html] - def deploy_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'deployVirtualMachine') - else - options.merge!('command' => 'deployVirtualMachine', - 'templateid' => args[0], - 'zoneid' => args[1], - 'serviceofferingid' => args[2]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - class Mock - def deploy_virtual_machine(options={}) - zone_id = options['zoneid'] - unless zone_id - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command deployvirtualmachine due to missing parameter zoneid') - end - unless zone = self.data[:zones][zone_id] - raise Fog::Compute::Cloudstack::BadRequest.new("Unable to execute API command deployvirtualmachine due to invalid value. Object zone(uuid: #{zone_id}) does not exist.") - end - zone_name = zone[:name] - - template_id = options['templateid'] - unless template = self.data[:images][template_id] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command deployvirtualmachine due to missing parameter templateid') - end - template_name = template[:name] - template_display_text = template[:display_text] - - service_offering_id = options['serviceofferingid'] - unless service_offering = self.data[:flavors][service_offering_id] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command deployvirtualmachine due to missing parameter serviceofferingid') - end - - service_offering_name = service_offering[:name] - service_offering_cpu_number = service_offering[:cpunumber] - service_offering_cpu_speed = service_offering[:cpuspeed] - service_offering_memory = service_offering[:cpumemory] - - identity = Fog::Cloudstack.uuid - name = options['name'] || Fog::Cloudstack.uuid - display_name = options['displayname'] || name - account_name = options['account'] || self.data[:accounts].first[1]["name"] - - domain = options['domainid'] ? self.data[:domains][options['domainid']] : self.data[:domains].first[1] - domain_id = domain[:id] - domain_name = domain[:name] - - # how is this setup - password = nil - password_enabled = false - - guest_os_id = Fog::Cloudstack.uuid - - security_group_ids = options['securitygroupids'] || [] # TODO: for now - - network_ids = Array(options['networkids']) || [self.data[:networks].first[1]["id"]] - networks = network_ids.map{|nid| self.data[:networks][nid]} - nic = networks.map do |network| - { - "id" => Fog::Cloudstack.uuid, - "networkid" => network["id"], - "netmask" => Fog::Cloudstack.ip_address, - "gateway" => network["gateway"], - "ipaddress" => Fog::Cloudstack.ip_address, - "traffictype" => "Guest", # TODO: ? - "type" => network["type"], - "isdefault" => true, # TODO: ? - "macaddress" => Fog::Cloudstack.mac_address - } - end - - virtual_machine = { - "id" => identity, - "name" => name, - "displayname" => display_name, - "account" => account_name, - "domainid" => domain_id, - "domain" => domain_name, - "created" => Time.now.to_s, - "state" => "Running", - "haenable" => false, - "zoneid" => zone_id, - "zonename" => zone_name, - "templateid" => template_id, - "templatename" => template_name, - "templatedisplaytext" => template_display_text, - "passwordenabled" => false, - "serviceofferingid" => service_offering_id, - "serviceofferingname" => service_offering_name, - "cpunumber" => service_offering_cpu_number, - "cpuspeed" => service_offering_cpu_speed, - "memory" => service_offering_memory, - "cpuused" => "0%", - "networkkbsread" => 0, - "networkkbswrite" => 0, - "guestosid" => guest_os_id, - "rootdeviceid" => 0, - "rootdevicetype" => "NetworkFilesystem", - "securitygroup" => security_group_ids, # TODO: mayhaps? - "nic" => nic - } - - self.data[:servers][identity]= virtual_machine - {'deployvirtualmachineresponse' => virtual_machine} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/destroy_lun_on_filer.rb b/lib/fog/cloudstack/requests/compute/destroy_lun_on_filer.rb deleted file mode 100644 index 730ff9179..000000000 --- a/lib/fog/cloudstack/requests/compute/destroy_lun_on_filer.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Destroy a LUN - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/destroyLunOnFiler.html] - def destroy_lun_on_filer(path, options={}) - options.merge!( - 'command' => 'destroyLunOnFiler', - 'path' => path - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/destroy_router.rb b/lib/fog/cloudstack/requests/compute/destroy_router.rb deleted file mode 100644 index 0eae54e9f..000000000 --- a/lib/fog/cloudstack/requests/compute/destroy_router.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Destroys a router. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/destroyRouter.html] - def destroy_router(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'destroyRouter') - else - options.merge!('command' => 'destroyRouter', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/destroy_system_vm.rb b/lib/fog/cloudstack/requests/compute/destroy_system_vm.rb deleted file mode 100644 index 1f6ce3682..000000000 --- a/lib/fog/cloudstack/requests/compute/destroy_system_vm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Destroyes a system virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/destroySystemVm.html] - def destroy_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'destroySystemVm') - else - options.merge!('command' => 'destroySystemVm', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/destroy_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/destroy_virtual_machine.rb deleted file mode 100644 index 1b109a66c..000000000 --- a/lib/fog/cloudstack/requests/compute/destroy_virtual_machine.rb +++ /dev/null @@ -1,54 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Destroys a virtual machine. Once destroyed, only the administrator can recover it. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/destroyVirtualMachine.html] - def destroy_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'destroyVirtualMachine') - else - options.merge!('command' => 'destroyVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def destroy_virtual_machine(options={}) - identity = options["id"] - - server = self.data[:servers][identity] - unless server - raise Fog::Compute::Cloudstack::BadRequest.new("Unable to execute API command attachserver due to invalid value. Object servers(uuid: #{identity}) does not exist.") - end - - job_id = Fog::Cloudstack.uuid - - job = { - "cmd" => "com.cloud.api.commands.DestroyVirtualMachineCmd", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => - {"virtualmachine" => server} - } - - self.data[:jobs][job_id]= job - self.data[:servers].delete(identity) - - {"destroyvirtualmachineresponse" => {"jobid" => job_id}} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/destroy_volume_on_filer.rb b/lib/fog/cloudstack/requests/compute/destroy_volume_on_filer.rb deleted file mode 100644 index 297b9aa87..000000000 --- a/lib/fog/cloudstack/requests/compute/destroy_volume_on_filer.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Destroy a Volume - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/destroyVolumeOnFiler.html] - def destroy_volume_on_filer(ipaddress, aggregatename, volumename, options={}) - options.merge!( - 'command' => 'destroyVolumeOnFiler', - 'ipaddress' => ipaddress, - 'aggregatename' => aggregatename, - 'volumename' => volumename - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/detach_iso.rb b/lib/fog/cloudstack/requests/compute/detach_iso.rb deleted file mode 100644 index d8568d948..000000000 --- a/lib/fog/cloudstack/requests/compute/detach_iso.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Detaches any ISO file (if any) currently attached to a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/detachIso.html] - def detach_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'detachIso') - else - options.merge!('command' => 'detachIso', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/detach_volume.rb b/lib/fog/cloudstack/requests/compute/detach_volume.rb deleted file mode 100644 index 3458a9a3b..000000000 --- a/lib/fog/cloudstack/requests/compute/detach_volume.rb +++ /dev/null @@ -1,64 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Detaches a disk volume from a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/detachVolume.html] - def detach_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'detachVolume') - else - options.merge!('command' => 'detachVolume') - end - request(options) - end - end - - class Mock - def detach_volume(options={}) - volume_id = options['id'] - - volume = self.data[:volumes][volume_id] - unless volume - raise Fog::Compute::Cloudstack::BadRequest.new("Unable to execute API command attachvolume due to invalid value. Object volumes(uuid: #{volume_id}) does not exist.") - end - - volume['virtualmachineid']= volume['vmname']= volume['vmdisplayname']= nil - - job_id = Fog::Cloudstack.uuid - - # FIXME: need to determine current user - account_id = self.data[:accounts].first - user_id = self.data[:users].first - - job = { - "accountid" => account_id, - "userid" => user_id, - "cmd" => "com.cloud.api.commands.DetachVolumeCmd", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => - {"volume" => volume} - } - - self.data[:jobs][job_id]= job - - { - "detachvolumeresponse" => { - "jobid" => job_id - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disable_account.rb b/lib/fog/cloudstack/requests/compute/disable_account.rb deleted file mode 100644 index 1db6a35f4..000000000 --- a/lib/fog/cloudstack/requests/compute/disable_account.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Disables an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/disableAccount.html] - def disable_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'disableAccount') - else - options.merge!('command' => 'disableAccount', - 'lock' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disable_auto_scale_vm_group.rb b/lib/fog/cloudstack/requests/compute/disable_auto_scale_vm_group.rb deleted file mode 100644 index df520d796..000000000 --- a/lib/fog/cloudstack/requests/compute/disable_auto_scale_vm_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Disables an AutoScale Vm Group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/disableAutoScaleVmGroup.html] - def disable_auto_scale_vm_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'disableAutoScaleVmGroup') - else - options.merge!('command' => 'disableAutoScaleVmGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disable_cisco_nexus_vsm.rb b/lib/fog/cloudstack/requests/compute/disable_cisco_nexus_vsm.rb deleted file mode 100644 index bc635ea49..000000000 --- a/lib/fog/cloudstack/requests/compute/disable_cisco_nexus_vsm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # disable a Cisco Nexus VSM device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/disableCiscoNexusVSM.html] - def disable_cisco_nexus_vsm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'disableCiscoNexusVSM') - else - options.merge!('command' => 'disableCiscoNexusVSM', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disable_static_nat.rb b/lib/fog/cloudstack/requests/compute/disable_static_nat.rb deleted file mode 100644 index d160c7753..000000000 --- a/lib/fog/cloudstack/requests/compute/disable_static_nat.rb +++ /dev/null @@ -1,51 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Disables static rule for given ip address - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/disableStaticNat.html] - def disable_static_nat(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'disableStaticNat') - else - options.merge!('command' => 'disableStaticNat', - 'ipaddressid' => args[0]) - end - request(options) - end - end - - class Mock - def disable_static_nat(*args) - ip_address_id = args[0].is_a?(Hash) ? args[0]['ipaddressid'] : args[0] - - address = self.data[:public_ip_addresses][ip_address_id] - - unless address - raise Fog::Compute::Cloudstack::BadRequest.new( -"Unable to execute API command disablestaticnat due to invalid value. \ -Invalid parameter ipaddressid value=#{ip_address_id} due to incorrect long value format, \ -or entity does not exist or due to incorrect parameter annotation for the field in api cmd class.") - end - - if address['virtualmachineid'].nil? - raise Fog::Compute::Cloudstack::BadRequest.new( -"Specified IP address id is not associated with any vm Id") - end - - address.merge!( - 'virtualmachineid' => nil, - 'virtualmachinname' => nil, - 'virtualmachinedisplayname' => nil - ) - {'enablestaticnatresponse' => {'success' => 'true'}} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disable_user.rb b/lib/fog/cloudstack/requests/compute/disable_user.rb deleted file mode 100644 index 5a07db17e..000000000 --- a/lib/fog/cloudstack/requests/compute/disable_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Disables a user account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/disableUser.html] - def disable_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'disableUser') - else - options.merge!('command' => 'disableUser', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disassociate_ip_address.rb b/lib/fog/cloudstack/requests/compute/disassociate_ip_address.rb deleted file mode 100644 index 1b2855909..000000000 --- a/lib/fog/cloudstack/requests/compute/disassociate_ip_address.rb +++ /dev/null @@ -1,35 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Disassociates an ip address from the account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/disassociateIpAddress.html] - def disassociate_ip_address(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'disassociateIpAddress') - else - options.merge!('command' => 'disassociateIpAddress', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def disassociate_ip_address(*args) - public_ip_address_id = args[0].is_a?(Hash) ? args[0]['id'] : args[0] - if self.data[:public_ip_addresses][public_ip_address_id] - self.data[:public_ip_addresses].delete(public_ip_address_id) - { "disassociateipaddressresponse" => { "success" => "true" }} - end - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/disassociate_ucs_profile_from_blade.rb b/lib/fog/cloudstack/requests/compute/disassociate_ucs_profile_from_blade.rb deleted file mode 100644 index f4fce61dc..000000000 --- a/lib/fog/cloudstack/requests/compute/disassociate_ucs_profile_from_blade.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # disassociate a profile from a blade - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/disassociateUcsProfileFromBlade.html] - def disassociate_ucs_profile_from_blade(bladeid, options={}) - options.merge!( - 'command' => 'disassociateUcsProfileFromBlade', - 'bladeid' => bladeid - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/dissociate_lun.rb b/lib/fog/cloudstack/requests/compute/dissociate_lun.rb deleted file mode 100644 index 641385bfe..000000000 --- a/lib/fog/cloudstack/requests/compute/dissociate_lun.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Dissociate a LUN - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/dissociateLun.html] - def dissociate_lun(iqn, path, options={}) - options.merge!( - 'command' => 'dissociateLun', - 'iqn' => iqn, - 'path' => path - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/enable_account.rb b/lib/fog/cloudstack/requests/compute/enable_account.rb deleted file mode 100644 index d6dbf6ccf..000000000 --- a/lib/fog/cloudstack/requests/compute/enable_account.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Enables an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/enableAccount.html] - def enable_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'enableAccount') - else - options.merge!('command' => 'enableAccount') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/enable_auto_scale_vm_group.rb b/lib/fog/cloudstack/requests/compute/enable_auto_scale_vm_group.rb deleted file mode 100644 index 6a1749408..000000000 --- a/lib/fog/cloudstack/requests/compute/enable_auto_scale_vm_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Enables an AutoScale Vm Group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/enableAutoScaleVmGroup.html] - def enable_auto_scale_vm_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'enableAutoScaleVmGroup') - else - options.merge!('command' => 'enableAutoScaleVmGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/enable_cisco_nexus_vsm.rb b/lib/fog/cloudstack/requests/compute/enable_cisco_nexus_vsm.rb deleted file mode 100644 index 011227f13..000000000 --- a/lib/fog/cloudstack/requests/compute/enable_cisco_nexus_vsm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Enable a Cisco Nexus VSM device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/enableCiscoNexusVSM.html] - def enable_cisco_nexus_vsm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'enableCiscoNexusVSM') - else - options.merge!('command' => 'enableCiscoNexusVSM', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/enable_static_nat.rb b/lib/fog/cloudstack/requests/compute/enable_static_nat.rb deleted file mode 100644 index 6a014952b..000000000 --- a/lib/fog/cloudstack/requests/compute/enable_static_nat.rb +++ /dev/null @@ -1,69 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Enables static nat for given ip address - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/enableStaticNat.html] - def enable_static_nat(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'enableStaticNat') - else - options.merge!('command' => 'enableStaticNat', - 'ipaddressid' => args[0], - 'virtualmachineid' => args[1]) - end - request(options) - end - end - - class Mock - def enable_static_nat(*args) - ip_address_id = nil - virtual_machine_id = nil - if args[0].is_a? Hash - ip_address_id = args[0]['ipaddressid'] - virtual_machine_id = args[0]['virtualmachineid'] - else - ip_address_id = args[0] - virtual_machine_id = args[1] - end - - server = self.data[:servers][virtual_machine_id] - address = self.data[:public_ip_addresses][ip_address_id] - - unless server - raise Fog::Compute::Cloudstack::BadRequest.new( -"Unable to execute API command enablestaticnat due to invalid value. \ -Invalid parameter virtualmachineid value=#{virtual_machine_id} due to incorrect long value format, \ -or entity does not exist or due to incorrect parameter annotation for the field in api cmd class.") - end - - unless address - raise Fog::Compute::Cloudstack::BadRequest.new( -"Unable to execute API command enablestaticnat due to invalid value. \ -Invalid parameter ipaddressid value=#{ip_address_id} due to incorrect long value format, \ -or entity does not exist or due to incorrect parameter annotation for the field in api cmd class.") - end - - unless address['virtualmachineid'].nil? - raise Fog::Compute::Cloudstack::BadRequest.new( -"Failed to enable static nat for the ip address id=#{ip_address_id} \ -as vm id=#{virtual_machine_id} is already associated with ip id=#{ip_address_id}") - end - - address.merge!( - 'virtualmachineid' => server['id'], - 'virtualmachinname' => server['name'], - 'virtualmachinedisplayname' => server['displayname'] - ) - {'enablestaticnatresponse' => {'success' => 'true'}} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/enable_storage_maintenance.rb b/lib/fog/cloudstack/requests/compute/enable_storage_maintenance.rb deleted file mode 100644 index 3cc90711c..000000000 --- a/lib/fog/cloudstack/requests/compute/enable_storage_maintenance.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Puts storage pool into maintenance state - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/enableStorageMaintenance.html] - def enable_storage_maintenance(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'enableStorageMaintenance') - else - options.merge!('command' => 'enableStorageMaintenance', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/enable_user.rb b/lib/fog/cloudstack/requests/compute/enable_user.rb deleted file mode 100644 index 54fd2c743..000000000 --- a/lib/fog/cloudstack/requests/compute/enable_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Enables a user account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/enableUser.html] - def enable_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'enableUser') - else - options.merge!('command' => 'enableUser', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/expunge_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/expunge_virtual_machine.rb deleted file mode 100644 index c8d934958..000000000 --- a/lib/fog/cloudstack/requests/compute/expunge_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Expunge a virtual machine. Once expunged, it cannot be recoverd. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/expungeVirtualMachine.html] - def expunge_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'expungeVirtualMachine') - else - options.merge!('command' => 'expungeVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/extract_iso.rb b/lib/fog/cloudstack/requests/compute/extract_iso.rb deleted file mode 100644 index 2839e4109..000000000 --- a/lib/fog/cloudstack/requests/compute/extract_iso.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Extracts an ISO - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/extractIso.html] - def extract_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'extractIso') - else - options.merge!('command' => 'extractIso', - 'id' => args[0], - 'mode' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/extract_template.rb b/lib/fog/cloudstack/requests/compute/extract_template.rb deleted file mode 100644 index cc2b6f67e..000000000 --- a/lib/fog/cloudstack/requests/compute/extract_template.rb +++ /dev/null @@ -1,65 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Extracts a template - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/extractTemplate.html] - def extract_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'extractTemplate') - else - options.merge!('command' => 'extractTemplate', - 'mode' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - class Mock - def extract_template(options={}) - Fog.credentials[:cloudstack_zone_id] = 1105 - - template_id = options['id'] - template_mode = options['mode'] - - zoneid = self.data[:zones].keys[0] - zone = self.data[:zones][zoneid] - - template = {} - template['id'] = template_id - template['name'] = "test template" - template['extractId'] = 1 - template['accountid'] = 1 - template['state'] = "DOWNLOAD_URL_CREATED" - template['zoneid'] = zoneid - template['zonename'] = self.data[:zones][zoneid]["name"] - template['extractMode'] = template_mode - template['url'] = "http:%2F%2Fexample.com" - - job_id = 1 - job = { - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => { "template" => template } - } - - self.data[:jobs][job_id] = job - { - "extracttemplateresponse" => { - "jobid" => job_id - } - } - end - end # Mock - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/extract_volume.rb b/lib/fog/cloudstack/requests/compute/extract_volume.rb deleted file mode 100644 index cba86b6d0..000000000 --- a/lib/fog/cloudstack/requests/compute/extract_volume.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Extracts volume - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/extractVolume.html] - def extract_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'extractVolume') - else - options.merge!('command' => 'extractVolume', - 'mode' => args[0], - 'id' => args[1], - 'zoneid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/find_hosts_for_migration.rb b/lib/fog/cloudstack/requests/compute/find_hosts_for_migration.rb deleted file mode 100644 index 1e103aecb..000000000 --- a/lib/fog/cloudstack/requests/compute/find_hosts_for_migration.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Find hosts suitable for migrating a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/findHostsForMigration.html] - def find_hosts_for_migration(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'findHostsForMigration') - else - options.merge!('command' => 'findHostsForMigration', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/find_storage_pools_for_migration.rb b/lib/fog/cloudstack/requests/compute/find_storage_pools_for_migration.rb deleted file mode 100644 index 87b33c1a9..000000000 --- a/lib/fog/cloudstack/requests/compute/find_storage_pools_for_migration.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists storage pools available for migration of a volume. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/findStoragePoolsForMigration.html] - def find_storage_pools_for_migration(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'findStoragePoolsForMigration') - else - options.merge!('command' => 'findStoragePoolsForMigration', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/generate_alert.rb b/lib/fog/cloudstack/requests/compute/generate_alert.rb deleted file mode 100644 index 5b6655db4..000000000 --- a/lib/fog/cloudstack/requests/compute/generate_alert.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Generates an alert - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/generateAlert.html] - def generate_alert(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'generateAlert') - else - options.merge!('command' => 'generateAlert', - 'description' => args[0], - 'name' => args[1], - 'type' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/generate_usage_records.rb b/lib/fog/cloudstack/requests/compute/generate_usage_records.rb deleted file mode 100644 index c044db589..000000000 --- a/lib/fog/cloudstack/requests/compute/generate_usage_records.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Generates usage records. This will generate records only if there any records to be generated, i.e if the scheduled usage job was not run or failed - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/generateUsageRecords.html] - def generate_usage_records(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'generateUsageRecords') - else - options.merge!('command' => 'generateUsageRecords', - 'enddate' => args[0], - 'startdate' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/get_api_limit.rb b/lib/fog/cloudstack/requests/compute/get_api_limit.rb deleted file mode 100644 index d147fe73f..000000000 --- a/lib/fog/cloudstack/requests/compute/get_api_limit.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Get API limit count for the caller - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/getApiLimit.html] - def get_api_limit(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'getApiLimit') - else - options.merge!('command' => 'getApiLimit') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/get_cloud_identifier.rb b/lib/fog/cloudstack/requests/compute/get_cloud_identifier.rb deleted file mode 100644 index ed66d7052..000000000 --- a/lib/fog/cloudstack/requests/compute/get_cloud_identifier.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Retrieves a cloud identifier. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/getCloudIdentifier.html] - def get_cloud_identifier(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'getCloudIdentifier') - else - options.merge!('command' => 'getCloudIdentifier', - 'userid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/get_user.rb b/lib/fog/cloudstack/requests/compute/get_user.rb deleted file mode 100644 index 9fd7ee56a..000000000 --- a/lib/fog/cloudstack/requests/compute/get_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Find user account by API key - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/getUser.html] - def get_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'getUser') - else - options.merge!('command' => 'getUser', - 'apikey' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/get_virtual_machine_user_data.rb b/lib/fog/cloudstack/requests/compute/get_virtual_machine_user_data.rb deleted file mode 100644 index 7d70f7469..000000000 --- a/lib/fog/cloudstack/requests/compute/get_virtual_machine_user_data.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Returns user data associated with the VM - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/getVirtualMachineUserData.html] - def get_virtual_machine_user_data(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'getVirtualMachineUserData') - else - options.merge!('command' => 'getVirtualMachineUserData', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/get_vm_password.rb b/lib/fog/cloudstack/requests/compute/get_vm_password.rb deleted file mode 100644 index 1d82daabe..000000000 --- a/lib/fog/cloudstack/requests/compute/get_vm_password.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Returns an encrypted password for the VM - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/getVMPassword.html] - def get_vm_password(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'getVMPassword') - else - options.merge!('command' => 'getVMPassword', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/import_ldap_users.rb b/lib/fog/cloudstack/requests/compute/import_ldap_users.rb deleted file mode 100644 index 319076776..000000000 --- a/lib/fog/cloudstack/requests/compute/import_ldap_users.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Import LDAP users - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/importLdapUsers.html] - def import_ldap_users(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'importLdapUsers') - else - options.merge!('command' => 'importLdapUsers', - 'accounttype' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/instantiate_ucs_template_and_assocaciate_to_blade.rb b/lib/fog/cloudstack/requests/compute/instantiate_ucs_template_and_assocaciate_to_blade.rb deleted file mode 100644 index b737cbe88..000000000 --- a/lib/fog/cloudstack/requests/compute/instantiate_ucs_template_and_assocaciate_to_blade.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # create a profile of template and associate to a blade - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/instantiateUcsTemplateAndAssocaciateToBlade.html] - def instantiate_ucs_template_and_assocaciate_to_blade(bladeid, templatedn, ucsmanagerid, options={}) - options.merge!( - 'command' => 'instantiateUcsTemplateAndAssocaciateToBlade', - 'bladeid' => bladeid, - 'templatedn' => templatedn, - 'ucsmanagerid' => ucsmanagerid - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/ldap_config.rb b/lib/fog/cloudstack/requests/compute/ldap_config.rb deleted file mode 100644 index 0aece9293..000000000 --- a/lib/fog/cloudstack/requests/compute/ldap_config.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Configure the LDAP context for this site. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/ldapConfig.html] - def ldap_config(options={}) - options.merge!( - 'command' => 'ldapConfig' - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/ldap_create_account.rb b/lib/fog/cloudstack/requests/compute/ldap_create_account.rb deleted file mode 100644 index 76931d1e7..000000000 --- a/lib/fog/cloudstack/requests/compute/ldap_create_account.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Creates an account from an LDAP user - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/ldapCreateAccount.html] - def ldap_create_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'ldapCreateAccount') - else - options.merge!('command' => 'ldapCreateAccount', - 'username' => args[0], - 'accounttype' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/ldap_remove.rb b/lib/fog/cloudstack/requests/compute/ldap_remove.rb deleted file mode 100644 index 1590fab5c..000000000 --- a/lib/fog/cloudstack/requests/compute/ldap_remove.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Remove the LDAP context for this site. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/ldapRemove.html] - def ldap_remove(options={}) - options.merge!( - 'command' => 'ldapRemove' - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_accounts.rb b/lib/fog/cloudstack/requests/compute/list_accounts.rb deleted file mode 100644 index 4d62ee2e8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_accounts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists accounts and provides detailed account information for listed accounts - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAccounts.html] - def list_accounts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAccounts') - else - options.merge!('command' => 'listAccounts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_affinity_group_types.rb b/lib/fog/cloudstack/requests/compute/list_affinity_group_types.rb deleted file mode 100644 index bf5eb1d30..000000000 --- a/lib/fog/cloudstack/requests/compute/list_affinity_group_types.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists affinity group types available - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAffinityGroupTypes.html] - def list_affinity_group_types(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAffinityGroupTypes') - else - options.merge!('command' => 'listAffinityGroupTypes') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_affinity_groups.rb b/lib/fog/cloudstack/requests/compute/list_affinity_groups.rb deleted file mode 100644 index 328a849dd..000000000 --- a/lib/fog/cloudstack/requests/compute/list_affinity_groups.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists affinity groups - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAffinityGroups.html] - def list_affinity_groups(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAffinityGroups') - else - options.merge!('command' => 'listAffinityGroups') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_alerts.rb b/lib/fog/cloudstack/requests/compute/list_alerts.rb deleted file mode 100644 index b33e83a8a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_alerts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all alerts. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAlerts.html] - def list_alerts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAlerts') - else - options.merge!('command' => 'listAlerts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_apis.rb b/lib/fog/cloudstack/requests/compute/list_apis.rb deleted file mode 100644 index 92eb776f9..000000000 --- a/lib/fog/cloudstack/requests/compute/list_apis.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists all available apis on the server, provided by the Api Discovery plugin - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listApis.html] - def list_apis(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listApis') - else - options.merge!('command' => 'listApis') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_async_jobs.rb b/lib/fog/cloudstack/requests/compute/list_async_jobs.rb deleted file mode 100644 index a4c7cae86..000000000 --- a/lib/fog/cloudstack/requests/compute/list_async_jobs.rb +++ /dev/null @@ -1,36 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all pending asynchronous jobs for the account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAsyncJobs.html] - def list_async_jobs(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAsyncJobs') - else - options.merge!('command' => 'listAsyncJobs') - end - request(options) - end - end - - class Mock - def list_async_jobs(options={}) - # FIXME: support paging - jobs = self.data[:jobs] - { - 'listasyncjobsresponse' => { - 'count' => jobs.size, - 'asyncjobs' => jobs - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_auto_scale_policies.rb b/lib/fog/cloudstack/requests/compute/list_auto_scale_policies.rb deleted file mode 100644 index 0100cade8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_auto_scale_policies.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists autoscale policies. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAutoScalePolicies.html] - def list_auto_scale_policies(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAutoScalePolicies') - else - options.merge!('command' => 'listAutoScalePolicies') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_auto_scale_vm_groups.rb b/lib/fog/cloudstack/requests/compute/list_auto_scale_vm_groups.rb deleted file mode 100644 index 79b7253da..000000000 --- a/lib/fog/cloudstack/requests/compute/list_auto_scale_vm_groups.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists autoscale vm groups. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAutoScaleVmGroups.html] - def list_auto_scale_vm_groups(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAutoScaleVmGroups') - else - options.merge!('command' => 'listAutoScaleVmGroups') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_auto_scale_vm_profiles.rb b/lib/fog/cloudstack/requests/compute/list_auto_scale_vm_profiles.rb deleted file mode 100644 index d97f47e68..000000000 --- a/lib/fog/cloudstack/requests/compute/list_auto_scale_vm_profiles.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists autoscale vm profiles. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listAutoScaleVmProfiles.html] - def list_auto_scale_vm_profiles(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listAutoScaleVmProfiles') - else - options.merge!('command' => 'listAutoScaleVmProfiles') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_baremetal_dhcp.rb b/lib/fog/cloudstack/requests/compute/list_baremetal_dhcp.rb deleted file mode 100644 index b3da2b49e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_baremetal_dhcp.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # list baremetal dhcp servers - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listBaremetalDhcp.html] - def list_baremetal_dhcp(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listBaremetalDhcp') - else - options.merge!('command' => 'listBaremetalDhcp') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_baremetal_pxe_servers.rb b/lib/fog/cloudstack/requests/compute/list_baremetal_pxe_servers.rb deleted file mode 100644 index 42ad3970f..000000000 --- a/lib/fog/cloudstack/requests/compute/list_baremetal_pxe_servers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # list baremetal pxe server - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listBaremetalPxeServers.html] - def list_baremetal_pxe_servers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listBaremetalPxeServers') - else - options.merge!('command' => 'listBaremetalPxeServers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_big_switch_vns_devices.rb b/lib/fog/cloudstack/requests/compute/list_big_switch_vns_devices.rb deleted file mode 100644 index 2b2f27c8c..000000000 --- a/lib/fog/cloudstack/requests/compute/list_big_switch_vns_devices.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists BigSwitch Vns devices - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listBigSwitchVnsDevices.html] - def list_big_switch_vns_devices(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listBigSwitchVnsDevices') - else - options.merge!('command' => 'listBigSwitchVnsDevices') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_capabilities.rb b/lib/fog/cloudstack/requests/compute/list_capabilities.rb deleted file mode 100644 index 7344b307c..000000000 --- a/lib/fog/cloudstack/requests/compute/list_capabilities.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists capabilities - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listCapabilities.html] - def list_capabilities(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listCapabilities') - else - options.merge!('command' => 'listCapabilities') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_capacity.rb b/lib/fog/cloudstack/requests/compute/list_capacity.rb deleted file mode 100644 index 329a2e863..000000000 --- a/lib/fog/cloudstack/requests/compute/list_capacity.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all the system wide capacities. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listCapacity.html] - def list_capacity(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listCapacity') - else - options.merge!('command' => 'listCapacity') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_cisco_asa1000v_resources.rb b/lib/fog/cloudstack/requests/compute/list_cisco_asa1000v_resources.rb deleted file mode 100644 index e99bc62a9..000000000 --- a/lib/fog/cloudstack/requests/compute/list_cisco_asa1000v_resources.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists Cisco ASA 1000v appliances - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listCiscoAsa1000vResources.html] - def list_cisco_asa1000v_resources(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listCiscoAsa1000vResources') - else - options.merge!('command' => 'listCiscoAsa1000vResources') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_cisco_nexus_vsms.rb b/lib/fog/cloudstack/requests/compute/list_cisco_nexus_vsms.rb deleted file mode 100644 index 3c3aaa8a2..000000000 --- a/lib/fog/cloudstack/requests/compute/list_cisco_nexus_vsms.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Retrieves a Cisco Nexus 1000v Virtual Switch Manager device associated with a Cluster - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listCiscoNexusVSMs.html] - def list_cisco_nexus_vsms(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listCiscoNexusVSMs') - else - options.merge!('command' => 'listCiscoNexusVSMs') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_cisco_vnmc_resources.rb b/lib/fog/cloudstack/requests/compute/list_cisco_vnmc_resources.rb deleted file mode 100644 index 1d2217c61..000000000 --- a/lib/fog/cloudstack/requests/compute/list_cisco_vnmc_resources.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists Cisco VNMC controllers - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listCiscoVnmcResources.html] - def list_cisco_vnmc_resources(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listCiscoVnmcResources') - else - options.merge!('command' => 'listCiscoVnmcResources') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_clusters.rb b/lib/fog/cloudstack/requests/compute/list_clusters.rb deleted file mode 100644 index 438fc6c14..000000000 --- a/lib/fog/cloudstack/requests/compute/list_clusters.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists clusters. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listClusters.html] - def list_clusters(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listClusters') - else - options.merge!('command' => 'listClusters') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_conditions.rb b/lib/fog/cloudstack/requests/compute/list_conditions.rb deleted file mode 100644 index c9cfed1a4..000000000 --- a/lib/fog/cloudstack/requests/compute/list_conditions.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List Conditions for the specific user - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listConditions.html] - def list_conditions(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listConditions') - else - options.merge!('command' => 'listConditions') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_configurations.rb b/lib/fog/cloudstack/requests/compute/list_configurations.rb deleted file mode 100644 index ef193f438..000000000 --- a/lib/fog/cloudstack/requests/compute/list_configurations.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all configurations. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listConfigurations.html] - def list_configurations(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listConfigurations') - else - options.merge!('command' => 'listConfigurations') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_counters.rb b/lib/fog/cloudstack/requests/compute/list_counters.rb deleted file mode 100644 index 0c57e0886..000000000 --- a/lib/fog/cloudstack/requests/compute/list_counters.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List the counters - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listCounters.html] - def list_counters(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listCounters') - else - options.merge!('command' => 'listCounters') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_dedicated_clusters.rb b/lib/fog/cloudstack/requests/compute/list_dedicated_clusters.rb deleted file mode 100644 index 9d728b240..000000000 --- a/lib/fog/cloudstack/requests/compute/list_dedicated_clusters.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists dedicated clusters. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDedicatedClusters.html] - def list_dedicated_clusters(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDedicatedClusters') - else - options.merge!('command' => 'listDedicatedClusters') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_dedicated_guest_vlan_ranges.rb b/lib/fog/cloudstack/requests/compute/list_dedicated_guest_vlan_ranges.rb deleted file mode 100644 index 2561ee33e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_dedicated_guest_vlan_ranges.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists dedicated guest vlan ranges - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDedicatedGuestVlanRanges.html] - def list_dedicated_guest_vlan_ranges(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDedicatedGuestVlanRanges') - else - options.merge!('command' => 'listDedicatedGuestVlanRanges') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_dedicated_hosts.rb b/lib/fog/cloudstack/requests/compute/list_dedicated_hosts.rb deleted file mode 100644 index 76405791a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_dedicated_hosts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists dedicated hosts. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDedicatedHosts.html] - def list_dedicated_hosts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDedicatedHosts') - else - options.merge!('command' => 'listDedicatedHosts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_dedicated_pods.rb b/lib/fog/cloudstack/requests/compute/list_dedicated_pods.rb deleted file mode 100644 index 1a29237de..000000000 --- a/lib/fog/cloudstack/requests/compute/list_dedicated_pods.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists dedicated pods. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDedicatedPods.html] - def list_dedicated_pods(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDedicatedPods') - else - options.merge!('command' => 'listDedicatedPods') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_dedicated_zones.rb b/lib/fog/cloudstack/requests/compute/list_dedicated_zones.rb deleted file mode 100644 index c0bb13f16..000000000 --- a/lib/fog/cloudstack/requests/compute/list_dedicated_zones.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List dedicated zones. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDedicatedZones.html] - def list_dedicated_zones(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDedicatedZones') - else - options.merge!('command' => 'listDedicatedZones') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_deployment_planners.rb b/lib/fog/cloudstack/requests/compute/list_deployment_planners.rb deleted file mode 100644 index 2e167557b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_deployment_planners.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all DeploymentPlanners available. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDeploymentPlanners.html] - def list_deployment_planners(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDeploymentPlanners') - else - options.merge!('command' => 'listDeploymentPlanners') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb b/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb deleted file mode 100644 index b53bc7e94..000000000 --- a/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb +++ /dev/null @@ -1,32 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available disk offerings. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDiskOfferings.html] - def list_disk_offerings(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDiskOfferings') - else - options.merge!('command' => 'listDiskOfferings') - end - request(options) - end - end - - class Mock - # TODO: add id, name filters and paging params - def list_disk_offerings(options={}) - disk_offerings = self.data[:disk_offerings] - { "listdiskofferingsresponse" => { "count"=> disk_offerings.count, "diskoffering"=> disk_offerings.values } } - end - - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_domain_children.rb b/lib/fog/cloudstack/requests/compute/list_domain_children.rb deleted file mode 100644 index c841d2eb0..000000000 --- a/lib/fog/cloudstack/requests/compute/list_domain_children.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all children domains belonging to a specified domain - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDomainChildren.html] - def list_domain_children(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDomainChildren') - else - options.merge!('command' => 'listDomainChildren') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_domains.rb b/lib/fog/cloudstack/requests/compute/list_domains.rb deleted file mode 100644 index 7705b3e83..000000000 --- a/lib/fog/cloudstack/requests/compute/list_domains.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists domains and provides detailed information for listed domains - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDomains.html] - def list_domains(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listDomains') - else - options.merge!('command' => 'listDomains') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_egress_firewall_rules.rb b/lib/fog/cloudstack/requests/compute/list_egress_firewall_rules.rb deleted file mode 100644 index cfc615e80..000000000 --- a/lib/fog/cloudstack/requests/compute/list_egress_firewall_rules.rb +++ /dev/null @@ -1,35 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all egress firewall rules for network id. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listEgressFirewallRules.html] - def list_egress_firewall_rules(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listEgressFirewallRules') - else - options.merge!('command' => 'listEgressFirewallRules') - end - - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - - request(options) - end - end - - class Mock - def list_egress_firewall_rules(*arg) - firewall_rules = self.data[:egress_firewall_rules] - { "listegressfirewallrulesresponse" => { "count"=> firewall_rules.count, "firewallrule"=> firewall_rules.values } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_event_types.rb b/lib/fog/cloudstack/requests/compute/list_event_types.rb deleted file mode 100644 index a27942c2a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_event_types.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List Event Types - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listEventTypes.html] - def list_event_types(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listEventTypes') - else - options.merge!('command' => 'listEventTypes') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_events.rb b/lib/fog/cloudstack/requests/compute/list_events.rb deleted file mode 100644 index 1521e1cf2..000000000 --- a/lib/fog/cloudstack/requests/compute/list_events.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # A command to list events. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listEvents.html] - def list_events(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listEvents') - else - options.merge!('command' => 'listEvents') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb b/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb deleted file mode 100644 index 5aa68a04e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List external firewall appliances. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listExternalFirewalls.html] - def list_external_firewalls(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listExternalFirewalls') - else - options.merge!('command' => 'listExternalFirewalls', - 'zoneid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb b/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb deleted file mode 100644 index 6346b30ba..000000000 --- a/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists F5 external load balancer appliances added in a zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listExternalLoadBalancers.html] - def list_external_load_balancers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listExternalLoadBalancers') - else - options.merge!('command' => 'listExternalLoadBalancers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_f5_load_balancer_networks.rb b/lib/fog/cloudstack/requests/compute/list_f5_load_balancer_networks.rb deleted file mode 100644 index af355c394..000000000 --- a/lib/fog/cloudstack/requests/compute/list_f5_load_balancer_networks.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists network that are using a F5 load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listF5LoadBalancerNetworks.html] - def list_f5_load_balancer_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listF5LoadBalancerNetworks') - else - options.merge!('command' => 'listF5LoadBalancerNetworks', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_f5_load_balancers.rb b/lib/fog/cloudstack/requests/compute/list_f5_load_balancers.rb deleted file mode 100644 index bf6c70835..000000000 --- a/lib/fog/cloudstack/requests/compute/list_f5_load_balancers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists F5 load balancer devices - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listF5LoadBalancers.html] - def list_f5_load_balancers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listF5LoadBalancers') - else - options.merge!('command' => 'listF5LoadBalancers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_firewall_rules.rb b/lib/fog/cloudstack/requests/compute/list_firewall_rules.rb deleted file mode 100644 index f5a46305c..000000000 --- a/lib/fog/cloudstack/requests/compute/list_firewall_rules.rb +++ /dev/null @@ -1,35 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all firewall rules for an IP address. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listFirewallRules.html] - def list_firewall_rules(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listFirewallRules') - else - options.merge!('command' => 'listFirewallRules') - end - - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - - request(options) - end - end - - class Mock - def list_firewall_rules(*arg) - firewall_rules = self.data[:firewall_rules] - { "listfirewallrulesresponse" => { "count"=> firewall_rules.count, "firewallrule"=> firewall_rules.values } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_global_load_balancer_rules.rb b/lib/fog/cloudstack/requests/compute/list_global_load_balancer_rules.rb deleted file mode 100644 index 0ec7fdf6a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_global_load_balancer_rules.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists load balancer rules. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listGlobalLoadBalancerRules.html] - def list_global_load_balancer_rules(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listGlobalLoadBalancerRules') - else - options.merge!('command' => 'listGlobalLoadBalancerRules') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_guest_os_mapping.rb b/lib/fog/cloudstack/requests/compute/list_guest_os_mapping.rb deleted file mode 100644 index c51eecc10..000000000 --- a/lib/fog/cloudstack/requests/compute/list_guest_os_mapping.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available OS mappings for given hypervisor - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listGuestOsMapping.html] - def list_guest_os_mapping(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listGuestOsMapping') - else - options.merge!('command' => 'listGuestOsMapping') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_hosts.rb b/lib/fog/cloudstack/requests/compute/list_hosts.rb deleted file mode 100644 index 6782fa7d2..000000000 --- a/lib/fog/cloudstack/requests/compute/list_hosts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists hosts. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listHosts.html] - def list_hosts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listHosts') - else - options.merge!('command' => 'listHosts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_hypervisor_capabilities.rb b/lib/fog/cloudstack/requests/compute/list_hypervisor_capabilities.rb deleted file mode 100644 index b2d1cfdbe..000000000 --- a/lib/fog/cloudstack/requests/compute/list_hypervisor_capabilities.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all hypervisor capabilities. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listHypervisorCapabilities.html] - def list_hypervisor_capabilities(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listHypervisorCapabilities') - else - options.merge!('command' => 'listHypervisorCapabilities') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_hypervisors.rb b/lib/fog/cloudstack/requests/compute/list_hypervisors.rb deleted file mode 100644 index d4a4c867b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_hypervisors.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List hypervisors - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listHypervisors.html] - def list_hypervisors(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listHypervisors') - else - options.merge!('command' => 'listHypervisors') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_image_stores.rb b/lib/fog/cloudstack/requests/compute/list_image_stores.rb deleted file mode 100644 index a096c947b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_image_stores.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists image stores. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listImageStores.html] - def list_image_stores(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listImageStores') - else - options.merge!('command' => 'listImageStores') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_instance_groups.rb b/lib/fog/cloudstack/requests/compute/list_instance_groups.rb deleted file mode 100644 index a01cfafe4..000000000 --- a/lib/fog/cloudstack/requests/compute/list_instance_groups.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists vm groups - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listInstanceGroups.html] - def list_instance_groups(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listInstanceGroups') - else - options.merge!('command' => 'listInstanceGroups') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_internal_load_balancer_elements.rb b/lib/fog/cloudstack/requests/compute/list_internal_load_balancer_elements.rb deleted file mode 100644 index 4f811f7ee..000000000 --- a/lib/fog/cloudstack/requests/compute/list_internal_load_balancer_elements.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available Internal Load Balancer elements. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listInternalLoadBalancerElements.html] - def list_internal_load_balancer_elements(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listInternalLoadBalancerElements') - else - options.merge!('command' => 'listInternalLoadBalancerElements') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_internal_load_balancer_vms.rb b/lib/fog/cloudstack/requests/compute/list_internal_load_balancer_vms.rb deleted file mode 100644 index 38ab038c8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_internal_load_balancer_vms.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List internal LB VMs. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listInternalLoadBalancerVMs.html] - def list_internal_load_balancer_vms(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listInternalLoadBalancerVMs') - else - options.merge!('command' => 'listInternalLoadBalancerVMs') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ip_forwarding_rules.rb b/lib/fog/cloudstack/requests/compute/list_ip_forwarding_rules.rb deleted file mode 100644 index 7c5d5f060..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ip_forwarding_rules.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List the ip forwarding rules - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listIpForwardingRules.html] - def list_ip_forwarding_rules(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listIpForwardingRules') - else - options.merge!('command' => 'listIpForwardingRules') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_iso_permissions.rb b/lib/fog/cloudstack/requests/compute/list_iso_permissions.rb deleted file mode 100644 index 6c9f73774..000000000 --- a/lib/fog/cloudstack/requests/compute/list_iso_permissions.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List iso visibility and all accounts that have permissions to view this iso. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listIsoPermissions.html] - def list_iso_permissions(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listIsoPermissions') - else - options.merge!('command' => 'listIsoPermissions', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_isos.rb b/lib/fog/cloudstack/requests/compute/list_isos.rb deleted file mode 100644 index 823914656..000000000 --- a/lib/fog/cloudstack/requests/compute/list_isos.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available ISO files. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listIsos.html] - def list_isos(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listIsos') - else - options.merge!('command' => 'listIsos') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_lb_health_check_policies.rb b/lib/fog/cloudstack/requests/compute/list_lb_health_check_policies.rb deleted file mode 100644 index af9db8edc..000000000 --- a/lib/fog/cloudstack/requests/compute/list_lb_health_check_policies.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists load balancer HealthCheck policies. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLBHealthCheckPolicies.html] - def list_lb_health_check_policies(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLBHealthCheckPolicies') - else - options.merge!('command' => 'listLBHealthCheckPolicies') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_lb_stickiness_policies.rb b/lib/fog/cloudstack/requests/compute/list_lb_stickiness_policies.rb deleted file mode 100644 index 7e1ab7630..000000000 --- a/lib/fog/cloudstack/requests/compute/list_lb_stickiness_policies.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists LBStickiness policies. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLBStickinessPolicies.html] - def list_lb_stickiness_policies(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLBStickinessPolicies') - else - options.merge!('command' => 'listLBStickinessPolicies') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ldap_configurations.rb b/lib/fog/cloudstack/requests/compute/list_ldap_configurations.rb deleted file mode 100644 index 8263bf32c..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ldap_configurations.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all LDAP configurations - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLdapConfigurations.html] - def list_ldap_configurations(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLdapConfigurations') - else - options.merge!('command' => 'listLdapConfigurations') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ldap_users.rb b/lib/fog/cloudstack/requests/compute/list_ldap_users.rb deleted file mode 100644 index d4faaa480..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ldap_users.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all LDAP Users - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLdapUsers.html] - def list_ldap_users(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLdapUsers') - else - options.merge!('command' => 'listLdapUsers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb b/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb deleted file mode 100644 index 17ca2f9c0..000000000 --- a/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List all virtual machine instances that are assigned to a load balancer rule. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLoadBalancerRuleInstances.html] - def list_load_balancer_rule_instances(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLoadBalancerRuleInstances') - else - options.merge!('command' => 'listLoadBalancerRuleInstances', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb b/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb deleted file mode 100644 index c9c3d5677..000000000 --- a/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists load balancer rules. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLoadBalancerRules.html] - def list_load_balancer_rules(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLoadBalancerRules') - else - options.merge!('command' => 'listLoadBalancerRules') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_load_balancers.rb b/lib/fog/cloudstack/requests/compute/list_load_balancers.rb deleted file mode 100644 index 070ca7846..000000000 --- a/lib/fog/cloudstack/requests/compute/list_load_balancers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists Load Balancers - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listLoadBalancers.html] - def list_load_balancers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listLoadBalancers') - else - options.merge!('command' => 'listLoadBalancers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_luns_on_filer.rb b/lib/fog/cloudstack/requests/compute/list_luns_on_filer.rb deleted file mode 100644 index d139b7eda..000000000 --- a/lib/fog/cloudstack/requests/compute/list_luns_on_filer.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List LUN - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/listLunsOnFiler.html] - def list_luns_on_filer(poolname, options={}) - options.merge!( - 'command' => 'listLunsOnFiler', - 'poolname' => poolname - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_netscaler_load_balancer_networks.rb b/lib/fog/cloudstack/requests/compute/list_netscaler_load_balancer_networks.rb deleted file mode 100644 index ab35a85cd..000000000 --- a/lib/fog/cloudstack/requests/compute/list_netscaler_load_balancer_networks.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists network that are using a netscaler load balancer device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetscalerLoadBalancerNetworks.html] - def list_netscaler_load_balancer_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetscalerLoadBalancerNetworks') - else - options.merge!('command' => 'listNetscalerLoadBalancerNetworks', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_netscaler_load_balancers.rb b/lib/fog/cloudstack/requests/compute/list_netscaler_load_balancers.rb deleted file mode 100644 index e8c297c6f..000000000 --- a/lib/fog/cloudstack/requests/compute/list_netscaler_load_balancers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists netscaler load balancer devices - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetscalerLoadBalancers.html] - def list_netscaler_load_balancers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetscalerLoadBalancers') - else - options.merge!('command' => 'listNetscalerLoadBalancers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_network_acl_lists.rb b/lib/fog/cloudstack/requests/compute/list_network_acl_lists.rb deleted file mode 100644 index 73a7ca9da..000000000 --- a/lib/fog/cloudstack/requests/compute/list_network_acl_lists.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all network ACLs - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworkACLLists.html] - def list_network_acl_lists(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworkACLLists') - else - options.merge!('command' => 'listNetworkACLLists') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_network_acls.rb b/lib/fog/cloudstack/requests/compute/list_network_acls.rb deleted file mode 100644 index 1df91a758..000000000 --- a/lib/fog/cloudstack/requests/compute/list_network_acls.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all network ACL items - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworkACLs.html] - def list_network_acls(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworkACLs') - else - options.merge!('command' => 'listNetworkACLs') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_network_device.rb b/lib/fog/cloudstack/requests/compute/list_network_device.rb deleted file mode 100644 index 50ba77b55..000000000 --- a/lib/fog/cloudstack/requests/compute/list_network_device.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List network devices - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworkDevice.html] - def list_network_device(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworkDevice') - else - options.merge!('command' => 'listNetworkDevice') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_network_isolation_methods.rb b/lib/fog/cloudstack/requests/compute/list_network_isolation_methods.rb deleted file mode 100644 index 1e91be082..000000000 --- a/lib/fog/cloudstack/requests/compute/list_network_isolation_methods.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists supported methods of network isolation - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworkIsolationMethods.html] - def list_network_isolation_methods(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworkIsolationMethods') - else - options.merge!('command' => 'listNetworkIsolationMethods') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_network_offerings.rb b/lib/fog/cloudstack/requests/compute/list_network_offerings.rb deleted file mode 100644 index e3d371ece..000000000 --- a/lib/fog/cloudstack/requests/compute/list_network_offerings.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available network offerings. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworkOfferings.html] - def list_network_offerings(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworkOfferings') - else - options.merge!('command' => 'listNetworkOfferings') - end - request(options) - end - end - - class Mock - def list_network_offerings(*arg) - network_offerings = self.data[:network_offerings] - { "listnetworkofferingsresponse" => { "count"=> network_offerings.count, "networkoffering"=> network_offerings.values } } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_network_service_providers.rb b/lib/fog/cloudstack/requests/compute/list_network_service_providers.rb deleted file mode 100644 index d6bf4ff22..000000000 --- a/lib/fog/cloudstack/requests/compute/list_network_service_providers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists network serviceproviders for a given physical network. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworkServiceProviders.html] - def list_network_service_providers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworkServiceProviders') - else - options.merge!('command' => 'listNetworkServiceProviders') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_networks.rb b/lib/fog/cloudstack/requests/compute/list_networks.rb deleted file mode 100644 index 3ddb444da..000000000 --- a/lib/fog/cloudstack/requests/compute/list_networks.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available networks. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNetworks.html] - def list_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNetworks') - else - options.merge!('command' => 'listNetworks') - end - - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_nicira_nvp_device_networks.rb b/lib/fog/cloudstack/requests/compute/list_nicira_nvp_device_networks.rb deleted file mode 100644 index d7b27a323..000000000 --- a/lib/fog/cloudstack/requests/compute/list_nicira_nvp_device_networks.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists network that are using a nicira nvp device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNiciraNvpDeviceNetworks.html] - def list_nicira_nvp_device_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNiciraNvpDeviceNetworks') - else - options.merge!('command' => 'listNiciraNvpDeviceNetworks', - 'nvpdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_nicira_nvp_devices.rb b/lib/fog/cloudstack/requests/compute/list_nicira_nvp_devices.rb deleted file mode 100644 index b1d634757..000000000 --- a/lib/fog/cloudstack/requests/compute/list_nicira_nvp_devices.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists Nicira NVP devices - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNiciraNvpDevices.html] - def list_nicira_nvp_devices(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNiciraNvpDevices') - else - options.merge!('command' => 'listNiciraNvpDevices') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_nics.rb b/lib/fog/cloudstack/requests/compute/list_nics.rb deleted file mode 100644 index d9423652a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_nics.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # list the vm nics IP to NIC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listNics.html] - def list_nics(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listNics') - else - options.merge!('command' => 'listNics', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_open_daylight_controllers.rb b/lib/fog/cloudstack/requests/compute/list_open_daylight_controllers.rb deleted file mode 100644 index 794b0735b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_open_daylight_controllers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists OpenDyalight controllers - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listOpenDaylightControllers.html] - def list_open_daylight_controllers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listOpenDaylightControllers') - else - options.merge!('command' => 'listOpenDaylightControllers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_os_categories.rb b/lib/fog/cloudstack/requests/compute/list_os_categories.rb deleted file mode 100644 index 582e7b6e0..000000000 --- a/lib/fog/cloudstack/requests/compute/list_os_categories.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all supported OS categories for this cloud. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listOsCategories.html] - def list_os_categories(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listOsCategories') - else - options.merge!('command' => 'listOsCategories') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_os_types.rb b/lib/fog/cloudstack/requests/compute/list_os_types.rb deleted file mode 100644 index d918d89e8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_os_types.rb +++ /dev/null @@ -1,32 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all supported OS types for this cloud. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listOsTypes.html] - def list_os_types(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listOsTypes') - else - options.merge!('command' => 'listOsTypes') - end - request(options) - end - end - - class Mock - # TODO: add id, category_id filters and paging params - def list_os_types(options={}) - os_types = self.data[:os_types] - { "listostypesresponse" => { "count"=> os_types.count, "ostype"=> os_types.values } } - end - - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ovs_elements.rb b/lib/fog/cloudstack/requests/compute/list_ovs_elements.rb deleted file mode 100644 index b75eb2a4b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ovs_elements.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available ovs elements. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listOvsElements.html] - def list_ovs_elements(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listOvsElements') - else - options.merge!('command' => 'listOvsElements') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_palo_alto_firewall_networks.rb b/lib/fog/cloudstack/requests/compute/list_palo_alto_firewall_networks.rb deleted file mode 100644 index 6399758e5..000000000 --- a/lib/fog/cloudstack/requests/compute/list_palo_alto_firewall_networks.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists network that are using Palo Alto firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPaloAltoFirewallNetworks.html] - def list_palo_alto_firewall_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPaloAltoFirewallNetworks') - else - options.merge!('command' => 'listPaloAltoFirewallNetworks', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_palo_alto_firewalls.rb b/lib/fog/cloudstack/requests/compute/list_palo_alto_firewalls.rb deleted file mode 100644 index 74c4648c4..000000000 --- a/lib/fog/cloudstack/requests/compute/list_palo_alto_firewalls.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists Palo Alto firewall devices in a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPaloAltoFirewalls.html] - def list_palo_alto_firewalls(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPaloAltoFirewalls') - else - options.merge!('command' => 'listPaloAltoFirewalls') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_physical_networks.rb b/lib/fog/cloudstack/requests/compute/list_physical_networks.rb deleted file mode 100644 index c1ac9a77e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_physical_networks.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists physical networks - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPhysicalNetworks.html] - def list_physical_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPhysicalNetworks') - else - options.merge!('command' => 'listPhysicalNetworks') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_pods.rb b/lib/fog/cloudstack/requests/compute/list_pods.rb deleted file mode 100644 index cb6f6ea8d..000000000 --- a/lib/fog/cloudstack/requests/compute/list_pods.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all Pods. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPods.html] - def list_pods(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPods') - else - options.merge!('command' => 'listPods') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_pools.rb b/lib/fog/cloudstack/requests/compute/list_pools.rb deleted file mode 100644 index e75dd53a2..000000000 --- a/lib/fog/cloudstack/requests/compute/list_pools.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List Pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/listPools.html] - def list_pools(options={}) - options.merge!( - 'command' => 'listPools' - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb b/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb deleted file mode 100644 index 7561b298a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb +++ /dev/null @@ -1,40 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all port forwarding rules for an IP address. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPortForwardingRules.html] - def list_port_forwarding_rules(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPortForwardingRules') - else - options.merge!('command' => 'listPortForwardingRules') - end - - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - - request(options) - end - end - - class Mock - def list_port_forwarding_rules(*args) - port_forwarding_rules = self.data[:port_forwarding_rules] - { - 'listportforwardingrulesresponse' => { - 'count' => port_forwarding_rules.size, - 'portforwardingrule' => port_forwarding_rules.values - } - } - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_portable_ip_ranges.rb b/lib/fog/cloudstack/requests/compute/list_portable_ip_ranges.rb deleted file mode 100644 index 79bda5033..000000000 --- a/lib/fog/cloudstack/requests/compute/list_portable_ip_ranges.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # list portable IP ranges - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPortableIpRanges.html] - def list_portable_ip_ranges(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPortableIpRanges') - else - options.merge!('command' => 'listPortableIpRanges') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_private_gateways.rb b/lib/fog/cloudstack/requests/compute/list_private_gateways.rb deleted file mode 100644 index 8a94d61f8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_private_gateways.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List private gateways - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPrivateGateways.html] - def list_private_gateways(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPrivateGateways') - else - options.merge!('command' => 'listPrivateGateways') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_project_accounts.rb b/lib/fog/cloudstack/requests/compute/list_project_accounts.rb deleted file mode 100644 index 3be2e67a0..000000000 --- a/lib/fog/cloudstack/requests/compute/list_project_accounts.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists project's accounts - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listProjectAccounts.html] - def list_project_accounts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listProjectAccounts') - else - options.merge!('command' => 'listProjectAccounts', - 'projectid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_project_invitations.rb b/lib/fog/cloudstack/requests/compute/list_project_invitations.rb deleted file mode 100644 index 11a7e37c7..000000000 --- a/lib/fog/cloudstack/requests/compute/list_project_invitations.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists projects and provides detailed information for listed projects - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listProjectInvitations.html] - def list_project_invitations(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listProjectInvitations') - else - options.merge!('command' => 'listProjectInvitations') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_projects.rb b/lib/fog/cloudstack/requests/compute/list_projects.rb deleted file mode 100644 index 8cb1f5f19..000000000 --- a/lib/fog/cloudstack/requests/compute/list_projects.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists projects and provides detailed information for listed projects - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listProjects.html] - def list_projects(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listProjects') - else - options.merge!('command' => 'listProjects') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb b/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb deleted file mode 100644 index cfd55e3ca..000000000 --- a/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb +++ /dev/null @@ -1,45 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all public ip addresses - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listPublicIpAddresses.html] - def list_public_ip_addresses(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listPublicIpAddresses') - else - options.merge!('command' => 'listPublicIpAddresses') - end - - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - - request(options) - end - end - - class Mock - def list_public_ip_addresses(*args) - public_ip_address_id = args[0].is_a?(Hash) ? args[0]['id'] : nil - if public_ip_address_id - public_ip_addresses = [self.data[:public_ip_addresses][public_ip_address_id]] - else - public_ip_addresses = self.data[:public_ip_addresses].values - end - - { - 'listpublicipaddressesresponse' => { - 'count' => public_ip_addresses.size, - 'publicipaddress' => public_ip_addresses - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_regions.rb b/lib/fog/cloudstack/requests/compute/list_regions.rb deleted file mode 100644 index fae537992..000000000 --- a/lib/fog/cloudstack/requests/compute/list_regions.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists Regions - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listRegions.html] - def list_regions(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listRegions') - else - options.merge!('command' => 'listRegions') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_remote_access_vpns.rb b/lib/fog/cloudstack/requests/compute/list_remote_access_vpns.rb deleted file mode 100644 index 5b8770c5b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_remote_access_vpns.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists remote access vpns - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listRemoteAccessVpns.html] - def list_remote_access_vpns(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listRemoteAccessVpns') - else - options.merge!('command' => 'listRemoteAccessVpns') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_resource_details.rb b/lib/fog/cloudstack/requests/compute/list_resource_details.rb deleted file mode 100644 index 7c0176ff6..000000000 --- a/lib/fog/cloudstack/requests/compute/list_resource_details.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List resource detail(s) - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listResourceDetails.html] - def list_resource_details(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listResourceDetails') - else - options.merge!('command' => 'listResourceDetails', - 'resourcetype' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_resource_limits.rb b/lib/fog/cloudstack/requests/compute/list_resource_limits.rb deleted file mode 100644 index 9d8240473..000000000 --- a/lib/fog/cloudstack/requests/compute/list_resource_limits.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists resource limits. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listResourceLimits.html] - def list_resource_limits(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listResourceLimits') - else - options.merge!('command' => 'listResourceLimits') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_routers.rb b/lib/fog/cloudstack/requests/compute/list_routers.rb deleted file mode 100644 index 1bf3ad682..000000000 --- a/lib/fog/cloudstack/requests/compute/list_routers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List routers. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listRouters.html] - def list_routers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listRouters') - else - options.merge!('command' => 'listRouters') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_s3s.rb b/lib/fog/cloudstack/requests/compute/list_s3s.rb deleted file mode 100644 index 9f73511af..000000000 --- a/lib/fog/cloudstack/requests/compute/list_s3s.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists S3s - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listS3s.html] - def list_s3s(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listS3s') - else - options.merge!('command' => 'listS3s') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_secondary_staging_stores.rb b/lib/fog/cloudstack/requests/compute/list_secondary_staging_stores.rb deleted file mode 100644 index daeda57be..000000000 --- a/lib/fog/cloudstack/requests/compute/list_secondary_staging_stores.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists secondary staging stores. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSecondaryStagingStores.html] - def list_secondary_staging_stores(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSecondaryStagingStores') - else - options.merge!('command' => 'listSecondaryStagingStores') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_security_groups.rb b/lib/fog/cloudstack/requests/compute/list_security_groups.rb deleted file mode 100644 index 8a8951cc9..000000000 --- a/lib/fog/cloudstack/requests/compute/list_security_groups.rb +++ /dev/null @@ -1,44 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists security groups - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSecurityGroups.html] - def list_security_groups(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSecurityGroups') - else - options.merge!('command' => 'listSecurityGroups') - end - request(options) - end - end - - class Mock - def list_security_groups(options={}) - security_groups = [] - if security_group_id = options['id'] - security_group = self.data[:security_groups][security_group_id] - raise Fog::Compute::Cloudstack::BadRequest unless security_group - security_groups = [security_group] - else - security_groups = self.data[:security_groups].values - end - - { - "listsecuritygroupsresponse" => - { - "count" => security_groups.size, - "securitygroup" => security_groups - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_service_offerings.rb b/lib/fog/cloudstack/requests/compute/list_service_offerings.rb deleted file mode 100644 index 0784f1a67..000000000 --- a/lib/fog/cloudstack/requests/compute/list_service_offerings.rb +++ /dev/null @@ -1,44 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available service offerings. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listServiceOfferings.html] - def list_service_offerings(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listServiceOfferings') - else - options.merge!('command' => 'listServiceOfferings') - end - request(options) - end - end - - class Mock - - def list_service_offerings(options={}) - id = options['id'] - if id && self.data[:flavors][id].nil? - # received 'id' filter for element that does not exist - response = { "listserviceofferingsresponse" => { "count" => 0, "serviceoffering" => []}} - elsif self.data[:flavors][id] - # received 'id' filter for a specific element - flavors = { id => self.data[:flavors][id] } - response = { "listserviceofferingsresponse" => { "count" => flavors.size, "serviceoffering"=> flavors.values}} - else - # no filter specified - flavors = self.data[:flavors] - response = { "listserviceofferingsresponse" => { "count" => flavors.size, "serviceoffering"=> flavors.values}} - end - - return response - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb b/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb deleted file mode 100644 index 5f7741ee2..000000000 --- a/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists snapshot policies. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSnapshotPolicies.html] - def list_snapshot_policies(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSnapshotPolicies') - else - options.merge!('command' => 'listSnapshotPolicies', - 'volumeid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_snapshots.rb b/lib/fog/cloudstack/requests/compute/list_snapshots.rb deleted file mode 100644 index c0908f56f..000000000 --- a/lib/fog/cloudstack/requests/compute/list_snapshots.rb +++ /dev/null @@ -1,43 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available snapshots for the account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSnapshots.html] - def list_snapshots(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSnapshots') - else - options.merge!('command' => 'listSnapshots') - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - class Mock - def list_snapshots(options={}) - snapshot_id = options.delete('id') - if snapshot_id - snapshots = [self.data[:snapshots][snapshot_id]] - else - snapshots = self.data[:snapshots].values - end - - { - 'listsnapshotsresponse' => { - 'count' => snapshots.size, - 'snapshot' => snapshots - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_srx_firewall_networks.rb b/lib/fog/cloudstack/requests/compute/list_srx_firewall_networks.rb deleted file mode 100644 index 70d3c96e5..000000000 --- a/lib/fog/cloudstack/requests/compute/list_srx_firewall_networks.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists network that are using SRX firewall device - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSrxFirewallNetworks.html] - def list_srx_firewall_networks(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSrxFirewallNetworks') - else - options.merge!('command' => 'listSrxFirewallNetworks', - 'lbdeviceid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_srx_firewalls.rb b/lib/fog/cloudstack/requests/compute/list_srx_firewalls.rb deleted file mode 100644 index 0a4fdfcfc..000000000 --- a/lib/fog/cloudstack/requests/compute/list_srx_firewalls.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # lists SRX firewall devices in a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSrxFirewalls.html] - def list_srx_firewalls(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSrxFirewalls') - else - options.merge!('command' => 'listSrxFirewalls') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb b/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb deleted file mode 100644 index 2ef05100c..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List registered keypairs - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSSHKeyPairs.html] - def list_ssh_key_pairs(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSSHKeyPairs') - else - options.merge!('command' => 'listSSHKeyPairs') - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ssl_certs.rb b/lib/fog/cloudstack/requests/compute/list_ssl_certs.rb deleted file mode 100644 index c231a1136..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ssl_certs.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists SSL certificates - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSslCerts.html] - def list_ssl_certs(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSslCerts') - else - options.merge!('command' => 'listSslCerts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_static_routes.rb b/lib/fog/cloudstack/requests/compute/list_static_routes.rb deleted file mode 100644 index f85b4679f..000000000 --- a/lib/fog/cloudstack/requests/compute/list_static_routes.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all static routes - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listStaticRoutes.html] - def list_static_routes(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listStaticRoutes') - else - options.merge!('command' => 'listStaticRoutes') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_storage_network_ip_range.rb b/lib/fog/cloudstack/requests/compute/list_storage_network_ip_range.rb deleted file mode 100644 index 194994a74..000000000 --- a/lib/fog/cloudstack/requests/compute/list_storage_network_ip_range.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List a storage network IP range. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listStorageNetworkIpRange.html] - def list_storage_network_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listStorageNetworkIpRange') - else - options.merge!('command' => 'listStorageNetworkIpRange') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_storage_pools.rb b/lib/fog/cloudstack/requests/compute/list_storage_pools.rb deleted file mode 100644 index 48b00e82f..000000000 --- a/lib/fog/cloudstack/requests/compute/list_storage_pools.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists storage pools. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listStoragePools.html] - def list_storage_pools(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listStoragePools') - else - options.merge!('command' => 'listStoragePools') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_storage_providers.rb b/lib/fog/cloudstack/requests/compute/list_storage_providers.rb deleted file mode 100644 index 9403bd9ed..000000000 --- a/lib/fog/cloudstack/requests/compute/list_storage_providers.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists storage providers. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listStorageProviders.html] - def list_storage_providers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listStorageProviders') - else - options.merge!('command' => 'listStorageProviders', - 'type' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_supported_network_services.rb b/lib/fog/cloudstack/requests/compute/list_supported_network_services.rb deleted file mode 100644 index 3b5d14ef5..000000000 --- a/lib/fog/cloudstack/requests/compute/list_supported_network_services.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all network services provided by CloudStack or for the given Provider. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSupportedNetworkServices.html] - def list_supported_network_services(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSupportedNetworkServices') - else - options.merge!('command' => 'listSupportedNetworkServices') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_swifts.rb b/lib/fog/cloudstack/requests/compute/list_swifts.rb deleted file mode 100644 index de8c72b0e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_swifts.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List Swift. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSwifts.html] - def list_swifts(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSwifts') - else - options.merge!('command' => 'listSwifts') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_system_vms.rb b/lib/fog/cloudstack/requests/compute/list_system_vms.rb deleted file mode 100644 index 40e21195e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_system_vms.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List system virtual machines. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listSystemVms.html] - def list_system_vms(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listSystemVms') - else - options.merge!('command' => 'listSystemVms') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_tags.rb b/lib/fog/cloudstack/requests/compute/list_tags.rb deleted file mode 100644 index 5cc22d311..000000000 --- a/lib/fog/cloudstack/requests/compute/list_tags.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List resource tag(s) - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listTags.html] - def list_tags(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listTags') - else - options.merge!('command' => 'listTags') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_template_permissions.rb b/lib/fog/cloudstack/requests/compute/list_template_permissions.rb deleted file mode 100644 index 81aea59e0..000000000 --- a/lib/fog/cloudstack/requests/compute/list_template_permissions.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List template visibility and all accounts that have permissions to view this template. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listTemplatePermissions.html] - def list_template_permissions(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listTemplatePermissions') - else - options.merge!('command' => 'listTemplatePermissions', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_templates.rb b/lib/fog/cloudstack/requests/compute/list_templates.rb deleted file mode 100644 index 5c9962cad..000000000 --- a/lib/fog/cloudstack/requests/compute/list_templates.rb +++ /dev/null @@ -1,42 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List all public, private, and privileged templates. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listTemplates.html] - def list_templates(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listTemplates') - else - options.merge!('command' => 'listTemplates', - 'templatefilter' => args[0]) - end - - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - - request(options) - end - end - - class Mock - def list_templates(options={}) - templates = self.data[:images].values - - { - "listtemplatesresponse" => - { - "count" => templates.size, - "template"=> templates - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_traffic_monitors.rb b/lib/fog/cloudstack/requests/compute/list_traffic_monitors.rb deleted file mode 100644 index a17865960..000000000 --- a/lib/fog/cloudstack/requests/compute/list_traffic_monitors.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List traffic monitor Hosts. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listTrafficMonitors.html] - def list_traffic_monitors(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listTrafficMonitors') - else - options.merge!('command' => 'listTrafficMonitors', - 'zoneid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_traffic_type_implementors.rb b/lib/fog/cloudstack/requests/compute/list_traffic_type_implementors.rb deleted file mode 100644 index 2784650a8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_traffic_type_implementors.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists implementors of implementor of a network traffic type or implementors of all network traffic types - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listTrafficTypeImplementors.html] - def list_traffic_type_implementors(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listTrafficTypeImplementors') - else - options.merge!('command' => 'listTrafficTypeImplementors') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_traffic_types.rb b/lib/fog/cloudstack/requests/compute/list_traffic_types.rb deleted file mode 100644 index 2e1ed65dd..000000000 --- a/lib/fog/cloudstack/requests/compute/list_traffic_types.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists traffic types of a given physical network. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listTrafficTypes.html] - def list_traffic_types(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listTrafficTypes') - else - options.merge!('command' => 'listTrafficTypes', - 'physicalnetworkid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ucs_blades.rb b/lib/fog/cloudstack/requests/compute/list_ucs_blades.rb deleted file mode 100644 index 0d93b67ac..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ucs_blades.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List ucs blades - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUcsBlades.html] - def list_ucs_blades(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listUcsBlades') - else - options.merge!('command' => 'listUcsBlades', - 'ucsmanagerid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ucs_managers.rb b/lib/fog/cloudstack/requests/compute/list_ucs_managers.rb deleted file mode 100644 index 6bc1bdfde..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ucs_managers.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List ucs manager - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUcsManagers.html] - def list_ucs_managers(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listUcsManagers') - else - options.merge!('command' => 'listUcsManagers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ucs_profiles.rb b/lib/fog/cloudstack/requests/compute/list_ucs_profiles.rb deleted file mode 100644 index 39e692518..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ucs_profiles.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List profile in ucs manager - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUcsProfiles.html] - def list_ucs_profiles(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listUcsProfiles') - else - options.merge!('command' => 'listUcsProfiles', - 'ucsmanagerid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_ucs_templates.rb b/lib/fog/cloudstack/requests/compute/list_ucs_templates.rb deleted file mode 100644 index 108efa891..000000000 --- a/lib/fog/cloudstack/requests/compute/list_ucs_templates.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List templates in ucs manager - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/listUcsTemplates.html] - def list_ucs_templates(ucsmanagerid, options={}) - options.merge!( - 'command' => 'listUcsTemplates', - 'ucsmanagerid' => ucsmanagerid - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_usage_records.rb b/lib/fog/cloudstack/requests/compute/list_usage_records.rb deleted file mode 100644 index ef9851737..000000000 --- a/lib/fog/cloudstack/requests/compute/list_usage_records.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists usage records for accounts - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUsageRecords.html] - def list_usage_records(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listUsageRecords') - else - options.merge!('command' => 'listUsageRecords', - 'enddate' => args[0], - 'startdate' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_usage_types.rb b/lib/fog/cloudstack/requests/compute/list_usage_types.rb deleted file mode 100644 index 111f654e9..000000000 --- a/lib/fog/cloudstack/requests/compute/list_usage_types.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List Usage Types - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUsageTypes.html] - def list_usage_types(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listUsageTypes') - else - options.merge!('command' => 'listUsageTypes') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_users.rb b/lib/fog/cloudstack/requests/compute/list_users.rb deleted file mode 100644 index 9fd8b2991..000000000 --- a/lib/fog/cloudstack/requests/compute/list_users.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists user accounts - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUsers.html] - def list_users(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listUsers') - else - options.merge!('command' => 'listUsers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_virtual_machines.rb b/lib/fog/cloudstack/requests/compute/list_virtual_machines.rb deleted file mode 100644 index 79e4829ae..000000000 --- a/lib/fog/cloudstack/requests/compute/list_virtual_machines.rb +++ /dev/null @@ -1,32 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List the virtual machines owned by the account. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVirtualMachines.html] - def list_virtual_machines(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVirtualMachines') - else - options.merge!('command' => 'listVirtualMachines') - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - class Mock - def list_virtual_machines(options={}) - {"listvirtualmachinesresponse" => - {"count" => self.data[:servers].values.size, "virtualmachine" => self.data[:servers].values}} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_virtual_router_elements.rb b/lib/fog/cloudstack/requests/compute/list_virtual_router_elements.rb deleted file mode 100644 index 951c0ca6e..000000000 --- a/lib/fog/cloudstack/requests/compute/list_virtual_router_elements.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all available virtual router elements. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVirtualRouterElements.html] - def list_virtual_router_elements(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVirtualRouterElements') - else - options.merge!('command' => 'listVirtualRouterElements') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vlan_ip_ranges.rb b/lib/fog/cloudstack/requests/compute/list_vlan_ip_ranges.rb deleted file mode 100644 index fd4b38f99..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vlan_ip_ranges.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all VLAN IP ranges. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVlanIpRanges.html] - def list_vlan_ip_ranges(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVlanIpRanges') - else - options.merge!('command' => 'listVlanIpRanges') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vm_snapshot.rb b/lib/fog/cloudstack/requests/compute/list_vm_snapshot.rb deleted file mode 100644 index 44e4d02a4..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vm_snapshot.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List virtual machine snapshot by conditions - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVMSnapshot.html] - def list_vm_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVMSnapshot') - else - options.merge!('command' => 'listVMSnapshot') - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vmware_dcs.rb b/lib/fog/cloudstack/requests/compute/list_vmware_dcs.rb deleted file mode 100644 index 7b5b8f625..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vmware_dcs.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Retrieves VMware DC(s) associated with a zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVmwareDcs.html] - def list_vmware_dcs(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVmwareDcs') - else - options.merge!('command' => 'listVmwareDcs', - 'zoneid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_volumes.rb b/lib/fog/cloudstack/requests/compute/list_volumes.rb deleted file mode 100644 index 32dc484af..000000000 --- a/lib/fog/cloudstack/requests/compute/list_volumes.rb +++ /dev/null @@ -1,43 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists all volumes. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVolumes.html] - def list_volumes(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVolumes') - else - options.merge!('command' => 'listVolumes') - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - class Mock - def list_volumes(options={}) - volume_id = options.delete('id') - if volume_id - volumes = [self.data[:volumes][volume_id]] - else - volumes = self.data[:volumes].values - end - - { - 'listvolumesresponse' => { - 'count' => volumes.size, - 'volume' => volumes - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_volumes_on_filer.rb b/lib/fog/cloudstack/requests/compute/list_volumes_on_filer.rb deleted file mode 100644 index c770e8bba..000000000 --- a/lib/fog/cloudstack/requests/compute/list_volumes_on_filer.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # List Volumes - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/listVolumesOnFiler.html] - def list_volumes_on_filer(poolname, options={}) - options.merge!( - 'command' => 'listVolumesOnFiler', - 'poolname' => poolname - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vpc_offerings.rb b/lib/fog/cloudstack/requests/compute/list_vpc_offerings.rb deleted file mode 100644 index adc691e55..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vpc_offerings.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists VPC offerings - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVPCOfferings.html] - def list_vpc_offerings(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVPCOfferings') - else - options.merge!('command' => 'listVPCOfferings') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vpcs.rb b/lib/fog/cloudstack/requests/compute/list_vpcs.rb deleted file mode 100644 index fa160a250..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vpcs.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists VPCs - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVPCs.html] - def list_vpcs(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVPCs') - else - options.merge!('command' => 'listVPCs') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vpn_connections.rb b/lib/fog/cloudstack/requests/compute/list_vpn_connections.rb deleted file mode 100644 index 1e6c4d259..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vpn_connections.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists site to site vpn connection gateways - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVpnConnections.html] - def list_vpn_connections(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVpnConnections') - else - options.merge!('command' => 'listVpnConnections') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vpn_customer_gateways.rb b/lib/fog/cloudstack/requests/compute/list_vpn_customer_gateways.rb deleted file mode 100644 index 1939aca4a..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vpn_customer_gateways.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists site to site vpn customer gateways - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVpnCustomerGateways.html] - def list_vpn_customer_gateways(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVpnCustomerGateways') - else - options.merge!('command' => 'listVpnCustomerGateways') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vpn_gateways.rb b/lib/fog/cloudstack/requests/compute/list_vpn_gateways.rb deleted file mode 100644 index 0633c1ef8..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vpn_gateways.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists site 2 site vpn gateways - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVpnGateways.html] - def list_vpn_gateways(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVpnGateways') - else - options.merge!('command' => 'listVpnGateways') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_vpn_users.rb b/lib/fog/cloudstack/requests/compute/list_vpn_users.rb deleted file mode 100644 index 54dd79a16..000000000 --- a/lib/fog/cloudstack/requests/compute/list_vpn_users.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists vpn users - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listVpnUsers.html] - def list_vpn_users(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listVpnUsers') - else - options.merge!('command' => 'listVpnUsers') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/list_zones.rb b/lib/fog/cloudstack/requests/compute/list_zones.rb deleted file mode 100644 index 2a4af901b..000000000 --- a/lib/fog/cloudstack/requests/compute/list_zones.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Lists zones - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listZones.html] - def list_zones(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'listZones') - else - options.merge!('command' => 'listZones') - end - request(options) - end - end - - class Mock - def list_zones(options={}) - zones = self.data[:zones].values - - { - "listzonesresponse"=> - { - "count" => zones.size, - "zone" => zones - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/lock_account.rb b/lib/fog/cloudstack/requests/compute/lock_account.rb deleted file mode 100644 index 4e25757a5..000000000 --- a/lib/fog/cloudstack/requests/compute/lock_account.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Locks an account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/lockAccount.html] - def lock_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'lockAccount') - else - options.merge!('command' => 'lockAccount', - 'account' => args[0], - 'domainid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/lock_user.rb b/lib/fog/cloudstack/requests/compute/lock_user.rb deleted file mode 100644 index 2e3932554..000000000 --- a/lib/fog/cloudstack/requests/compute/lock_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Locks a user account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/lockUser.html] - def lock_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'lockUser') - else - options.merge!('command' => 'lockUser', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/mark_default_zone_for_account.rb b/lib/fog/cloudstack/requests/compute/mark_default_zone_for_account.rb deleted file mode 100644 index 057dfc846..000000000 --- a/lib/fog/cloudstack/requests/compute/mark_default_zone_for_account.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Marks a default zone for this account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/markDefaultZoneForAccount.html] - def mark_default_zone_for_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'markDefaultZoneForAccount') - else - options.merge!('command' => 'markDefaultZoneForAccount', - 'zoneid' => args[0], - 'account' => args[1], - 'domainid' => args[2]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/migrate_system_vm.rb b/lib/fog/cloudstack/requests/compute/migrate_system_vm.rb deleted file mode 100644 index d870b8e0b..000000000 --- a/lib/fog/cloudstack/requests/compute/migrate_system_vm.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Attempts Migration of a system virtual machine to the host specified. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/migrateSystemVm.html] - def migrate_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'migrateSystemVm') - else - options.merge!('command' => 'migrateSystemVm', - 'virtualmachineid' => args[0], - 'hostid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/migrate_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/migrate_virtual_machine.rb deleted file mode 100644 index 2f3ff86a5..000000000 --- a/lib/fog/cloudstack/requests/compute/migrate_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Attempts Migration of a VM to a different host or Root volume of the vm to a different storage pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/migrateVirtualMachine.html] - def migrate_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'migrateVirtualMachine') - else - options.merge!('command' => 'migrateVirtualMachine', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/migrate_virtual_machine_with_volume.rb b/lib/fog/cloudstack/requests/compute/migrate_virtual_machine_with_volume.rb deleted file mode 100644 index 2498259b9..000000000 --- a/lib/fog/cloudstack/requests/compute/migrate_virtual_machine_with_volume.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Attempts Migration of a VM with its volumes to a different host - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/migrateVirtualMachineWithVolume.html] - def migrate_virtual_machine_with_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'migrateVirtualMachineWithVolume') - else - options.merge!('command' => 'migrateVirtualMachineWithVolume', - 'hostid' => args[0], - 'virtualmachineid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/migrate_volume.rb b/lib/fog/cloudstack/requests/compute/migrate_volume.rb deleted file mode 100644 index 256ef7156..000000000 --- a/lib/fog/cloudstack/requests/compute/migrate_volume.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Migrate volume - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/migrateVolume.html] - def migrate_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'migrateVolume') - else - options.merge!('command' => 'migrateVolume', - 'storageid' => args[0], - 'volumeid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/modify_pool.rb b/lib/fog/cloudstack/requests/compute/modify_pool.rb deleted file mode 100644 index 2c59e8d15..000000000 --- a/lib/fog/cloudstack/requests/compute/modify_pool.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Modify pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/modifyPool.html] - def modify_pool(algorithm, poolname, options={}) - options.merge!( - 'command' => 'modifyPool', - 'algorithm' => algorithm, - 'poolname' => poolname - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/prepare_host_for_maintenance.rb b/lib/fog/cloudstack/requests/compute/prepare_host_for_maintenance.rb deleted file mode 100644 index e8f2713e4..000000000 --- a/lib/fog/cloudstack/requests/compute/prepare_host_for_maintenance.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Prepares a host for maintenance. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/prepareHostForMaintenance.html] - def prepare_host_for_maintenance(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'prepareHostForMaintenance') - else - options.merge!('command' => 'prepareHostForMaintenance', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/prepare_template.rb b/lib/fog/cloudstack/requests/compute/prepare_template.rb deleted file mode 100644 index ed76c951c..000000000 --- a/lib/fog/cloudstack/requests/compute/prepare_template.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # load template into primary storage - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/prepareTemplate.html] - def prepare_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'prepareTemplate') - else - options.merge!('command' => 'prepareTemplate', - 'templateid' => args[0], - 'zoneid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/query_async_job_result.rb b/lib/fog/cloudstack/requests/compute/query_async_job_result.rb deleted file mode 100644 index 4417383a2..000000000 --- a/lib/fog/cloudstack/requests/compute/query_async_job_result.rb +++ /dev/null @@ -1,38 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Retrieves the current status of asynchronous job. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/queryAsyncJobResult.html] - def query_async_job_result(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'queryAsyncJobResult') - else - options.merge!('command' => 'queryAsyncJobResult', - 'jobid' => args[0]) - end - request(options) - end - end - - class Mock - def query_async_job_result(options={}) - unless job_id = options['jobid'] - raise Fog::Compute::Cloudstack::BadRequest.new("Missing required parameter jobid") - end - - unless job = self.data[:jobs][job_id] - raise Fog::Compute::Cloudstack::BadRequest.new("Unknown job id #{job_id}") - end - - {'queryasyncjobresultresponse' => job } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reboot_router.rb b/lib/fog/cloudstack/requests/compute/reboot_router.rb deleted file mode 100644 index 09e9edada..000000000 --- a/lib/fog/cloudstack/requests/compute/reboot_router.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Starts a router. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/rebootRouter.html] - def reboot_router(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'rebootRouter') - else - options.merge!('command' => 'rebootRouter', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reboot_system_vm.rb b/lib/fog/cloudstack/requests/compute/reboot_system_vm.rb deleted file mode 100644 index f44f50979..000000000 --- a/lib/fog/cloudstack/requests/compute/reboot_system_vm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Reboots a system VM. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/rebootSystemVm.html] - def reboot_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'rebootSystemVm') - else - options.merge!('command' => 'rebootSystemVm', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reboot_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/reboot_virtual_machine.rb deleted file mode 100644 index 7fb9a52cb..000000000 --- a/lib/fog/cloudstack/requests/compute/reboot_virtual_machine.rb +++ /dev/null @@ -1,35 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Reboots a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/rebootVirtualMachine.html] - def reboot_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'rebootVirtualMachine') - else - options.merge!('command' => 'rebootVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def reboot_virtual_machine(options={}) - job_id = Fog::Cloudstack.uuid - { - "rebootvirtualmachineresponse" => { - "jobid" => job_id - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reconnect_host.rb b/lib/fog/cloudstack/requests/compute/reconnect_host.rb deleted file mode 100644 index 0b545904b..000000000 --- a/lib/fog/cloudstack/requests/compute/reconnect_host.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Reconnects a host. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/reconnectHost.html] - def reconnect_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'reconnectHost') - else - options.merge!('command' => 'reconnectHost', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/recover_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/recover_virtual_machine.rb deleted file mode 100644 index 7475339bb..000000000 --- a/lib/fog/cloudstack/requests/compute/recover_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Recovers a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/recoverVirtualMachine.html] - def recover_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'recoverVirtualMachine') - else - options.merge!('command' => 'recoverVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/refresh_ucs_blades.rb b/lib/fog/cloudstack/requests/compute/refresh_ucs_blades.rb deleted file mode 100644 index a1e1d182b..000000000 --- a/lib/fog/cloudstack/requests/compute/refresh_ucs_blades.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # refresh ucs blades to sync with UCS manager - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/refreshUcsBlades.html] - def refresh_ucs_blades(ucsmanagerid, options={}) - options.merge!( - 'command' => 'refreshUcsBlades', - 'ucsmanagerid' => ucsmanagerid - ) - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/register_iso.rb b/lib/fog/cloudstack/requests/compute/register_iso.rb deleted file mode 100644 index 06e3492d7..000000000 --- a/lib/fog/cloudstack/requests/compute/register_iso.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Registers an existing ISO into the CloudStack Cloud. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/registerIso.html] - def register_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'registerIso') - else - options.merge!('command' => 'registerIso', - 'name' => args[0], - 'displaytext' => args[1], - 'url' => args[2], - 'zoneid' => args[3]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/register_ssh_key_pair.rb b/lib/fog/cloudstack/requests/compute/register_ssh_key_pair.rb deleted file mode 100644 index 41ffe91bb..000000000 --- a/lib/fog/cloudstack/requests/compute/register_ssh_key_pair.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Register a public key in a keypair under a certain name - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/registerSSHKeyPair.html] - def register_ssh_key_pair(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'registerSSHKeyPair') - else - options.merge!('command' => 'registerSSHKeyPair', - 'name' => args[0], - 'publickey' => args[1]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/register_template.rb b/lib/fog/cloudstack/requests/compute/register_template.rb deleted file mode 100644 index a17f611ff..000000000 --- a/lib/fog/cloudstack/requests/compute/register_template.rb +++ /dev/null @@ -1,45 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Registers an existing template into the CloudStack cloud. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/registerTemplate.html] - def register_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'registerTemplate') - else - options.merge!('command' => 'registerTemplate', - 'zoneid' => args[0], - 'format' => args[1], - 'hypervisor' => args[2], - 'url' => args[3], - 'name' => args[4], - 'ostypeid' => args[5], - 'displaytext' => args[6]) - end - request(options) - end - end - - class Mock - def register_template(options={}) - mock_template_id = self.data[:images].keys.first - registered_template = self.data[:images][mock_template_id] - - { - 'registertemplateresponse' => - { - 'count' => 1, - 'template' => [registered_template] - } - } - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/register_user_keys.rb b/lib/fog/cloudstack/requests/compute/register_user_keys.rb deleted file mode 100644 index ea0730bbf..000000000 --- a/lib/fog/cloudstack/requests/compute/register_user_keys.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # This command allows a user to register for the developer API, returning a secret key and an API key. This request is made through the integration API port, so it is a privileged command and must be made on behalf of a user. It is up to the implementer just how the username and password are entered, and then how that translates to an integration API request. Both secret key and API key should be returned to the user - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/registerUserKeys.html] - def register_user_keys(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'registerUserKeys') - else - options.merge!('command' => 'registerUserKeys', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_dedicated_cluster.rb b/lib/fog/cloudstack/requests/compute/release_dedicated_cluster.rb deleted file mode 100644 index 5f7c4a9c9..000000000 --- a/lib/fog/cloudstack/requests/compute/release_dedicated_cluster.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Release the dedication for cluster - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releaseDedicatedCluster.html] - def release_dedicated_cluster(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releaseDedicatedCluster') - else - options.merge!('command' => 'releaseDedicatedCluster', - 'clusterid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_dedicated_guest_vlan_range.rb b/lib/fog/cloudstack/requests/compute/release_dedicated_guest_vlan_range.rb deleted file mode 100644 index 2cbeff087..000000000 --- a/lib/fog/cloudstack/requests/compute/release_dedicated_guest_vlan_range.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Releases a dedicated guest vlan range to the system - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releaseDedicatedGuestVlanRange.html] - def release_dedicated_guest_vlan_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releaseDedicatedGuestVlanRange') - else - options.merge!('command' => 'releaseDedicatedGuestVlanRange', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_dedicated_host.rb b/lib/fog/cloudstack/requests/compute/release_dedicated_host.rb deleted file mode 100644 index d631c3566..000000000 --- a/lib/fog/cloudstack/requests/compute/release_dedicated_host.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Release the dedication for host - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releaseDedicatedHost.html] - def release_dedicated_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releaseDedicatedHost') - else - options.merge!('command' => 'releaseDedicatedHost', - 'hostid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_dedicated_pod.rb b/lib/fog/cloudstack/requests/compute/release_dedicated_pod.rb deleted file mode 100644 index ccac292a2..000000000 --- a/lib/fog/cloudstack/requests/compute/release_dedicated_pod.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Release the dedication for the pod - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releaseDedicatedPod.html] - def release_dedicated_pod(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releaseDedicatedPod') - else - options.merge!('command' => 'releaseDedicatedPod', - 'podid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_dedicated_zone.rb b/lib/fog/cloudstack/requests/compute/release_dedicated_zone.rb deleted file mode 100644 index 86ca40ce9..000000000 --- a/lib/fog/cloudstack/requests/compute/release_dedicated_zone.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Release dedication of zone - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releaseDedicatedZone.html] - def release_dedicated_zone(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releaseDedicatedZone') - else - options.merge!('command' => 'releaseDedicatedZone', - 'zoneid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_host_reservation.rb b/lib/fog/cloudstack/requests/compute/release_host_reservation.rb deleted file mode 100644 index 736380330..000000000 --- a/lib/fog/cloudstack/requests/compute/release_host_reservation.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Releases host reservation. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releaseHostReservation.html] - def release_host_reservation(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releaseHostReservation') - else - options.merge!('command' => 'releaseHostReservation', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/release_public_ip_range.rb b/lib/fog/cloudstack/requests/compute/release_public_ip_range.rb deleted file mode 100644 index 2bbfdfbc9..000000000 --- a/lib/fog/cloudstack/requests/compute/release_public_ip_range.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Releases a Public IP range back to the system pool - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/releasePublicIpRange.html] - def release_public_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'releasePublicIpRange') - else - options.merge!('command' => 'releasePublicIpRange', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_cert_from_load_balancer.rb b/lib/fog/cloudstack/requests/compute/remove_cert_from_load_balancer.rb deleted file mode 100644 index 76762da0c..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_cert_from_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes a certificate from a Load Balancer Rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeCertFromLoadBalancer.html] - def remove_cert_from_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeCertFromLoadBalancer') - else - options.merge!('command' => 'removeCertFromLoadBalancer', - 'lbruleid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_from_global_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/remove_from_global_load_balancer_rule.rb deleted file mode 100644 index 89c403ca6..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_from_global_load_balancer_rule.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes a load balancer rule association with global load balancer rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeFromGlobalLoadBalancerRule.html] - def remove_from_global_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeFromGlobalLoadBalancerRule') - else - options.merge!('command' => 'removeFromGlobalLoadBalancerRule', - 'id' => args[0], - 'loadbalancerrulelist' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb deleted file mode 100644 index d3db1b5db..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes a virtual machine or a list of virtual machines from a load balancer rule. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeFromLoadBalancerRule.html] - def remove_from_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeFromLoadBalancerRule') - else - options.merge!('command' => 'removeFromLoadBalancerRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_guest_os.rb b/lib/fog/cloudstack/requests/compute/remove_guest_os.rb deleted file mode 100644 index ae3c7ceb7..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_guest_os.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes a Guest OS from listing. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeGuestOs.html] - def remove_guest_os(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeGuestOs') - else - options.merge!('command' => 'removeGuestOs', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_guest_os_mapping.rb b/lib/fog/cloudstack/requests/compute/remove_guest_os_mapping.rb deleted file mode 100644 index 4dfc59161..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_guest_os_mapping.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes a Guest OS Mapping. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeGuestOsMapping.html] - def remove_guest_os_mapping(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeGuestOsMapping') - else - options.merge!('command' => 'removeGuestOsMapping', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_ip_from_nic.rb b/lib/fog/cloudstack/requests/compute/remove_ip_from_nic.rb deleted file mode 100644 index 6b8ca3cef..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_ip_from_nic.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes secondary IP from the NIC. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeIpFromNic.html] - def remove_ip_from_nic(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeIpFromNic') - else - options.merge!('command' => 'removeIpFromNic', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_nic_from_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/remove_nic_from_virtual_machine.rb deleted file mode 100644 index ab4254c8b..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_nic_from_virtual_machine.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes VM from specified network by deleting a NIC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeNicFromVirtualMachine.html] - def remove_nic_from_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeNicFromVirtualMachine') - else - options.merge!('command' => 'removeNicFromVirtualMachine', - 'virtualmachineid' => args[0], - 'nicid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_region.rb b/lib/fog/cloudstack/requests/compute/remove_region.rb deleted file mode 100644 index 110bd84fb..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_region.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes specified region - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeRegion.html] - def remove_region(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeRegion') - else - options.merge!('command' => 'removeRegion', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_resource_detail.rb b/lib/fog/cloudstack/requests/compute/remove_resource_detail.rb deleted file mode 100644 index c94deb9db..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_resource_detail.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes detail for the Resource. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeResourceDetail.html] - def remove_resource_detail(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeResourceDetail') - else - options.merge!('command' => 'removeResourceDetail', - 'resourcetype' => args[0], - 'resourceid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_vmware_dc.rb b/lib/fog/cloudstack/requests/compute/remove_vmware_dc.rb deleted file mode 100644 index 0d9d07e93..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_vmware_dc.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Remove a VMware datacenter from a zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeVmwareDc.html] - def remove_vmware_dc(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeVmwareDc') - else - options.merge!('command' => 'removeVmwareDc', - 'zoneid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/remove_vpn_user.rb b/lib/fog/cloudstack/requests/compute/remove_vpn_user.rb deleted file mode 100644 index 9d0b7241e..000000000 --- a/lib/fog/cloudstack/requests/compute/remove_vpn_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Removes vpn user - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/removeVpnUser.html] - def remove_vpn_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'removeVpnUser') - else - options.merge!('command' => 'removeVpnUser', - 'username' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/replace_network_acl_list.rb b/lib/fog/cloudstack/requests/compute/replace_network_acl_list.rb deleted file mode 100644 index 2d8e05c47..000000000 --- a/lib/fog/cloudstack/requests/compute/replace_network_acl_list.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Replaces ACL associated with a Network or private gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/replaceNetworkACLList.html] - def replace_network_acl_list(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'replaceNetworkACLList') - else - options.merge!('command' => 'replaceNetworkACLList', - 'aclid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reset_api_limit.rb b/lib/fog/cloudstack/requests/compute/reset_api_limit.rb deleted file mode 100644 index fb3bfcd29..000000000 --- a/lib/fog/cloudstack/requests/compute/reset_api_limit.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Reset api count - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/resetApiLimit.html] - def reset_api_limit(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'resetApiLimit') - else - options.merge!('command' => 'resetApiLimit') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb deleted file mode 100644 index f364df9e8..000000000 --- a/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Resets the password for virtual machine. The virtual machine must be in a "Stopped" state and the template must already support this feature for this command to take effect. [async] - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/resetPasswordForVirtualMachine.html] - def reset_password_for_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'resetPasswordForVirtualMachine') - else - options.merge!('command' => 'resetPasswordForVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reset_ssh_key_for_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/reset_ssh_key_for_virtual_machine.rb deleted file mode 100644 index 4c469f60d..000000000 --- a/lib/fog/cloudstack/requests/compute/reset_ssh_key_for_virtual_machine.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Resets the SSH Key for virtual machine. The virtual machine must be in a "Stopped" state. [async] - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/resetSSHKeyForVirtualMachine.html] - def reset_ssh_key_for_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'resetSSHKeyForVirtualMachine') - else - options.merge!('command' => 'resetSSHKeyForVirtualMachine', - 'id' => args[0], - 'keypair' => args[1]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/reset_vpn_connection.rb b/lib/fog/cloudstack/requests/compute/reset_vpn_connection.rb deleted file mode 100644 index a19734163..000000000 --- a/lib/fog/cloudstack/requests/compute/reset_vpn_connection.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Reset site to site vpn connection - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/resetVpnConnection.html] - def reset_vpn_connection(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'resetVpnConnection') - else - options.merge!('command' => 'resetVpnConnection', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/resize_volume.rb b/lib/fog/cloudstack/requests/compute/resize_volume.rb deleted file mode 100644 index c23e2b621..000000000 --- a/lib/fog/cloudstack/requests/compute/resize_volume.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Resizes a volume - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/resizeVolume.html] - def resize_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'resizeVolume') - else - options.merge!('command' => 'resizeVolume', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/restart_network.rb b/lib/fog/cloudstack/requests/compute/restart_network.rb deleted file mode 100644 index e63e65a5d..000000000 --- a/lib/fog/cloudstack/requests/compute/restart_network.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Restarts the network; includes 1) restarting network elements - virtual routers, dhcp servers 2) reapplying all public ips 3) reapplying loadBalancing/portForwarding rules - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/restartNetwork.html] - def restart_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'restartNetwork') - else - options.merge!('command' => 'restartNetwork', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/restart_vpc.rb b/lib/fog/cloudstack/requests/compute/restart_vpc.rb deleted file mode 100644 index 009a83f10..000000000 --- a/lib/fog/cloudstack/requests/compute/restart_vpc.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Restarts a VPC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/restartVPC.html] - def restart_vpc(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'restartVPC') - else - options.merge!('command' => 'restartVPC', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/restore_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/restore_virtual_machine.rb deleted file mode 100644 index 062152321..000000000 --- a/lib/fog/cloudstack/requests/compute/restore_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Restore a VM to original template/ISO or new template/ISO - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/restoreVirtualMachine.html] - def restore_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'restoreVirtualMachine') - else - options.merge!('command' => 'restoreVirtualMachine', - 'virtualmachineid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/revert_snapshot.rb b/lib/fog/cloudstack/requests/compute/revert_snapshot.rb deleted file mode 100644 index 396a23e83..000000000 --- a/lib/fog/cloudstack/requests/compute/revert_snapshot.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # revert a volume snapshot. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/revertSnapshot.html] - def revert_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'revertSnapshot') - else - options.merge!('command' => 'revertSnapshot', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/revert_to_vm_snapshot.rb b/lib/fog/cloudstack/requests/compute/revert_to_vm_snapshot.rb deleted file mode 100644 index 1096a02ea..000000000 --- a/lib/fog/cloudstack/requests/compute/revert_to_vm_snapshot.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Revert VM from a vmsnapshot. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/revertToVMSnapshot.html] - def revert_to_vm_snapshot(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'revertToVMSnapshot') - else - options.merge!('command' => 'revertToVMSnapshot', - 'vmsnapshotid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb b/lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb deleted file mode 100644 index 1aea84f09..000000000 --- a/lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb +++ /dev/null @@ -1,52 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a particular egress rule from this security group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/revokeSecurityGroupEgress.html] - def revoke_security_group_egress(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'revokeSecurityGroupEgress') - else - options.merge!('command' => 'revokeSecurityGroupEgress', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def revoke_security_group_egress(options={}) - unless security_group_rule_id = options['id'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter id') - end - - security_group = self.data[:security_groups].values.find do |group| - (rule = (group['egressrule'] || []).find{|r| r['ruleid'] == security_group_rule_id}) && group['egressrule'].delete(rule) - end - - job_id = Fog::Cloudstack.uuid - job = { - "cmd" => "com.cloud.api.commands.revokeSecurityGroupEgress", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => { "securitygroup" => security_group } - } - - self.data[:jobs][job_id]= job - - {"revokesecuritygroupegress" => { "jobid" => job_id }} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/revoke_security_group_ingress.rb b/lib/fog/cloudstack/requests/compute/revoke_security_group_ingress.rb deleted file mode 100644 index 142084fea..000000000 --- a/lib/fog/cloudstack/requests/compute/revoke_security_group_ingress.rb +++ /dev/null @@ -1,52 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Deletes a particular ingress rule from this security group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/revokeSecurityGroupIngress.html] - def revoke_security_group_ingress(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'revokeSecurityGroupIngress') - else - options.merge!('command' => 'revokeSecurityGroupIngress', - 'id' => args[0]) - end - request(options) - end - end - - class Mock - def revoke_security_group_ingress(options={}) - unless security_group_rule_id = options['id'] - raise Fog::Compute::Cloudstack::BadRequest.new('Unable to execute API command missing parameter id') - end - - security_group = self.data[:security_groups].values.find do |group| - (rule = (group['ingressrule'] || []).find{|r| r['ruleid'] == security_group_rule_id}) && group['ingressrule'].delete(rule) - end - - job_id = Fog::Cloudstack.uuid - job = { - "cmd" => "com.cloud.api.commands.revokeSecurityGroupIngress", - "created" => Time.now.iso8601, - "jobid" => job_id, - "jobstatus" => 1, - "jobprocstatus" => 0, - "jobresultcode" => 0, - "jobresulttype" => "object", - "jobresult" => { "securitygroup" => security_group } - } - - self.data[:jobs][job_id]= job - - {"revokesecuritygroupingress" => { "jobid" => job_id }} - end - end - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/scale_system_vm.rb b/lib/fog/cloudstack/requests/compute/scale_system_vm.rb deleted file mode 100644 index 34c92f53f..000000000 --- a/lib/fog/cloudstack/requests/compute/scale_system_vm.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Scale the service offering for a system vm (console proxy or secondary storage). The system vm must be in a "Stopped" state for this command to take effect. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/scaleSystemVm.html] - def scale_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'scaleSystemVm') - else - options.merge!('command' => 'scaleSystemVm', - 'serviceofferingid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/scale_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/scale_virtual_machine.rb deleted file mode 100644 index 84a5728c4..000000000 --- a/lib/fog/cloudstack/requests/compute/scale_virtual_machine.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Scales the virtual machine to a new service offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/scaleVirtualMachine.html] - def scale_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'scaleVirtualMachine') - else - options.merge!('command' => 'scaleVirtualMachine', - 'serviceofferingid' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/start_internal_load_balancer_vm.rb b/lib/fog/cloudstack/requests/compute/start_internal_load_balancer_vm.rb deleted file mode 100644 index af34bd5b5..000000000 --- a/lib/fog/cloudstack/requests/compute/start_internal_load_balancer_vm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Starts an existing internal lb vm. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/startInternalLoadBalancerVM.html] - def start_internal_load_balancer_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'startInternalLoadBalancerVM') - else - options.merge!('command' => 'startInternalLoadBalancerVM', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/start_router.rb b/lib/fog/cloudstack/requests/compute/start_router.rb deleted file mode 100644 index 9712fbb5c..000000000 --- a/lib/fog/cloudstack/requests/compute/start_router.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Starts a router. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/startRouter.html] - def start_router(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'startRouter') - else - options.merge!('command' => 'startRouter', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/start_system_vm.rb b/lib/fog/cloudstack/requests/compute/start_system_vm.rb deleted file mode 100644 index bb9781a9d..000000000 --- a/lib/fog/cloudstack/requests/compute/start_system_vm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Starts a system virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/startSystemVm.html] - def start_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'startSystemVm') - else - options.merge!('command' => 'startSystemVm', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/start_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/start_virtual_machine.rb deleted file mode 100644 index d3d500d6a..000000000 --- a/lib/fog/cloudstack/requests/compute/start_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Starts a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/startVirtualMachine.html] - def start_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'startVirtualMachine') - else - options.merge!('command' => 'startVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/stop_internal_load_balancer_vm.rb b/lib/fog/cloudstack/requests/compute/stop_internal_load_balancer_vm.rb deleted file mode 100644 index 300eb8061..000000000 --- a/lib/fog/cloudstack/requests/compute/stop_internal_load_balancer_vm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Stops an Internal LB vm. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/stopInternalLoadBalancerVM.html] - def stop_internal_load_balancer_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'stopInternalLoadBalancerVM') - else - options.merge!('command' => 'stopInternalLoadBalancerVM', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/stop_router.rb b/lib/fog/cloudstack/requests/compute/stop_router.rb deleted file mode 100644 index d15b47c0f..000000000 --- a/lib/fog/cloudstack/requests/compute/stop_router.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Stops a router. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/stopRouter.html] - def stop_router(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'stopRouter') - else - options.merge!('command' => 'stopRouter', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/stop_system_vm.rb b/lib/fog/cloudstack/requests/compute/stop_system_vm.rb deleted file mode 100644 index 2e8f4ab70..000000000 --- a/lib/fog/cloudstack/requests/compute/stop_system_vm.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Stops a system VM. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/stopSystemVm.html] - def stop_system_vm(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'stopSystemVm') - else - options.merge!('command' => 'stopSystemVm', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/stop_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/stop_virtual_machine.rb deleted file mode 100644 index 884ea5b78..000000000 --- a/lib/fog/cloudstack/requests/compute/stop_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Stops a virtual machine. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/stopVirtualMachine.html] - def stop_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'stopVirtualMachine') - else - options.merge!('command' => 'stopVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/suspend_project.rb b/lib/fog/cloudstack/requests/compute/suspend_project.rb deleted file mode 100644 index 8b72b220b..000000000 --- a/lib/fog/cloudstack/requests/compute/suspend_project.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Suspends a project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/suspendProject.html] - def suspend_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'suspendProject') - else - options.merge!('command' => 'suspendProject', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_account.rb b/lib/fog/cloudstack/requests/compute/update_account.rb deleted file mode 100644 index aaebf72b7..000000000 --- a/lib/fog/cloudstack/requests/compute/update_account.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates account information for the authenticated user - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateAccount.html] - def update_account(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateAccount') - else - options.merge!('command' => 'updateAccount', - 'newname' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_auto_scale_policy.rb b/lib/fog/cloudstack/requests/compute/update_auto_scale_policy.rb deleted file mode 100644 index 67026127d..000000000 --- a/lib/fog/cloudstack/requests/compute/update_auto_scale_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates an existing autoscale policy. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateAutoScalePolicy.html] - def update_auto_scale_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateAutoScalePolicy') - else - options.merge!('command' => 'updateAutoScalePolicy', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_auto_scale_vm_group.rb b/lib/fog/cloudstack/requests/compute/update_auto_scale_vm_group.rb deleted file mode 100644 index bb9f55d7b..000000000 --- a/lib/fog/cloudstack/requests/compute/update_auto_scale_vm_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates an existing autoscale vm group. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateAutoScaleVmGroup.html] - def update_auto_scale_vm_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateAutoScaleVmGroup') - else - options.merge!('command' => 'updateAutoScaleVmGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_auto_scale_vm_profile.rb b/lib/fog/cloudstack/requests/compute/update_auto_scale_vm_profile.rb deleted file mode 100644 index 6fe0426ad..000000000 --- a/lib/fog/cloudstack/requests/compute/update_auto_scale_vm_profile.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates an existing autoscale vm profile. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateAutoScaleVmProfile.html] - def update_auto_scale_vm_profile(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateAutoScaleVmProfile') - else - options.merge!('command' => 'updateAutoScaleVmProfile', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_cloud_to_use_object_store.rb b/lib/fog/cloudstack/requests/compute/update_cloud_to_use_object_store.rb deleted file mode 100644 index 8a5dcaa92..000000000 --- a/lib/fog/cloudstack/requests/compute/update_cloud_to_use_object_store.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Migrate current NFS secondary storages to use object store. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateCloudToUseObjectStore.html] - def update_cloud_to_use_object_store(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateCloudToUseObjectStore') - else - options.merge!('command' => 'updateCloudToUseObjectStore', - 'provider' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_cluster.rb b/lib/fog/cloudstack/requests/compute/update_cluster.rb deleted file mode 100644 index 33905089c..000000000 --- a/lib/fog/cloudstack/requests/compute/update_cluster.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates an existing cluster - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateCluster.html] - def update_cluster(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateCluster') - else - options.merge!('command' => 'updateCluster', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_configuration.rb b/lib/fog/cloudstack/requests/compute/update_configuration.rb deleted file mode 100644 index 64697deb1..000000000 --- a/lib/fog/cloudstack/requests/compute/update_configuration.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a configuration. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateConfiguration.html] - def update_configuration(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateConfiguration') - else - options.merge!('command' => 'updateConfiguration', - 'name' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_default_nic_for_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/update_default_nic_for_virtual_machine.rb deleted file mode 100644 index f224094e4..000000000 --- a/lib/fog/cloudstack/requests/compute/update_default_nic_for_virtual_machine.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Changes the default NIC on a VM - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateDefaultNicForVirtualMachine.html] - def update_default_nic_for_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateDefaultNicForVirtualMachine') - else - options.merge!('command' => 'updateDefaultNicForVirtualMachine', - 'nicid' => args[0], - 'virtualmachineid' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_disk_offering.rb b/lib/fog/cloudstack/requests/compute/update_disk_offering.rb deleted file mode 100644 index 6a0bcf977..000000000 --- a/lib/fog/cloudstack/requests/compute/update_disk_offering.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a disk offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateDiskOffering.html] - def update_disk_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateDiskOffering') - else - options.merge!('command' => 'updateDiskOffering', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_domain.rb b/lib/fog/cloudstack/requests/compute/update_domain.rb deleted file mode 100644 index fce55f0a7..000000000 --- a/lib/fog/cloudstack/requests/compute/update_domain.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a domain with a new name - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateDomain.html] - def update_domain(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateDomain') - else - options.merge!('command' => 'updateDomain', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_egress_firewall_rule.rb b/lib/fog/cloudstack/requests/compute/update_egress_firewall_rule.rb deleted file mode 100644 index 011c2bd28..000000000 --- a/lib/fog/cloudstack/requests/compute/update_egress_firewall_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates egress firewall rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateEgressFirewallRule.html] - def update_egress_firewall_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateEgressFirewallRule') - else - options.merge!('command' => 'updateEgressFirewallRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_firewall_rule.rb b/lib/fog/cloudstack/requests/compute/update_firewall_rule.rb deleted file mode 100644 index 19880aeff..000000000 --- a/lib/fog/cloudstack/requests/compute/update_firewall_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates firewall rule - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateFirewallRule.html] - def update_firewall_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateFirewallRule') - else - options.merge!('command' => 'updateFirewallRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_global_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/update_global_load_balancer_rule.rb deleted file mode 100644 index 4bf98d096..000000000 --- a/lib/fog/cloudstack/requests/compute/update_global_load_balancer_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # update global load balancer rules. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateGlobalLoadBalancerRule.html] - def update_global_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateGlobalLoadBalancerRule') - else - options.merge!('command' => 'updateGlobalLoadBalancerRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_guest_os.rb b/lib/fog/cloudstack/requests/compute/update_guest_os.rb deleted file mode 100644 index 440aac2b8..000000000 --- a/lib/fog/cloudstack/requests/compute/update_guest_os.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates the information about Guest OS - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateGuestOs.html] - def update_guest_os(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateGuestOs') - else - options.merge!('command' => 'updateGuestOs', - 'id' => args[0], - 'osdisplayname' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_guest_os_mapping.rb b/lib/fog/cloudstack/requests/compute/update_guest_os_mapping.rb deleted file mode 100644 index 5c5ee574e..000000000 --- a/lib/fog/cloudstack/requests/compute/update_guest_os_mapping.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates the information about Guest OS to Hypervisor specific name mapping - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateGuestOsMapping.html] - def update_guest_os_mapping(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateGuestOsMapping') - else - options.merge!('command' => 'updateGuestOsMapping', - 'osnameforhypervisor' => args[0], - 'id' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_host.rb b/lib/fog/cloudstack/requests/compute/update_host.rb deleted file mode 100644 index c535386fe..000000000 --- a/lib/fog/cloudstack/requests/compute/update_host.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a host. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateHost.html] - def update_host(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateHost') - else - options.merge!('command' => 'updateHost', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_host_password.rb b/lib/fog/cloudstack/requests/compute/update_host_password.rb deleted file mode 100644 index ad3aea057..000000000 --- a/lib/fog/cloudstack/requests/compute/update_host_password.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Update password of a host/pool on management server. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateHostPassword.html] - def update_host_password(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateHostPassword') - else - options.merge!('command' => 'updateHostPassword', - 'username' => args[0], - 'password' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_hypervisor_capabilities.rb b/lib/fog/cloudstack/requests/compute/update_hypervisor_capabilities.rb deleted file mode 100644 index 1273ed9ca..000000000 --- a/lib/fog/cloudstack/requests/compute/update_hypervisor_capabilities.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a hypervisor capabilities. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateHypervisorCapabilities.html] - def update_hypervisor_capabilities(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateHypervisorCapabilities') - else - options.merge!('command' => 'updateHypervisorCapabilities') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_instance_group.rb b/lib/fog/cloudstack/requests/compute/update_instance_group.rb deleted file mode 100644 index 7a9446305..000000000 --- a/lib/fog/cloudstack/requests/compute/update_instance_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a vm group - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateInstanceGroup.html] - def update_instance_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateInstanceGroup') - else - options.merge!('command' => 'updateInstanceGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_ip_address.rb b/lib/fog/cloudstack/requests/compute/update_ip_address.rb deleted file mode 100644 index ab0611ee1..000000000 --- a/lib/fog/cloudstack/requests/compute/update_ip_address.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates an ip address - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateIpAddress.html] - def update_ip_address(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateIpAddress') - else - options.merge!('command' => 'updateIpAddress', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_iso.rb b/lib/fog/cloudstack/requests/compute/update_iso.rb deleted file mode 100644 index cc9dbbea7..000000000 --- a/lib/fog/cloudstack/requests/compute/update_iso.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates an ISO file. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateIso.html] - def update_iso(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateIso') - else - options.merge!('command' => 'updateIso', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_iso_permissions.rb b/lib/fog/cloudstack/requests/compute/update_iso_permissions.rb deleted file mode 100644 index 11594fc94..000000000 --- a/lib/fog/cloudstack/requests/compute/update_iso_permissions.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates iso permissions - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateIsoPermissions.html] - def update_iso_permissions(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateIsoPermissions') - else - options.merge!('command' => 'updateIsoPermissions', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_lb_health_check_policy.rb b/lib/fog/cloudstack/requests/compute/update_lb_health_check_policy.rb deleted file mode 100644 index 4efd1f200..000000000 --- a/lib/fog/cloudstack/requests/compute/update_lb_health_check_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates LB HealthCheck policy - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateLBHealthCheckPolicy.html] - def update_lb_health_check_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateLBHealthCheckPolicy') - else - options.merge!('command' => 'updateLBHealthCheckPolicy', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_lb_stickiness_policy.rb b/lib/fog/cloudstack/requests/compute/update_lb_stickiness_policy.rb deleted file mode 100644 index 160b98d90..000000000 --- a/lib/fog/cloudstack/requests/compute/update_lb_stickiness_policy.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates LB Stickiness policy - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateLBStickinessPolicy.html] - def update_lb_stickiness_policy(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateLBStickinessPolicy') - else - options.merge!('command' => 'updateLBStickinessPolicy', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_load_balancer.rb b/lib/fog/cloudstack/requests/compute/update_load_balancer.rb deleted file mode 100644 index 1ee5059e4..000000000 --- a/lib/fog/cloudstack/requests/compute/update_load_balancer.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a Load Balancer - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateLoadBalancer.html] - def update_load_balancer(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateLoadBalancer') - else - options.merge!('command' => 'updateLoadBalancer', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/update_load_balancer_rule.rb deleted file mode 100644 index 8bccc5cc4..000000000 --- a/lib/fog/cloudstack/requests/compute/update_load_balancer_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates load balancer - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateLoadBalancerRule.html] - def update_load_balancer_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateLoadBalancerRule') - else - options.merge!('command' => 'updateLoadBalancerRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_network.rb b/lib/fog/cloudstack/requests/compute/update_network.rb deleted file mode 100644 index 0ae7ac79c..000000000 --- a/lib/fog/cloudstack/requests/compute/update_network.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateNetwork.html] - def update_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateNetwork') - else - options.merge!('command' => 'updateNetwork', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_network_acl_item.rb b/lib/fog/cloudstack/requests/compute/update_network_acl_item.rb deleted file mode 100644 index 5cd7553ec..000000000 --- a/lib/fog/cloudstack/requests/compute/update_network_acl_item.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates ACL Item with specified Id - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateNetworkACLItem.html] - def update_network_acl_item(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateNetworkACLItem') - else - options.merge!('command' => 'updateNetworkACLItem', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_network_acl_list.rb b/lib/fog/cloudstack/requests/compute/update_network_acl_list.rb deleted file mode 100644 index c250781d8..000000000 --- a/lib/fog/cloudstack/requests/compute/update_network_acl_list.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates Network ACL list - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateNetworkACLList.html] - def update_network_acl_list(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateNetworkACLList') - else - options.merge!('command' => 'updateNetworkACLList', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_network_offering.rb b/lib/fog/cloudstack/requests/compute/update_network_offering.rb deleted file mode 100644 index 3792e1ce6..000000000 --- a/lib/fog/cloudstack/requests/compute/update_network_offering.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a network offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateNetworkOffering.html] - def update_network_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateNetworkOffering') - else - options.merge!('command' => 'updateNetworkOffering') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_network_service_provider.rb b/lib/fog/cloudstack/requests/compute/update_network_service_provider.rb deleted file mode 100644 index 4ee136e3b..000000000 --- a/lib/fog/cloudstack/requests/compute/update_network_service_provider.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a network serviceProvider of a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateNetworkServiceProvider.html] - def update_network_service_provider(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateNetworkServiceProvider') - else - options.merge!('command' => 'updateNetworkServiceProvider', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_physical_network.rb b/lib/fog/cloudstack/requests/compute/update_physical_network.rb deleted file mode 100644 index d0c38d7fe..000000000 --- a/lib/fog/cloudstack/requests/compute/update_physical_network.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updatePhysicalNetwork.html] - def update_physical_network(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updatePhysicalNetwork') - else - options.merge!('command' => 'updatePhysicalNetwork', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_pod.rb b/lib/fog/cloudstack/requests/compute/update_pod.rb deleted file mode 100644 index c8aeaba16..000000000 --- a/lib/fog/cloudstack/requests/compute/update_pod.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a Pod. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updatePod.html] - def update_pod(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updatePod') - else - options.merge!('command' => 'updatePod', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_port_forwarding_rule.rb b/lib/fog/cloudstack/requests/compute/update_port_forwarding_rule.rb deleted file mode 100644 index 5f692c7e0..000000000 --- a/lib/fog/cloudstack/requests/compute/update_port_forwarding_rule.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a port forwarding rule. Only the private port and the virtual machine can be updated. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updatePortForwardingRule.html] - def update_port_forwarding_rule(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updatePortForwardingRule') - else - options.merge!('command' => 'updatePortForwardingRule', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_project.rb b/lib/fog/cloudstack/requests/compute/update_project.rb deleted file mode 100644 index 37b553365..000000000 --- a/lib/fog/cloudstack/requests/compute/update_project.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a project - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateProject.html] - def update_project(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateProject') - else - options.merge!('command' => 'updateProject', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_project_invitation.rb b/lib/fog/cloudstack/requests/compute/update_project_invitation.rb deleted file mode 100644 index 0715f3aa4..000000000 --- a/lib/fog/cloudstack/requests/compute/update_project_invitation.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Accepts or declines project invitation - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateProjectInvitation.html] - def update_project_invitation(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateProjectInvitation') - else - options.merge!('command' => 'updateProjectInvitation', - 'projectid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_region.rb b/lib/fog/cloudstack/requests/compute/update_region.rb deleted file mode 100644 index 00b551d8c..000000000 --- a/lib/fog/cloudstack/requests/compute/update_region.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a region - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateRegion.html] - def update_region(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateRegion') - else - options.merge!('command' => 'updateRegion', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_remote_access_vpn.rb b/lib/fog/cloudstack/requests/compute/update_remote_access_vpn.rb deleted file mode 100644 index 3e47f2978..000000000 --- a/lib/fog/cloudstack/requests/compute/update_remote_access_vpn.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates remote access vpn - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateRemoteAccessVpn.html] - def update_remote_access_vpn(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateRemoteAccessVpn') - else - options.merge!('command' => 'updateRemoteAccessVpn', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_resource_count.rb b/lib/fog/cloudstack/requests/compute/update_resource_count.rb deleted file mode 100644 index 344db74fb..000000000 --- a/lib/fog/cloudstack/requests/compute/update_resource_count.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Recalculate and update resource count for an account or domain. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateResourceCount.html] - def update_resource_count(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateResourceCount') - else - options.merge!('command' => 'updateResourceCount', - 'domainid' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_resource_limit.rb b/lib/fog/cloudstack/requests/compute/update_resource_limit.rb deleted file mode 100644 index 129a84c5a..000000000 --- a/lib/fog/cloudstack/requests/compute/update_resource_limit.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates resource limits for an account or domain. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateResourceLimit.html] - def update_resource_limit(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateResourceLimit') - else - options.merge!('command' => 'updateResourceLimit', - 'resourcetype' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_service_offering.rb b/lib/fog/cloudstack/requests/compute/update_service_offering.rb deleted file mode 100644 index 478c39f4d..000000000 --- a/lib/fog/cloudstack/requests/compute/update_service_offering.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a service offering. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateServiceOffering.html] - def update_service_offering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateServiceOffering') - else - options.merge!('command' => 'updateServiceOffering', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_storage_network_ip_range.rb b/lib/fog/cloudstack/requests/compute/update_storage_network_ip_range.rb deleted file mode 100644 index 2e74b4da4..000000000 --- a/lib/fog/cloudstack/requests/compute/update_storage_network_ip_range.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Update a Storage network IP range, only allowed when no IPs in this range have been allocated. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateStorageNetworkIpRange.html] - def update_storage_network_ip_range(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateStorageNetworkIpRange') - else - options.merge!('command' => 'updateStorageNetworkIpRange', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_storage_pool.rb b/lib/fog/cloudstack/requests/compute/update_storage_pool.rb deleted file mode 100644 index b878eca5a..000000000 --- a/lib/fog/cloudstack/requests/compute/update_storage_pool.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a storage pool. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateStoragePool.html] - def update_storage_pool(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateStoragePool') - else - options.merge!('command' => 'updateStoragePool', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_template.rb b/lib/fog/cloudstack/requests/compute/update_template.rb deleted file mode 100644 index 3aa6b8e74..000000000 --- a/lib/fog/cloudstack/requests/compute/update_template.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates attributes of a template. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateTemplate.html] - def update_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateTemplate') - else - options.merge!('command' => 'updateTemplate', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_template_permissions.rb b/lib/fog/cloudstack/requests/compute/update_template_permissions.rb deleted file mode 100644 index 700909968..000000000 --- a/lib/fog/cloudstack/requests/compute/update_template_permissions.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a template visibility permissions. A public template is visible to all accounts within the same domain. A private template is visible only to the owner of the template. A priviledged template is a private template with account permissions added. Only accounts specified under the template permissions are visible to them. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateTemplatePermissions.html] - def update_template_permissions(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateTemplatePermissions') - else - options.merge!('command' => 'updateTemplatePermissions', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_traffic_type.rb b/lib/fog/cloudstack/requests/compute/update_traffic_type.rb deleted file mode 100644 index edc984a06..000000000 --- a/lib/fog/cloudstack/requests/compute/update_traffic_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates traffic type of a physical network - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateTrafficType.html] - def update_traffic_type(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateTrafficType') - else - options.merge!('command' => 'updateTrafficType', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_user.rb b/lib/fog/cloudstack/requests/compute/update_user.rb deleted file mode 100644 index ea56106fe..000000000 --- a/lib/fog/cloudstack/requests/compute/update_user.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a user account - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateUser.html] - def update_user(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateUser') - else - options.merge!('command' => 'updateUser', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/update_virtual_machine.rb deleted file mode 100644 index 458e1cbc0..000000000 --- a/lib/fog/cloudstack/requests/compute/update_virtual_machine.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates properties of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. Therefore, stop the VM manually before issuing this call. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVirtualMachine.html] - def update_virtual_machine(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVirtualMachine') - else - options.merge!('command' => 'updateVirtualMachine', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_vm_affinity_group.rb b/lib/fog/cloudstack/requests/compute/update_vm_affinity_group.rb deleted file mode 100644 index 67b29a35e..000000000 --- a/lib/fog/cloudstack/requests/compute/update_vm_affinity_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVMAffinityGroup.html] - def update_vm_affinity_group(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVMAffinityGroup') - else - options.merge!('command' => 'updateVMAffinityGroup', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_volume.rb b/lib/fog/cloudstack/requests/compute/update_volume.rb deleted file mode 100644 index 33814a21e..000000000 --- a/lib/fog/cloudstack/requests/compute/update_volume.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates the volume. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVolume.html] - def update_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVolume') - else - options.merge!('command' => 'updateVolume') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_vpc.rb b/lib/fog/cloudstack/requests/compute/update_vpc.rb deleted file mode 100644 index 6b3429b2a..000000000 --- a/lib/fog/cloudstack/requests/compute/update_vpc.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a VPC - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVPC.html] - def update_vpc(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVPC') - else - options.merge!('command' => 'updateVPC', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_vpcoffering.rb b/lib/fog/cloudstack/requests/compute/update_vpcoffering.rb deleted file mode 100644 index 7f7c754f6..000000000 --- a/lib/fog/cloudstack/requests/compute/update_vpcoffering.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates VPC offering - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVPCOffering.html] - def update_vpcoffering(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVPCOffering') - else - options.merge!('command' => 'updateVPCOffering', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_vpn_connection.rb b/lib/fog/cloudstack/requests/compute/update_vpn_connection.rb deleted file mode 100644 index 1de22352d..000000000 --- a/lib/fog/cloudstack/requests/compute/update_vpn_connection.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates site to site vpn connection - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVpnConnection.html] - def update_vpn_connection(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVpnConnection') - else - options.merge!('command' => 'updateVpnConnection', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_vpn_customer_gateway.rb b/lib/fog/cloudstack/requests/compute/update_vpn_customer_gateway.rb deleted file mode 100644 index 48e05877c..000000000 --- a/lib/fog/cloudstack/requests/compute/update_vpn_customer_gateway.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Update site to site vpn customer gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVpnCustomerGateway.html] - def update_vpn_customer_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVpnCustomerGateway') - else - options.merge!('command' => 'updateVpnCustomerGateway', - 'id' => args[0], - 'gateway' => args[1], - 'cidrlist' => args[2], - 'ipsecpsk' => args[3], - 'esppolicy' => args[4], - 'ikepolicy' => args[5]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_vpn_gateway.rb b/lib/fog/cloudstack/requests/compute/update_vpn_gateway.rb deleted file mode 100644 index 9841e9798..000000000 --- a/lib/fog/cloudstack/requests/compute/update_vpn_gateway.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates site to site vpn local gateway - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateVpnGateway.html] - def update_vpn_gateway(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateVpnGateway') - else - options.merge!('command' => 'updateVpnGateway', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/update_zone.rb b/lib/fog/cloudstack/requests/compute/update_zone.rb deleted file mode 100644 index 27e7dcf94..000000000 --- a/lib/fog/cloudstack/requests/compute/update_zone.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Updates a Zone. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateZone.html] - def update_zone(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'updateZone') - else - options.merge!('command' => 'updateZone', - 'id' => args[0]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/upgrade_router_template.rb b/lib/fog/cloudstack/requests/compute/upgrade_router_template.rb deleted file mode 100644 index 08b0352cc..000000000 --- a/lib/fog/cloudstack/requests/compute/upgrade_router_template.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Upgrades router to use newer template - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/upgradeRouterTemplate.html] - def upgrade_router_template(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'upgradeRouterTemplate') - else - options.merge!('command' => 'upgradeRouterTemplate') - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/upload_custom_certificate.rb b/lib/fog/cloudstack/requests/compute/upload_custom_certificate.rb deleted file mode 100644 index dfcf585fe..000000000 --- a/lib/fog/cloudstack/requests/compute/upload_custom_certificate.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Uploads a custom certificate for the console proxy VMs to use for SSL. Can be used to upload a single certificate signed by a known CA. Can also be used, through multiple calls, to upload a chain of certificates from CA to the custom certificate itself. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/uploadCustomCertificate.html] - def upload_custom_certificate(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'uploadCustomCertificate') - else - options.merge!('command' => 'uploadCustomCertificate', - 'domainsuffix' => args[0], - 'certificate' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/upload_ssl_cert.rb b/lib/fog/cloudstack/requests/compute/upload_ssl_cert.rb deleted file mode 100644 index e0e9c8024..000000000 --- a/lib/fog/cloudstack/requests/compute/upload_ssl_cert.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Upload a certificate to cloudstack - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/uploadSslCert.html] - def upload_ssl_cert(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'uploadSslCert') - else - options.merge!('command' => 'uploadSslCert', - 'certificate' => args[0], - 'privatekey' => args[1]) - end - request(options) - end - end - - end - end -end - diff --git a/lib/fog/cloudstack/requests/compute/upload_volume.rb b/lib/fog/cloudstack/requests/compute/upload_volume.rb deleted file mode 100644 index 299a3fc4b..000000000 --- a/lib/fog/cloudstack/requests/compute/upload_volume.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Fog - module Compute - class Cloudstack - - class Real - # Uploads a data disk. - # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/uploadVolume.html] - def upload_volume(*args) - options = {} - if args[0].is_a? Hash - options = args[0] - options.merge!('command' => 'uploadVolume') - else - options.merge!('command' => 'uploadVolume', - 'url' => args[0], - 'format' => args[1], - 'zoneid' => args[2], - 'name' => args[3]) - end - # add project id if we have one - @cloudstack_project_id ? options.merge!('projectid' => @cloudstack_project_id) : nil - request(options) - end - end - - end - end -end - diff --git a/spec/fog/bin/cloudstack_spec.rb b/spec/fog/bin/cloudstack_spec.rb deleted file mode 100644 index 065c07e23..000000000 --- a/spec/fog/bin/cloudstack_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -require "spec_helper" -require "fog/bin" -require "helpers/bin" - -describe Cloudstack do - include Fog::BinSpec - - let(:subject) { Cloudstack } -end diff --git a/tests/cloudstack/compute/models/disk_offering_tests.rb b/tests/cloudstack/compute/models/disk_offering_tests.rb deleted file mode 100644 index b52f60a85..000000000 --- a/tests/cloudstack/compute/models/disk_offering_tests.rb +++ /dev/null @@ -1,5 +0,0 @@ -Shindo.tests("Fog::Compute[:cloudstack] | disk_offering", "cloudstack") do - config = compute_providers[:cloudstack] - compute = Fog::Compute[:cloudstack] - model_tests(compute.disk_offerings, config[:disk_offering_attributes], config[:mocked]) -end diff --git a/tests/cloudstack/compute/models/egress_firewall_rule_tests.rb b/tests/cloudstack/compute/models/egress_firewall_rule_tests.rb deleted file mode 100644 index 0042caa82..000000000 --- a/tests/cloudstack/compute/models/egress_firewall_rule_tests.rb +++ /dev/null @@ -1,6 +0,0 @@ -Shindo.tests("Fog::Compute[:cloudstack] | egress_firewall_rule", "cloudstack") do - config = compute_providers[:cloudstack] - compute = Fog::Compute[:cloudstack] - - model_tests(compute.egress_firewall_rules, config[:egress_firewall_rule_attributes], config[:mocked]) -end diff --git a/tests/cloudstack/compute/models/public_ip_address_tests.rb b/tests/cloudstack/compute/models/public_ip_address_tests.rb deleted file mode 100644 index c073f4cde..000000000 --- a/tests/cloudstack/compute/models/public_ip_address_tests.rb +++ /dev/null @@ -1,27 +0,0 @@ -Shindo.tests("Fog::Compute[:cloudstack] | public_ip_address", "cloudstack") do - config = compute_providers[:cloudstack] - compute = Fog::Compute[:cloudstack] - - model_tests(compute.public_ip_addresses, config[:public_ip_address_attributes], config[:mocked]) do - @server = Fog::Compute[:cloudstack].servers.create(config[:server_attributes]) - @server.wait_for { ready? } - - tests('#server=').succeeds do - @instance.server = @server - end - - tests('#server') do - test(' == @server') do - @instance.reload - @instance.server_id == @server.id - end - end - - test('#server = nil') do - @instance.server = nil - @instance.server_id.nil? - end - - @server.destroy - end -end diff --git a/tests/cloudstack/compute/models/public_ip_addresses_tests.rb b/tests/cloudstack/compute/models/public_ip_addresses_tests.rb deleted file mode 100644 index da8405fda..000000000 --- a/tests/cloudstack/compute/models/public_ip_addresses_tests.rb +++ /dev/null @@ -1,5 +0,0 @@ -Shindo.tests("Fog::Compute[:cloudstack] | public_ip_addresses", ['cloudstack']) do - - collection_tests(Fog::Compute[:cloudstack].public_ip_addresses, {}, true) - -end diff --git a/tests/cloudstack/compute/models/security_group_rule_tests.rb b/tests/cloudstack/compute/models/security_group_rule_tests.rb deleted file mode 100644 index e715f161e..000000000 --- a/tests/cloudstack/compute/models/security_group_rule_tests.rb +++ /dev/null @@ -1,28 +0,0 @@ -def security_group_rule_tests(connection, params, direction, mocks_implemented = true) - @security_group = connection.security_groups.create(params[:security_group_attributes]) - - rule_params = params[:security_group_rule_attributes].merge(:security_group_id => @security_group.id, :direction => direction) - - model_tests(connection.security_group_rules, rule_params, mocks_implemented) do - - if Fog.mocking? && !mocks_implemented - pending - end - - end - @security_group.destroy -end - -provider, config = :cloudstack, compute_providers[:cloudstack] - -Shindo.tests("Fog::Compute[:#{provider}] | security_group_rules | ingress", [provider.to_s]) do - - security_group_rule_tests(Fog::Compute[:cloudstack], config, "ingress", config[:mocked]) - -end - -Shindo.tests("Fog::Compute[:#{provider}] | security_group_rules | egress", [provider.to_s]) do - - security_group_rule_tests(Fog::Compute[:cloudstack], config, "egress", config[:mocked]) - -end diff --git a/tests/cloudstack/compute/models/security_group_tests.rb b/tests/cloudstack/compute/models/security_group_tests.rb deleted file mode 100644 index c0ff70013..000000000 --- a/tests/cloudstack/compute/models/security_group_tests.rb +++ /dev/null @@ -1,16 +0,0 @@ -def security_group_tests(connection, params, mocks_implemented = true) - model_tests(connection.security_groups, params[:security_group_attributes], mocks_implemented) do - if Fog.mocking? && !mocks_implemented - pending - else - responds_to(:rules) - end - end -end - -provider, config = :cloudstack, compute_providers[:cloudstack] -Shindo.tests("Fog::Compute[:#{provider}] | security_groups", [provider.to_s]) do - - security_group_tests(Fog::Compute[:cloudstack], config, config[:mocked]) - -end diff --git a/tests/cloudstack/compute/models/security_groups_tests.rb b/tests/cloudstack/compute/models/security_groups_tests.rb deleted file mode 100644 index 132ea9bf3..000000000 --- a/tests/cloudstack/compute/models/security_groups_tests.rb +++ /dev/null @@ -1,18 +0,0 @@ -def security_group_tests(provider, params, mocks_implemented = true) - collection_tests(provider.security_groups, params, mocks_implemented) do - - if Fog.mocking? && !mocks_implemented - pending - else - responds_to(:rules) - end - - end -end - -provider, config = :cloudstack, compute_providers[:cloudstack] -Shindo.tests("Fog::Compute[:#{provider}] | security_group", [provider.to_s]) do - - security_group_tests(Fog::Compute[provider], (config[:security_group_attributes] || {}), config[:mocked]) - -end diff --git a/tests/cloudstack/compute/models/server_tests.rb b/tests/cloudstack/compute/models/server_tests.rb deleted file mode 100644 index 5044fb296..000000000 --- a/tests/cloudstack/compute/models/server_tests.rb +++ /dev/null @@ -1,18 +0,0 @@ -provider, config = :cloudstack, compute_providers[:cloudstack] - -Shindo.tests("Fog::Compute[:#{provider}] | servers + security_groups", [provider.to_s]) do - connection = Fog::Compute[provider] - @security_group = connection.security_groups.create(config[:security_group_attributes]) - @server = connection.servers.create(config[:server_attributes].merge(:security_groups => [@security_group])) - - tests('#security_group').succeeds do - @server.wait_for { ready? } - @server.security_groups.map(&:id) == [@security_group.id] - end - - tests('#destroy').succeeds do - @server.destroy.wait_for { ready? } - @security_group.destroy - end - -end diff --git a/tests/cloudstack/compute/models/snapshot_tests.rb b/tests/cloudstack/compute/models/snapshot_tests.rb deleted file mode 100644 index 9a492dd68..000000000 --- a/tests/cloudstack/compute/models/snapshot_tests.rb +++ /dev/null @@ -1,19 +0,0 @@ -def snapshot_tests(connection, params, mocks_implemented = true) - model_tests(connection.snapshots, params[:snapshot_attributes], mocks_implemented) do - if !Fog.mocking? || mocks_implemented - @instance.wait_for { ready? } - end - end -end - -Shindo.tests("Fog::Compute[:cloudstack] | snapshot", "cloudstack") do - - config = compute_providers[:cloudstack] - - snapshot_tests(Fog::Compute[:cloudstack], config, config[:mocked]) - - tests('has volume relation') do - responds_to(:volume) - end - -end diff --git a/tests/cloudstack/compute/models/volume_tests.rb b/tests/cloudstack/compute/models/volume_tests.rb deleted file mode 100644 index 41536942b..000000000 --- a/tests/cloudstack/compute/models/volume_tests.rb +++ /dev/null @@ -1,34 +0,0 @@ -def volume_tests(connection, params, mocks_implemented = true) - model_tests(connection.volumes, params[:volume_attributes], mocks_implemented) do - if !Fog.mocking? || mocks_implemented - @instance.wait_for { ready? } - end - - @server = @instance.service.servers.create(params[:server_attributes]) - @server.wait_for { ready? } - - tests('attach').succeeds do - @instance.attach(@server) - end - - tests('detach').succeeds do - @instance.detach - end - - @server.destroy - end -end - -Shindo.tests("Fog::Compute[:cloudstack] | volume", "cloudstack") do - - config = compute_providers[:cloudstack] - - volume_tests(Fog::Compute[:cloudstack], config, config[:mocked]) do - if Fog.mocking? && !mocks_implemented - pending - else - responds_to(:ready?) - responds_to(:flavor) - end - end -end diff --git a/tests/cloudstack/compute/models/volumes_tests.rb b/tests/cloudstack/compute/models/volumes_tests.rb deleted file mode 100644 index 7af3935b3..000000000 --- a/tests/cloudstack/compute/models/volumes_tests.rb +++ /dev/null @@ -1,15 +0,0 @@ -def volumes_tests(connection, params = {}, mocks_implemented = true) - collection_tests(connection.volumes, params, mocks_implemented) do - - if !Fog.mocking? || mocks_implemented - @instance.wait_for { ready? } - end - - end -end - -config = compute_providers[:cloudstack] - -Shindo.tests("Fog::Compute[:cloudstack] | volumes", ["cloudstack"]) do - volumes_tests(Fog::Compute[:cloudstack], config[:volume_attributes], config[:mocked]) -end diff --git a/tests/cloudstack/requests/disk_offering_tests.rb b/tests/cloudstack/requests/disk_offering_tests.rb deleted file mode 100644 index 1212991d4..000000000 --- a/tests/cloudstack/requests/disk_offering_tests.rb +++ /dev/null @@ -1,29 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | disk offering requests', ['cloudstack']) do - - @disk_offerings_format = { - 'listdiskofferingsresponse' => { - 'count' => Integer, - 'diskoffering' => [ - 'id' => String, - 'created' => String, - 'disksize' => Integer, - 'displaytext' => String, - 'domain' => Fog::Nullable::String, - 'domainid' => Fog::Nullable::String, - 'iscustomized' => Fog::Boolean, - 'name' => String, - 'storagetype' => String, - 'tags' => Fog::Nullable::String - ] - } - } - - tests('success') do - - tests('#list_disk_offerings').formats(@disk_offerings_format) do - Fog::Compute[:cloudstack].list_disk_offerings - end - - end - -end diff --git a/tests/cloudstack/requests/egress_firewall_rule_tests.rb b/tests/cloudstack/requests/egress_firewall_rule_tests.rb deleted file mode 100644 index 82f689352..000000000 --- a/tests/cloudstack/requests/egress_firewall_rule_tests.rb +++ /dev/null @@ -1,25 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | egress firewall rule requests', ['cloudstack']) do - - @egress_firewall_rules_format = { - 'listegressfirewallrulesresponse' => { - 'count' => Integer, - 'firewallrule' => [ - 'id' => String, - 'protocol' => String, - 'networkid' => String, - 'state' => String, - 'cidrlist' => String, - 'tags' => Fog::Nullable::Array - ] - } - } - - tests('success') do - - tests('#list_egress_firewall_rules').formats(@egress_firewall_rules_format) do - Fog::Compute[:cloudstack].list_egress_firewall_rules - end - - end - -end diff --git a/tests/cloudstack/requests/firewall_rule_tests.rb b/tests/cloudstack/requests/firewall_rule_tests.rb deleted file mode 100644 index ee80b8ba1..000000000 --- a/tests/cloudstack/requests/firewall_rule_tests.rb +++ /dev/null @@ -1,29 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | firewall rule requests', ['cloudstack']) do - - @firewall_rules_format = { - 'listfirewallrulesresponse' => { - 'count' => Integer, - 'firewallrule' => [ - 'id' => String, - 'protocol' => String, - 'startport' => String, - 'endport' => String, - 'ipaddressid' => String, - 'networkid' => String, - 'ipaddress' => String, - 'state' => String, - 'cidrlist' => String, - 'tags' => Fog::Nullable::Array - ] - } - } - - tests('success') do - - tests('#list_firewall_rules').formats(@firewall_rules_format) do - Fog::Compute[:cloudstack].list_firewall_rules - end - - end - -end diff --git a/tests/cloudstack/requests/network_offering_tests.rb b/tests/cloudstack/requests/network_offering_tests.rb deleted file mode 100644 index 16e3bf6c4..000000000 --- a/tests/cloudstack/requests/network_offering_tests.rb +++ /dev/null @@ -1,32 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | network offering requests', ['cloudstack']) do - - @network_offerings_format = { - 'listnetworkofferingsresponse' => { - 'count' => Integer, - 'networkoffering' => [ - 'id' => String, - 'name' => String, - 'displaytext' => String, - 'traffictype' => String, - 'isdefault' => Fog::Boolean, - 'specifyvlan' => Fog::Boolean, - 'conservemode' => Fog::Boolean, - 'specifyipranges' => Fog::Boolean, - 'availability' => String, - 'networkrate' => Integer, - 'state' => String, - 'guestiptype' => String, - 'serviceofferingid' => String, - ] - } - } - - tests('success') do - - tests('#list_network_offerings').formats(@network_offerings_format) do - Fog::Compute[:cloudstack].list_network_offerings - end - - end - -end diff --git a/tests/cloudstack/requests/os_type_tests.rb b/tests/cloudstack/requests/os_type_tests.rb deleted file mode 100644 index e36533e8e..000000000 --- a/tests/cloudstack/requests/os_type_tests.rb +++ /dev/null @@ -1,37 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | os type requests', ['cloudstack']) do - - @os_types_format = { - 'listostypesresponse' => { - 'count' => Integer, - 'ostype' => [ - 'id' => String, - 'description' => String, - 'oscategoryid' => String - ] - } - } - - @os_categories_format = { - 'listoscategoriesresponse' => { - 'count' => Integer, - 'oscategory' => [ - 'id' => Integer, - 'name' => String - ] - } - } - - tests('success') do - - tests('#list_os_types').formats(@os_types_format) do - Fog::Compute[:cloudstack].list_os_types - end - - tests('#list_os_categories').formats(@os_categories_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_os_categories - end - - end - -end diff --git a/tests/cloudstack/requests/port_forwarding_rule_tests.rb b/tests/cloudstack/requests/port_forwarding_rule_tests.rb deleted file mode 100644 index 6d4599093..000000000 --- a/tests/cloudstack/requests/port_forwarding_rule_tests.rb +++ /dev/null @@ -1,33 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | port forwarding rule requests', ['cloudstack']) do - - @port_forwarding_rule_format = { - 'listportforwardingrulesresponse' => { - 'count' => Integer, - 'portforwardingrule' => [ - 'id' => String, - 'privateport' => String, - 'privateendport' => String, - 'protocol' => String, - 'publicport' => String, - 'publicendport' => String, - 'virtualmachineid' => String, - 'virtualmachinename' => String, - 'virtualmachinedisplayname' => String, - 'ipaddressid' => String, - 'ipaddress' => String, - 'state' => String, - 'cidrlist' => String, - 'tags' => Fog::Nullable::Array - ] - } - } - - tests('success') do - - tests('#list_port_forwarding_rules').formats(@port_forwarding_rule_format) do - Fog::Compute[:cloudstack].list_port_forwarding_rules('zoneid' => 1) - end - - end - -end diff --git a/tests/cloudstack/requests/public_ip_address_tests.rb b/tests/cloudstack/requests/public_ip_address_tests.rb deleted file mode 100644 index 574495ce3..000000000 --- a/tests/cloudstack/requests/public_ip_address_tests.rb +++ /dev/null @@ -1,38 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | public ip address requests', ['cloudstack']) do - - @public_ip_addresses_format = { - 'listpublicipaddressesresponse' => { - 'count' => Integer, - 'publicipaddress' => [ - 'id' => String, - 'ipaddress' => String, - 'allocated' => String, - 'zoneid' => String, - 'zonename' => String, - 'issourcenat' => Fog::Boolean, - 'projectid' => String, - 'project' => String, - 'domainid' => String, - 'domain' => String, - 'forvirtualnetwork' => Fog::Boolean, - 'isstaticnat' => Fog::Boolean, - 'issystem' => Fog::Boolean, - 'associatednetworkid' => String, - 'associatednetworkname' => String, - 'networkid' => String, - 'state' => String, - 'physicalnetworkid' => String, - 'tags' => Fog::Nullable::Array - ] - } - } - - tests('success') do - - tests('#list_public_ip_addresses').formats(@public_ip_addresses_format) do - Fog::Compute[:cloudstack].list_public_ip_addresses - end - - end - -end diff --git a/tests/cloudstack/requests/security_group_tests.rb b/tests/cloudstack/requests/security_group_tests.rb deleted file mode 100644 index bd20daaeb..000000000 --- a/tests/cloudstack/requests/security_group_tests.rb +++ /dev/null @@ -1,29 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | security group requests', ['cloudstack']) do - - @security_groups_format = { - 'listsecuritygroupsresponse' => { - 'count' => Integer, - 'securitygroup' => [ - 'id' => Integer, - 'account' => String, - 'description' => Fog::Nullable::String, - 'domain' => String, - 'domainid' => Integer, - 'jobid' => Fog::Nullable::Integer, - 'jobstatus' => Fog::Nullable::String, - 'name' => String, - 'ingressrule' => Fog::Nullable::Array - ] - } - } - - tests('success') do - - tests('#list_security_groups').formats(@security_groups_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_security_groups - end - - end - -end diff --git a/tests/cloudstack/requests/service_offering_tests.rb b/tests/cloudstack/requests/service_offering_tests.rb deleted file mode 100644 index c4808803a..000000000 --- a/tests/cloudstack/requests/service_offering_tests.rb +++ /dev/null @@ -1,31 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | service offering requests', ['cloudstack']) do - - @service_offerings_format = { - 'listserviceofferingsresponse' => { - 'count' => Integer, - 'serviceoffering' => [ - 'id' => String, - 'name' => String, - 'displaytext' => String, - 'cpuspeed' => Integer, - 'cpunumber' => Integer, - 'memory' => Integer, - 'created' => String, - 'storagetype' => String, - 'offerha' => Fog::Boolean, - 'limitcpuuse' => Fog::Boolean, - 'issystem' => Fog::Boolean, - 'defaultuse' => Fog::Boolean - ] - } - } - - tests('success') do - - tests('#list_service_offerings').formats(@service_offerings_format) do - Fog::Compute[:cloudstack].list_service_offerings - end - - end - -end diff --git a/tests/cloudstack/requests/snapshot_tests.rb b/tests/cloudstack/requests/snapshot_tests.rb deleted file mode 100644 index dd0796c68..000000000 --- a/tests/cloudstack/requests/snapshot_tests.rb +++ /dev/null @@ -1,32 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | snapshot requests', ['cloudstack']) do - - @snapshots_format = { - 'listsnapshotsresponse' => { - 'count' => Integer, - 'snapshot' => [ - 'id' => Integer, - 'account' => String, - 'domainid' => Integer, - 'domain' => String, - 'snapshottype' => String, - 'volumeid' => Integer, - 'volumename' => String, - 'volumetype' => String, - 'created' => String, - 'name' => String, - 'intervaltype' => String, - 'state' => String - ] - } - } - - tests('success') do - - tests('#list_snapshots').formats(@snapshots_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_snapshots - end - - end - -end diff --git a/tests/cloudstack/requests/ssh_key_pair_tests.rb b/tests/cloudstack/requests/ssh_key_pair_tests.rb deleted file mode 100644 index 2bfbe6256..000000000 --- a/tests/cloudstack/requests/ssh_key_pair_tests.rb +++ /dev/null @@ -1,23 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | ssh key pairs requests', ['cloudstack']) do - - @ssh_keys_format = { - 'listsshkeypairsresponse' => { - 'count' => Integer, - 'sshkeypair' => [ - 'fingerprint' => String, - 'name' => String, - 'privatekey' => Fog::Nullable::String - ] - } - } - - tests('success') do - - tests('#list_ssh_key_pairs').formats(@ssh_keys_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_ssh_key_pairs - end - - end - -end diff --git a/tests/cloudstack/requests/template_tests.rb b/tests/cloudstack/requests/template_tests.rb deleted file mode 100644 index 4ce290439..000000000 --- a/tests/cloudstack/requests/template_tests.rb +++ /dev/null @@ -1,53 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | template requests', ['cloudstack']) do - - @templates_format = { - 'listtemplatesresponse' => { - 'count' => Integer, - 'template' => [ - 'id' => Integer, - 'name' => String, - 'displaytext' => String, - 'ispublic' => Fog::Boolean, - 'created' => String, - 'isready' => Fog::Boolean, - 'passwordenabled' => Fog::Boolean, - 'format' => String, - 'isfeatured' => Fog::Boolean, - 'crossZones' => Fog::Boolean, - 'ostypeid' => Integer, - 'ostypename' => String, - 'account' => String, - 'zoneid' => Integer, - 'zonename' => String, - 'status' => Fog::Nullable::String, - 'size' => Fog::Nullable::Integer, - 'templatetype' => String, - 'hypervisor' => String, - 'domain' => String, - 'domainid' => Integer, - 'isextractable' => Fog::Boolean, - 'checksum' => Fog::Nullable::String, - 'sourcetemplateid' => Fog::Nullable::Integer, - 'accountid' => Fog::Nullable::Integer, - 'bootable' => Fog::Nullable::Boolean, - 'hostid' => Fog::Nullable::Integer, - 'hostname' => Fog::Nullable::String, - 'jobid' => Fog::Nullable::Integer, - 'jobstatus' => Fog::Nullable::Integer, - 'removed' => Fog::Nullable::Boolean, - 'templatetag' => Fog::Nullable::String, - 'templatetype' => Fog::Nullable::String - ] - } - } - - tests('success') do - - tests('#list_templates').formats(@templates_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_templates('templateFilter' => "executable") - end - - end - -end diff --git a/tests/cloudstack/requests/virtual_machine_tests.rb b/tests/cloudstack/requests/virtual_machine_tests.rb deleted file mode 100644 index 9cc745579..000000000 --- a/tests/cloudstack/requests/virtual_machine_tests.rb +++ /dev/null @@ -1,71 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | virtual machine requests', ['cloudstack']) do - - @virtual_machines_format = { - 'listvirtualmachinesresponse' => { - 'count' => Integer, - 'virtualmachine' => [ - 'id' => String, - 'name' => String, - 'displayname' => String, - 'account' => String, - 'domainid' => String, - 'domain' => String, - 'created' => String, - 'state' => String, - 'haenable' => Fog::Boolean, - 'zoneid' => String, - 'zonename' => String, - 'hostid' => Fog::Nullable::String, - 'hostname' => Fog::Nullable::String, - 'templateid' => String, - 'templatename' => String, - 'templatedisplaytext' => String, - 'passwordenabled' => Fog::Boolean, - 'serviceofferingid' => String, - 'serviceofferingname' => String, - 'cpunumber' => Integer, - 'cpuspeed' => Integer, - 'networkkbsread' => Fog::Nullable::Integer, - 'memory' => Integer, - 'cpuused' => Fog::Nullable::String, - 'guestosid' => String, - 'networkkbswrite' => Fog::Nullable::Integer, - 'rootdeviceid' => Integer, - 'rootdevicetype' => String, - 'hypervisor' => Fog::Nullable::String, - 'group' => Fog::Nullable::String, - 'groupid' => Fog::Nullable::Integer, - 'isoname' => Fog::Nullable::String, - 'isoid' => Fog::Nullable::Integer, - 'securitygroup' => [ - 'id' => Integer, - 'name' => Fog::Nullable::String, - 'description' => Fog::Nullable::String - ], - 'nic' => [ - 'id' => String, - 'networkid' => String, - 'netmask' => String, - 'gateway' => String, - 'ipaddress' => String, - 'traffictype' => String, - 'type' => String, - 'isdefault' => Fog::Boolean, - 'macaddress' => String, - 'broadcasturi' => Fog::Nullable::String, - 'isolationuri' => Fog::Nullable::String - ] - ] - } - } - - tests('success') do - - tests('#list_virtual_machines').formats(@virtual_machines_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_virtual_machines - end - - end - -end diff --git a/tests/cloudstack/requests/volume_tests.rb b/tests/cloudstack/requests/volume_tests.rb deleted file mode 100644 index 925e769f8..000000000 --- a/tests/cloudstack/requests/volume_tests.rb +++ /dev/null @@ -1,47 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | volume requests', ['cloudstack']) do - - @volumes_format = { - 'listvolumesresponse' => { - 'count' => Integer, - 'volume' => [ - 'id' => String, - 'name' => String, - 'zoneid' => String, - 'zonename' => String, - 'type' => String, - 'size' => Integer, - 'created' => String, - 'account' => String, - 'domainid' => String, - 'domain' => String, - 'state' => String, - 'storagetype' => String, - 'hypervisor' => String, - 'diskofferingid' => Fog::Nullable::String, - 'diskofferingname' => Fog::Nullable::String, - 'diskofferingdisplaytext' => Fog::Nullable::String, - 'storage' => String, - 'destroyed' => Fog::Boolean, - 'isextractable' => Fog::Boolean, - 'deviceid' => Fog::Nullable::Integer, - 'virtualmachineid' => Fog::Nullable::String, - 'vmname' => Fog::Nullable::String, - 'vmdisplayname' => Fog::Nullable::String, - 'vmstate' => Fog::Nullable::String, - 'serviceofferingid' => Fog::Nullable::Integer, - 'serviceofferingname' => Fog::Nullable::String, - 'serviceofferingdisplaytext' => Fog::Nullable::String, - 'attached' => Fog::Nullable::String - ] - } - } - - tests('success') do - - tests('#list_volumes').formats(@volumes_format) do - Fog::Compute[:cloudstack].list_volumes('zoneid' => 1) - end - - end - -end diff --git a/tests/cloudstack/requests/zone_tests.rb b/tests/cloudstack/requests/zone_tests.rb deleted file mode 100644 index 74a2e6e30..000000000 --- a/tests/cloudstack/requests/zone_tests.rb +++ /dev/null @@ -1,33 +0,0 @@ -Shindo.tests('Fog::Compute[:cloudstack] | zone requests', ['cloudstack']) do - - @zones_format = { - 'listzonesresponse' => { - 'count' => Integer, - 'zone' => [ - 'id' => Integer, - 'name' => String, - 'dns1' => Fog::Nullable::String, - 'dns2' => Fog::Nullable::String, - 'internaldns1' => Fog::Nullable::String, - 'internaldns2' => Fog::Nullable::String, - 'vlan' => Fog::Nullable::String, - 'guestcidraddress' => Fog::Nullable::String, - 'networktype' => String, - 'securitygroupsenabled' => Fog::Nullable::Boolean, - 'allocationstate' => String, - 'dhcpprovider' => String, - 'zonetoken' => Fog::Nullable::String - ] - } - } - - tests('success') do - - tests('#list_zones').formats(@zones_format) do - pending if Fog.mocking? - Fog::Compute[:cloudstack].list_zones - end - - end - -end diff --git a/tests/cloudstack/signed_params_tests.rb b/tests/cloudstack/signed_params_tests.rb deleted file mode 100644 index 6ba96da0a..000000000 --- a/tests/cloudstack/signed_params_tests.rb +++ /dev/null @@ -1,12 +0,0 @@ -# encoding: utf-8 - -Shindo.tests('Cloudstack | escape', ['cloudstack']) do - returns( Fog::Cloudstack.escape( "'Stöp!' said Fred_-~." ) ) { "%27St%C3%B6p%21%27%20said%20Fred_-%7E." } -end - -Shindo.tests('Cloudstack | signed_params', ['cloudstack']) do - returns( Fog::Cloudstack.signed_params( 'abcdefg', 'account' => 'Lorem Ipsum', 'domainid' => 42, 'q' => 'keywords' ) ) { "V2CxRU4zQQtox1DZsH/66GDdzhg=" } - returns( Fog::Cloudstack.signed_params( 'abcdefg', 'account' => 'Lorem Ipsum', 'domainid' => '42', 'q' => 'keywords' ) ) { "V2CxRU4zQQtox1DZsH/66GDdzhg=" } - returns( Fog::Cloudstack.signed_params( 'abcdefg', 'account' => 'Lorem Ipsum', 'domainid' => 42, 'q' => nil ) ) { "5bsDirm5pPgVoreQ6vquKRN+4HI=" } - returns( Fog::Cloudstack.signed_params( 'abcdefg', 'account' => 'Lorem Ipsum', 'domainid' => 42, 'q' => '' ) ) { "5bsDirm5pPgVoreQ6vquKRN+4HI=" } -end diff --git a/tests/helpers/mock_helper.rb b/tests/helpers/mock_helper.rb index 5e16b9673..7a66c4a52 100644 --- a/tests/helpers/mock_helper.rb +++ b/tests/helpers/mock_helper.rb @@ -15,6 +15,8 @@ if Fog.mock? :ia_secret_access_key => 'aws_secret_access_key', :brightbox_client_id => 'brightbox_client_id', :brightbox_secret => 'brightbox_secret', + :clodo_api_key => 'clodo_api_key', + :clodo_username => 'clodo_username', :cloudstack_disk_offering_id => '', :cloudstack_host => 'http://cloudstack.example.org', :cloudstack_network_ids => '', @@ -22,8 +24,6 @@ if Fog.mock? :cloudstack_template_id => '8a31cf9c-f248-0588-256e-9dbf58785216', :cloudstack_zone_id => 'c554c592-e09c-9df5-7688-4a32754a4305', :cloudstack_project_id => 'f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1', - :clodo_api_key => 'clodo_api_key', - :clodo_username => 'clodo_username', :digitalocean_api_key => 'digitalocean_api_key', :digitalocean_client_id => 'digitalocean_client_id', :digitalocean_token => 'digitalocean_token',