1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

defer requires to initialize time, speeding load time for those using fewer services

This commit is contained in:
geemus (Wesley Beary) 2010-04-03 00:33:35 -07:00
parent eb09931c2d
commit 509bf6e469
7 changed files with 154 additions and 147 deletions

View file

@ -1,55 +1,56 @@
require 'fog/aws/models/ec2/address'
require 'fog/aws/models/ec2/addresses'
require 'fog/aws/models/ec2/flavor'
require 'fog/aws/models/ec2/flavors'
require 'fog/aws/models/ec2/image'
require 'fog/aws/models/ec2/images'
require 'fog/aws/models/ec2/key_pair'
require 'fog/aws/models/ec2/key_pairs'
require 'fog/aws/models/ec2/security_group'
require 'fog/aws/models/ec2/security_groups'
require 'fog/aws/models/ec2/server'
require 'fog/aws/models/ec2/servers'
require 'fog/aws/models/ec2/snapshot'
require 'fog/aws/models/ec2/snapshots'
require 'fog/aws/models/ec2/volume'
require 'fog/aws/models/ec2/volumes'
require 'fog/aws/requests/ec2/allocate_address'
require 'fog/aws/requests/ec2/associate_address'
require 'fog/aws/requests/ec2/attach_volume'
require 'fog/aws/requests/ec2/authorize_security_group_ingress'
require 'fog/aws/requests/ec2/create_key_pair'
require 'fog/aws/requests/ec2/create_security_group'
require 'fog/aws/requests/ec2/create_snapshot'
require 'fog/aws/requests/ec2/create_volume'
require 'fog/aws/requests/ec2/delete_key_pair'
require 'fog/aws/requests/ec2/delete_security_group'
require 'fog/aws/requests/ec2/delete_snapshot'
require 'fog/aws/requests/ec2/delete_volume'
require 'fog/aws/requests/ec2/describe_addresses'
require 'fog/aws/requests/ec2/describe_availability_zones'
require 'fog/aws/requests/ec2/describe_images'
require 'fog/aws/requests/ec2/describe_instances'
require 'fog/aws/requests/ec2/describe_reserved_instances'
require 'fog/aws/requests/ec2/describe_key_pairs'
require 'fog/aws/requests/ec2/describe_regions'
require 'fog/aws/requests/ec2/describe_security_groups'
require 'fog/aws/requests/ec2/describe_snapshots'
require 'fog/aws/requests/ec2/describe_volumes'
require 'fog/aws/requests/ec2/detach_volume'
require 'fog/aws/requests/ec2/disassociate_address'
require 'fog/aws/requests/ec2/get_console_output'
require 'fog/aws/requests/ec2/reboot_instances'
require 'fog/aws/requests/ec2/release_address'
require 'fog/aws/requests/ec2/revoke_security_group_ingress'
require 'fog/aws/requests/ec2/run_instances'
require 'fog/aws/requests/ec2/terminate_instances'
module Fog
module AWS
module EC2
def self.new(options={})
require 'fog/aws/models/ec2/address'
require 'fog/aws/models/ec2/addresses'
require 'fog/aws/models/ec2/flavor'
require 'fog/aws/models/ec2/flavors'
require 'fog/aws/models/ec2/image'
require 'fog/aws/models/ec2/images'
require 'fog/aws/models/ec2/key_pair'
require 'fog/aws/models/ec2/key_pairs'
require 'fog/aws/models/ec2/security_group'
require 'fog/aws/models/ec2/security_groups'
require 'fog/aws/models/ec2/server'
require 'fog/aws/models/ec2/servers'
require 'fog/aws/models/ec2/snapshot'
require 'fog/aws/models/ec2/snapshots'
require 'fog/aws/models/ec2/volume'
require 'fog/aws/models/ec2/volumes'
require 'fog/aws/requests/ec2/allocate_address'
require 'fog/aws/requests/ec2/associate_address'
require 'fog/aws/requests/ec2/attach_volume'
require 'fog/aws/requests/ec2/authorize_security_group_ingress'
require 'fog/aws/requests/ec2/create_key_pair'
require 'fog/aws/requests/ec2/create_security_group'
require 'fog/aws/requests/ec2/create_snapshot'
require 'fog/aws/requests/ec2/create_volume'
require 'fog/aws/requests/ec2/delete_key_pair'
require 'fog/aws/requests/ec2/delete_security_group'
require 'fog/aws/requests/ec2/delete_snapshot'
require 'fog/aws/requests/ec2/delete_volume'
require 'fog/aws/requests/ec2/describe_addresses'
require 'fog/aws/requests/ec2/describe_availability_zones'
require 'fog/aws/requests/ec2/describe_images'
require 'fog/aws/requests/ec2/describe_instances'
require 'fog/aws/requests/ec2/describe_reserved_instances'
require 'fog/aws/requests/ec2/describe_key_pairs'
require 'fog/aws/requests/ec2/describe_regions'
require 'fog/aws/requests/ec2/describe_security_groups'
require 'fog/aws/requests/ec2/describe_snapshots'
require 'fog/aws/requests/ec2/describe_volumes'
require 'fog/aws/requests/ec2/detach_volume'
require 'fog/aws/requests/ec2/disassociate_address'
require 'fog/aws/requests/ec2/get_console_output'
require 'fog/aws/requests/ec2/reboot_instances'
require 'fog/aws/requests/ec2/release_address'
require 'fog/aws/requests/ec2/revoke_security_group_ingress'
require 'fog/aws/requests/ec2/run_instances'
require 'fog/aws/requests/ec2/terminate_instances'
unless options[:aws_access_key_id]
raise ArgumentError.new('aws_access_key_id is required to access ec2')
end

