diff --git a/.gitignore b/.gitignore index 44708107ff..76e452d49f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .rvmrc .bundle .DS_Store +.idea coverage doc/* docs/_site/* diff --git a/lib/fog/aws/dns.rb b/lib/fog/aws/dns.rb index 30c1d983f7..353610c8cd 100644 --- a/lib/fog/aws/dns.rb +++ b/lib/fog/aws/dns.rb @@ -89,7 +89,7 @@ def initialize(options={}) @persistent = options[:persistent] || true @port = options[:port] || 443 @scheme = options[:scheme] || 'https' - @version = options[:version] || '2010-10-01' + @version = options[:version] || '2011-05-05' @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options) end diff --git a/lib/fog/aws/models/dns/records.rb b/lib/fog/aws/models/dns/records.rb index c0fee02092..74ab9eb090 100644 --- a/lib/fog/aws/models/dns/records.rb +++ b/lib/fog/aws/models/dns/records.rb @@ -7,12 +7,14 @@ class AWS class Records < Fog::Collection - attribute :is_truncated, :aliases => ['IsTruncated'] - attribute :max_items, :aliases => ['MaxItems'] + attribute :is_truncated, :aliases => ['IsTruncated'] + attribute :max_items, :aliases => ['MaxItems'] attribute :name - attribute :next_record_name, :aliases => ['NextRecordName'] - attribute :next_record_type, :aliases => ['NextRecordType'] + attribute :next_record_name, :aliases => ['NextRecordName'] + attribute :next_record_type, :aliases => ['NextRecordType'] + attribute :next_record_identifier, :aliases => ['NextRecordIdentifier'] attribute :type + attribute :identifier attribute :zone @@ -20,20 +22,92 @@ class Records < Fog::Collection def all(options = {}) requires :zone - options['maxitems'] ||= max_items - options['name'] ||= name - options['type'] ||= type + options[:max_items] ||= max_items + options[:name] ||= zone.domain + options[:type] ||= type + options[:identifier] ||= identifier + options.delete_if {|key, value| value.nil?} + data = connection.list_resource_record_sets(zone.id, options).body - merge_attributes(data.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextRecordName', 'NextRecordType'].include?(key)}) + # NextRecordIdentifier is completely absent instead of nil, so set to nil, or iteration breaks. + data['NextRecordIdentifier'] = nil unless data.has_key?('NextRecordIdentifier') + + merge_attributes(data.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextRecordName', 'NextRecordType', 'NextRecordIdentifier'].include?(key)}) # leave out the default, read only records - data = data['ResourceRecordSets'].reject {|record| ['NS', 'SOA'].include?(record['Type'])} + # data = data['ResourceRecordSets'].reject {|record| ['NS', 'SOA'].include?(record['Type'])} + # AMT: these are not read only + data = data['ResourceRecordSets'] load(data) end - def get(record_id) - data = connection.get_change(record_id).body - new(data) - rescue Excon::Errors::Forbidden + # + # Load all zone records into the collection. + # + def all! + data = [] + + begin + options = { + :name => next_record_name, + :type => next_record_type, + :identifier => next_record_identifier + } + options.delete_if {|key, value| value.nil?} + + batch = connection.list_resource_record_sets(zone.id, options).body + # NextRecordIdentifier is completely absent instead of nil, so set to nil, or iteration breaks. + batch['NextRecordIdentifier'] = nil unless batch.has_key?('NextRecordIdentifier') + + merge_attributes(batch.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextRecordName', 'NextRecordType', 'NextRecordIdentifier'].include?(key)}) + + data.concat(batch['ResourceRecordSets']) + end while is_truncated + + load(data) + end + + # + # AWS Route 53 records are uniquely identified by a compound key of name, type, and identifier. + # #get allows one to retrieve a record using one or more of those key components. + # + # ==== Parameters + # * record_name - The name of the record to retrieve. + # * record_type - The type of record to retrieve, if nil, then the first matching record is returned. + # * record_identifier - The record set identifier to retrieve, if nil, then the first matching record is returned. + # + def get(record_name, record_type = nil, record_identifier = nil) + requires :zone + # Append a trailing period to the record_name if absent. + record_name = record_name + "." unless record_name.end_with?(".") + record_type = record_type.upcase unless record_type.nil? + + options = { + :max_items => 1, + :name => record_name, + :type => record_type, + :identifier => record_identifier + } + options.delete_if {|key, value| value.nil?} + + data = connection.list_resource_record_sets(zone.id, options).body + # Get first record + data = data['ResourceRecordSets'].shift + + if data + record = new(data) + # make sure everything matches + if record.name == record_name + if (!record_type.nil? && record.type != record_type) || + (!record_identifier.nil? && record.set_identifier != record_identifier) + nil + else + record + end + end + else + nil + end + rescue Excon::Errors::NotFound nil end diff --git a/lib/fog/aws/requests/dns/change_resource_record_sets.rb b/lib/fog/aws/requests/dns/change_resource_record_sets.rb index 23728e62cc..7d0d5d9cbd 100644 --- a/lib/fog/aws/requests/dns/change_resource_record_sets.rb +++ b/lib/fog/aws/requests/dns/change_resource_record_sets.rb @@ -40,32 +40,42 @@ def change_resource_record_sets(zone_id, change_batch, options = {}) optional_tags+= "#{value}" end } - + #build XML if change_batch.count > 0 - + changes= "#{optional_tags}" - + change_batch.each { |change_item| action_tag = %Q{#{change_item[:action]}} name_tag = %Q{#{change_item[:name]}} type_tag = %Q{#{change_item[:type]}} ttl_tag = %Q{#{change_item[:ttl]}} + + raise "Weighted records require a 'setidentifier' and 'weight' tag to be specified, but you only specified the #{change_item[:setidentifier].nil?? 'weight' : 'setidentifier'}" if (change_item[:weight].nil? and !change_item[:setidentifier].nil?) or (!change_item[:weight].nil? and change_item[:setidentifier].nil?) + identifier_tag = %Q{#{change_item[:setidentifier]}} unless change_item[:setidentifier].nil? + weight_tag = %Q{#{change_item[:weight]}} unless change_item[:weight].nil? + resource_records= change_item[:resource_records] resource_record_tags = '' resource_records.each { |record| resource_record_tags+= %Q{#{record}} } resource_tag= %Q{#{resource_record_tags}} - - change_tags = %Q{#{action_tag}#{name_tag}#{type_tag}#{ttl_tag}#{resource_tag}} + + if (change_item[:weight].nil? and change_item[:setidentifier].nil?) + change_tags = %Q{#{action_tag}#{name_tag}#{type_tag}#{ttl_tag}#{resource_tag}} + else + change_tags = %Q{#{action_tag}#{name_tag}#{type_tag}#{identifier_tag}#{weight_tag}#{ttl_tag}#{resource_tag}} + end changes+= change_tags } - + changes+= '' + puts "@@@ SENDING @@@\n#{changes}\n\n" end - body = %Q{#{changes}} + body = %Q{#{changes}} request({ :body => body, :parser => Fog::Parsers::DNS::AWS::ChangeResourceRecordSets.new, diff --git a/lib/fog/aws/requests/dns/create_hosted_zone.rb b/lib/fog/aws/requests/dns/create_hosted_zone.rb index 4a26142cd8..5acaed1566 100644 --- a/lib/fog/aws/requests/dns/create_hosted_zone.rb +++ b/lib/fog/aws/requests/dns/create_hosted_zone.rb @@ -44,7 +44,7 @@ def create_hosted_zone(name, options = {}) end request({ - :body => %Q{#{name}#{optional_tags}}, + :body => %Q{#{name}#{optional_tags}}, :parser => Fog::Parsers::DNS::AWS::CreateHostedZone.new, :expects => 201, :method => 'POST', diff --git a/lib/fog/cloudstack/compute.rb b/lib/fog/cloudstack/compute.rb index 4493e1a8b3..e62e1a63bf 100644 --- a/lib/fog/cloudstack/compute.rb +++ b/lib/fog/cloudstack/compute.rb @@ -17,16 +17,22 @@ class Unauthorized < Fog::Compute::Cloudstack::Error; end request_path 'fog/cloudstack/requests/compute' request :acquire_ip_address + request :add_vpn_user request :assign_to_load_balancer_rule request :attach_volume request :authorize_security_group_ingress + request :authorize_security_group_egress request :change_service_for_virtual_machine request :copy_template request :create_account request :create_domain + request :create_egress_firewall_rule + request :create_firewall_rule + request :create_ip_forwarding_rule request :create_load_balancer_rule request :create_network request :create_port_forwarding_rule + request :create_remote_access_vpn request :create_security_group request :create_ssh_key_pair request :create_snapshot @@ -35,9 +41,14 @@ class Unauthorized < Fog::Compute::Cloudstack::Error; end request :create_volume request :delete_account request :delete_domain + request :delete_egress_firewall_rule + request :delete_firewall_rule + request :delete_ip_forwarding_rule request :delete_load_balancer_rule request :delete_port_forwarding_rule + request :delete_network request :delete_security_group + request :delete_remote_access_vpn request :delete_ssh_key_pair request :delete_snapshot request :delete_snapshot_policies @@ -45,9 +56,13 @@ class Unauthorized < Fog::Compute::Cloudstack::Error; end request :delete_volume request :detach_volume request :deploy_virtual_machine + request :destroy_router request :destroy_virtual_machine request :disable_user + request :disable_static_nat + request :disassociate_ip_address request :enable_user + request :enable_static_nat request :generate_usage_records request :get_vm_password request :list_accounts @@ -61,13 +76,16 @@ class Unauthorized < Fog::Compute::Cloudstack::Error; end request :list_capacity request :list_domains request :list_domain_children + request :list_egress_firewall_rules request :list_events request :list_external_firewalls request :list_external_load_balancers + request :list_firewall_rules request :list_hosts request :list_hypervisors request :list_instance_groups request :list_isos + request :list_ip_forwarding_rules request :list_load_balancer_rules request :list_load_balancer_rule_instances request :list_network_offerings @@ -77,7 +95,9 @@ class Unauthorized < Fog::Compute::Cloudstack::Error; end request :list_pods request :list_port_forwarding_rules request :list_public_ip_addresses + request :list_remote_access_vpns request :list_resource_limits + request :list_routers request :list_security_groups request :list_service_offerings request :list_snapshots @@ -89,20 +109,28 @@ class Unauthorized < Fog::Compute::Cloudstack::Error; end request :list_users request :list_virtual_machines request :list_volumes + request :list_vpn_users request :list_zones request :migrate_virtual_machine request :query_async_job_result + request :reboot_router request :reboot_virtual_machine request :recover_virtual_machine request :register_ssh_key_pair request :register_user_keys request :remove_from_load_balancer_rule + request :remove_vpn_user + request :restart_network request :reset_password_for_virtual_machine request :revoke_security_group_ingress + request :revoke_security_group_egress + request :start_router request :start_virtual_machine request :stop_virtual_machine + request :stop_router request :update_account request :update_domain + request :update_network request :update_user request :update_resource_count request :update_virtual_machine diff --git a/lib/fog/cloudstack/requests/compute/add_vpn_user.rb b/lib/fog/cloudstack/requests/compute/add_vpn_user.rb new file mode 100644 index 0000000000..070a34137f --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/add_vpn_user.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Adds a vpn user. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/addVpnUser.html] + def add_vpn_user(options={}) + options.merge!( + 'command' => 'addVpnUser' + ) + + request(options) + 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 new file mode 100644 index 0000000000..e621db1c4b --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/authorize_security_group_egress.rb @@ -0,0 +1,22 @@ +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/authorizeSecurityGroupEgress.html] + def authorize_security_group_egress(options={}) + options.merge!( + 'command' => 'authorizeSecurityGroupEgress' + ) + + 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 new file mode 100644 index 0000000000..39bc75a910 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/create_egress_firewall_rule.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a firewall rule. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/createEgressFirewallRule.html] + def create_egress_firewall_rule(options={}) + options.merge!( + 'command' => 'createEgressFirewallRule' + ) + + request(options) + 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 new file mode 100644 index 0000000000..98b8f16740 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/create_firewall_rule.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a firewall rule. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/createFirewallRule.html] + def create_firewall_rule(options={}) + options.merge!( + 'command' => 'createFirewallRule' + ) + + 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 new file mode 100644 index 0000000000..b2af6f645f --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/create_ip_forwarding_rule.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a domain. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/createIpForwardingRule.html] + def create_ip_forwarding_rule(options={}) + options.merge!( + 'command' => 'createIpForwardingRule' + ) + + 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 new file mode 100644 index 0000000000..2b44d1114d --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/create_remote_access_vpn.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a vpn rule + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/createRemoteAccessVpn.html] + def create_remote_access_vpn(options={}) + options.merge!( + 'command' => 'createRemoteAccessVpn' + ) + + 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 new file mode 100644 index 0000000000..c9b7fc1fde --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/delete_egress_firewall_rule.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Deletes a firewall rule. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/deleteEgressFirewallRule.html] + def delete_egress_firewall_rule(options={}) + options.merge!( + 'command' => 'deleteEgressFirewallRule' + ) + + 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 new file mode 100644 index 0000000000..9bffd46b4c --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/delete_firewall_rule.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Deletes a firewall rule. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/deleteFirewallRule.html] + def delete_firewall_rule(options={}) + options.merge!( + 'command' => 'deleteFirewallRule' + ) + + 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 new file mode 100644 index 0000000000..0a9a3bd9ec --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/delete_ip_forwarding_rule.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a domain. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/deleteIpForwardingRule.html] + def delete_ip_forwarding_rule(options={}) + options.merge!( + 'command' => 'deleteIpForwardingRule' + ) + + 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 new file mode 100644 index 0000000000..2e0664b27c --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/delete_network.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a domain. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/deleteNetwork.html] + def delete_network(options={}) + options.merge!( + 'command' => 'deleteNetwork' + ) + + 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 new file mode 100644 index 0000000000..7eaa312471 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/delete_remote_access_vpn.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Deletes a specified user. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/deleteRemoteAccessVpn.html] + def delete_remote_access_vpn(options={}) + options.merge!( + 'command' => 'deleteRemoteAccessVpn' + ) + + 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 new file mode 100644 index 0000000000..c86516155a --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/destroy_router.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/destroyRouter.html] + def destroy_router(options={}) + options.merge!( + 'command' => 'destroyRouter' + ) + + 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 new file mode 100644 index 0000000000..f0d13af2d5 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/disable_static_nat.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Disables a user account. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/disableStaticNat.html] + def disable_static_nat(options={}) + options.merge!( + 'command' => 'disableStaticNat' + ) + + request(options) + end + + end + end + end +end \ No newline at end of file diff --git a/lib/fog/cloudstack/requests/compute/disassociate_ip_address.rb b/lib/fog/cloudstack/requests/compute/disassociate_ip_address.rb new file mode 100644 index 0000000000..60b3126a5e --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/disassociate_ip_address.rb @@ -0,0 +1,21 @@ +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/disassociateIpAddress.html] + def disassociate_ip_address(options={}) + options.merge!( + 'command' => 'disassociateIpAddress' + ) + + 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 new file mode 100644 index 0000000000..cdaba90280 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/enable_static_nat.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Disables a user account. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/enableStaticNat.html] + def enable_static_nat(options={}) + options.merge!( + 'command' => 'enableStaticNat' + ) + + 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 new file mode 100644 index 0000000000..9fb374b3ab --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/list_egress_firewall_rules.rb @@ -0,0 +1,22 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists firewall rules. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/listEgressFirewallRules.html] + def list_egress_firewall_rules(options={}) + options.merge!( + 'command' => 'listEgressFirewallRules' + ) + + 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 new file mode 100644 index 0000000000..aba980a069 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/list_firewall_rules.rb @@ -0,0 +1,22 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists firewall rules. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/listFirewallRules.html] + def list_firewall_rules(options={}) + options.merge!( + 'command' => 'listFirewallRules' + ) + + 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 new file mode 100644 index 0000000000..acc385920a --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/list_ip_forwarding_rules.rb @@ -0,0 +1,22 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/listIpForwardingRules.html] + def list_ip_forwarding_rules(options={}) + options.merge!( + 'command' => 'listIpForwardingRules' + ) + + 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 new file mode 100644 index 0000000000..a0affe6984 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/list_remote_access_vpns.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/listRemoteAccessVpns.html] + def list_remote_access_vpns(options={}) + options.merge!( + 'command' => 'listRemoteAccessVpns' + ) + + request(options) + end + + end + end + end +end \ No newline at end of file diff --git a/lib/fog/cloudstack/requests/compute/list_routers.rb b/lib/fog/cloudstack/requests/compute/list_routers.rb new file mode 100644 index 0000000000..8fd9c57618 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/list_routers.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/listResourceLimits.html] + def list_routers(options={}) + options.merge!( + 'command' => 'listRouters' + ) + + 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 new file mode 100644 index 0000000000..7f6a864759 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/list_vpn_users.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists a vpn users. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/listVpnUsers.html] + def list_vpn_users(options={}) + options.merge!( + 'command' => 'listVpnUsers' + ) + + request(options) + 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 new file mode 100644 index 0000000000..8adb7949f3 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/reboot_router.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/listResourceLimits.html] + def reboot_router(options={}) + options.merge!( + 'command' => 'rebootRouter' + ) + + 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 new file mode 100644 index 0000000000..3f584b8802 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/remove_vpn_user.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Removes a vpn user. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.14/user/removeVpnUser.html] + def remove_vpn_user(options={}) + options.merge!( + 'command' => 'removeVpnUser' + ) + + 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 new file mode 100644 index 0000000000..9b9ce2aa7a --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/restart_network.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a domain. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/restartNetwork.html] + def restart_network(options={}) + options.merge!( + 'command' => 'restartNetwork' + ) + + request(options) + end + + end + end + end +end \ No newline at end of file diff --git a/lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb b/lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb new file mode 100644 index 0000000000..a120c6123a --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/revoke_security_group_egress.rb @@ -0,0 +1,21 @@ +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/authorizeSecurityGroupEgress.html] + def revoke_security_group_egress(options={}) + options.merge!( + 'command' => 'revokeSecurityGroupEgress' + ) + + 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 new file mode 100644 index 0000000000..c1277cf168 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/start_router.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/startRouter.html] + def start_router(options={}) + options.merge!( + 'command' => 'startRouter' + ) + + 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 new file mode 100644 index 0000000000..c7a4f14eac --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/stop_router.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Lists resource limits. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/stopRouter.html] + def stop_router(options={}) + options.merge!( + 'command' => 'stopRouter' + ) + + 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 new file mode 100644 index 0000000000..50e6a8e3c4 --- /dev/null +++ b/lib/fog/cloudstack/requests/compute/update_network.rb @@ -0,0 +1,20 @@ +module Fog + module Compute + class Cloudstack + class Real + + # Creates a domain. + # + # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/updateNetwork.html] + def update_network(options={}) + options.merge!( + 'command' => 'updateNetwork' + ) + + request(options) + end + + end + end + end +end \ No newline at end of file