View file

@ -1,25 +1,26 @@
require 'fog/aws/models/s3/directories'
require 'fog/aws/models/s3/directory'
require 'fog/aws/models/s3/files'
require 'fog/aws/models/s3/file'
require 'fog/aws/requests/s3/copy_object'
require 'fog/aws/requests/s3/delete_bucket'
require 'fog/aws/requests/s3/delete_object'
require 'fog/aws/requests/s3/get_bucket'
require 'fog/aws/requests/s3/get_bucket_location'
require 'fog/aws/requests/s3/get_object'
require 'fog/aws/requests/s3/get_request_payment'
require 'fog/aws/requests/s3/get_service'
require 'fog/aws/requests/s3/head_object'
require 'fog/aws/requests/s3/put_bucket'
require 'fog/aws/requests/s3/put_object'
require 'fog/aws/requests/s3/put_request_payment'
module Fog
module AWS
module S3
def self.new(options={})
require 'fog/aws/models/s3/directories'
require 'fog/aws/models/s3/directory'
require 'fog/aws/models/s3/files'
require 'fog/aws/models/s3/file'
require 'fog/aws/requests/s3/copy_object'
require 'fog/aws/requests/s3/delete_bucket'
require 'fog/aws/requests/s3/delete_object'
require 'fog/aws/requests/s3/get_bucket'
require 'fog/aws/requests/s3/get_bucket_location'
require 'fog/aws/requests/s3/get_object'
require 'fog/aws/requests/s3/get_request_payment'
require 'fog/aws/requests/s3/get_service'
require 'fog/aws/requests/s3/head_object'
require 'fog/aws/requests/s3/put_bucket'
require 'fog/aws/requests/s3/put_object'
require 'fog/aws/requests/s3/put_request_payment'
if Fog.mocking?
Fog::AWS::S3::Mock.new(options)
else

View file

@ -1,18 +1,19 @@
require 'fog/aws/requests/simpledb/batch_put_attributes'
require 'fog/aws/requests/simpledb/create_domain'
require 'fog/aws/requests/simpledb/delete_attributes'
require 'fog/aws/requests/simpledb/delete_domain'
require 'fog/aws/requests/simpledb/domain_metadata'
require 'fog/aws/requests/simpledb/get_attributes'
require 'fog/aws/requests/simpledb/list_domains'
require 'fog/aws/requests/simpledb/put_attributes'
require 'fog/aws/requests/simpledb/select'
module Fog
module AWS
module SimpleDB
def self.new(options={})
require 'fog/aws/requests/simpledb/batch_put_attributes'
require 'fog/aws/requests/simpledb/create_domain'
require 'fog/aws/requests/simpledb/delete_attributes'
require 'fog/aws/requests/simpledb/delete_domain'
require 'fog/aws/requests/simpledb/domain_metadata'
require 'fog/aws/requests/simpledb/get_attributes'
require 'fog/aws/requests/simpledb/list_domains'
require 'fog/aws/requests/simpledb/put_attributes'
require 'fog/aws/requests/simpledb/select'
if Fog.mocking?
Fog::AWS::SimpleDB::Mock.new(options)
else

View file

@ -1,23 +1,24 @@
require 'fog/rackspace/models/files/directory'
require 'fog/rackspace/models/files/directories'
require 'fog/rackspace/models/files/file'
require 'fog/rackspace/models/files/files'
require 'fog/rackspace/requests/files/delete_container'
require 'fog/rackspace/requests/files/delete_object'
require 'fog/rackspace/requests/files/get_container'
require 'fog/rackspace/requests/files/get_containers'
require 'fog/rackspace/requests/files/get_object'
require 'fog/rackspace/requests/files/head_container'
require 'fog/rackspace/requests/files/head_containers'
require 'fog/rackspace/requests/files/head_object'
require 'fog/rackspace/requests/files/put_container'
require 'fog/rackspace/requests/files/put_object'
module Fog
module Rackspace
module Files
def self.new(options={})
require 'fog/rackspace/models/files/directory'
require 'fog/rackspace/models/files/directories'
require 'fog/rackspace/models/files/file'
require 'fog/rackspace/models/files/files'
require 'fog/rackspace/requests/files/delete_container'
require 'fog/rackspace/requests/files/delete_object'
require 'fog/rackspace/requests/files/get_container'
require 'fog/rackspace/requests/files/get_containers'
require 'fog/rackspace/requests/files/get_object'
require 'fog/rackspace/requests/files/head_container'
require 'fog/rackspace/requests/files/head_containers'
require 'fog/rackspace/requests/files/head_object'
require 'fog/rackspace/requests/files/put_container'
require 'fog/rackspace/requests/files/put_object'
if Fog.mocking?
Fog::Rackspace::Files::Mock.new(options)
else

View file

@ -1,32 +1,33 @@
require 'fog/rackspace/models/servers/flavor'
require 'fog/rackspace/models/servers/flavors'
require 'fog/rackspace/models/servers/image'
require 'fog/rackspace/models/servers/images'
require 'fog/rackspace/models/servers/server'
require 'fog/rackspace/models/servers/servers'
require 'fog/rackspace/requests/servers/create_image'
require 'fog/rackspace/requests/servers/create_server'
require 'fog/rackspace/requests/servers/delete_image'
require 'fog/rackspace/requests/servers/delete_server'
require 'fog/rackspace/requests/servers/get_flavor_details'
require 'fog/rackspace/requests/servers/get_server_details'
require 'fog/rackspace/requests/servers/list_addresses'
require 'fog/rackspace/requests/servers/list_private_addresses'
require 'fog/rackspace/requests/servers/list_public_addresses'
require 'fog/rackspace/requests/servers/list_flavors'
require 'fog/rackspace/requests/servers/list_flavors_detail'
require 'fog/rackspace/requests/servers/list_images'
require 'fog/rackspace/requests/servers/list_images_detail'
require 'fog/rackspace/requests/servers/list_servers'
require 'fog/rackspace/requests/servers/list_servers_detail'
require 'fog/rackspace/requests/servers/reboot_server'
require 'fog/rackspace/requests/servers/update_server'
module Fog
module Rackspace
module Servers
def self.new(options={})
require 'fog/rackspace/models/servers/flavor'
require 'fog/rackspace/models/servers/flavors'
require 'fog/rackspace/models/servers/image'
require 'fog/rackspace/models/servers/images'
require 'fog/rackspace/models/servers/server'
require 'fog/rackspace/models/servers/servers'
require 'fog/rackspace/requests/servers/create_image'
require 'fog/rackspace/requests/servers/create_server'
require 'fog/rackspace/requests/servers/delete_image'
require 'fog/rackspace/requests/servers/delete_server'
require 'fog/rackspace/requests/servers/get_flavor_details'
require 'fog/rackspace/requests/servers/get_server_details'
require 'fog/rackspace/requests/servers/list_addresses'
require 'fog/rackspace/requests/servers/list_private_addresses'
require 'fog/rackspace/requests/servers/list_public_addresses'
require 'fog/rackspace/requests/servers/list_flavors'
require 'fog/rackspace/requests/servers/list_flavors_detail'
require 'fog/rackspace/requests/servers/list_images'
require 'fog/rackspace/requests/servers/list_images_detail'
require 'fog/rackspace/requests/servers/list_servers'
require 'fog/rackspace/requests/servers/list_servers_detail'
require 'fog/rackspace/requests/servers/reboot_server'
require 'fog/rackspace/requests/servers/update_server'
if Fog.mocking?
Fog::Rackspace::Servers::Mock.new(options)
else

View file

@ -1,24 +1,25 @@
require 'fog/slicehost/models/flavor'
require 'fog/slicehost/models/flavors'
require 'fog/slicehost/models/image'
require 'fog/slicehost/models/images'
require 'fog/slicehost/models/server'
require 'fog/slicehost/models/servers'
require 'fog/slicehost/requests/create_slice'
require 'fog/slicehost/requests/delete_slice'
require 'fog/slicehost/requests/get_backups'
require 'fog/slicehost/requests/get_flavor'
require 'fog/slicehost/requests/get_flavors'
require 'fog/slicehost/requests/get_image'
require 'fog/slicehost/requests/get_images'
require 'fog/slicehost/requests/get_slice'
require 'fog/slicehost/requests/get_slices'
require 'fog/slicehost/requests/reboot_slice'
module Fog
module Slicehost
def self.new(options={})
require 'fog/slicehost/models/flavor'
require 'fog/slicehost/models/flavors'
require 'fog/slicehost/models/image'
require 'fog/slicehost/models/images'
require 'fog/slicehost/models/server'
require 'fog/slicehost/models/servers'
require 'fog/slicehost/requests/create_slice'
require 'fog/slicehost/requests/delete_slice'
require 'fog/slicehost/requests/get_backups'
require 'fog/slicehost/requests/get_flavor'
require 'fog/slicehost/requests/get_flavors'
require 'fog/slicehost/requests/get_image'
require 'fog/slicehost/requests/get_images'
require 'fog/slicehost/requests/get_slice'
require 'fog/slicehost/requests/get_slices'
require 'fog/slicehost/requests/reboot_slice'
unless options[:slicehost_password]
raise ArgumentError.new('slicehost_password is required to access slicehost')
end

View file

@ -1,24 +1,25 @@
require 'fog/terremark/requests/delete_vapp'
require 'fog/terremark/requests/deploy_vapp'
require 'fog/terremark/requests/get_catalog'
require 'fog/terremark/requests/get_catalog_item'
require 'fog/terremark/requests/get_organization'
require 'fog/terremark/requests/get_organizations'
require 'fog/terremark/requests/get_task'
require 'fog/terremark/requests/get_tasks_list'
require 'fog/terremark/requests/get_vapp'
require 'fog/terremark/requests/get_vapp_template'
require 'fog/terremark/requests/get_vdc'
require 'fog/terremark/requests/instantiate_vapp_template'
require 'fog/terremark/requests/reset'
require 'fog/terremark/requests/power_off'
require 'fog/terremark/requests/power_on'
require 'fog/terremark/requests/shutdown'
module Fog
module Terremark
def self.new(options={})
require 'fog/terremark/requests/delete_vapp'
require 'fog/terremark/requests/deploy_vapp'
require 'fog/terremark/requests/get_catalog'
require 'fog/terremark/requests/get_catalog_item'
require 'fog/terremark/requests/get_organization'
require 'fog/terremark/requests/get_organizations'
require 'fog/terremark/requests/get_task'
require 'fog/terremark/requests/get_tasks_list'
require 'fog/terremark/requests/get_vapp'
require 'fog/terremark/requests/get_vapp_template'
require 'fog/terremark/requests/get_vdc'
require 'fog/terremark/requests/instantiate_vapp_template'
require 'fog/terremark/requests/reset'
require 'fog/terremark/requests/power_off'
require 'fog/terremark/requests/power_on'
require 'fog/terremark/requests/shutdown'
unless options[:terremark_password]
raise ArgumentError.new('terremark_password is required to access terremark')
end