### Home Classes Methods

### In Files

- lib/fog/aws/requests/compute/unmonitor_instances.rb
- lib/fog/aws/requests/compute/describe_availability_zones.rb
- lib/fog/aws/requests/compute/describe_regions.rb
- lib/fog/aws/requests/compute/allocate_address.rb
- lib/fog/aws/requests/compute/delete_dhcp_options.rb
- lib/fog/aws/requests/compute/detach_network_interface.rb
- lib/fog/aws/requests/compute/delete_key_pair.rb
- lib/fog/aws/requests/compute/create_volume.rb
- lib/fog/aws/requests/compute/revoke_security_group_ingress.rb
- lib/fog/aws/requests/compute/copy_snapshot.rb
- lib/fog/aws/requests/compute/release_address.rb
- lib/fog/aws/requests/compute/delete_subnet.rb
- lib/fog/aws/requests/compute/delete_vpc.rb
- lib/fog/aws/requests/compute/describe_instances.rb
- lib/fog/aws/requests/compute/describe_volume_status.rb
- lib/fog/aws/requests/compute/describe_vpcs.rb
- lib/fog/aws/requests/compute/attach_internet_gateway.rb
- lib/fog/aws/requests/compute/associate_address.rb
- lib/fog/aws/requests/compute/create_key_pair.rb
- lib/fog/aws/requests/compute/create_internet_gateway.rb
- lib/fog/aws/requests/compute/modify_volume_attribute.rb
- lib/fog/aws/requests/compute/describe_key_pairs.rb
- lib/fog/aws/requests/compute/deregister_image.rb
- lib/fog/aws/requests/compute/get_console_output.rb
- lib/fog/aws/requests/compute/describe_instance_status.rb
- lib/fog/aws/requests/compute/create_network_interface.rb
- lib/fog/aws/requests/compute/describe_snapshots.rb
- lib/fog/aws/requests/compute/run_instances.rb
- lib/fog/aws/requests/compute/terminate_instances.rb
- lib/fog/aws/requests/compute/delete_security_group.rb
- lib/fog/aws/requests/compute/delete_network_interface.rb
- lib/fog/aws/requests/compute/monitor_instances.rb
- lib/fog/aws/requests/compute/import_key_pair.rb
- lib/fog/aws/requests/compute/create_dhcp_options.rb
- lib/fog/aws/requests/compute/reset_network_interface_attribute.rb
- lib/fog/aws/requests/compute/stop_instances.rb
- lib/fog/aws/requests/compute/describe_images.rb
- lib/fog/aws/requests/compute/describe_subnets.rb
- lib/fog/aws/requests/compute/detach_volume.rb
- lib/fog/aws/requests/compute/attach_volume.rb
- lib/fog/aws/requests/compute/describe_dhcp_options.rb
- lib/fog/aws/requests/compute/create_image.rb
- lib/fog/aws/requests/compute/get_password_data.rb
- lib/fog/aws/requests/compute/describe_volumes.rb
- lib/fog/aws/requests/compute/delete_internet_gateway.rb
- lib/fog/aws/requests/compute/create_tags.rb
- lib/fog/aws/requests/compute/reboot_instances.rb
- lib/fog/aws/requests/compute/describe_tags.rb
- lib/fog/aws/requests/compute/delete_tags.rb
- lib/fog/aws/requests/compute/modify_network_interface_attribute.rb
- lib/fog/aws/requests/compute/register_image.rb
- lib/fog/aws/requests/compute/modify_image_attribute.rb
- lib/fog/aws/requests/compute/create_subnet.rb
- lib/fog/aws/requests/compute/describe_addresses.rb
- lib/fog/aws/requests/compute/delete_volume.rb
- lib/fog/aws/requests/compute/detach_internet_gateway.rb
- lib/fog/aws/requests/compute/disassociate_address.rb
- lib/fog/aws/requests/compute/start_instances.rb
- lib/fog/aws/requests/compute/create_vpc.rb
- lib/fog/aws/requests/compute/describe_network_interface_attribute.rb
- lib/fog/aws/requests/compute/describe_security_groups.rb
- lib/fog/aws/requests/compute/describe_network_interfaces.rb
- lib/fog/aws/requests/compute/create_security_group.rb
- lib/fog/aws/requests/compute/create_snapshot.rb
- lib/fog/aws/requests/compute/authorize_security_group_ingress.rb
- lib/fog/aws/requests/compute/attach_network_interface.rb
- lib/fog/aws/requests/compute/associate_dhcp_options.rb
- lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb
- lib/fog/aws/requests/compute/describe_reserved_instances.rb
- lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb
- lib/fog/aws/requests/compute/delete_snapshot.rb
- lib/fog/aws/requests/compute/describe_internet_gateways.rb
- lib/fog/aws/compute.rb

### Parent

Object

### Methods

- ::data
- ::new
- ::reset
- #allocate_address
- #apply_tag_filters
- #associate_address
- #associate_dhcp_options
- #attach_internet_gateway
- #attach_network_interface
- #attach_volume
- #authorize_security_group_ingress
- #copy_snapshot
- #create_dhcp_options
- #create_image
- #create_internet_gateway
- #create_key_pair
- #create_network_interface
- #create_security_group
- #create_snapshot
- #create_subnet
- #create_tags
- #create_volume
- #create_vpc
- #data
- #delete_dhcp_options
- #delete_internet_gateway
- #delete_key_pair
- #delete_network_interface
- #delete_security_group
- #delete_snapshot
- #delete_subnet
- #delete_tags
- #delete_volume
- #delete_vpc
- #deregister_image
- #describe_addresses
- #describe_availability_zones
- #describe_dhcp_options
- #describe_images
- #describe_instance_status
- #describe_instances
- #describe_internet_gateways
- #describe_key_pairs
- #describe_network_interface_attribute
- #describe_network_interfaces
- #describe_regions
- #describe_reserved_instances
- #describe_reserved_instances_offerings
- #describe_security_groups
- #describe_snapshots
- #describe_subnets
- #describe_tags
- #describe_volume_status
- #describe_volumes
- #describe_vpcs
- #detach_internet_gateway
- #detach_network_interface
- #detach_volume
- #disassociate_address
- #get_console_output
- #get_password_data
- #import_key_pair
- #modify_image_attribute
- #modify_network_interface_attribute
- #modify_volume_attribute
- #monitor_instances
- #purchase_reserved_instances_offering
- #reboot_instances
- #region_data
- #register_image
- #release_address
- #reset_data
- #reset_network_interface_attribute
- #revoke_security_group_ingress
- #run_instances
- #setup_credentials
- #start_instances
- #stop_instances
- #terminate_instances
- #unmonitor_instances
- #visible_images

### Included Modules

- Fog::AWS::CredentialFetcher::ConnectionMethods

### Files

- README_HP.rdoc
- lorem.txt

### Class/Module Index

Quicksearch

- Fog
- Fog::AWS
- Fog::AWS::AutoScaling
- Fog::AWS::AutoScaling::Activities
- Fog::AWS::AutoScaling::Activity
- Fog::AWS::AutoScaling::Configuration
- Fog::AWS::AutoScaling::Configurations
- Fog::AWS::AutoScaling::Group
- Fog::AWS::AutoScaling::Groups
- Fog::AWS::AutoScaling::IdentifierTaken
- Fog::AWS::AutoScaling::Instance
- Fog::AWS::AutoScaling::Instances
- Fog::AWS::AutoScaling::Mock
- Fog::AWS::AutoScaling::Policies
- Fog::AWS::AutoScaling::Policy
- Fog::AWS::AutoScaling::Real
- Fog::AWS::AutoScaling::ResourceInUse
- Fog::AWS::AutoScaling::ValidationError
- Fog::AWS::CloudFormation
- Fog::AWS::CloudFormation::Mock
- Fog::AWS::CloudFormation::Real
- Fog::AWS::CloudWatch
- Fog::AWS::CloudWatch::Alarm
- Fog::AWS::CloudWatch::AlarmData
- Fog::AWS::CloudWatch::AlarmDatum
- Fog::AWS::CloudWatch::AlarmHistories
- Fog::AWS::CloudWatch::AlarmHistory
- Fog::AWS::CloudWatch::Alarms
- Fog::AWS::CloudWatch::Metric
- Fog::AWS::CloudWatch::MetricStatistic
- Fog::AWS::CloudWatch::MetricStatistics
- Fog::AWS::CloudWatch::Metrics
- Fog::AWS::CloudWatch::Mock
- Fog::AWS::CloudWatch::Real
- Fog::AWS::CredentialFetcher
- Fog::AWS::CredentialFetcher::ConnectionMethods
- Fog::AWS::CredentialFetcher::ServiceMethods
- Fog::AWS::DataPipeline
- Fog::AWS::DataPipeline::Mock
- Fog::AWS::DataPipeline::Pipeline
- Fog::AWS::DataPipeline::Pipelines
- Fog::AWS::DataPipeline::Real
- Fog::AWS::DynamoDB
- Fog::AWS::DynamoDB::Mock
- Fog::AWS::DynamoDB::Real
- Fog::AWS::ELB
- Fog::AWS::ELB::DuplicatePolicyName
- Fog::AWS::ELB::IdentifierTaken
- Fog::AWS::ELB::InvalidConfigurationRequest
- Fog::AWS::ELB::InvalidInstance
- Fog::AWS::ELB::Listener
- Fog::AWS::ELB::Listeners
- Fog::AWS::ELB::LoadBalancer
- Fog::AWS::ELB::LoadBalancers
- Fog::AWS::ELB::Mock
- Fog::AWS::ELB::Policies
- Fog::AWS::ELB::Policy
- Fog::AWS::ELB::PolicyNotFound
- Fog::AWS::ELB::PolicyTypeNotFound
- Fog::AWS::ELB::Real
- Fog::AWS::ELB::Throttled
- Fog::AWS::ELB::TooManyPolicies
- Fog::AWS::ELB::ValidationError
- Fog::AWS::EMR
- Fog::AWS::EMR::IdentifierTaken
- Fog::AWS::EMR::Mock
- Fog::AWS::EMR::Real
- Fog::AWS::ElasticBeanstalk
- Fog::AWS::ElasticBeanstalk::Application
- Fog::AWS::ElasticBeanstalk::Applications
- Fog::AWS::ElasticBeanstalk::Environment
- Fog::AWS::ElasticBeanstalk::Environments
- Fog::AWS::ElasticBeanstalk::Event
- Fog::AWS::ElasticBeanstalk::Events
- Fog::AWS::ElasticBeanstalk::InvalidParameterError
- Fog::AWS::ElasticBeanstalk::Mock
- Fog::AWS::ElasticBeanstalk::Real
- Fog::AWS::ElasticBeanstalk::Template
- Fog::AWS::ElasticBeanstalk::Templates
- Fog::AWS::ElasticBeanstalk::Version
- Fog::AWS::ElasticBeanstalk::Versions
- Fog::AWS::Elasticache
- Fog::AWS::Elasticache::Cluster
- Fog::AWS::Elasticache::Clusters
- Fog::AWS::Elasticache::IdentifierTaken
- Fog::AWS::Elasticache::InvalidInstance
- Fog::AWS::Elasticache::Mock
- Fog::AWS::Elasticache::ParameterGroup
- Fog::AWS::Elasticache::ParameterGroups
- Fog::AWS::Elasticache::Real
- Fog::AWS::Elasticache::SecurityGroup
- Fog::AWS::Elasticache::SecurityGroups
- Fog::AWS::Glacier
- Fog::AWS::Glacier::Archive
- Fog::AWS::Glacier::Archives
- Fog::AWS::Glacier::Job
- Fog::AWS::Glacier::Jobs
- Fog::AWS::Glacier::Mock
- Fog::AWS::Glacier::Real
- Fog::AWS::Glacier::TreeHash
- Fog::AWS::Glacier::Vault
- Fog::AWS::Glacier::Vaults
- Fog::AWS::IAM
- Fog::AWS::IAM::AccessKey
- Fog::AWS::IAM::AccessKeys
- Fog::AWS::IAM::EntityAlreadyExists
- Fog::AWS::IAM::KeyPairMismatch
- Fog::AWS::IAM::LimitExceeded
- Fog::AWS::IAM::MalformedCertificate
- Fog::AWS::IAM::Mock
- Fog::AWS::IAM::Policies
- Fog::AWS::IAM::Policy
- Fog::AWS::IAM::Real
- Fog::AWS::IAM::User
- Fog::AWS::IAM::Users
- Fog::AWS::IAM::ValidationError
- Fog::AWS::Mock
- Fog::AWS::RDS
- Fog::AWS::RDS::AuthorizationAlreadyExists
- Fog::AWS::RDS::IdentifierTaken
- Fog::AWS::RDS::Mock
- Fog::AWS::RDS::Parameter
- Fog::AWS::RDS::ParameterGroup
- Fog::AWS::RDS::ParameterGroups
- Fog::AWS::RDS::Parameters
- Fog::AWS::RDS::Real
- Fog::AWS::RDS::SecurityGroup
- Fog::AWS::RDS::SecurityGroups
- Fog::AWS::RDS::Server
- Fog::AWS::RDS::Servers
- Fog::AWS::RDS::Snapshot
- Fog::AWS::RDS::Snapshots
- Fog::AWS::RDS::SubnetGroup
- Fog::AWS::RDS::SubnetGroups
- Fog::AWS::SES
- Fog::AWS::SES::Mock
- Fog::AWS::SES::Real
- Fog::AWS::SNS
- Fog::AWS::SNS::Mock
- Fog::AWS::SNS::Real
- Fog::AWS::SQS
- Fog::AWS::SQS::Mock
- Fog::AWS::SQS::Real
- Fog::AWS::STS
- Fog::AWS::STS::EntityAlreadyExists
- Fog::AWS::STS::Mock
- Fog::AWS::STS::Real
- Fog::AWS::STS::ValidationError
- Fog::AWS::SignatureV4
- Fog::AWS::SimpleDB
- Fog::AWS::SimpleDB::Mock
- Fog::AWS::SimpleDB::Real
- Fog::Atmos
- Fog::Attributes
- Fog::Attributes::ClassMethods
- Fog::Attributes::InstanceMethods
- Fog::BareMetalCloud
- Fog::Bin
- Fog::Bluebox
- Fog::Bluebox::BLB
- Fog::Bluebox::BLB::LbApplication
- Fog::Bluebox::BLB::LbApplications
- Fog::Bluebox::BLB::LbBackend
- Fog::Bluebox::BLB::LbBackends
- Fog::Bluebox::BLB::LbService
- Fog::Bluebox::BLB::LbServices
- Fog::Bluebox::BLB::Mock
- Fog::Bluebox::BLB::Real
- Fog::Bluebox::DNS
- Fog::Bluebox::DNS::Mock
- Fog::Bluebox::DNS::Real
- Fog::Brightbox
- Fog::Brightbox::Compute
- Fog::Brightbox::Compute::ImageSelector
- Fog::Brightbox::OAuth2
- Fog::Brightbox::OAuth2::ClientCredentialsStrategy
- Fog::Brightbox::OAuth2::CredentialSet
- Fog::Brightbox::OAuth2::GrantTypeStrategy
- Fog::Brightbox::OAuth2::RefreshTokenStrategy
- Fog::Brightbox::OAuth2::UserCredentialsStrategy
- Fog::CDN
- Fog::CDN::AWS
- Fog::CDN::AWS::Distribution
- Fog::CDN::AWS::DistributionHelper
- Fog::CDN::AWS::Distributions
- Fog::CDN::AWS::DistributionsHelper
- Fog::CDN::AWS::Invalidation
- Fog::CDN::AWS::Invalidations
- Fog::CDN::AWS::Mock
- Fog::CDN::AWS::Real
- Fog::CDN::AWS::StreamingDistribution
- Fog::CDN::AWS::StreamingDistributions
- Fog::CDN::HP
- Fog::CDN::HP::Mock
- Fog::CDN::HP::Real
- Fog::CDN::HP::Utils
- Fog::CDN::Rackspace
- Fog::CDN::Rackspace::Base
- Fog::CDN::Rackspace::Mock
- Fog::CDN::Rackspace::Real
- Fog::Clodo
- Fog::Cloudstack
- Fog::Collection
- Fog::Compute
- Fog::Compute::AWS
- Fog::Compute::AWS::Address
- Fog::Compute::AWS::Addresses
- Fog::Compute::AWS::DhcpOption
- Fog::Compute::AWS::DhcpOptions
- Fog::Compute::AWS::Flavor
- Fog::Compute::AWS::Flavors
- Fog::Compute::AWS::Image
- Fog::Compute::AWS::Images
- Fog::Compute::AWS::InternetGateway
- Fog::Compute::AWS::InternetGateways
- Fog::Compute::AWS::KeyPair
- Fog::Compute::AWS::KeyPairs
- Fog::Compute::AWS::Mock
- Fog::Compute::AWS::NetworkInterface
- Fog::Compute::AWS::NetworkInterfaces
- Fog::Compute::AWS::Real
- Fog::Compute::AWS::SecurityGroup
- Fog::Compute::AWS::SecurityGroups
- Fog::Compute::AWS::Server
- Fog::Compute::AWS::Servers
- Fog::Compute::AWS::Snapshot
- Fog::Compute::AWS::Snapshots
- Fog::Compute::AWS::SpotRequest
- Fog::Compute::AWS::SpotRequests
- Fog::Compute::AWS::Subnet
- Fog::Compute::AWS::Subnets
- Fog::Compute::AWS::Tag
- Fog::Compute::AWS::Tags
- Fog::Compute::AWS::VPC
- Fog::Compute::AWS::Volume
- Fog::Compute::AWS::Volumes
- Fog::Compute::AWS::Vpcs
- Fog::Compute::BareMetalCloud
- Fog::Compute::BareMetalCloud::Mock
- Fog::Compute::BareMetalCloud::Real
- Fog::Compute::Bluebox
- Fog::Compute::Bluebox::BlockInstantiationError
- Fog::Compute::Bluebox::Flavor
- Fog::Compute::Bluebox::Flavors
- Fog::Compute::Bluebox::Image
- Fog::Compute::Bluebox::Images
- Fog::Compute::Bluebox::Location
- Fog::Compute::Bluebox::Locations
- Fog::Compute::Bluebox::Mock
- Fog::Compute::Bluebox::Real
- Fog::Compute::Bluebox::Server
- Fog::Compute::Bluebox::Servers
- Fog::Compute::Brightbox
- Fog::Compute::Brightbox::Account
- Fog::Compute::Brightbox::Accounts
- Fog::Compute::Brightbox::ApiClient
- Fog::Compute::Brightbox::ApiClients
- Fog::Compute::Brightbox::Application
- Fog::Compute::Brightbox::Applications
- Fog::Compute::Brightbox::CloudIp
- Fog::Compute::Brightbox::CloudIps
- Fog::Compute::Brightbox::FirewallPolicies
- Fog::Compute::Brightbox::FirewallPolicy
- Fog::Compute::Brightbox::FirewallRule
- Fog::Compute::Brightbox::FirewallRules
- Fog::Compute::Brightbox::Flavor
- Fog::Compute::Brightbox::Flavors
- Fog::Compute::Brightbox::Image
- Fog::Compute::Brightbox::Images
- Fog::Compute::Brightbox::LoadBalancer
- Fog::Compute::Brightbox::LoadBalancers
- Fog::Compute::Brightbox::Mock
- Fog::Compute::Brightbox::Real
- Fog::Compute::Brightbox::Server
- Fog::Compute::Brightbox::ServerGroup
- Fog::Compute::Brightbox::ServerGroups
- Fog::Compute::Brightbox::Servers
- Fog::Compute::Brightbox::Shared
- Fog::Compute::Brightbox::User
- Fog::Compute::Brightbox::Users
- Fog::Compute::Brightbox::Zone
- Fog::Compute::Brightbox::Zones
- Fog::Compute::Clodo
- Fog::Compute::Clodo::Image
- Fog::Compute::Clodo::Images
- Fog::Compute::Clodo::Mock
- Fog::Compute::Clodo::Real
- Fog::Compute::Clodo::Server
- Fog::Compute::Clodo::Servers
- Fog::Compute::Cloudstack
- Fog::Compute::Cloudstack::Address
- Fog::Compute::Cloudstack::BadRequest
- Fog::Compute::Cloudstack::DiskOffering
- Fog::Compute::Cloudstack::DiskOfferings
- Fog::Compute::Cloudstack::Flavor
- Fog::Compute::Cloudstack::Flavors
- Fog::Compute::Cloudstack::Image
- Fog::Compute::Cloudstack::Images
- Fog::Compute::Cloudstack::Job
- Fog::Compute::Cloudstack::Jobs
- Fog::Compute::Cloudstack::Mock
- Fog::Compute::Cloudstack::Real
- Fog::Compute::Cloudstack::SecurityGroup
- Fog::Compute::Cloudstack::SecurityGroupRule
- Fog::Compute::Cloudstack::SecurityGroupRules
- Fog::Compute::Cloudstack::SecurityGroups
- Fog::Compute::Cloudstack::Server
- Fog::Compute::Cloudstack::Servers
- Fog::Compute::Cloudstack::Snapshot
- Fog::Compute::Cloudstack::Snapshots
- Fog::Compute::Cloudstack::Unauthorized
- Fog::Compute::Cloudstack::Volume
- Fog::Compute::Cloudstack::Volumes
- Fog::Compute::Cloudstack::Zone
- Fog::Compute::Cloudstack::Zones
- Fog::Compute::DigitalOcean
- Fog::Compute::DigitalOcean::Flavor
- Fog::Compute::DigitalOcean::Flavors
- Fog::Compute::DigitalOcean::Image
- Fog::Compute::DigitalOcean::Images
- Fog::Compute::DigitalOcean::Mock
- Fog::Compute::DigitalOcean::Real
- Fog::Compute::DigitalOcean::Region
- Fog::Compute::DigitalOcean::Regions
- Fog::Compute::DigitalOcean::Server
- Fog::Compute::DigitalOcean::Servers
- Fog::Compute::DigitalOcean::SshKey
- Fog::Compute::DigitalOcean::SshKeys
- Fog::Compute::Ecloud
- Fog::Compute::Ecloud::AdminOrganization
- Fog::Compute::Ecloud::AdminOrganizations
- Fog::Compute::Ecloud::ApiKey
- Fog::Compute::Ecloud::ApiKeys
- Fog::Compute::Ecloud::Association
- Fog::Compute::Ecloud::Associations
- Fog::Compute::Ecloud::AuthenticationLevel
- Fog::Compute::Ecloud::AuthenticationLevels
- Fog::Compute::Ecloud::BackupInternetService
- Fog::Compute::Ecloud::BackupInternetServices
- Fog::Compute::Ecloud::Catalog
- Fog::Compute::Ecloud::CatalogConfiguration
- Fog::Compute::Ecloud::CatalogConfigurations
- Fog::Compute::Ecloud::CatalogItem
- Fog::Compute::Ecloud::ComputePool
- Fog::Compute::Ecloud::ComputePools
- Fog::Compute::Ecloud::CpuUsageDetail
- Fog::Compute::Ecloud::CpuUsageDetailSummary
- Fog::Compute::Ecloud::DetachedDisk
- Fog::Compute::Ecloud::DetachedDisks
- Fog::Compute::Ecloud::Environment
- Fog::Compute::Ecloud::Environments
- Fog::Compute::Ecloud::Environments::Vdcs
- Fog::Compute::Ecloud::FirewallAcl
- Fog::Compute::Ecloud::FirewallAcls
- Fog::Compute::Ecloud::Group
- Fog::Compute::Ecloud::Groups
- Fog::Compute::Ecloud::GuestProcess
- Fog::Compute::Ecloud::GuestProcesses
- Fog::Compute::Ecloud::HardwareConfiguration
- Fog::Compute::Ecloud::HardwareConfigurations
- Fog::Compute::Ecloud::InternetService
- Fog::Compute::Ecloud::InternetServices
- Fog::Compute::Ecloud::IpAddress
- Fog::Compute::Ecloud::IpAddresses
- Fog::Compute::Ecloud::Layout
- Fog::Compute::Ecloud::Layouts
- Fog::Compute::Ecloud::Location
- Fog::Compute::Ecloud::Locations
- Fog::Compute::Ecloud::LoginBanner
- Fog::Compute::Ecloud::LoginBanners
- Fog::Compute::Ecloud::MemoryUsageDetail
- Fog::Compute::Ecloud::MemoryUsageDetailSummary
- Fog::Compute::Ecloud::Mock
- Fog::Compute::Ecloud::Monitor
- Fog::Compute::Ecloud::Monitors
- Fog::Compute::Ecloud::Network
- Fog::Compute::Ecloud::Networks
- Fog::Compute::Ecloud::Node
- Fog::Compute::Ecloud::Nodes
- Fog::Compute::Ecloud::OperatingSystem
- Fog::Compute::Ecloud::OperatingSystemFamilies
- Fog::Compute::Ecloud::OperatingSystemFamily
- Fog::Compute::Ecloud::OperatingSystems
- Fog::Compute::Ecloud::Organization
- Fog::Compute::Ecloud::Organizations
- Fog::Compute::Ecloud::PasswordComplexityRule
- Fog::Compute::Ecloud::PasswordComplexityRules
- Fog::Compute::Ecloud::PhysicalDevice
- Fog::Compute::Ecloud::PhysicalDevices
- Fog::Compute::Ecloud::PublicIp
- Fog::Compute::Ecloud::PublicIps
- Fog::Compute::Ecloud::Real
- Fog::Compute::Ecloud::Rnat
- Fog::Compute::Ecloud::Rnats
- Fog::Compute::Ecloud::Role
- Fog::Compute::Ecloud::Roles
- Fog::Compute::Ecloud::Row
- Fog::Compute::Ecloud::Rows
- Fog::Compute::Ecloud::Server
- Fog::Compute::Ecloud::ServerConfigurationOption
- Fog::Compute::Ecloud::ServerConfigurationOptions
- Fog::Compute::Ecloud::Servers
- Fog::Compute::Ecloud::Shared
- Fog::Compute::Ecloud::SshKey
- Fog::Compute::Ecloud::SshKeys
- Fog::Compute::Ecloud::StorageUsageDetail
- Fog::Compute::Ecloud::StorageUsageDetailSummary
- Fog::Compute::Ecloud::SupportTicket
- Fog::Compute::Ecloud::SupportTickets
- Fog::Compute::Ecloud::Tag
- Fog::Compute::Ecloud::Tags
- Fog::Compute::Ecloud::Task
- Fog::Compute::Ecloud::Tasks
- Fog::Compute::Ecloud::Template
- Fog::Compute::Ecloud::Templates
- Fog::Compute::Ecloud::TrustedNetworkGroup
- Fog::Compute::Ecloud::TrustedNetworkGroups
- Fog::Compute::Ecloud::User
- Fog::Compute::Ecloud::Users
- Fog::Compute::Ecloud::Vdc
- Fog::Compute::Ecloud::VirtualMachineAssignedIp
- Fog::Compute::Ecloud::VirtualMachineAssignedIps
- Fog::Compute::Glesys
- Fog::Compute::Glesys::Ip
- Fog::Compute::Glesys::Ips
- Fog::Compute::Glesys::Mock
- Fog::Compute::Glesys::Real
- Fog::Compute::Glesys::Server
- Fog::Compute::Glesys::Servers
- Fog::Compute::Glesys::Template
- Fog::Compute::Glesys::Templates
- Fog::Compute::GoGrid
- Fog::Compute::GoGrid::BlockInstantiationError
- Fog::Compute::GoGrid::Image
- Fog::Compute::GoGrid::Images
- Fog::Compute::GoGrid::Mock
- Fog::Compute::GoGrid::Password
- Fog::Compute::GoGrid::Passwords
- Fog::Compute::GoGrid::Real
- Fog::Compute::GoGrid::Server
- Fog::Compute::GoGrid::Servers
- Fog::Compute::Google
- Fog::Compute::Google::Flavor
- Fog::Compute::Google::Flavors
- Fog::Compute::Google::Image
- Fog::Compute::Google::Images
- Fog::Compute::Google::Mock
- Fog::Compute::Google::Real
- Fog::Compute::Google::Server
- Fog::Compute::Google::Servers
- Fog::Compute::HP
- Fog::Compute::HP::Address
- Fog::Compute::HP::Addresses
- Fog::Compute::HP::Flavor
- Fog::Compute::HP::Flavors
- Fog::Compute::HP::Image
- Fog::Compute::HP::Images
- Fog::Compute::HP::KeyPair
- Fog::Compute::HP::KeyPairs
- Fog::Compute::HP::Meta
- Fog::Compute::HP::MetaParent
- Fog::Compute::HP::Metadata
- Fog::Compute::HP::Mock
- Fog::Compute::HP::Real
- Fog::Compute::HP::SecurityGroup
- Fog::Compute::HP::SecurityGroups
- Fog::Compute::HP::Server
- Fog::Compute::HP::Servers
- Fog::Compute::HP::Utils
- Fog::Compute::IBM
- Fog::Compute::IBM::Address
- Fog::Compute::IBM::Addresses
- Fog::Compute::IBM::Image
- Fog::Compute::IBM::Images
- Fog::Compute::IBM::InstanceType
- Fog::Compute::IBM::InstanceTypes
- Fog::Compute::IBM::Key
- Fog::Compute::IBM::Keys
- Fog::Compute::IBM::Location
- Fog::Compute::IBM::Locations
- Fog::Compute::IBM::Mock
- Fog::Compute::IBM::Real
- Fog::Compute::IBM::Server
- Fog::Compute::IBM::Servers
- Fog::Compute::IBM::Vlan
- Fog::Compute::IBM::Vlans
- Fog::Compute::Joyent
- Fog::Compute::Joyent::Errors
- Fog::Compute::Joyent::Errors::BadRequest
- Fog::Compute::Joyent::Errors::Conflict
- Fog::Compute::Joyent::Errors::Forbidden
- Fog::Compute::Joyent::Errors::MessageParserMixin
- Fog::Compute::Joyent::Errors::MethodNotAllowed
- Fog::Compute::Joyent::Errors::NotAcceptable
- Fog::Compute::Joyent::Errors::NotFound
- Fog::Compute::Joyent::Errors::PolicyNotForfilled
- Fog::Compute::Joyent::Errors::RequestEntityTooLarge
- Fog::Compute::Joyent::Errors::RetryWith
- Fog::Compute::Joyent::Errors::ServiceUnavailable
- Fog::Compute::Joyent::Errors::Unauthorized
- Fog::Compute::Joyent::Errors::UnsupportedMediaType
- Fog::Compute::Joyent::Flavor
- Fog::Compute::Joyent::Flavors
- Fog::Compute::Joyent::Image
- Fog::Compute::Joyent::Images
- Fog::Compute::Joyent::Key
- Fog::Compute::Joyent::Keys
- Fog::Compute::Joyent::Mock
- Fog::Compute::Joyent::Real
- Fog::Compute::Joyent::Server
- Fog::Compute::Joyent::Servers
- Fog::Compute::Joyent::Snapshot
- Fog::Compute::Joyent::Snapshots
- Fog::Compute::Libvirt
- Fog::Compute::Libvirt::Interface
- Fog::Compute::Libvirt::Interfaces
- Fog::Compute::Libvirt::Mock
- Fog::Compute::Libvirt::Network
- Fog::Compute::Libvirt::Networks
- Fog::Compute::Libvirt::Nic
- Fog::Compute::Libvirt::Nics
- Fog::Compute::Libvirt::Node
- Fog::Compute::Libvirt::Nodes
- Fog::Compute::Libvirt::Pool
- Fog::Compute::Libvirt::Pools
- Fog::Compute::Libvirt::Real
- Fog::Compute::Libvirt::Server
- Fog::Compute::Libvirt::Servers
- Fog::Compute::Libvirt::Shared
- Fog::Compute::Libvirt::Volume
- Fog::Compute::Libvirt::Volumes
- Fog::Compute::LibvirtUtil
- Fog::Compute::LibvirtUtil::URI
- Fog::Compute::Linode
- Fog::Compute::Linode::DataCenter
- Fog::Compute::Linode::DataCenters
- Fog::Compute::Linode::Disk
- Fog::Compute::Linode::Disks
- Fog::Compute::Linode::Flavor
- Fog::Compute::Linode::Flavors
- Fog::Compute::Linode::Image
- Fog::Compute::Linode::Images
- Fog::Compute::Linode::Ip
- Fog::Compute::Linode::Ips
- Fog::Compute::Linode::Kernel
- Fog::Compute::Linode::Kernels
- Fog::Compute::Linode::Mock
- Fog::Compute::Linode::Real
- Fog::Compute::Linode::Server
- Fog::Compute::Linode::Servers
- Fog::Compute::Linode::StackScript
- Fog::Compute::Linode::StackScripts
- Fog::Compute::Ninefold
- Fog::Compute::Ninefold::Address
- Fog::Compute::Ninefold::Addresses
- Fog::Compute::Ninefold::Flavor
- Fog::Compute::Ninefold::Flavors
- Fog::Compute::Ninefold::Image
- Fog::Compute::Ninefold::Images
- Fog::Compute::Ninefold::IpForwardingRule
- Fog::Compute::Ninefold::IpForwardingRules
- Fog::Compute::Ninefold::Mock
- Fog::Compute::Ninefold::Real
- Fog::Compute::Ninefold::Server
- Fog::Compute::Ninefold::Servers
- Fog::Compute::OpenStack
- Fog::Compute::OpenStack::Address
- Fog::Compute::OpenStack::Addresses
- Fog::Compute::OpenStack::Flavor
- Fog::Compute::OpenStack::Flavors
- Fog::Compute::OpenStack::Host
- Fog::Compute::OpenStack::Hosts
- Fog::Compute::OpenStack::Image
- Fog::Compute::OpenStack::Images
- Fog::Compute::OpenStack::KeyPair
- Fog::Compute::OpenStack::KeyPairs
- Fog::Compute::OpenStack::MetaParent
- Fog::Compute::OpenStack::Metadata
- Fog::Compute::OpenStack::Metadatum
- Fog::Compute::OpenStack::Mock
- Fog::Compute::OpenStack::Network
- Fog::Compute::OpenStack::Networks
- Fog::Compute::OpenStack::Real
- Fog::Compute::OpenStack::SecurityGroup
- Fog::Compute::OpenStack::SecurityGroups
- Fog::Compute::OpenStack::Server
- Fog::Compute::OpenStack::Servers
- Fog::Compute::OpenStack::Snapshot
- Fog::Compute::OpenStack::Snapshots
- Fog::Compute::OpenStack::Tenant
- Fog::Compute::OpenStack::Tenants
- Fog::Compute::OpenStack::Volume
- Fog::Compute::OpenStack::Volumes
- Fog::Compute::Ovirt
- Fog::Compute::Ovirt::Cluster
- Fog::Compute::Ovirt::Clusters
- Fog::Compute::Ovirt::Interface
- Fog::Compute::Ovirt::Interfaces
- Fog::Compute::Ovirt::Mock
- Fog::Compute::Ovirt::Quota
- Fog::Compute::Ovirt::Quotas
- Fog::Compute::Ovirt::Real
- Fog::Compute::Ovirt::Server
- Fog::Compute::Ovirt::Servers
- Fog::Compute::Ovirt::Shared
- Fog::Compute::Ovirt::Template
- Fog::Compute::Ovirt::Templates
- Fog::Compute::Ovirt::Volume
- Fog::Compute::Ovirt::Volumes
- Fog::Compute::Rackspace
- Fog::Compute::Rackspace::Flavor
- Fog::Compute::Rackspace::Flavors
- Fog::Compute::Rackspace::Image
- Fog::Compute::Rackspace::Images
- Fog::Compute::Rackspace::Mock
- Fog::Compute::Rackspace::Real
- Fog::Compute::Rackspace::Server
- Fog::Compute::Rackspace::Servers
- Fog::Compute::RackspaceV2
- Fog::Compute::RackspaceV2::Attachment
- Fog::Compute::RackspaceV2::Attachments
- Fog::Compute::RackspaceV2::BadRequest
- Fog::Compute::RackspaceV2::Flavor
- Fog::Compute::RackspaceV2::Flavors
- Fog::Compute::RackspaceV2::Image
- Fog::Compute::RackspaceV2::Images
- Fog::Compute::RackspaceV2::InternalServerError
- Fog::Compute::RackspaceV2::InvalidImageStateException
- Fog::Compute::RackspaceV2::InvalidServerStateException
- Fog::Compute::RackspaceV2::InvalidStateException
- Fog::Compute::RackspaceV2::MetaParent
- Fog::Compute::RackspaceV2::Metadata
- Fog::Compute::RackspaceV2::Metadatum
- Fog::Compute::RackspaceV2::Mock
- Fog::Compute::RackspaceV2::Network
- Fog::Compute::RackspaceV2::Networks
- Fog::Compute::RackspaceV2::Real
- Fog::Compute::RackspaceV2::Server
- Fog::Compute::RackspaceV2::Servers
- Fog::Compute::RackspaceV2::ServiceError
- Fog::Compute::Server
- Fog::Compute::Serverlove
- Fog::Compute::Serverlove::Image
- Fog::Compute::Serverlove::Images
- Fog::Compute::Serverlove::Mock
- Fog::Compute::Serverlove::PasswordGenerator
- Fog::Compute::Serverlove::Real
- Fog::Compute::Serverlove::Server
- Fog::Compute::Serverlove::Servers
- Fog::Compute::StormOnDemand
- Fog::Compute::StormOnDemand::Balancer
- Fog::Compute::StormOnDemand::Balancers
- Fog::Compute::StormOnDemand::Config
- Fog::Compute::StormOnDemand::Configs
- Fog::Compute::StormOnDemand::Image
- Fog::Compute::StormOnDemand::Images
- Fog::Compute::StormOnDemand::Mock
- Fog::Compute::StormOnDemand::PrivateIp
- Fog::Compute::StormOnDemand::PrivateIps
- Fog::Compute::StormOnDemand::Real
- Fog::Compute::StormOnDemand::Server
- Fog::Compute::StormOnDemand::Servers
- Fog::Compute::StormOnDemand::Stat
- Fog::Compute::StormOnDemand::Stats
- Fog::Compute::StormOnDemand::Template
- Fog::Compute::StormOnDemand::Templates
- Fog::Compute::Vmfusion
- Fog::Compute::Vmfusion::Mock
- Fog::Compute::Vmfusion::Real
- Fog::Compute::Vmfusion::Server
- Fog::Compute::Vmfusion::Servers
- Fog::Compute::Voxel
- Fog::Compute::Voxel::Image
- Fog::Compute::Voxel::Images
- Fog::Compute::Voxel::Mock
- Fog::Compute::Voxel::Real
- Fog::Compute::Voxel::Server
- Fog::Compute::Voxel::Servers
- Fog::Compute::Vsphere
- Fog::Compute::Vsphere::Cluster
- Fog::Compute::Vsphere::Clusters
- Fog::Compute::Vsphere::Customfield
- Fog::Compute::Vsphere::Customfields
- Fog::Compute::Vsphere::Customvalue
- Fog::Compute::Vsphere::Customvalues
- Fog::Compute::Vsphere::Datacenter
- Fog::Compute::Vsphere::Datacenters
- Fog::Compute::Vsphere::Datastore
- Fog::Compute::Vsphere::Datastores
- Fog::Compute::Vsphere::Folder
- Fog::Compute::Vsphere::Folders
- Fog::Compute::Vsphere::Interface
- Fog::Compute::Vsphere::Interfaces
- Fog::Compute::Vsphere::Mock
- Fog::Compute::Vsphere::Network
- Fog::Compute::Vsphere::Networks
- Fog::Compute::Vsphere::Real
- Fog::Compute::Vsphere::ResourcePool
- Fog::Compute::Vsphere::ResourcePools
- Fog::Compute::Vsphere::Server
- Fog::Compute::Vsphere::Servers
- Fog::Compute::Vsphere::Shared
- Fog::Compute::Vsphere::Template
- Fog::Compute::Vsphere::Templates
- Fog::Compute::Vsphere::Volume
- Fog::Compute::Vsphere::Volumes
- Fog::Compute::XenServer
- Fog::Compute::XenServer::GuestMetrics
- Fog::Compute::XenServer::Host
- Fog::Compute::XenServer::HostCpu
- Fog::Compute::XenServer::HostMetrics
- Fog::Compute::XenServer::Hosts
- Fog::Compute::XenServer::Mock
- Fog::Compute::XenServer::Network
- Fog::Compute::XenServer::Networks
- Fog::Compute::XenServer::PBD
- Fog::Compute::XenServer::PIF
- Fog::Compute::XenServer::Pbds
- Fog::Compute::XenServer::Pifs
- Fog::Compute::XenServer::Pool
- Fog::Compute::XenServer::Pools
- Fog::Compute::XenServer::Real
- Fog::Compute::XenServer::Server
- Fog::Compute::XenServer::Servers
- Fog::Compute::XenServer::StorageRepositories
- Fog::Compute::XenServer::StorageRepository
- Fog::Compute::XenServer::VBD
- Fog::Compute::XenServer::VDI
- Fog::Compute::XenServer::VIF
- Fog::Compute::XenServer::VLAN
- Fog::Compute::XenServer::VbdMetrics
- Fog::Compute::XenServer::Vbds
- Fog::Compute::XenServer::Vdis
- Fog::Compute::XenServer::Vifs
- Fog::Compute::XenServer::Vlans
- Fog::Connection
- Fog::Core
- Fog::Core::DeprecatedConnectionAccessors
- Fog::CurrentMachine
- Fog::DNS
- Fog::DNS::AWS
- Fog::DNS::AWS::Mock
- Fog::DNS::AWS::Real
- Fog::DNS::AWS::Record
- Fog::DNS::AWS::Records
- Fog::DNS::AWS::Zone
- Fog::DNS::AWS::Zones
- Fog::DNS::Bluebox
- Fog::DNS::Bluebox::Mock
- Fog::DNS::Bluebox::Real
- Fog::DNS::Bluebox::Record
- Fog::DNS::Bluebox::Records
- Fog::DNS::Bluebox::Zone
- Fog::DNS::Bluebox::Zones
- Fog::DNS::DNSMadeEasy
- Fog::DNS::DNSMadeEasy::Mock
- Fog::DNS::DNSMadeEasy::Real
- Fog::DNS::DNSMadeEasy::Record
- Fog::DNS::DNSMadeEasy::Records
- Fog::DNS::DNSMadeEasy::Zone
- Fog::DNS::DNSMadeEasy::Zones
- Fog::DNS::DNSimple
- Fog::DNS::DNSimple::Mock
- Fog::DNS::DNSimple::Real
- Fog::DNS::DNSimple::Record
- Fog::DNS::DNSimple::Records
- Fog::DNS::DNSimple::Zone
- Fog::DNS::DNSimple::Zones
- Fog::DNS::Dreamhost
- Fog::DNS::Dreamhost::Mock
- Fog::DNS::Dreamhost::Real
- Fog::DNS::Dreamhost::Record
- Fog::DNS::Dreamhost::Records
- Fog::DNS::Dreamhost::Zone
- Fog::DNS::Dreamhost::Zones
- Fog::DNS::Dynect
- Fog::DNS::Dynect::JobIncomplete
- Fog::DNS::Dynect::Mock
- Fog::DNS::Dynect::Real
- Fog::DNS::Dynect::Record
- Fog::DNS::Dynect::Records
- Fog::DNS::Dynect::Zone
- Fog::DNS::Dynect::Zones
- Fog::DNS::Linode
- Fog::DNS::Linode::Mock
- Fog::DNS::Linode::Real
- Fog::DNS::Linode::Record
- Fog::DNS::Linode::Records
- Fog::DNS::Linode::Zone
- Fog::DNS::Linode::Zones
- Fog::DNS::Rackspace
- Fog::DNS::Rackspace::Callback
- Fog::DNS::Rackspace::CallbackError
- Fog::DNS::Rackspace::Mock
- Fog::DNS::Rackspace::Real
- Fog::DNS::Rackspace::Record
- Fog::DNS::Rackspace::Records
- Fog::DNS::Rackspace::Zone
- Fog::DNS::Rackspace::Zones
- Fog::DNS::Zerigo
- Fog::DNS::Zerigo::Mock
- Fog::DNS::Zerigo::Real
- Fog::DNS::Zerigo::Record
- Fog::DNS::Zerigo::Records
- Fog::DNS::Zerigo::Zone
- Fog::DNS::Zerigo::Zones
- Fog::DNSMadeEasy
- Fog::DNSimple
- Fog::Deprecation
- Fog::DigitalOcean
- Fog::Dreamhost
- Fog::Dynect
- Fog::Dynect::Mock
- Fog::Ecloud
- Fog::Ecloud::Collection
- Fog::Ecloud::MockDataClasses
- Fog::Ecloud::MockDataClasses::Base
- Fog::Ecloud::MockDataClasses::MockBackupInternetService
- Fog::Ecloud::MockDataClasses::MockCatalog
- Fog::Ecloud::MockDataClasses::MockCatalogItem
- Fog::Ecloud::MockDataClasses::MockCatalogItemCustomization
- Fog::Ecloud::MockDataClasses::MockCatalogItemVappTemplate
- Fog::Ecloud::MockDataClasses::MockData
- Fog::Ecloud::MockDataClasses::MockFirewallAcls
- Fog::Ecloud::MockDataClasses::MockNetwork
- Fog::Ecloud::MockDataClasses::MockNetworkExtensions
- Fog::Ecloud::MockDataClasses::MockNetworkIp
- Fog::Ecloud::MockDataClasses::MockNetworkIps
- Fog::Ecloud::MockDataClasses::MockOrganization
- Fog::Ecloud::MockDataClasses::MockPublicIp
- Fog::Ecloud::MockDataClasses::MockPublicIpInternetService
- Fog::Ecloud::MockDataClasses::MockPublicIpInternetServiceNode
- Fog::Ecloud::MockDataClasses::MockPublicIpInternetServiceNodes
- Fog::Ecloud::MockDataClasses::MockPublicIpInternetServices
- Fog::Ecloud::MockDataClasses::MockPublicIps
- Fog::Ecloud::MockDataClasses::MockTaskList
- Fog::Ecloud::MockDataClasses::MockVdc
- Fog::Ecloud::MockDataClasses::MockVdcInternetServices
- Fog::Ecloud::MockDataClasses::MockVersion
- Fog::Ecloud::MockDataClasses::MockVirtualMachine
- Fog::Ecloud::MockDataClasses::MockVirtualMachineDisk
- Fog::Ecloud::MockDataClasses::MockVirtualMachineDisks
- Fog::Ecloud::Model
- Fog::Errors
- Fog::Errors::Error
- Fog::Errors::LoadError
- Fog::Errors::MockNotImplemented
- Fog::Errors::NotFound
- Fog::Errors::NotImplemented
- Fog::Errors::TimeoutError
- Fog::Glesys
- Fog::GoGrid
- Fog::Google
- Fog::Google::Mock
- Fog::Google::Storage
- Fog::Google::Storage::Mock
- Fog::Google::Storage::Real
- Fog::HMAC
- Fog::HP
- Fog::HP::BlockStorage
- Fog::HP::BlockStorage::BootableVolumes
- Fog::HP::BlockStorage::Mock
- Fog::HP::BlockStorage::Real
- Fog::HP::BlockStorage::Snapshot
- Fog::HP::BlockStorage::Snapshots
- Fog::HP::BlockStorage::Utils
- Fog::HP::BlockStorage::Volume
- Fog::HP::BlockStorage::Volumes
- Fog::HP::Errors
- Fog::HP::Errors::BadRequest
- Fog::HP::Errors::Conflict
- Fog::HP::Errors::Forbidden
- Fog::HP::Errors::InternalServerError
- Fog::HP::Errors::NotFound
- Fog::HP::Errors::ServiceError
- Fog::HP::Errors::ServiceUnavailable
- Fog::HP::Mock
- Fog::IBM
- Fog::IBM::Connection
- Fog::IBM::Mock
- Fog::Identity
- Fog::Identity::OpenStack
- Fog::Identity::OpenStack::Ec2Credential
- Fog::Identity::OpenStack::Ec2Credentials
- Fog::Identity::OpenStack::Mock
- Fog::Identity::OpenStack::Real
- Fog::Identity::OpenStack::Role
- Fog::Identity::OpenStack::Roles
- Fog::Identity::OpenStack::Tenant
- Fog::Identity::OpenStack::Tenants
- Fog::Identity::OpenStack::User
- Fog::Identity::OpenStack::Users
- Fog::Image
- Fog::Image::OpenStack
- Fog::Image::OpenStack::Image
- Fog::Image::OpenStack::Images
- Fog::Image::OpenStack::Mock
- Fog::Image::OpenStack::Real
- Fog::InternetArchive
- Fog::InternetArchive::Mock
- Fog::InternetArchive::SignatureV4
- Fog::JSON
- Fog::JSON::LegacyJSON
- Fog::JSON::LoadError
- Fog::JSON::NewJSON
- Fog::Joyent
- Fog::Libvirt
- Fog::Linode
- Fog::Local
- Fog::Logger
- Fog::Mock
- Fog::Model
- Fog::Network
- Fog::Network::OpenStack
- Fog::Network::OpenStack::FloatingIp
- Fog::Network::OpenStack::FloatingIps
- Fog::Network::OpenStack::Mock
- Fog::Network::OpenStack::Network
- Fog::Network::OpenStack::Networks
- Fog::Network::OpenStack::Port
- Fog::Network::OpenStack::Ports
- Fog::Network::OpenStack::Real
- Fog::Network::OpenStack::Router
- Fog::Network::OpenStack::Routers
- Fog::Network::OpenStack::Subnet
- Fog::Network::OpenStack::Subnets
- Fog::Ninefold
- Fog::OpenStack
- Fog::OpenStack::Errors
- Fog::OpenStack::Errors::BadRequest
- Fog::OpenStack::Errors::ServiceError
- Fog::OpenStack::Errors::ServiceUnavailable
- Fog::Ovirt
- Fog::Ovirt::Errors
- Fog::Ovirt::Errors::NotFound
- Fog::Ovirt::Errors::SecurityError
- Fog::Ovirt::Errors::ServiceError
- Fog::Parsers
- Fog::Parsers::AWS
- Fog::Parsers::AWS::AutoScaling
- Fog::Parsers::AWS::AutoScaling::Basic
- Fog::Parsers::AWS::AutoScaling::DescribeAdjustmentTypes
- Fog::Parsers::AWS::AutoScaling::DescribeAutoScalingGroups
- Fog::Parsers::AWS::AutoScaling::DescribeAutoScalingInstances
- Fog::Parsers::AWS::AutoScaling::DescribeAutoScalingNotificationTypes
- Fog::Parsers::AWS::AutoScaling::DescribeLaunchConfigurations
- Fog::Parsers::AWS::AutoScaling::DescribeMetricCollectionTypes
- Fog::Parsers::AWS::AutoScaling::DescribeNotificationConfigurations
- Fog::Parsers::AWS::AutoScaling::DescribePolicies
- Fog::Parsers::AWS::AutoScaling::DescribeScalingActivities
- Fog::Parsers::AWS::AutoScaling::DescribeScalingProcessTypes
- Fog::Parsers::AWS::AutoScaling::DescribeScheduledActions
- Fog::Parsers::AWS::AutoScaling::DescribeTags
- Fog::Parsers::AWS::AutoScaling::DescribeTerminationPolicyTypes
- Fog::Parsers::AWS::AutoScaling::PutNotificationConfiguration
- Fog::Parsers::AWS::AutoScaling::PutScalingPolicy
- Fog::Parsers::AWS::AutoScaling::TerminateInstanceInAutoScalingGroup
- Fog::Parsers::AWS::CloudFormation
- Fog::Parsers::AWS::CloudFormation::Basic
- Fog::Parsers::AWS::CloudFormation::CreateStack
- Fog::Parsers::AWS::CloudFormation::DescribeStackEvents
- Fog::Parsers::AWS::CloudFormation::DescribeStackResources
- Fog::Parsers::AWS::CloudFormation::DescribeStacks
- Fog::Parsers::AWS::CloudFormation::GetTemplate
- Fog::Parsers::AWS::CloudFormation::UpdateStack
- Fog::Parsers::AWS::CloudFormation::ValidateTemplate
- Fog::Parsers::AWS::CloudWatch
- Fog::Parsers::AWS::CloudWatch::DeleteAlarms
- Fog::Parsers::AWS::CloudWatch::DescribeAlarmHistory
- Fog::Parsers::AWS::CloudWatch::DescribeAlarms
- Fog::Parsers::AWS::CloudWatch::DescribeAlarmsForMetric
- Fog::Parsers::AWS::CloudWatch::DisableAlarmActions
- Fog::Parsers::AWS::CloudWatch::EnableAlarmActions
- Fog::Parsers::AWS::CloudWatch::GetMetricStatistics
- Fog::Parsers::AWS::CloudWatch::ListMetrics
- Fog::Parsers::AWS::CloudWatch::PutMetricAlarm
- Fog::Parsers::AWS::CloudWatch::PutMetricData
- Fog::Parsers::AWS::CloudWatch::SetAlarmState
- Fog::Parsers::AWS::ELB
- Fog::Parsers::AWS::ELB::ApplySecurityGroupsToLoadBalancer
- Fog::Parsers::AWS::ELB::AttachLoadBalancerToSubnets
- Fog::Parsers::AWS::ELB::ConfigureHealthCheck
- Fog::Parsers::AWS::ELB::CreateLoadBalancer
- Fog::Parsers::AWS::ELB::DeleteLoadBalancer
- Fog::Parsers::AWS::ELB::DeregisterInstancesFromLoadBalancer
- Fog::Parsers::AWS::ELB::DescribeInstanceHealth
- Fog::Parsers::AWS::ELB::DescribeLoadBalancerPolicies
- Fog::Parsers::AWS::ELB::DescribeLoadBalancerPolicyTypes
- Fog::Parsers::AWS::ELB::DescribeLoadBalancers
- Fog::Parsers::AWS::ELB::DetachLoadBalancerFromSubnets
- Fog::Parsers::AWS::ELB::DisableAvailabilityZonesForLoadBalancer
- Fog::Parsers::AWS::ELB::Empty
- Fog::Parsers::AWS::ELB::EnableAvailabilityZonesForLoadBalancer
- Fog::Parsers::AWS::ELB::RegisterInstancesWithLoadBalancer
- Fog::Parsers::AWS::EMR
- Fog::Parsers::AWS::EMR::AddInstanceGroups
- Fog::Parsers::AWS::EMR::AddJobFlowSteps
- Fog::Parsers::AWS::EMR::DescribeJobFlows
- Fog::Parsers::AWS::EMR::ModifyInstanceGroups
- Fog::Parsers::AWS::EMR::RunJobFlow
- Fog::Parsers::AWS::EMR::SetTerminationProtection
- Fog::Parsers::AWS::EMR::TerminateJobFlows
- Fog::Parsers::AWS::ElasticBeanstalk
- Fog::Parsers::AWS::ElasticBeanstalk::BaseParser
- Fog::Parsers::AWS::ElasticBeanstalk::CheckDNSAvailability
- Fog::Parsers::AWS::ElasticBeanstalk::CreateApplication
- Fog::Parsers::AWS::ElasticBeanstalk::CreateApplicationVersion
- Fog::Parsers::AWS::ElasticBeanstalk::CreateConfigurationTemplate
- Fog::Parsers::AWS::ElasticBeanstalk::CreateEnvironment
- Fog::Parsers::AWS::ElasticBeanstalk::CreateStorageLocation
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeApplicationVersions
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeApplications
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeConfigurationOptions
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeConfigurationSettings
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeEnvironmentResources
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeEnvironments
- Fog::Parsers::AWS::ElasticBeanstalk::DescribeEvents
- Fog::Parsers::AWS::ElasticBeanstalk::Empty
- Fog::Parsers::AWS::ElasticBeanstalk::ListAvailableSolutionStacks
- Fog::Parsers::AWS::ElasticBeanstalk::RetrieveEnvironmentInfo
- Fog::Parsers::AWS::ElasticBeanstalk::TerminateEnvironment
- Fog::Parsers::AWS::ElasticBeanstalk::UpdateApplication
- Fog::Parsers::AWS::ElasticBeanstalk::UpdateApplicationVersion
- Fog::Parsers::AWS::ElasticBeanstalk::UpdateConfigurationTemplate
- Fog::Parsers::AWS::ElasticBeanstalk::UpdateEnvironment
- Fog::Parsers::AWS::ElasticBeanstalk::ValidateConfigurationSettings
- Fog::Parsers::AWS::Elasticache
- Fog::Parsers::AWS::Elasticache::AuthorizeCacheSecurityGroupIngress
- Fog::Parsers::AWS::Elasticache::Base
- Fog::Parsers::AWS::Elasticache::CacheClusterParser
- Fog::Parsers::AWS::Elasticache::DescribeCacheClusters
- Fog::Parsers::AWS::Elasticache::DescribeCacheParameters
- Fog::Parsers::AWS::Elasticache::DescribeEngineDefaultParameters
- Fog::Parsers::AWS::Elasticache::DescribeParameterGroups
- Fog::Parsers::AWS::Elasticache::DescribeReservedCacheNodes
- Fog::Parsers::AWS::Elasticache::DescribeSecurityGroups
- Fog::Parsers::AWS::Elasticache::EngineDefaultsParser
- Fog::Parsers::AWS::Elasticache::EventListParser
- Fog::Parsers::AWS::Elasticache::ModifyParameterGroup
- Fog::Parsers::AWS::Elasticache::ParameterGroupParser
- Fog::Parsers::AWS::Elasticache::ResetParameterGroup
- Fog::Parsers::AWS::Elasticache::SecurityGroupParser
- Fog::Parsers::AWS::Elasticache::SingleCacheCluster
- Fog::Parsers::AWS::Elasticache::SingleParameterGroup
- Fog::Parsers::AWS::Elasticache::SingleSecurityGroup
- Fog::Parsers::AWS::IAM
- Fog::Parsers::AWS::IAM::BaseInstanceProfile
- Fog::Parsers::AWS::IAM::Basic
- Fog::Parsers::AWS::IAM::CreateAccessKey
- Fog::Parsers::AWS::IAM::CreateGroup
- Fog::Parsers::AWS::IAM::CreateUser
- Fog::Parsers::AWS::IAM::GetGroup
- Fog::Parsers::AWS::IAM::GetGroupPolicy
- Fog::Parsers::AWS::IAM::GetRolePolicy
- Fog::Parsers::AWS::IAM::GetUser
- Fog::Parsers::AWS::IAM::GetUserPolicy
- Fog::Parsers::AWS::IAM::InstanceProfile
- Fog::Parsers::AWS::IAM::ListAccessKeys
- Fog::Parsers::AWS::IAM::ListAccountAliases
- Fog::Parsers::AWS::IAM::ListGroups
- Fog::Parsers::AWS::IAM::ListGroupsForUser
- Fog::Parsers::AWS::IAM::ListInstanceProfiles
- Fog::Parsers::AWS::IAM::ListPolicies
- Fog::Parsers::AWS::IAM::ListRoles
- Fog::Parsers::AWS::IAM::ListServerCertificates
- Fog::Parsers::AWS::IAM::ListSigningCertificates
- Fog::Parsers::AWS::IAM::ListUsers
- Fog::Parsers::AWS::IAM::LoginProfile
- Fog::Parsers::AWS::IAM::RoleParser
- Fog::Parsers::AWS::IAM::SingleRole
- Fog::Parsers::AWS::IAM::UpdateGroup
- Fog::Parsers::AWS::IAM::UpdateUser
- Fog::Parsers::AWS::IAM::UploadServerCertificate
- Fog::Parsers::AWS::IAM::UploadSigningCertificate
- Fog::Parsers::AWS::RDS
- Fog::Parsers::AWS::RDS::AuthorizeDBSecurityGroupIngress
- Fog::Parsers::AWS::RDS::Base
- Fog::Parsers::AWS::RDS::CreateDBInstance
- Fog::Parsers::AWS::RDS::CreateDBInstanceReadReplica
- Fog::Parsers::AWS::RDS::CreateDBSecurityGroup
- Fog::Parsers::AWS::RDS::CreateDBSnapshot
- Fog::Parsers::AWS::RDS::CreateDBSubnetGroup
- Fog::Parsers::AWS::RDS::CreateDbParameterGroup
- Fog::Parsers::AWS::RDS::DBEngineVersionParser
- Fog::Parsers::AWS::RDS::DbParser
- Fog::Parsers::AWS::RDS::DeleteDBInstance
- Fog::Parsers::AWS::RDS::DeleteDBSecurityGroup
- Fog::Parsers::AWS::RDS::DeleteDBSnapshot
- Fog::Parsers::AWS::RDS::DeleteDbParameterGroup
- Fog::Parsers::AWS::RDS::DescribeDBEngineVersions
- Fog::Parsers::AWS::RDS::DescribeDBInstances
- Fog::Parsers::AWS::RDS::DescribeDBParameterGroups
- Fog::Parsers::AWS::RDS::DescribeDBParameters
- Fog::Parsers::AWS::RDS::DescribeDBReservedInstances
- Fog::Parsers::AWS::RDS::DescribeDBSecurityGroups
- Fog::Parsers::AWS::RDS::DescribeDBSnapshots
- Fog::Parsers::AWS::RDS::DescribeDBSubnetGroups
- Fog::Parsers::AWS::RDS::EventListParser
- Fog::Parsers::AWS::RDS::ModifyDBInstance
- Fog::Parsers::AWS::RDS::ModifyDbParameterGroup
- Fog::Parsers::AWS::RDS::RebootDBInstance
- Fog::Parsers::AWS::RDS::RestoreDBInstanceFromDBSnapshot
- Fog::Parsers::AWS::RDS::RestoreDBInstanceToPointInTime
- Fog::Parsers::AWS::RDS::RevokeDBSecurityGroupIngress
- Fog::Parsers::AWS::RDS::SecurityGroupParser
- Fog::Parsers::AWS::RDS::SnapshotParser
- Fog::Parsers::AWS::RDS::SubnetGroupParser
- Fog::Parsers::AWS::RDS::TagListParser
- Fog::Parsers::AWS::SES
- Fog::Parsers::AWS::SES::DeleteVerifiedEmailAddress
- Fog::Parsers::AWS::SES::GetSendQuota
- Fog::Parsers::AWS::SES::GetSendStatistics
- Fog::Parsers::AWS::SES::ListVerifiedEmailAddresses
- Fog::Parsers::AWS::SES::SendEmail
- Fog::Parsers::AWS::SES::SendRawEmail
- Fog::Parsers::AWS::SES::VerifyEmailAddress
- Fog::Parsers::AWS::SNS
- Fog::Parsers::AWS::SNS::AddPermission
- Fog::Parsers::AWS::SNS::ConfirmSubscription
- Fog::Parsers::AWS::SNS::CreateTopic
- Fog::Parsers::AWS::SNS::DeleteTopic
- Fog::Parsers::AWS::SNS::GetTopicAttributes
- Fog::Parsers::AWS::SNS::ListSubscriptions
- Fog::Parsers::AWS::SNS::ListTopics
- Fog::Parsers::AWS::SNS::Publish
- Fog::Parsers::AWS::SNS::RemovePermission
- Fog::Parsers::AWS::SNS::SetTopicAttributes
- Fog::Parsers::AWS::SNS::Subscribe
- Fog::Parsers::AWS::SNS::Unsubscribe
- Fog::Parsers::AWS::SQS
- Fog::Parsers::AWS::SQS::Basic
- Fog::Parsers::AWS::SQS::CreateQueue
- Fog::Parsers::AWS::SQS::GetQueueAttributes
- Fog::Parsers::AWS::SQS::ListQueues
- Fog::Parsers::AWS::SQS::ReceiveMessage
- Fog::Parsers::AWS::SQS::SendMessage
- Fog::Parsers::AWS::STS
- Fog::Parsers::AWS::STS::GetSessionToken
- Fog::Parsers::AWS::SimpleDB
- Fog::Parsers::AWS::SimpleDB::Basic
- Fog::Parsers::AWS::SimpleDB::DomainMetadata
- Fog::Parsers::AWS::SimpleDB::GetAttributes
- Fog::Parsers::AWS::SimpleDB::ListDomains
- Fog::Parsers::AWS::SimpleDB::Select
- Fog::Parsers::Base
- Fog::Parsers::CDN
- Fog::Parsers::CDN::AWS
- Fog::Parsers::CDN::AWS::Distribution
- Fog::Parsers::CDN::AWS::GetDistributionList
- Fog::Parsers::CDN::AWS::GetInvalidation
- Fog::Parsers::CDN::AWS::GetInvalidationList
- Fog::Parsers::CDN::AWS::GetStreamingDistributionList
- Fog::Parsers::CDN::AWS::PostInvalidation
- Fog::Parsers::CDN::AWS::StreamingDistribution
- Fog::Parsers::Compute
- Fog::Parsers::Compute::AWS
- Fog::Parsers::Compute::AWS::AllocateAddress
- Fog::Parsers::Compute::AWS::AssociateAddress
- Fog::Parsers::Compute::AWS::AssociateDhcpOptions
- Fog::Parsers::Compute::AWS::AttachInternetGateway
- Fog::Parsers::Compute::AWS::AttachNetworkInterface
- Fog::Parsers::Compute::AWS::AttachVolume
- Fog::Parsers::Compute::AWS::Basic
- Fog::Parsers::Compute::AWS::CancelSpotInstanceRequests
- Fog::Parsers::Compute::AWS::CopySnapshot
- Fog::Parsers::Compute::AWS::CreateDhcpOptions
- Fog::Parsers::Compute::AWS::CreateImage
- Fog::Parsers::Compute::AWS::CreateInternetGateway
- Fog::Parsers::Compute::AWS::CreateKeyPair
- Fog::Parsers::Compute::AWS::CreateNetworkInterface
- Fog::Parsers::Compute::AWS::CreateSecurityGroup
- Fog::Parsers::Compute::AWS::CreateSnapshot
- Fog::Parsers::Compute::AWS::CreateSubnet
- Fog::Parsers::Compute::AWS::CreateVolume
- Fog::Parsers::Compute::AWS::CreateVpc
- Fog::Parsers::Compute::AWS::DeleteDhcpOptions
- Fog::Parsers::Compute::AWS::DeleteInternetGateway
- Fog::Parsers::Compute::AWS::DeleteNetworkInterface
- Fog::Parsers::Compute::AWS::DeleteSubnet
- Fog::Parsers::Compute::AWS::DeleteVpc
- Fog::Parsers::Compute::AWS::DeregisterImage
- Fog::Parsers::Compute::AWS::DescribeAddresses
- Fog::Parsers::Compute::AWS::DescribeAvailabilityZones
- Fog::Parsers::Compute::AWS::DescribeDhcpOptions
- Fog::Parsers::Compute::AWS::DescribeImages
- Fog::Parsers::Compute::AWS::DescribeInstanceStatus
- Fog::Parsers::Compute::AWS::DescribeInstances
- Fog::Parsers::Compute::AWS::DescribeInternetGateways
- Fog::Parsers::Compute::AWS::DescribeKeyPairs
- Fog::Parsers::Compute::AWS::DescribeNetworkInterfaceAttribute
- Fog::Parsers::Compute::AWS::DescribeNetworkInterfaces
- Fog::Parsers::Compute::AWS::DescribePlacementGroups
- Fog::Parsers::Compute::AWS::DescribeRegions
- Fog::Parsers::Compute::AWS::DescribeReservedInstances
- Fog::Parsers::Compute::AWS::DescribeReservedInstancesOfferings
- Fog::Parsers::Compute::AWS::DescribeSecurityGroups
- Fog::Parsers::Compute::AWS::DescribeSnapshots
- Fog::Parsers::Compute::AWS::DescribeSpotPriceHistory
- Fog::Parsers::Compute::AWS::DescribeSubnets
- Fog::Parsers::Compute::AWS::DescribeTags
- Fog::Parsers::Compute::AWS::DescribeVolumeStatus
- Fog::Parsers::Compute::AWS::DescribeVolumes
- Fog::Parsers::Compute::AWS::DescribeVpcs
- Fog::Parsers::Compute::AWS::DetachInternetGateway
- Fog::Parsers::Compute::AWS::DetachNetworkInterface
- Fog::Parsers::Compute::AWS::DetachVolume
- Fog::Parsers::Compute::AWS::GetConsoleOutput
- Fog::Parsers::Compute::AWS::GetPasswordData
- Fog::Parsers::Compute::AWS::ImportKeyPair
- Fog::Parsers::Compute::AWS::MonitorUnmonitorInstances
- Fog::Parsers::Compute::AWS::NetworkInterfaceParser
- Fog::Parsers::Compute::AWS::PurchaseReservedInstancesOffering
- Fog::Parsers::Compute::AWS::RegisterImage
- Fog::Parsers::Compute::AWS::RunInstances
- Fog::Parsers::Compute::AWS::SpotDatafeedSubscription
- Fog::Parsers::Compute::AWS::SpotInstanceRequests
- Fog::Parsers::Compute::AWS::StartStopInstances
- Fog::Parsers::Compute::AWS::TerminateInstances
- Fog::Parsers::Compute::Voxel
- Fog::Parsers::Compute::Voxel::Basic
- Fog::Parsers::Compute::Voxel::DevicesList
- Fog::Parsers::Compute::Voxel::ImagesList
- Fog::Parsers::Compute::Voxel::VoxcloudCreate
- Fog::Parsers::Compute::Voxel::VoxcloudDelete
- Fog::Parsers::Compute::Voxel::VoxcloudStatus
- Fog::Parsers::DNS
- Fog::Parsers::DNS::AWS
- Fog::Parsers::DNS::AWS::ChangeResourceRecordSets
- Fog::Parsers::DNS::AWS::CreateHostedZone
- Fog::Parsers::DNS::AWS::DeleteHostedZone
- Fog::Parsers::DNS::AWS::GetChange
- Fog::Parsers::DNS::AWS::GetHostedZone
- Fog::Parsers::DNS::AWS::ListHostedZones
- Fog::Parsers::DNS::AWS::ListResourceRecordSets
- Fog::Parsers::DNS::Bluebox
- Fog::Parsers::DNS::Bluebox::CreateRecord
- Fog::Parsers::DNS::Bluebox::CreateZone
- Fog::Parsers::DNS::Bluebox::GetRecord
- Fog::Parsers::DNS::Bluebox::GetRecords
- Fog::Parsers::DNS::Bluebox::GetZone
- Fog::Parsers::DNS::Bluebox::GetZones
- Fog::Parsers::DNS::Zerigo
- Fog::Parsers::DNS::Zerigo::CountHosts
- Fog::Parsers::DNS::Zerigo::CountZones
- Fog::Parsers::DNS::Zerigo::CreateHost
- Fog::Parsers::DNS::Zerigo::CreateZone
- Fog::Parsers::DNS::Zerigo::FindHosts
- Fog::Parsers::DNS::Zerigo::GetHost
- Fog::Parsers::DNS::Zerigo::GetZone
- Fog::Parsers::DNS::Zerigo::GetZoneStats
- Fog::Parsers::DNS::Zerigo::ListHosts
- Fog::Parsers::DNS::Zerigo::ListZones
- Fog::Parsers::Storage
- Fog::Parsers::Storage::AWS
- Fog::Parsers::Storage::AWS::AccessControlList
- Fog::Parsers::Storage::AWS::CompleteMultipartUpload
- Fog::Parsers::Storage::AWS::CopyObject
- Fog::Parsers::Storage::AWS::CorsConfiguration
- Fog::Parsers::Storage::AWS::DeleteMultipleObjects
- Fog::Parsers::Storage::AWS::GetBucket
- Fog::Parsers::Storage::AWS::GetBucketLifecycle
- Fog::Parsers::Storage::AWS::GetBucketLocation
- Fog::Parsers::Storage::AWS::GetBucketLogging
- Fog::Parsers::Storage::AWS::GetBucketObjectVersions
- Fog::Parsers::Storage::AWS::GetBucketVersioning
- Fog::Parsers::Storage::AWS::GetBucketWebsite
- Fog::Parsers::Storage::AWS::GetRequestPayment
- Fog::Parsers::Storage::AWS::GetService
- Fog::Parsers::Storage::AWS::InitiateMultipartUpload
- Fog::Parsers::Storage::AWS::ListMultipartUploads
- Fog::Parsers::Storage::AWS::ListParts
- Fog::Parsers::Storage::Google
- Fog::Parsers::Storage::Google::AccessControlList
- Fog::Parsers::Storage::Google::CopyObject
- Fog::Parsers::Storage::Google::GetBucket
- Fog::Parsers::Storage::Google::GetBucketObjectVersions
- Fog::Parsers::Storage::Google::GetBucketVersioning
- Fog::Parsers::Storage::Google::GetRequestPayment
- Fog::Parsers::Storage::Google::GetService
- Fog::Parsers::Storage::InternetArchive
- Fog::Parsers::Storage::InternetArchive::AccessControlList
- Fog::Parsers::Storage::InternetArchive::CompleteMultipartUpload
- Fog::Parsers::Storage::InternetArchive::CopyObject
- Fog::Parsers::Storage::InternetArchive::CorsConfiguration
- Fog::Parsers::Storage::InternetArchive::DeleteMultipleObjects
- Fog::Parsers::Storage::InternetArchive::GetBucket
- Fog::Parsers::Storage::InternetArchive::GetBucketLifecycle
- Fog::Parsers::Storage::InternetArchive::GetBucketLocation
- Fog::Parsers::Storage::InternetArchive::GetBucketLogging
- Fog::Parsers::Storage::InternetArchive::GetBucketWebsite
- Fog::Parsers::Storage::InternetArchive::GetRequestPayment
- Fog::Parsers::Storage::InternetArchive::GetService
- Fog::Parsers::Storage::InternetArchive::InitiateMultipartUpload
- Fog::Parsers::Storage::InternetArchive::ListMultipartUploads
- Fog::Parsers::Storage::InternetArchive::ListParts
- Fog::Parsers::Terremark
- Fog::Parsers::Terremark::Shared
- Fog::Parsers::Terremark::Shared::GetCatalog
- Fog::Parsers::Terremark::Shared::GetCatalogItem
- Fog::Parsers::Terremark::Shared::GetInternetServices
- Fog::Parsers::Terremark::Shared::GetKeysList
- Fog::Parsers::Terremark::Shared::GetNetworkIps
- Fog::Parsers::Terremark::Shared::GetNodeServices
- Fog::Parsers::Terremark::Shared::GetOrganization
- Fog::Parsers::Terremark::Shared::GetOrganizations
- Fog::Parsers::Terremark::Shared::GetPublicIps
- Fog::Parsers::Terremark::Shared::GetTasksList
- Fog::Parsers::Terremark::Shared::GetVappTemplate
- Fog::Parsers::Terremark::Shared::GetVdc
- Fog::Parsers::Terremark::Shared::InstantiateVappTemplate
- Fog::Parsers::Terremark::Shared::InternetService
- Fog::Parsers::Terremark::Shared::Network
- Fog::Parsers::Terremark::Shared::NodeService
- Fog::Parsers::Terremark::Shared::PublicIp
- Fog::Parsers::Terremark::Shared::Task
- Fog::Parsers::Terremark::Shared::Vapp
- Fog::Parsers::XenServer
- Fog::Parsers::XenServer::Base
- Fog::Parsers::XenServer::GetHosts
- Fog::Parsers::XenServer::GetNetworks
- Fog::Parsers::XenServer::GetPools
- Fog::Parsers::XenServer::GetRecords
- Fog::Parsers::XenServer::GetStorageRepositories
- Fog::Parsers::XenServer::GetVBDs
- Fog::Parsers::XenServer::GetVIFs
- Fog::Parsers::XenServer::GetVms
- Fog::Provider
- Fog::Rackspace
- Fog::Rackspace::BlockStorage
- Fog::Rackspace::BlockStorage::BadRequest
- Fog::Rackspace::BlockStorage::IdentifierTaken
- Fog::Rackspace::BlockStorage::InternalServerError
- Fog::Rackspace::BlockStorage::Mock
- Fog::Rackspace::BlockStorage::Real
- Fog::Rackspace::BlockStorage::ServiceError
- Fog::Rackspace::BlockStorage::Snapshot
- Fog::Rackspace::BlockStorage::Snapshots
- Fog::Rackspace::BlockStorage::Volume
- Fog::Rackspace::BlockStorage::VolumeType
- Fog::Rackspace::BlockStorage::VolumeTypes
- Fog::Rackspace::BlockStorage::Volumes
- Fog::Rackspace::Databases
- Fog::Rackspace::Databases::BadRequest
- Fog::Rackspace::Databases::Database
- Fog::Rackspace::Databases::Databases
- Fog::Rackspace::Databases::Flavor
- Fog::Rackspace::Databases::Flavors
- Fog::Rackspace::Databases::Instance
- Fog::Rackspace::Databases::Instances
- Fog::Rackspace::Databases::InternalServerError
- Fog::Rackspace::Databases::Mock
- Fog::Rackspace::Databases::Real
- Fog::Rackspace::Databases::ServiceError
- Fog::Rackspace::Databases::User
- Fog::Rackspace::Databases::Users
- Fog::Rackspace::Errors
- Fog::Rackspace::Errors::BadRequest
- Fog::Rackspace::Errors::Conflict
- Fog::Rackspace::Errors::InternalServerError
- Fog::Rackspace::Errors::ServiceError
- Fog::Rackspace::Errors::ServiceUnavailable
- Fog::Rackspace::Identity
- Fog::Rackspace::Identity::Credential
- Fog::Rackspace::Identity::Credentials
- Fog::Rackspace::Identity::Mock
- Fog::Rackspace::Identity::Real
- Fog::Rackspace::Identity::Role
- Fog::Rackspace::Identity::Roles
- Fog::Rackspace::Identity::ServiceCatalog
- Fog::Rackspace::Identity::Tenant
- Fog::Rackspace::Identity::Tenants
- Fog::Rackspace::Identity::User
- Fog::Rackspace::Identity::Users
- Fog::Rackspace::LoadBalancers
- Fog::Rackspace::LoadBalancers::AccessRule
- Fog::Rackspace::LoadBalancers::AccessRules
- Fog::Rackspace::LoadBalancers::BadRequest
- Fog::Rackspace::LoadBalancers::InternalServerError
- Fog::Rackspace::LoadBalancers::LoadBalancer
- Fog::Rackspace::LoadBalancers::LoadBalancers
- Fog::Rackspace::LoadBalancers::Mock
- Fog::Rackspace::LoadBalancers::Node
- Fog::Rackspace::LoadBalancers::Nodes
- Fog::Rackspace::LoadBalancers::Real
- Fog::Rackspace::LoadBalancers::ServiceError
- Fog::Rackspace::LoadBalancers::Shared
- Fog::Rackspace::LoadBalancers::VirtualIp
- Fog::Rackspace::LoadBalancers::VirtualIps
- Fog::Rackspace::MockData
- Fog::Rackspace::Service
- Fog::Rake
- Fog::Rake::ChangelogTask
- Fog::Rake::TestTask
- Fog::RiakCS
- Fog::RiakCS::MultipartUtils
- Fog::RiakCS::MultipartUtils::Headers
- Fog::RiakCS::Provisioning
- Fog::RiakCS::Provisioning::Mock
- Fog::RiakCS::Provisioning::Real
- Fog::RiakCS::Provisioning::ServiceUnavailable
- Fog::RiakCS::Provisioning::UserAlreadyExists
- Fog::RiakCS::Usage
- Fog::RiakCS::Usage::Mock
- Fog::RiakCS::Usage::Real
- Fog::RiakCS::Usage::Utils
- Fog::RiakCS::UserUtils
- Fog::RiakCS::Utils
- Fog::SCP
- Fog::SCP::Mock
- Fog::SCP::Real
- Fog::SSH
- Fog::SSH::Mock
- Fog::SSH::Real
- Fog::SSH::Result
- Fog::Schema
- Fog::Schema::DataValidator
- Fog::Serverlove
- Fog::Service
- Fog::Service::Collections
- Fog::Service::Error
- Fog::Service::NoLeakInspector
- Fog::Service::NotFound
- Fog::Storage
- Fog::Storage::AWS
- Fog::Storage::AWS::Directories
- Fog::Storage::AWS::Directory
- Fog::Storage::AWS::File
- Fog::Storage::AWS::Files
- Fog::Storage::AWS::GetObjectHttpUrl
- Fog::Storage::AWS::GetObjectHttpsUrl
- Fog::Storage::AWS::GetObjectUrl
- Fog::Storage::AWS::Mock
- Fog::Storage::AWS::PutObjectUrl
- Fog::Storage::AWS::Real
- Fog::Storage::AWS::Utils
- Fog::Storage::AWS::Version
- Fog::Storage::AWS::Versions
- Fog::Storage::Atmos
- Fog::Storage::Atmos::Directories
- Fog::Storage::Atmos::Directory
- Fog::Storage::Atmos::File
- Fog::Storage::Atmos::Files
- Fog::Storage::Atmos::Mock
- Fog::Storage::Atmos::Real
- Fog::Storage::Atmos::Utils
- Fog::Storage::Google
- Fog::Storage::Google::Directories
- Fog::Storage::Google::Directory
- Fog::Storage::Google::File
- Fog::Storage::Google::Files
- Fog::Storage::Google::GetObjectHttpUrl
- Fog::Storage::Google::GetObjectHttpsUrl
- Fog::Storage::Google::Mock
- Fog::Storage::Google::Real
- Fog::Storage::Google::Utils
- Fog::Storage::HP
- Fog::Storage::HP::Directories
- Fog::Storage::HP::Directory
- Fog::Storage::HP::File
- Fog::Storage::HP::Files
- Fog::Storage::HP::Mock
- Fog::Storage::HP::Real
- Fog::Storage::HP::SharedDirectories
- Fog::Storage::HP::SharedDirectory
- Fog::Storage::HP::SharedFile
- Fog::Storage::HP::SharedFiles
- Fog::Storage::HP::Utils
- Fog::Storage::IAAttributes
- Fog::Storage::IAAttributes::ClassMethods
- Fog::Storage::IAAttributes::InstanceMethods
- Fog::Storage::IBM
- Fog::Storage::IBM::Mock
- Fog::Storage::IBM::Offering
- Fog::Storage::IBM::Offerings
- Fog::Storage::IBM::Real
- Fog::Storage::IBM::Volume
- Fog::Storage::IBM::Volumes
- Fog::Storage::InternetArchive
- Fog::Storage::InternetArchive::Directories
- Fog::Storage::InternetArchive::Directory
- Fog::Storage::InternetArchive::File
- Fog::Storage::InternetArchive::Files
- Fog::Storage::InternetArchive::GetObjectHttpUrl
- Fog::Storage::InternetArchive::GetObjectHttpsUrl
- Fog::Storage::InternetArchive::GetObjectUrl
- Fog::Storage::InternetArchive::Mock
- Fog::Storage::InternetArchive::PutObjectUrl
- Fog::Storage::InternetArchive::Real
- Fog::Storage::InternetArchive::Utils
- Fog::Storage::Local
- Fog::Storage::Local::Directories
- Fog::Storage::Local::Directory
- Fog::Storage::Local::File
- Fog::Storage::Local::Files
- Fog::Storage::Local::Mock
- Fog::Storage::Local::Real
- Fog::Storage::Ninefold
- Fog::Storage::Ninefold::Mock
- Fog::Storage::Ninefold::Real
- Fog::Storage::Ninefold::Utils
- Fog::Storage::OpenStack
- Fog::Storage::OpenStack::Directories
- Fog::Storage::OpenStack::Directory
- Fog::Storage::OpenStack::File
- Fog::Storage::OpenStack::Files
- Fog::Storage::OpenStack::Mock
- Fog::Storage::OpenStack::Real
- Fog::Storage::Rackspace
- Fog::Storage::Rackspace::Account
- Fog::Storage::Rackspace::BadRequest
- Fog::Storage::Rackspace::Directories
- Fog::Storage::Rackspace::Directory
- Fog::Storage::Rackspace::File
- Fog::Storage::Rackspace::Files
- Fog::Storage::Rackspace::InternalServerError
- Fog::Storage::Rackspace::Metadata
- Fog::Storage::Rackspace::Mock
- Fog::Storage::Rackspace::Real
- Fog::Storage::Rackspace::ServiceError
- Fog::Storage::Rackspace::Utils
- Fog::StormOnDemand
- Fog::Terremark
- Fog::Terremark::Shared
- Fog::Terremark::Shared::Address
- Fog::Terremark::Shared::Addresses
- Fog::Terremark::Shared::Common
- Fog::Terremark::Shared::Image
- Fog::Terremark::Shared::Images
- Fog::Terremark::Shared::InternetService
- Fog::Terremark::Shared::InternetServices
- Fog::Terremark::Shared::Mock
- Fog::Terremark::Shared::Network
- Fog::Terremark::Shared::Networks
- Fog::Terremark::Shared::NodeService
- Fog::Terremark::Shared::NodeServices
- Fog::Terremark::Shared::Parser
- Fog::Terremark::Shared::Real
- Fog::Terremark::Shared::Server
- Fog::Terremark::Shared::Servers
- Fog::Terremark::Shared::Task
- Fog::Terremark::Shared::Tasks
- Fog::Terremark::Shared::Vdc
- Fog::Terremark::Shared::Vdcs
- Fog::Terremark::Vcloud
- Fog::Terremark::Vcloud::Bin
- Fog::Terremark::Vcloud::Defaults
- Fog::Terremark::Vcloud::Mock
- Fog::Terremark::Vcloud::Real
- Fog::Time
- Fog::ToHashDocument
- Fog::Vcloud
- Fog::Vcloud::Collection
- Fog::Vcloud::Compute
- Fog::Vcloud::Compute::Catalog
- Fog::Vcloud::Compute::CatalogItem
- Fog::Vcloud::Compute::CatalogItems
- Fog::Vcloud::Compute::Catalogs
- Fog::Vcloud::Compute::Helpers
- Fog::Vcloud::Compute::Helpers::Status
- Fog::Vcloud::Compute::Ip
- Fog::Vcloud::Compute::Ips
- Fog::Vcloud::Compute::Mock
- Fog::Vcloud::Compute::Network
- Fog::Vcloud::Compute::Networks
- Fog::Vcloud::Compute::Organization
- Fog::Vcloud::Compute::Organizations
- Fog::Vcloud::Compute::Real
- Fog::Vcloud::Compute::Server
- Fog::Vcloud::Compute::Servers
- Fog::Vcloud::Compute::Shared
- Fog::Vcloud::Compute::Task
- Fog::Vcloud::Compute::Tasks
- Fog::Vcloud::Compute::Vapp
- Fog::Vcloud::Compute::Vapps
- Fog::Vcloud::Compute::Vdc
- Fog::Vcloud::Compute::Vdcs
- Fog::Vcloud::Model
- Fog::Vmfusion
- Fog::Volume
- Fog::Volume::OpenStack
- Fog::Volume::OpenStack::Mock
- Fog::Volume::OpenStack::Real
- Fog::Volume::OpenStack::Volume
- Fog::Volume::OpenStack::Volumes
- Fog::Voxel
- Fog::Vsphere
- Fog::Vsphere::Errors
- Fog::Vsphere::Errors::NotFound
- Fog::Vsphere::Errors::SecurityError
- Fog::Vsphere::Errors::ServiceError
- Fog::XenServer
- Fog::XenServer::Connection
- Fog::XenServer::InvalidLogin
- Fog::XenServer::NokogiriStreamParser
- Fog::XenServer::NotFound
- Fog::XenServer::RequestFailed
- Fog::Zerigo
- AWS
- Atmos
- BareMetalCloud
- Bluebox
- Brightbox
- Clodo
- Cloudstack
- DNSMadeEasy
- DNSimple
- DigitalOcean
- Dreamhost
- Dynect
- Ecloud
- Glesys
- GoGrid
- Google
- HP
- Hash
- IBM
- IPAddr
- InternetArchive
- Joyent
- Libvirt
- Linode
- Local
- Ninefold
- Object
- OpenStack
- Ovirt
- Rackspace
- RiakCS
- Serverlove
- StormOnDemand
- String
- Terremark
- TerremarkParser
- VAppStatus
- Vcloud
- Vmfusion
- Voxel
- Vsphere
- XenServer
- Zerigo

No matching classes.

# Fog::Compute::AWS::Mock

### Attributes

region[RW]

### Public Class Methods

data() click to toggle source

    # File lib/fog/aws/compute.rb, line 145
    def self.data
      @data ||= Hash.new do |hash, region|
        hash[region] = Hash.new do |region_hash, key|
          owner_id = Fog::AWS::Mock.owner_id
          security_group_id = Fog::AWS::Mock.security_group_id
          region_hash[key] = {
            :deleted_at => {},
            :addresses  => {},
            :images     => {},
            :image_launch_permissions => Hash.new do |permissions_hash, image_key|
              permissions_hash[image_key] = {
                :users => []
              }
            end,
            :instances  => {},
            :reserved_instances => {},
            :key_pairs  => {},
            :limits     => { :addresses => 5 },
            :owner_id   => owner_id,
            :security_groups => {
              'default' => {
                'groupDescription'    => 'default group',
                'groupName'           => 'default',
                'groupId'             => security_group_id,
                'ipPermissionsEgress' => [],
                'ipPermissions'       => [
                  {
                    'groups'      => [{'groupName' => 'default', 'userId' => owner_id, 'groupId' => security_group_id }],
                    'fromPort'    => -1,
                    'toPort'      => -1,
                    'ipProtocol'  => 'icmp',
                    'ipRanges'    => []
                  },
                  {
                    'groups'      => [{'groupName' => 'default', 'userId' => owner_id, 'groupId' => security_group_id}],
                    'fromPort'    => 0,
                    'toPort'      => 65535,
                    'ipProtocol'  => 'tcp',
                    'ipRanges'    => []
                  },
                  {
                    'groups'      => [{'groupName' => 'default', 'userId' => owner_id, 'groupId' => security_group_id}],
                    'fromPort'    => 0,
                    'toPort'      => 65535,
                    'ipProtocol'  => 'udp',
                    'ipRanges'    => []
                  }
                ],
                'ownerId'             => owner_id
              }
            },
            :network_interfaces => {},
            :snapshots => {},
            :volumes => {},
            :internet_gateways => {},
            :tags => {},
            :tag_sets => Hash.new do |tag_set_hash, resource_id|
              tag_set_hash[resource_id] = {}
            end,
            :subnets => [],
            :vpcs => [],
            :dhcp_options => [],
            :internet_gateways => []
          }
        end
      end
    end

new(options={}) click to toggle source

    # File lib/fog/aws/compute.rb, line 219
    def initialize(options={})
      @use_iam_profile = options[:use_iam_profile]
      @aws_credentials_expire_at = Time::now + 20
      setup_credentials(options)
      @region = options[:region] || 'us-east-1'

      unless ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(@region)
        raise ArgumentError, "Unknown region: #{@region.inspect}"
      end
    end

reset() click to toggle source

    # File lib/fog/aws/compute.rb, line 213
    def self.reset
      @data = nil
    end

### Public Instance Methods

allocate_address(domain = 'standard') click to toggle source

    # File lib/fog/aws/requests/compute/allocate_address.rb, line 32
    def allocate_address(domain = 'standard')
      domain = domain == 'vpc' ? 'vpc' : 'standard'
      response = Excon::Response.new
      if describe_addresses.body['addressesSet'].size < self.data[:limits][:addresses]
        response.status = 200
        public_ip = Fog::AWS::Mock.ip_address
        data = {
          'instanceId' => nil,
          'publicIp'   => public_ip,
          'domain'     => domain
        }
        if domain == 'vpc'
          data['allocationId'] = "eipalloc-#{Fog::Mock.random_hex(8)}"
        end
        self.data[:addresses][public_ip] = data
        response.body = data.reject {|k, v| k == 'instanceId' }.merge('requestId' => Fog::AWS::Mock.request_id)
        response
      else
        response.status = 400
        response.body = "<?xml version=\"1.0\"?><Response><Errors><Error><Code>AddressLimitExceeded</Code><Message>Too many addresses allocated</Message></Error></Errors><RequestID>#{Fog::AWS::Mock.request_id}</RequestID></Response>"
        raise(Excon::Errors.status_error({:expects => 200}, response))
      end
    end

apply_tag_filters(resources, filters, resource_id_key) click to toggle source

    # File lib/fog/aws/compute.rb, line 258
    def apply_tag_filters(resources, filters, resource_id_key)
      tag_set_fetcher = lambda {|resource| self.data[:tag_sets][resource[resource_id_key]] }

      # tag-key: match resources tagged with this key (any value)
      if filters.has_key?('tag-key')
        value = filters.delete('tag-key')
        resources = resources.select{|r| tag_set_fetcher[r].has_key?(value)}
      end

      # tag-value: match resources tagged with this value (any key)
      if filters.has_key?('tag-value')
        value = filters.delete('tag-value')
        resources = resources.select{|r| tag_set_fetcher[r].values.include?(value)}
      end

      # tag:key: match resources tagged with a key-value pair.  Value may be an array, which is OR'd.
      tag_filters = {}
      filters.keys.each do |key|
        tag_filters[key.gsub('tag:', '')] = filters.delete(key) if /^tag:/ =~ key
      end
      for tag_key, tag_value in tag_filters
        resources = resources.select{|r| tag_value.include?(tag_set_fetcher[r][tag_key])}
      end

      resources
    end

associate_address(instance_id=nil, public_ip=nil, network_interface_id=nil, allocation_id=nil) click to toggle source

    # File lib/fog/aws/requests/compute/associate_address.rb, line 43
    def associate_address(instance_id=nil, public_ip=nil, network_interface_id=nil, allocation_id=nil)
      public_ip = allocation_id.nil? ? public_ip : nil
      response = Excon::Response.new
      response.status = 200
      instance = self.data[:instances][instance_id]
      address = public_ip.nil? ? nil : self.data[:addresses][public_ip]
      if ((instance && address) || (instance &&  !allocation_id.nil?) || (!allocation_id.nil? && !network_interface_id.nil?))
        if !allocation_id.nil?
          allocation_ip = describe_addresses( 'allocation-id'  => "#{allocation_id}").body['addressesSet'].first
          if !allocation_ip.nil?
            public_ip = allocation_ip['publicIp']
          end
        end
        if !address.nil?
          if current_instance = self.data[:instances][address['instanceId']]
            current_instance['ipAddress'] = current_instance['originalIpAddress']
          end
          address['instanceId'] = instance_id
        end
        # detach other address (if any)
        if self.data[:addresses][instance['ipAddress']]
          self.data[:addresses][instance['ipAddress']]['instanceId'] = nil
        end
        if !public_ip.nil?
          instance['ipAddress'] = public_ip
          instance['dnsName'] = Fog::AWS::Mock.dns_name_for(public_ip)
        end
        response.status = 200
        if !instance_id.nil? && !public_ip.nil?
          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'return'    => true
          }
        elsif !allocation_id.nil?
          response.body = {
            'requestId'     => Fog::AWS::Mock.request_id,
            'return'        => true,
            'associationId' => Fog::AWS::Mock.request_id
          }
        end
        response
      #elsif ! network_interface_id.nil? && allocation_id.nil?
      #  raise Fog::Compute::AWS::NotFound.new("You must specify an AllocationId when specifying a NetworkInterfaceID")
      #elsif instance.nil? && network_interface_id.nil?
      #  raise Fog::Compute::AWS::Error.new("You must specify either an InstanceId or a NetworkInterfaceID")
      #elsif !instance && !network_interface_id
      #  raise Fog::Compute::AWS::Error.new(" 2 You must specify either an InstanceId or a NetworkInterfaceID")
      elsif !instance
        raise Fog::Compute::AWS::NotFound.new("You must specify either an InstanceId or a NetworkInterfaceID")
      elsif !address
        raise Fog::Compute::AWS::Error.new("AuthFailure => The address '#{public_ip}' does not belong to you.")
      end
    end

associate_dhcp_options(dhcp_options_id, vpc_id) click to toggle source

    # File lib/fog/aws/requests/compute/associate_dhcp_options.rb, line 35
    def associate_dhcp_options(dhcp_options_id, vpc_id)
      response = Excon::Response.new
      if dhcp_options_id && vpc_id
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return' => true
        }
        response
      else
        if !dhcp_options_id
          message << 'The request must contain the parameter dhcp_options_id'
        elsif !vpc_id
          message << 'The request must contain the parameter vpc_id'
        end
        raise Fog::Compute::AWS::Error.new(message)
      end
    end

attach_internet_gateway(internet_gateway_id, vpc_id) click to toggle source

    # File lib/fog/aws/requests/compute/attach_internet_gateway.rb, line 34
    def attach_internet_gateway(internet_gateway_id, vpc_id)
      response = Excon::Response.new
      if internet_gateway_id && vpc_id
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return' => true
        }
        response
      else
        if !internet_gateway_id
          message << 'The request must contain the parameter internet_gateway_id'
        elsif !vpc_id
          message << 'The request must contain the parameter vpc_id'
        end
        raise Fog::Compute::AWS::Error.new(message)
      end
    end

attach_network_interface(nic_id, instance_id, device_index) click to toggle source

    # File lib/fog/aws/requests/compute/attach_network_interface.rb, line 36
    def attach_network_interface(nic_id, instance_id, device_index)
      response = Excon::Response.new
      if self.data[:network_interfaces][nic_id]
        attachment = self.data[:network_interfaces][nic_id]['attachment']
        attachment['attachmentId'] = Fog::AWS::Mock.request_id
        attachment['instanceId']   = instance_id

        response.status = 200
        response.body = {
          'requestId'    => Fog::AWS::Mock.request_id,
          'attachmentId' => attachment['attachmentId']
        }
      else
        raise Fog::Compute::AWS::NotFound.new("The network interface '#{nic_id}' does not exist")
      end

      response
    end

attach_volume(instance_id, volume_id, device) click to toggle source

    # File lib/fog/aws/requests/compute/attach_volume.rb, line 41
    def attach_volume(instance_id, volume_id, device)
      response = Excon::Response.new
      if instance_id && volume_id && device
        response.status = 200
        instance = self.data[:instances][instance_id]
        volume = self.data[:volumes][volume_id]
        if instance && volume
          unless volume['status'] == 'available'
            raise Fog::Compute::AWS::Error.new("Client.VolumeInUse => Volume #{volume_id} is unavailable")
          end

          data = {
            'attachTime'  => Time.now,
            'device'      => device,
            'instanceId'  => instance_id,
            'status'      => 'attaching',
            'volumeId'    => volume_id
          }
          volume['attachmentSet'] = [data]
          volume['status'] = 'attaching'
          response.status = 200
          response.body = {
            'requestId' => Fog::AWS::Mock.request_id
          }.merge!(data)
          response
        elsif !instance
          raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_id}' does not exist.")
        elsif !volume
          raise Fog::Compute::AWS::NotFound.new("The volume '#{volume_id}' does not exist.")
        end
      else
        message = 'MissingParameter => '
        if !instance_id
          message << 'The request must contain the parameter instance_id'
        elsif !volume_id
          message << 'The request must contain the parameter volume_id'
        else
          message << 'The request must contain the parameter device'
        end
        raise Fog::Compute::AWS::Error.new(message)
      end
    end

authorize_security_group_ingress(group_name, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/authorize_security_group_ingress.rb, line 84
    def authorize_security_group_ingress(group_name, options = {})
      options = Fog::AWS.parse_security_group_options(group_name, options)
      if options.key?('GroupName')
        group_name = options['GroupName']
      else
        group_name = self.data[:security_groups].reject { |k,v| v['groupId'] != options['GroupId'] } .keys.first
      end

      response = Excon::Response.new
      group = self.data[:security_groups][group_name]

      if group
        verify_permission_options(options, group['vpcId'] != nil)

        normalized_permissions = normalize_permissions(options)

        normalized_permissions.each do |permission|
          if matching_group_permission = find_matching_permission(group, permission)
            if permission['groups'].any? {|pg| matching_group_permission['groups'].include?(pg) }
              raise Fog::Compute::AWS::Error, "InvalidPermission.Duplicate => The permission '123' has already been authorized in the specified group"
            end

            if permission['ipRanges'].any? {|pr| matching_group_permission['ipRanges'].include?(pr) }
              raise Fog::Compute::AWS::Error, "InvalidPermission.Duplicate => The permission '123' has already been authorized in the specified group"
            end
          end
        end

        normalized_permissions.each do |permission|
          if matching_group_permission = find_matching_permission(group, permission)
            matching_group_permission['groups'] += permission['groups']
            matching_group_permission['ipRanges'] += permission['ipRanges']
          else
            group['ipPermissions'] << permission
          end
        end

        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The security group '#{group_name}' does not exist")
      end
    end

copy_snapshot(source_snapshot_id, source_region, description = nil) click to toggle source

Usage

AWS.copy_snapshot("snap-1db0a957", 'us-east-1')

    # File lib/fog/aws/requests/compute/copy_snapshot.rb, line 41
    def copy_snapshot(source_snapshot_id, source_region, description = nil)
      response = Excon::Response.new
      response.status = 200
      snapshot_id = Fog::AWS::Mock.snapshot_id
      data = {
        'snapshotId'  => snapshot_id,
      }
      self.data[:snapshots][snapshot_id] = data
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id
      }.merge!(data)
      response
    end

create_dhcp_options(dhcp_configurations = {}) click to toggle source

    # File lib/fog/aws/requests/compute/create_dhcp_options.rb, line 43
    def create_dhcp_options(dhcp_configurations = {})
      params = {}
      params.merge!(indexed_multidimensional_params(dhcp_configurations))
      Excon::Response.new.tap do |response|
        response.status = 200
        self.data[:dhcp_options].push({
          'dhcpOptionsId' => Fog::AWS::Mock.dhcp_options_id,
          'dhcpConfigurationSet'  => {},
          'tagSet'             => {}
        })
        response.body = {
          'requestId'    => Fog::AWS::Mock.request_id,
          'dhcpOptionsSet'      => self.data[:dhcp_options]
        }
      end
    end

create_image(instance_id, name, description, no_reboot = false, options = {}) click to toggle source

Usage

AWS.create_image("i-ac65ee8c", "test", "something")

    # File lib/fog/aws/requests/compute/create_image.rb, line 54
    def create_image(instance_id, name, description, no_reboot = false, options = {})
      params = {}
      block_device_mappings = options[:block_device_mappings] || []
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']})
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.NoDevice', block_device_mappings.map{|mapping| mapping['NoDevice']})
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.VirtualName', block_device_mappings.map{|mapping| mapping['VirtualName']})
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.SnapshotId', block_device_mappings.map{|mapping| mapping['Ebs.SnapshotId']})
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.DeleteOnTermination', block_device_mappings.map{|mapping| mapping['Ebs.DeleteOnTermination']})
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.VolumeType', block_device_mappings.map{|mapping| mapping['Ebs.VolumeType']})
      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.Iops', block_device_mappings.map{|mapping| mapping['Ebs.Iops']})
      params.reject!{|k,v| v.nil?}

      reserved_ebs_root_device  = '/dev/sda1'
      block_devices = options.delete(:block_device_mappings) || []
      register_image_response = register_image(name, description, reserved_ebs_root_device, block_devices, options)

      response = Excon::Response.new
      if instance_id && !name.empty?
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'imageId' => register_image_response.body['imageId']
        }
      else
        response.status = 400
        response.body = {
          'Code' => 'InvalidParameterValue'
        }
        if name.empty?
          response.body['Message'] = "Invalid value '' for name. Must be specified."
        end
      end
      response
    end

create_internet_gateway() click to toggle source

    # File lib/fog/aws/requests/compute/create_internet_gateway.rb, line 35
    def create_internet_gateway()
    self.data[:internet_gateways].push({
      'internetGatewayId' => Fog::AWS::Mock.request_id,
      'attachmentSet'     => {},
      'tagSet'            => {}
    })
     Excon::Response.new(
        :status => 200,
        :body   => {
          'requestId' => Fog::AWS::Mock.request_id,
          'internetGatewaySet' => self.data[:internet_gateways]
        }
      )
    end

create_key_pair(key_name) click to toggle source

    # File lib/fog/aws/requests/compute/create_key_pair.rb, line 34
    def create_key_pair(key_name)
      response = Excon::Response.new
      unless self.data[:key_pairs][key_name]
        response.status = 200
        data = {
          'keyFingerprint'  => Fog::AWS::Mock.key_fingerprint,
          'keyMaterial'     => Fog::AWS::Mock.key_material,
          'keyName'         => key_name
        }
        self.data[:key_pairs][key_name] = data
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id
        }.merge!(data)
        response
      else
        raise Fog::Compute::AWS::Error.new("InvalidKeyPair.Duplicate => The keypair '#{key_name}' already exists.")
      end
    end

create_network_interface(subnetId, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/create_network_interface.rb, line 65
    def create_network_interface(subnetId, options = {})
      response = Excon::Response.new
      if subnetId
        id = Fog::AWS::Mock.network_interface_id

        groups = {}
        if options['GroupSet']
          options['GroupSet'].each do |group_id|
            name = self.data[:security_groups].select { |k,v| v['groupId'] == group_id } .first.first
            if name.nil?
              raise Fog::Compute::AWS::Error.new("Unknown security group '#{group_id}' specified")
            end
            groups[group_id] = name
          end
        end
        if options['PrivateIpAddress'].nil?
          options['PrivateIpAddress'] = "10.0.0.2"
        end

        data = {
          'networkInterfaceId' => id,
          'subnetId'           => subnetId,
          'vpcId'              => 'mock-vpc-id',
          'availabilityZone'   => 'mock-zone',
          'description'        => options['Description'],
          'ownerId'            => '',
          'requesterManaged'   => 'false',
          'status'             => 'available',
          'macAddress'         => '00:11:22:33:44:55',
          'privateIpAddress'   => options['PrivateIpAddress'],
          'sourceDestCheck'    => true,
          'groupSet'           => groups,
          'attachment'         => {},
          'association'        => {},
          'tagSet'             => {}
        }
        self.data[:network_interfaces][id] = data
        response.body = {
          'requestId'        => Fog::AWS::Mock.request_id,
          'networkInterface' => data
        }
        response
      else
        response.status = 400
        response.body = {
          'Code'    => 'InvalidParameterValue',
          'Message' => "Invalid value '' for subnetId"
        }
      end
    end

create_security_group(name, description, vpc_id=nil) click to toggle source

    # File lib/fog/aws/requests/compute/create_security_group.rb, line 37
    def create_security_group(name, description, vpc_id=nil)
      response = Excon::Response.new
      unless self.data[:security_groups][name]
        data = {
          'groupDescription'    => description,
          'groupName'           => name,
          'groupId'             => Fog::AWS::Mock.security_group_id,
          'ipPermissionsEgress' => [],
          'ipPermissions'       => [],
          'ownerId'             => self.data[:owner_id],
          'vpcId'               => vpc_id
        }
        self.data[:security_groups][name] = data
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'groupId'   => data['groupId'],
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::Error.new("InvalidGroup.Duplicate => The security group '#{name}' already exists")
      end
    end

create_snapshot(volume_id, description = nil) click to toggle source

Usage

AWS.create_snapshot("vol-f7c23423", "latest snapshot")

    # File lib/fog/aws/requests/compute/create_snapshot.rb, line 43
    def create_snapshot(volume_id, description = nil)
      response = Excon::Response.new
      if volume = self.data[:volumes][volume_id]
        response.status = 200
        snapshot_id = Fog::AWS::Mock.snapshot_id
        data = {
          'description' => description,
          'ownerId'     => self.data[:owner_id],
          'progress'    => nil,
          'snapshotId'  => snapshot_id,
          'startTime'   => Time.now,
          'status'      => 'pending',
          'volumeId'    => volume_id,
          'volumeSize'  => volume['size']
        }
        self.data[:snapshots][snapshot_id] = data
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id
        }.merge!(data)
      else
        response.status = 400
        raise(Excon::Errors.status_error({:expects => 200}, response))
      end
      response
    end

create_subnet(vpcId, cidrBlock, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/create_subnet.rb, line 44
    def create_subnet(vpcId, cidrBlock, options = {})
      av_zone = options['AvailabilityZone'].nil? ? 'us-east-1c' : options['AvailabilityZone']
      Excon::Response.new.tap do |response|
        if cidrBlock  && vpcId
          response.status = 200
          self.data[:subnets].push({
            'subnetId'                 => Fog::AWS::Mock.request_id,
            'state'                    => 'pending',
            'vpcId'                    => vpcId,
            'cidrBlock'                => cidrBlock,
            'availableIpAddressCount'  => "255",
            'availabilityZone'         => av_zone,
            'tagSet'                   => {}
          })

          response.body = {
            'requestId'    => Fog::AWS::Mock.request_id,
            'subnetSet'    => self.data[:subnets]
          }
        else
          response.status = 400
          response.body = {
            'Code' => 'InvalidParameterValue'
          }
          if cidrBlock.empty?
            response.body['Message'] = "Invalid value '' for cidrBlock. Must be specified."
          end
          if vpcId.empty?
            response.body['Message'] = "Invalid value '' for vpcId. Must be specified."
          end
        end
      end
    end

create_tags(resources, tags) click to toggle source

    # File lib/fog/aws/requests/compute/create_tags.rb, line 43
    def create_tags(resources, tags)
      resources = [*resources]

      tagged = resources.map do |resource_id|
        type = case resource_id
        when /^ami\-[a-z0-9]{8}$/
          'image'
        when /^i\-[a-z0-9]{8}$/
          'instance'
        when /^snap\-[a-z0-9]{8}$/
          'snapshot'
        when /^vol\-[a-z0-9]{8}$/
          'volume'
        end
        if type && ((type == 'image' && visible_images[resource_id]) || self.data[:"#{type}s"][resource_id])
          { 'resourceId' => resource_id, 'resourceType' => type }
        else
          raise(Fog::Service::NotFound.new("The #{type} ID '#{resource_id}' does not exist"))
        end
      end

      tags.each do |key, value|
        self.data[:tags][key] ||= {}
        self.data[:tags][key][value] ||= []
        self.data[:tags][key][value] |= tagged

        tagged.each do |resource|
          self.data[:tag_sets][resource['resourceId']][key] = value
        end
      end

      response = Excon::Response.new
      response.status = 200
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'return'    => true
      }
      response
    end

create_volume(availability_zone, size, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/create_volume.rb, line 49
    def create_volume(availability_zone, size, options = {})
      unless options.is_a?(Hash)
        Fog::Logger.deprecation("create_volume with a bare snapshot_id is deprecated, use create_volume(availability_zone, size, 'SnapshotId' => snapshot_id) instead [light_black](#{caller.first})[/]")
        options = { 'SnapshotId' => options }
      end

      response = Excon::Response.new
      if availability_zone && (size || options['SnapshotId'])
        snapshot = self.data[:snapshots][options['SnapshotId']]
        if options['SnapshotId'] && !snapshot
          raise Fog::Compute::AWS::NotFound.new("The snapshot '#{options['SnapshotId']}' does not exist.")
        end

        if snapshot && size && size < snapshot['volumeSize']
          raise Fog::Compute::AWS::NotFound.new("The snapshot '#{options['SnapshotId']}' has size #{snapshot['volumeSize']} which is greater than #{size}.")
        elsif snapshot && !size
          size = snapshot['volumeSize']
        end

        if options['VolumeType'] == 'io1'
          iops = options['Iops']
          if !iops
            raise Fog::Compute::AWS::Error.new("InvalidParameterCombination => The parameter iops must be specified for io1 volumes.")
          end

          if size < 10
            raise Fog::Compute::AWS::Error.new("InvalidParameterValue => Volume of #{size}GiB is too small; minimum is 10GiB.")
          end

          if (iops_to_size_ratio = iops.to_f / size.to_f) > 10.0
            raise Fog::Compute::AWS::Error.new("InvalidParameterValue => Iops to volume size ratio of #{"%.1f" % iops_to_size_ratio} is too high; maximum is 10.0")
          end

          if iops < 100
            raise Fog::Compute::AWS::Error.new("VolumeIOPSLimit => Volume iops of #{iops} is too low; minimum is 100.")
          end

          if iops > 2000
            raise Fog::Compute::AWS::Error.new("VolumeIOPSLimit => Volume iops of #{iops} is too high; maximum is 2000.")
          end
        end

        response.status = 200
        volume_id = Fog::AWS::Mock.volume_id
        data = {
          'availabilityZone'  => availability_zone,
          'attachmentSet'     => [],
          'createTime'        => Time.now,
          'iops'              => options['Iops'],
          'size'              => size,
          'snapshotId'        => options['SnapshotId'],
          'status'            => 'creating',
          'volumeId'          => volume_id,
          'volumeType'        => options['VolumeType'] || 'standard'
        }
        self.data[:volumes][volume_id] = data
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id
        }.merge!(data.reject {|key,value| !['availabilityZone','createTime','size','snapshotId','status','volumeId','volumeType'].include?(key) })
      else
        response.status = 400
        response.body = {
          'Code' => 'MissingParameter'
        }
        unless availability_zone
          response.body['Message'] = 'The request must contain the parameter availability_zone'
        else
          response.body['Message'] = 'The request must contain the parameter size'
        end
      end
      response
    end

create_vpc(cidrBlock) click to toggle source

    # File lib/fog/aws/requests/compute/create_vpc.rb, line 42
    def create_vpc(cidrBlock)
      Excon::Response.new.tap do |response|
        if cidrBlock
          response.status = 200
          self.data[:vpcs].push({
            'vpcId'         => Fog::AWS::Mock.request_id,
            'state'         => 'pending',
            'cidrBlock'     => cidrBlock,
            'dhcpOptionsId' => Fog::AWS::Mock.request_id,
            'tagSet'        => {}

          })
          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'vpcSet'    => self.data[:vpcs]
          }
        else
          response.status = 400
          response.body = {
            'Code' => 'InvalidParameterValue'
          }
          if cidrBlock.empty?
            response.body['Message'] = "Invalid value '' for cidrBlock. Must be specified."
          end
        end
      end
    end

data() click to toggle source

    # File lib/fog/aws/compute.rb, line 234
    def data
      self.region_data[@aws_access_key_id]
    end

delete_dhcp_options(dhcp_options_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_dhcp_options.rb, line 31
    def delete_dhcp_options(dhcp_options_id)
      Excon::Response.new.tap do |response|
        if dhcp_options_id
          response.status = 200
          self.data[:dhcp_options].reject! { |v| v['dhcpOptionsId'] == dhcp_options_id }

          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'return' => true
          }
        else
          message = 'MissingParameter => '
          message << 'The request must contain the parameter dhcp_options_id'
          raise Fog::Compute::AWS::Error.new(message)
        end
      end
    end

delete_internet_gateway(internet_gateway_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_internet_gateway.rb, line 29
    def delete_internet_gateway(internet_gateway_id)
      Excon::Response.new.tap do |response|
        if internet_gateway_id
          response.status = 200
          self.data[:internet_gateways].reject! { |v| v['internetGatewayId'] == internet_gateway_id }

          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'return' => true
          }
        else
          message = 'MissingParameter => '
          message << 'The request must contain the parameter internet_gateway_id'
          raise Fog::Compute::AWS::Error.new(message)
        end
      end
    end

delete_key_pair(key_name) click to toggle source

    # File lib/fog/aws/requests/compute/delete_key_pair.rb, line 33
    def delete_key_pair(key_name)
      response = Excon::Response.new
      self.data[:key_pairs].delete(key_name)
      response.status = 200
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'return'    => true
      }
      response
    end

delete_network_interface(network_interface_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_network_interface.rb, line 29
    def delete_network_interface(network_interface_id)
      response = Excon::Response.new
      if self.data[:network_interfaces][network_interface_id]

        if self.data[:network_interfaces][network_interface_id]['attachment']['attachmentId']
          raise Fog::Compute::AWS::Error.new("Interface is in use")
        end

        self.data[:network_interfaces].delete(network_interface_id)

        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The network interface '#{network_interface_id}' does not exist")
      end
    end

delete_security_group(name, id = nil) click to toggle source

    # File lib/fog/aws/requests/compute/delete_security_group.rb, line 43
    def delete_security_group(name, id = nil)
      if name == 'default'
        raise Fog::Compute::AWS::Error.new("InvalidGroup.Reserved => The security group 'default' is reserved")
      end

      if name && id
        raise Fog::Compute::AWS::Error.new("May not specify both group_name and group_id")
      end
      if id
        name = self.data[:security_groups].reject { |k,v| v['groupId'] != id } .keys.first
      end

      response = Excon::Response.new
      if self.data[:security_groups][name]

        used_by_groups = []
        self.region_data.each do |access_key, key_data|
          key_data[:security_groups].each do |group_name, group|
            next if group == self.data[:security_groups][name]

            group['ipPermissions'].each do |group_ip_permission|
              group_ip_permission['groups'].each do |group_group_permission|
                if group_group_permission['groupName'] == name &&
                    group_group_permission['userId'] == self.data[:owner_id]
                  used_by_groups << "#{key_data[:owner_id]}:#{group_name}"
                end
              end
            end
          end
        end

        unless used_by_groups.empty?
          raise Fog::Compute::AWS::Error.new("InvalidGroup.InUse => Group #{self.data[:owner_id]}:#{name} is used by groups: #{used_by_groups.uniq.join(" ")}")
        end

        self.data[:security_groups].delete(name)
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The security group '#{name}' does not exist")
      end
    end

delete_snapshot(snapshot_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_snapshot.rb, line 33
    def delete_snapshot(snapshot_id)
      response = Excon::Response.new
      if snapshot = self.data[:snapshots].delete(snapshot_id)
        response.status = true
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' does not exist.")
      end
    end

delete_subnet(subnet_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_subnet.rb, line 30
    def delete_subnet(subnet_id)
      Excon::Response.new.tap do |response|
        if subnet_id
          self.data[:subnets].reject! { |v| v['subnetId'] == subnet_id }
          response.status = 200

          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'return' => true
          }
        else
          message = 'MissingParameter => '
          message << 'The request must contain the parameter subnet_id'
          raise Fog::Compute::AWS::Error.new(message)
        end
      end
    end

delete_tags(resources, tags) click to toggle source

    # File lib/fog/aws/requests/compute/delete_tags.rb, line 44
    def delete_tags(resources, tags)
      tagged = Array(resources).map do |resource_id|
        type = case resource_id
        when /^ami\-[a-z0-9]{8}$/
          'image'
        when /^i\-[a-z0-9]{8}$/
          'instance'
        when /^snap\-[a-z0-9]{8}$/
          'snapshot'
        when /^vol\-[a-z0-9]{8}$/
          'volume'
        end
        if type && ((type == 'image' && visible_images[resource_id]) || self.data[:"#{type}s"][resource_id])
          { 'resourceId' => resource_id, 'resourceType' => type }
        else
          raise(Fog::Service::NotFound.new("The #{type} ID '#{resource_id}' does not exist"))
        end
      end

      tags.each do |key, value|
        self.data[:tags][key][value] = self.data[:tags][key][value] - tagged
      end

      tagged.each do |resource|
        tags.each do |key, value|
          tagset = self.data[:tag_sets][resource['resourceId']]
          tagset.delete(key) if tagset.has_key?(key) && (value.nil? || tagset[key] == value)
        end
      end

      response = Excon::Response.new
      response.status = true
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'return'    => true
      }
      response
    end

delete_volume(volume_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_volume.rb, line 33
    def delete_volume(volume_id)
      response = Excon::Response.new
      if volume = self.data[:volumes][volume_id]
        if volume["attachmentSet"].any?
          attach = volume["attachmentSet"].first
          raise Fog::Compute::AWS::Error.new("Client.VolumeInUse => Volume #{volume_id} is currently attached to #{attach["instanceId"]}")
        end
        self.data[:deleted_at][volume_id] = Time.now
        volume['status'] = 'deleting'
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The volume '#{volume_id}' does not exist.")
      end
    end

delete_vpc(vpc_id) click to toggle source

    # File lib/fog/aws/requests/compute/delete_vpc.rb, line 33
    def delete_vpc(vpc_id)
      Excon::Response.new.tap do |response|
        if vpc_id
          response.status = 200
          self.data[:vpcs].reject! { |v| v['vpcId'] == vpc_id }

          response.body = {
            'requestId' => Fog::AWS::Mock.request_id,
            'return' => true
          }
        else
          message = 'MissingParameter => '
          message << 'The request must contain the parameter vpc_id'
          raise Fog::Compute::AWS::Error.new(message)
        end
      end
    end

deregister_image(image_id) click to toggle source

    # File lib/fog/aws/requests/compute/deregister_image.rb, line 32
    def deregister_image(image_id)
      response = Excon::Response.new
      if image_id
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return' => "true"
        }
        response
      else
        message = 'MissingParameter => '
        if !instance_id
          message << 'The request must contain the parameter image_id'
        end
        raise Fog::Compute::AWS::Error.new(message)
      end
    end

describe_addresses(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_addresses.rb, line 39
    def describe_addresses(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_addresses with #{filters.class} param is deprecated, use describe_addresses('public-ip' => []) instead [light_black](#{caller.first})[/]")
        filters = {'public-ip' => [*filters]}
      end

      response = Excon::Response.new

      addresses_set = self.data[:addresses].values

      aliases = {'public-ip' => 'publicIp', 'instance-id' => 'instanceId'}
      for filter_key, filter_value in filters
        aliased_key = aliases[filter_key]
        addresses_set = addresses_set.reject{|address| ![*filter_value].include?(address[aliased_key])}
      end

      response.status = 200
      response.body = {
        'requestId'     => Fog::AWS::Mock.request_id,
        'addressesSet'  => addresses_set
      }
      response
    end

describe_availability_zones(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_availability_zones.rb, line 40
    def describe_availability_zones(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_availability_zones with #{filters.class} param is deprecated, use describe_availability_zones('zone-name' => []) instead [light_black](#{caller.first})[/]")
        filters = {'public-ip' => [*filters]}
      end

      response = Excon::Response.new

      all_zones = [
        {"messageSet" => [], "regionName" => "us-east-1", "zoneName" => "us-east-1a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-east-1", "zoneName" => "us-east-1b", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-east-1", "zoneName" => "us-east-1c", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-east-1", "zoneName" => "us-east-1d", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-east-1", "zoneName" => "us-east-1e", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "us-west-1", "zoneName" => "us-west-1a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-west-1", "zoneName" => "us-west-1b", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-west-1", "zoneName" => "us-west-1c", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "us-west-2", "zoneName" => "us-west-2a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "us-west-2", "zoneName" => "us-west-2b", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "sa-east-1", "zoneName" => "sa-east-1a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "sa-east-1", "zoneName" => "sa-east-1b", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "eu-west-1", "zoneName" => "eu-west-1a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "eu-west-1", "zoneName" => "eu-west-1b", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "eu-west-1", "zoneName" => "eu-west-1c", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "ap-northeast-1", "zoneName" => "ap-northeast-1a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "ap-northeast-1", "zoneName" => "ap-northeast-1b", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "ap-southeast-1", "zoneName" => "ap-southeast-1a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "ap-southeast-1", "zoneName" => "ap-southeast-1b", "zoneState" => "available"},

        {"messageSet" => [], "regionName" => "ap-southeast-2", "zoneName" => "ap-southeast-2a", "zoneState" => "available"},
        {"messageSet" => [], "regionName" => "ap-southeast-2", "zoneName" => "ap-southeast-2b", "zoneState" => "available"},
      ]

      availability_zone_info = all_zones.select { |zoneinfo| zoneinfo["regionName"] == @region }

      aliases = {'region-name' => 'regionName', 'zone-name' => 'zoneName', 'state' => 'zoneState'}
      for filter_key, filter_value in filters
        aliased_key = aliases[filter_key]
        availability_zone_info = availability_zone_info.reject{|availability_zone| ![*filter_value].include?(availability_zone[aliased_key])}
      end

      response.status = 200
      response.body = {
        'availabilityZoneInfo'  => availability_zone_info,
        'requestId'             => Fog::AWS::Mock.request_id
      }
      response
    end

describe_dhcp_options(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_dhcp_options.rb, line 43
    def describe_dhcp_options(filters = {})
      Excon::Response.new.tap do |response|
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'dhcpOptionsSet'    => self.data[:dhcp_options]
        }
      end
    end

describe_images(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_images.rb, line 61
    def describe_images(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_images with #{filters.class} param is deprecated, use describe_images('image-id' => []) instead [light_black](#{caller.first})[/]")
        filters = {'image-id' => [*filters]}
      end

      if filters.keys.any? {|key| key =~ /^block-device/}
        Fog::Logger.warning("describe_images block-device-mapping filters are not yet mocked [light_black](#{caller.first})[/]")
        Fog::Mock.not_implemented
      end

      if owner = filters.delete('Owner')
        if owner == 'self'
          filters['owner-id'] = self.data[:owner_id]
        else
          filters['owner-alias'] = owner
        end
      end

      response = Excon::Response.new

      aliases = {
        'architecture'        => 'architecture',
        'description'         => 'description',
        'hypervisor'          => 'hypervisor',
        'image-id'            => 'imageId',
        'image-type'          => 'imageType',
        'is-public'           => 'isPublic',
        'kernel-id'           => 'kernelId',
        'manifest-location'   => 'manifestLocation',
        'name'                => 'name',
        'owner-alias'         => 'imageOwnerAlias',
        'owner-id'            => 'imageOwnerId',
        'ramdisk-id'          => 'ramdiskId',
        'root-device-name'    => 'rootDeviceName',
        'root-device-type'    => 'rootDeviceType',
        'state'               => 'imageState',
        'virtualization-type' => 'virtualizationType'
      }

      image_set = visible_images.values
      image_set = apply_tag_filters(image_set, filters, 'imageId')

      for filter_key, filter_value in filters
        aliased_key = aliases[filter_key]
        image_set = image_set.reject{|image| ![*filter_value].include?(image[aliased_key])}
      end

      image_set = image_set.map do |image|
        case image['imageState']
        when 'pending'
          if Time.now - image['registered'] >= Fog::Mock.delay
            image['imageState'] = 'available'
          end
        end
        image.reject { |key, value| ['registered'].include?(key) }.merge('tagSet' => self.data[:tag_sets][image['imageId']])
      end

      response.status = 200
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'imagesSet' => image_set
      }
      response
    end

describe_instance_status(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_instance_status.rb, line 33
    def describe_instance_status(filters = {})
      response = Excon::Response.new
      response.status = 200

      response.body = {
        'instanceStatusSet' => [],
        'requestId' => Fog::AWS::Mock.request_id
      }

      response

    end

describe_instances(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_instances.rb, line 83
    def describe_instances(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_instances with #{filters.class} param is deprecated, use describe_instances('instance-id' => []) instead [light_black](#{caller.first})[/]")
        filters = {'instance-id' => [*filters]}
      end

      response = Excon::Response.new

      instance_set = self.data[:instances].values
      instance_set = apply_tag_filters(instance_set, filters, 'instanceId')

      aliases = {
        'architecture'      => 'architecture',
        'availability-zone' => 'availabilityZone',
        'client-token'      => 'clientToken',
        'dns-name'         => 'dnsName',
        'group-id'          => 'groupId',
        'image-id'          => 'imageId',
        'instance-id'       => 'instanceId',
        'instance-lifecycle'  => 'instanceLifecycle',
        'instance-type'     => 'instanceType',
        'ip-address'        => 'ipAddress',
        'kernel-id'         => 'kernelId',
        'key-name'          => 'key-name',
        'launch-index'      => 'launchIndex',
        'launch-time'       => 'launchTime',
        'monitoring-state'  => 'monitoringState',
        'owner-id'          => 'ownerId',
        'placement-group-name' => 'placementGroupName',
        'platform'          => 'platform',
        'private-dns-name'  => 'privateDnsName',
        'private-ip-address'  => 'privateIpAddress',
        'product-code'      => 'productCode',
        'ramdisk-id'        => 'ramdiskId',
        'reason'            => 'reason',
        'requester-id'      => 'requesterId',
        'reservation-id'    => 'reservationId',
        'root-device-name'  => 'rootDeviceName',
        'root-device-type'  => 'rootDeviceType',
        'spot-instance-request-id' => 'spotInstanceRequestId',
        'subnet-id'         => 'subnetId',
        'virtualization-type' => 'virtualizationType',
        'vpc-id'            => 'vpcId'
      }
      block_device_mapping_aliases = {
        'attach-time'           => 'attachTime',
        'delete-on-termination' => 'deleteOnTermination',
        'device-name'           => 'deviceName',
        'status'                => 'status',
        'volume-id'             => 'volumeId',
      }
      instance_state_aliases = {
        'code' => 'code',
        'name' => 'name'
      }
      state_reason_aliases = {
        'code'    => 'code',
        'message' => 'message'
      }
      for filter_key, filter_value in filters
        if block_device_mapping_key = filter_key.split('block-device-mapping.')[1]
          aliased_key = block_device_mapping_aliases[block_device_mapping_key]
          instance_set = instance_set.reject{|instance| !instance['blockDeviceMapping'].detect {|block_device_mapping| [*filter_value].include?(block_device_mapping[aliased_key])}}
        elsif instance_state_key = filter_key.split('instance-state-')[1]
          aliased_key = instance_state_aliases[instance_state_key]
          instance_set = instance_set.reject{|instance| ![*filter_value].include?(instance['instanceState'][aliased_key])}
        elsif state_reason_key = filter_key.split('state-reason-')[1]
          aliased_key = state_reason_aliases[state_reason_key]
          instance_set = instance_set.reject{|instance| ![*filter_value].include?(instance['stateReason'][aliased_key])}
        elsif filter_key == "group-name"
          instance_set = instance_set.reject {|instance| !instance['groupSet'].include?(filter_value)}
        else
          aliased_key = aliases[filter_key]
          instance_set = instance_set.reject {|instance| ![*filter_value].include?(instance[aliased_key])}
        end
      end

      brand_new_instances = instance_set.find_all do |instance|
        instance['instanceState']['name'] == 'pending' &&
          Time.now - instance['launchTime'] < Fog::Mock.delay * 2
      end

      # Error if filtering for a brand new instance directly
      if (filters['instance-id'] || filters['instanceId']) && !brand_new_instances.empty?
        raise Fog::Compute::AWS::NotFound.new("The instance ID '#{brand_new_instances.first['instanceId']}' does not exist")
      end

      # Otherwise don't include it in the list
      instance_set = instance_set.reject {|instance| brand_new_instances.include?(instance) }

      response.status = 200
      reservation_set = {}

      instance_set.each do |instance|
        case instance['instanceState']['name']
        when 'pending'
          if Time.now - instance['launchTime'] >= Fog::Mock.delay * 2
            instance['ipAddress']         = Fog::AWS::Mock.ip_address
            instance['originalIpAddress'] = instance['ipAddress']
            instance['dnsName']           = Fog::AWS::Mock.dns_name_for(instance['ipAddress'])
            instance['privateIpAddress']  = Fog::AWS::Mock.private_ip_address
            instance['privateDnsName']    = Fog::AWS::Mock.private_dns_name_for(instance['privateIpAddress'])
            instance['instanceState']     = { 'code' => 16, 'name' => 'running' }
          end
        when 'rebooting'
          instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
        when 'stopping'
          instance['instanceState'] = { 'code' => 0, 'name' => 'stopping' }
          instance['stateReason'] = { 'code' => 0 }
        when 'shutting-down'
          if Time.now - self.data[:deleted_at][instance['instanceId']] >= Fog::Mock.delay * 2
            self.data[:deleted_at].delete(instance['instanceId'])
            self.data[:instances].delete(instance['instanceId'])
          elsif Time.now - self.data[:deleted_at][instance['instanceId']] >= Fog::Mock.delay
            instance['instanceState'] = { 'code' => 48, 'name' => 'terminating' }
          end
        when 'terminating'
          if Time.now - self.data[:deleted_at][instance['instanceId']] >= Fog::Mock.delay
            self.data[:deleted_at].delete(instance['instanceId'])
            self.data[:instances].delete(instance['instanceId'])
          end
        end

        if self.data[:instances][instance['instanceId']]

          reservation_set[instance['reservationId']] ||= {
            'groupSet'      => instance['groupSet'],
            'groupIds'      => instance['groupIds'],
            'instancesSet'  => [],
            'ownerId'       => instance['ownerId'],
            'reservationId' => instance['reservationId']
          }
          reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'architecture', 'blockDeviceMapping', 'clientToken', 'dnsName', 'ebsOptimized', 'iamInstanceProfile', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'ipAddress', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'networkInterfaces', 'ownerId', 'placement', 'platform', 'privateDnsName', 'privateIpAddress', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType', 'stateReason'].include?(key)}.merge('tagSet' => self.data[:tag_sets][instance['instanceId']])
        end
      end

      response.body = {
        'requestId'       => Fog::AWS::Mock.request_id,
        'reservationSet' => reservation_set.values
      }
      response
    end

describe_internet_gateways(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_internet_gateways.rb, line 42
    def describe_internet_gateways(filters = {})
      internet_gateways = self.data[:internet_gateways]

      if filters['internet-gateway-id']
        internet_gateways = internet_gateways.reject {|internet_gateway| internet_gateway['internetGatewayId'] != filters['internet-gateway-id']}
      end

      Excon::Response.new(
        :status => 200,
        :body   => {
          'requestId'           => Fog::AWS::Mock.request_id,
          'internetGatewaySet'  => internet_gateways
        }
      )
    end

describe_key_pairs(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_key_pairs.rb, line 39
    def describe_key_pairs(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_key_pairs with #{filters.class} param is deprecated, use describe_key_pairs('key-name' => []) instead [light_black](#{caller.first})[/]")
        filters = {'key-name' => [*filters]}
      end

      response = Excon::Response.new

      key_set = self.data[:key_pairs].values

      aliases = {'fingerprint' => 'keyFingerprint', 'key-name' => 'keyName'}
      for filter_key, filter_value in filters
        aliased_key = aliases[filter_key]
        key_set = key_set.reject{|key_pair| ![*filter_value].include?(key_pair[aliased_key])}
      end

      response.status = 200
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'keySet'    => key_set.map do |key_pair|
          key_pair.reject {|key,value| !['keyFingerprint', 'keyName'].include?(key)}
        end
      }
      response
    end

describe_network_interface_attribute(network_interface_id, attribute) click to toggle source

    # File lib/fog/aws/requests/compute/describe_network_interface_attribute.rb, line 44
    def describe_network_interface_attribute(network_interface_id, attribute)
      response = Excon::Response.new
      if self.data[:network_interfaces][network_interface_id]

        response.status = 200
        response.body = {
          'requestId'          => Fog::AWS::Mock.request_id,
          'networkInterfaceId' => network_interface_id
        }
        case attribute
        when 'description', 'groupSet', 'sourceDestCheck', 'attachment'
          response.body[attribute] = self.data[:network_interfaces][network_interface_id][attribute]
        else
          raise Fog::Compute::AWS::Error.new("Illegal attribute '#{attribute}' specified")
        end
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The network interface '#{network_interface_id}' does not exist")
      end
    end

describe_network_interfaces(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_network_interfaces.rb, line 65
    def describe_network_interfaces(filters = {})
      response = Excon::Response.new

      network_interface_info = self.data[:network_interfaces].values

      for filter_key, filter_value in filters
        network_interface_info = network_interface_info.reject{|nic| ![*filter_value].include?(nic[filter_key])}
      end

      response.status = 200
      response.body = {
        'requestId'           => Fog::AWS::Mock.request_id,
        'networkInterfaceSet' => network_interface_info
      }
      response
    end

describe_regions(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_regions.rb, line 39
    def describe_regions(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_regions with #{filters.class} param is deprecated, use describe_regions('region-name' => []) instead [light_black](#{caller.first})[/]")
        filters = {'region-name' => [*filters]}
      end

      response = Excon::Response.new
      region_info = [
        {"regionName"=>"eu-west-1", "regionEndpoint"=>"eu-west-1.ec2.amazonaws.com"},
        {"regionName"=>"us-east-1", "regionEndpoint"=>"us-east-1.ec2.amazonaws.com"}
      ]

      aliases = {'region-name' => 'regionName', 'endpoint' => 'regionEndpoint'}
      for filter_key, filter_value in filters
        aliased_key = aliases[filter_key]
        region_info = region_info.reject{|region| ![*filter_value].include?(region[aliased_key])}
      end

      response.status = 200
      response.body = {
        'requestId'   => Fog::AWS::Mock.request_id,
        'regionInfo'  => region_info
      }
      response
    end

describe_reserved_instances(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_reserved_instances.rb, line 46
    def describe_reserved_instances(filters = {})
      response = Excon::Response.new
      response.status = 200

      response.body = {
        'reservedInstancesSet' => self.data[:reserved_instances].values,
        'requestId' => Fog::AWS::Mock.request_id
      }

      response
    end

describe_reserved_instances_offerings(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb, line 54
    def describe_reserved_instances_offerings(filters = {})
      response = Excon::Response.new
      response.status = 200

      self.data[:reserved_instances_offerings] ||= [{
        'reservedInstancesOfferingId' => Fog::AWS::Mock.reserved_instances_offering_id,
        'instanceType'                => 'm1.small',
        'availabilityZone'            => 'us-east-1d',
        'duration'                    => 31536000,
        'fixedPrice'                  => 350.0,
        'offeringType'                => 'Medium Utilization',
        'usagePrice'                  => 0.03,
        'productDescription'          => 'Linux/UNIX',
        'instanceTenancy'             => 'default',
        'currencyCode'                => 'USD'
      }]

      response.body = {
        'reservedInstancesOfferingsSet' => self.data[:reserved_instances_offerings],
        'requestId' => Fog::AWS::Mock.request_id
      }

      response
    end

describe_security_groups(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_security_groups.rb, line 50
    def describe_security_groups(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_security_groups with #{filters.class} param is deprecated, use describe_security_groups('group-name' => []) instead [light_black](#{caller.first})[/]")
        filters = {'group-name' => [*filters]}
      end

      response = Excon::Response.new

      security_group_info = self.data[:security_groups].reject { |k,v| k['amazon-elb-sg'] }.values

      aliases = {
        'description' => 'groupDescription',
        'group-name'  => 'groupName',
        'group-id'    => 'groupId',
        'owner-id'    => 'ownerId'
      }
      permission_aliases = {
        'cidr'      => 'cidrIp',
        'from-port' => 'fromPort',
        'protocol'  => 'ipProtocol',
        'to-port'   => 'toPort'
      }
      for filter_key, filter_value in filters
        if permission_key = filter_key.split('ip-permission.')[1]
          if permission_key == 'group-name'
            security_group_info = security_group_info.reject{|security_group| !security_group['ipPermissions']['groups'].detect {|group| [*filter_value].include?(group['groupName'])}}
          elsif permission_key == 'group-id'
            security_group_info = security_group_info.reject{|security_group| !security_group['ipPermissions']['groups'].detect {|group| [*filter_value].include?(group['groupId'])}}
          elsif permission_key == 'user-id'
            security_group_info = security_group_info.reject{|security_group| !security_group['ipPermissions']['groups'].detect {|group| [*filter_value].include?(group['userId'])}}
          else
            aliased_key = permission_aliases[filter_key]
            security_group_info = security_group_info.reject{|security_group| !security_group['ipPermissions'].detect {|permission| [*filter_value].include?(permission[aliased_key])}}
          end
        else
          aliased_key = aliases[filter_key]
          security_group_info = security_group_info.reject{|security_group| ![*filter_value].include?(security_group[aliased_key])}
        end
      end

      response.status = 200
      response.body = {
        'requestId'         => Fog::AWS::Mock.request_id,
        'securityGroupInfo' => security_group_info
      }
      response
    end

describe_snapshots(filters = {}, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_snapshots.rb, line 55
    def describe_snapshots(filters = {}, options = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_snapshots with #{filters.class} param is deprecated, use describe_snapshots('snapshot-id' => []) instead [light_black](#{caller.first})[/]")
        filters = {'snapshot-id' => [*filters]}
      end
      unless options.empty?
        Fog::Logger.deprecation("describe_snapshots with a second param is deprecated, use describe_snapshots(options) instead [light_black](#{caller.first})[/]")
      end

      response = Excon::Response.new

      snapshot_set = self.data[:snapshots].values

      if filters.delete('owner-alias')
        Fog::Logger.warning("describe_snapshots with owner-alias is not mocked [light_black](#{caller.first})[/]")
      end
      if (restorable_by = filters.delete('RestorableBy')) && restorable_by != 'self'
        Fog::Logger.warning("describe_snapshots with RestorableBy other than 'self' (wanted #{restorable_by.inspect}) is not mocked [light_black](#{caller.first})[/]")
      end

      snapshot_set = apply_tag_filters(snapshot_set, filters, 'snapshotId')

      aliases = {
        'description' => 'description',
        'owner-id'    => 'ownerId',
        'progress'    => 'progress',
        'snapshot-id' => 'snapshotId',
        'start-time'  => 'startTime',
        'status'      => 'status',
        'volume-id'   => 'volumeId',
        'volume-size' => 'volumeSize'
      }

      for filter_key, filter_value in filters
        aliased_key = aliases[filter_key]
        snapshot_set = snapshot_set.reject{|snapshot| ![*filter_value].include?(snapshot[aliased_key])}
      end

      snapshot_set.each do |snapshot|
        case snapshot['status']
        when 'in progress', 'pending'
          if Time.now - snapshot['startTime'] >= Fog::Mock.delay * 2
            snapshot['progress']  = '100%'
            snapshot['status']    = 'completed'
          elsif Time.now - snapshot['startTime'] >= Fog::Mock.delay
            snapshot['progress']  = '50%'
            snapshot['status']    = 'in progress'
          else
            snapshot['progress']  = '0%'
            snapshot['status']    = 'in progress'
          end
        end
      end

      snapshot_set = snapshot_set.map {|snapshot| snapshot.merge('tagSet' => self.data[:tag_sets][snapshot['snapshotId']]) }

      response.status = 200
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'snapshotSet' => snapshot_set
      }
      response
    end

describe_subnets(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_subnets.rb, line 46
    def describe_subnets(filters = {})
      subnets = self.data[:subnets]

      if filters['subnet-id']
        subnets = subnets.reject {|subnet| subnet['subnetId'] != filters['subnet-id']}
      end

      Excon::Response.new(
        :status => 200,
        :body   => {
          'requestId' => Fog::AWS::Mock.request_id,
          'subnetSet' => subnets
        }
      )
    end

describe_tags(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_tags.rb, line 36
    def describe_tags(filters = {})
      response = Excon::Response.new

      tag_set = deep_clone(self.data[:tags])

      aliases = {
        'key'               => 'key',
        'resource-id'       => 'resourceId',
        'resource-type'     => 'resourceType',
        'value'             => 'value'
      }

      for filter_key, filter_value in filters
        filter_attribute = aliases[filter_key]
        case filter_attribute
        when 'key'
          tag_set.reject! { |k,_| k != filter_value }
        when 'value'
          tag_set.each { |k,values| values.reject! { |v, _| v != filter_value } }
        when 'resourceId'
          filter_resources(tag_set, 'resourceId', filter_value)
        when 'resourceType'
          filter_resources(tag_set, 'resourceType', filter_value)
        end
      end

      tagged_resources = []
      tag_set.each do |key, values|
        values.each do |value, resources|
          resources.each do |resource|
            tagged_resources << resource.merge({
              'key' => key,
              'value' => value
            })
          end
        end
      end

      response.status = 200
      response.body = {
        'requestId'       => Fog::AWS::Mock.request_id,
        'tagSet'          => tagged_resources
      }
      response
    end

describe_volume_status(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_volume_status.rb, line 30
    def describe_volume_status(filters = {})
      response = Excon::Response.new
      response.status = 200

      response.body = {
        'volumeStatusSet' => [],
        'requestId' => Fog::AWS::Mock.request_id
      }

      response

    end

describe_volumes(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_volumes.rb, line 51
    def describe_volumes(filters = {})
      unless filters.is_a?(Hash)
        Fog::Logger.deprecation("describe_volumes with #{filters.class} param is deprecated, use describe_volumes('volume-id' => []) instead [light_black](#{caller.first})[/]")
        filters = {'volume-id' => [*filters]}
      end

      response = Excon::Response.new

      volume_set = self.data[:volumes].values
      volume_set = apply_tag_filters(volume_set, filters, 'volumeId')

      aliases = {
        'availability-zone' => 'availabilityZone',
        'create-time' => 'createTime',
        'size' => 'size',
        'snapshot-id' => 'snapshotId',
        'status' => 'status',
        'volume-id' => 'volumeId'
      }
      attachment_aliases = {
        'attach-time' => 'attachTime',
        'delete-on-termination' => 'deleteOnTermination',
        'device'      => 'device',
        'instance-id' => 'instanceId',
        'status'      => 'status'
      }

      for filter_key, filter_value in filters
        if attachment_key = filter_key.split('attachment.')[1]
          aliased_key = attachment_aliases[filter_key]
          volume_set = volume_set.reject{|volume| !volume['attachmentSet'].detect {|attachment| [*filter_value].include?(attachment[aliased_key])}}
        else
          aliased_key = aliases[filter_key]
          volume_set = volume_set.reject{|volume| ![*filter_value].include?(volume[aliased_key])}
        end
      end

      volume_set.each do |volume|
        case volume['status']
        when 'attaching'
          if Time.now - volume['attachmentSet'].first['attachTime'] >= Fog::Mock.delay
            volume['attachmentSet'].first['status'] = 'in-use'
            volume['status'] = 'in-use'
          end
        when 'creating'
          if Time.now - volume['createTime'] >= Fog::Mock.delay
            volume['status'] = 'available'
          end
        when 'deleting'
          if Time.now - self.data[:deleted_at][volume['volumeId']] >= Fog::Mock.delay
            self.data[:deleted_at].delete(volume['volumeId'])
            self.data[:volumes].delete(volume['volumeId'])
          end
        end
      end
      volume_set = volume_set.reject {|volume| !self.data[:volumes][volume['volumeId']]}
      volume_set = volume_set.map {|volume| volume.merge('tagSet' => self.data[:tag_sets][volume['volumeId']]) }

      response.status = 200
      response.body = {
        'requestId' => Fog::AWS::Mock.request_id,
        'volumeSet' => volume_set
      }
      response
    end

describe_vpcs(filters = {}) click to toggle source

    # File lib/fog/aws/requests/compute/describe_vpcs.rb, line 43
    def describe_vpcs(filters = {})
      vpcs = self.data[:vpcs]

      if filters['vpc-id']
        vpcs = vpcs.reject {|vpc| vpc['vpcId'] != filters['vpc-id']}
      end

      Excon::Response.new(
        :status => 200,
        :body   => {
          'requestId' => Fog::AWS::Mock.request_id,
          'vpcSet'    => vpcs
        }
      )
    end

detach_internet_gateway(internet_gateway_id, vpc_id) click to toggle source

    # File lib/fog/aws/requests/compute/detach_internet_gateway.rb, line 34
    def detach_internet_gateway(internet_gateway_id, vpc_id)
      response = Excon::Response.new
      if internet_gateway_id && vpc_id
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return' => true
        }
        response
      else
        if !internet_gateway_id
          message << 'The request must contain the parameter internet_gateway_id'
        elsif !vpc_id
          message << 'The request must contain the parameter vpc_id'
        end
        raise Fog::Compute::AWS::Error.new(message)
      end
    end

detach_network_interface(attachment_id, force = false) click to toggle source

    # File lib/fog/aws/requests/compute/detach_network_interface.rb, line 31
    def detach_network_interface(attachment_id, force = false)
      response = Excon::Response.new
      nic_id = self.data[:network_interfaces].select { |k,v| v['attachment']['attachmentId'] == attachment_id} .first.first
      if nic_id
        self.data[:network_interfaces][nic_id]["attachment"] = {}
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The network interface '#{network_interface_id}' does not exist")
      end
    end

detach_volume(volume_id, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/detach_volume.rb, line 41
    def detach_volume(volume_id, options = {})
      response = Excon::Response.new
      response.status = 200
      if (volume = self.data[:volumes][volume_id])
        if !volume['attachmentSet'].empty?
          data = volume['attachmentSet'].pop
          volume['status'] = 'available'
          response.status = 200
          response.body = {
            'requestId' => Fog::AWS::Mock.request_id
          }.merge!(data)
          response
        else
          # real response has spacing issue below
          raise Fog::Compute::AWS::Error.new("IncorrectState => Volume '#{volume_id}'is in the 'available' state.")
        end
      else
        raise Fog::Compute::AWS::NotFound.new("The volume '#{volume_id}' does not exist.")
      end
    end

disassociate_address(public_ip) click to toggle source

    # File lib/fog/aws/requests/compute/disassociate_address.rb, line 35
    def disassociate_address(public_ip)
      response = Excon::Response.new
      response.status = 200
      if address = self.data[:addresses][public_ip]
        instance_id = address['instanceId']
        instance = self.data[:instances][instance_id]
        instance['ipAddress']         = instance['originalIpAddress']
        instance['dnsName']           = Fog::AWS::Mock.dns_name_for(instance['ipAddress'])
        address['instanceId'] = nil
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::Error.new("AuthFailure => The address '#{public_ip}' does not belong to you.")
      end
    end

get_console_output(instance_id) click to toggle source

    # File lib/fog/aws/requests/compute/get_console_output.rb, line 35
    def get_console_output(instance_id)
      response = Excon::Response.new
      if instance = self.data[:instances][instance_id]
        response.status = 200
        response.body = {
          'instanceId'    => instance_id,
          'output'        => (Time.now - instance['launchTime'] >= Fog::Mock.delay) ? nil : Fog::AWS::Mock.console_output,
          'requestId'     => Fog::AWS::Mock.request_id,
          'timestamp'     => Time.now
        }
        response
      else;
        raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_id}' does not exist")
      end
    end

get_password_data(instance_id) click to toggle source

    # File lib/fog/aws/requests/compute/get_password_data.rb, line 37
    def get_password_data(instance_id)
      response = Excon::Response.new
      if instance = self.data[:instances][instance_id]
        response.status = 200
        response.body = {
          'instanceId'   => instance_id,
          'passwordData' => nil,
          'requestId'    => Fog::AWS::Mock.request_id,
          'timestamp'    => Time.now
        }
        response
      else;
        raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_id}' does not exist")
      end
    end

import_key_pair(key_name, public_key_material) click to toggle source

    # File lib/fog/aws/requests/compute/import_key_pair.rb, line 35
    def import_key_pair(key_name, public_key_material)
      response = Excon::Response.new
      unless self.data[:key_pairs][key_name]
        response.status = 200
        data = {
          'keyFingerprint'  => Fog::AWS::Mock.key_fingerprint,
          'keyName'         => key_name
        }
        self.data[:key_pairs][key_name] = data
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id
        }.merge!(data)
        response
      else
        raise Fog::Compute::AWS::Error.new("InvalidKeyPair.Duplicate => The keypair '#{key_name}' already exists.")
      end
    end

modify_image_attribute(image_id, attributes) click to toggle source

    # File lib/fog/aws/requests/compute/modify_image_attribute.rb, line 43
    def modify_image_attribute(image_id, attributes)
      raise ArgumentError.new("image_id is required") unless image_id

      unless self.data[:images][image_id]
        raise Fog::Compute::AWS::NotFound.new("The AMI ID '#{image_id}' does not exist")
      end

      (attributes['Add.UserId'] || []).each do |user_id|
        if image_launch_permissions = self.data[:image_launch_permissions][image_id]
          image_launch_permissions[:users].push(user_id)
        end
      end

      (attributes['Remove.UserId'] || []).each do |user_id|
        if image_launch_permissions = self.data[:image_launch_permissions][image_id]
          image_launch_permissions[:users].delete(user_id)
        end
      end

      response = Excon::Response.new
      response.status = 200
      response.body = {
        'return'        => true,
        'requestId'     => Fog::AWS::Mock.request_id
      }
      response
    end

modify_network_interface_attribute(network_interface_id, attribute, value) click to toggle source

    # File lib/fog/aws/requests/compute/modify_network_interface_attribute.rb, line 47
    def modify_network_interface_attribute(network_interface_id, attribute, value)
      response = Excon::Response.new
      if self.data[:network_interfaces][network_interface_id]
        nic = self.data[:network_interfaces][network_interface_id]

        case attribute
        when 'description'
          nic['description'] = value.clone
        when 'groupSet'
          groups = {}
          value.each do |group_id|
            name = self.data[:security_groups].select { |k,v| v['groupId'] == group_id } .first.first
            if name.nil?
              raise Fog::Compute::AWS::Error.new("Unknown security group '#{group_id}' specified")
            end
            groups[group_id] = name
          end
          nic['groupSet'] = groups
        when 'sourceDestCheck'
          nic['sourceDestCheck'] = value
        when 'attachment'
          if nic['attachment'].nil? || value['attachmentId'] != nic['attachment']['attachmentId']
            raise Fog::Compute::AWS::Error.new("Illegal attachment '#{value['attachmentId']}' specified")
          end
          nic['attachment']['deleteOnTermination'] = value['deleteOnTermination']
        else
          raise Fog::Compute::AWS::Error.new("Illegal attribute '#{attribute}' specified")
        end

        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }

        response
      else
        raise Fog::Compute::AWS::NotFound.new("The network interface '#{network_interface_id}' does not exist")
      end
    end

modify_volume_attribute(volume_id=nil, auto_enable_io_value=false) click to toggle source

    # File lib/fog/aws/requests/compute/modify_volume_attribute.rb, line 35
    def modify_volume_attribute(volume_id=nil, auto_enable_io_value=false)
      response = Excon::Response.new
      if volume = self.data[:volumes][volume_id]
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The volume '#{volume_id}' does not exist.")
      end
    end

monitor_instances(instance_ids) click to toggle source

    # File lib/fog/aws/requests/compute/monitor_instances.rb, line 35
    def monitor_instances(instance_ids)
      response        = Excon::Response.new
      response.status = 200
      [*instance_ids].each do |instance_id|
        if instance = self.data[:instances][instance_id]
          instance['monitoring']['state'] = 'enabled'
        else
          raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_ids}' does not exist")
        end
      end
      instances_set = [*instance_ids].inject([]) { |memo, id| memo << {'instanceId' => id, 'monitoring' => 'enabled'} }
      response.body = {'requestId' => 'some_request_id', 'instancesSet' => instances_set}
      response
    end

purchase_reserved_instances_offering(reserved_instances_offering_id, instance_count = 1) click to toggle source

    # File lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb, line 34
    def purchase_reserved_instances_offering(reserved_instances_offering_id, instance_count = 1)
      response = Excon::Response.new
      response.status = 200

      # Need to implement filters in the mock to find this there instead of here
      # Also there's no information about what to do when the specified reserved_instances_offering_id doesn't exist
      raise unless reserved_instance_offering = describe_reserved_instances_offerings.body["reservedInstancesOfferingsSet"].find { |offering| offering["reservedInstancesOfferingId"] == reserved_instances_offering_id }

      reserved_instances_id = Fog::AWS::Mock.reserved_instances_id
      reserved_instance_offering.delete('reservedInstancesOfferingId')

      self.data[:reserved_instances][reserved_instances_id] = reserved_instance_offering.merge({
        'reservedInstancesId' => reserved_instances_id,
        'start'               => Time.now,
        'instanceCount'       => instance_count,
        'state'               => 'payment-pending',
        'tagSet'              => []
      })

      response.body = {
        'reservedInstancesId' => reserved_instances_id,
        'requestId' => Fog::AWS::Mock.request_id
      }

      response
    end

reboot_instances(instance_id = []) click to toggle source

    # File lib/fog/aws/requests/compute/reboot_instances.rb, line 33
    def reboot_instances(instance_id = [])
      response = Excon::Response.new
      instance_id = [*instance_id]
      if (self.data[:instances].keys & instance_id).length == instance_id.length
        for instance_id in instance_id
          self.data[:instances][instance_id]['status'] = 'rebooting'
        end
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The instance ID #{instance_id.inspect} does not exist")
      end
    end

region_data() click to toggle source

    # File lib/fog/aws/compute.rb, line 230
    def region_data
      self.class.data[@region]
    end

register_image(name, description, location, block_devices=[], options={}) click to toggle source

    # File lib/fog/aws/requests/compute/register_image.rb, line 67
    def register_image(name, description, location, block_devices=[], options={})
      unless name.empty?
        image = {
          'imageId' => Fog::AWS::Mock.image_id,
          'imageLocation' => '',
          'imageState' => 'pending',
          'imageOwnerId' => self.data[:owner_id],
          'isPublic' => false,
          'productCodes' => [],
          'architecture' => options['Architecture'] || 'i386',
          'imageType' => 'machine',
          'kernelId' => options['KernelId'] || Fog::AWS::Mock.kernel_id,
          'ramdiskId' => options['RamdiskId'] || Fog::AWS::Mock.ramdisk_id,
          'platform' => 'Linux',
          'stateReason' => {},
          'imageOwnerAlias' => self.data[:owner_id],
          'name' => name,
          'description' => description,
          'rootDeviceType' => '',
          'rootDeviceName' => '',
          'blockDeviceMapping' => [],
          'virtualizationType' => 'paravirtual',
          'hypervisor' => 'xen',
          'registered' => Time.now
        }

        if location[/^\/dev\/sd[a-p]\d{0,2}$/]
          image['rootDeviceName'] = location
          image['rootDeviceType'] = 'ebs'
        else
          image['imageLocation'] = location
        end

        block_devices.each do |bd|
          block_device_mapping = {
            'ebs' => {}
          }
          ["DeviceName","VirtualName"].each do |n|
            block_device_mapping[n] = bd[n] if bd[n]
          end
          ["SnapshotId","VolumeSize","NoDevice","DeleteOnTermination"].each do |n|
            block_device_mapping['ebs'][n] = bd[n] if bd[n]
          end
          image['blockDeviceMapping'] << block_device_mapping
        end

        self.data[:images][image['imageId']] = image

        response = Excon::Response.new
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'imageId' => image['imageId']
        }
        response
      else
        message = 'MissingParameter => '
        if name.empty?
          message << 'The request must contain the parameter name'
        end
        raise Fog::Compute::AWS::Error.new(message)
      end
    end

release_address(public_ip_or_allocation_id) click to toggle source

    # File lib/fog/aws/requests/compute/release_address.rb, line 38
    def release_address(public_ip_or_allocation_id)
      response = Excon::Response.new

      address = self.data[:addresses][public_ip_or_allocation_id] || self.data[:addresses].values.detect {|a| a['allocationId'] == public_ip_or_allocation_id }

      if address
        if address['allocationId'] && public_ip_or_allocation_id == address['publicIp']
          raise Fog::Compute::AWS::Error, "InvalidParameterValue => You must specify an allocation id when releasing a VPC elastic IP address"
        end

        self.data[:addresses].delete(address['publicIp'])
        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::Error.new("AuthFailure => The address '#{public_ip_or_allocation_id}' does not belong to you.")
      end
    end

reset_data() click to toggle source

    # File lib/fog/aws/compute.rb, line 238
    def reset_data
      self.region_data.delete(@aws_access_key_id)
    end

reset_network_interface_attribute(network_interface_id, attribute) click to toggle source

    # File lib/fog/aws/requests/compute/reset_network_interface_attribute.rb, line 34
    def reset_network_interface_attribute(network_interface_id, attribute)
      response = Excon::Response.new
      if self.data[:network_interfaces][network_interface_id]

        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        if attribute == 'sourceDestCheck'
          self.data[:network_interfaces][network_interface_id]['sourceDestCheck'] = true
        else
          raise Fog::Compute::AWS::Error.new("Illegal attribute '#{attribute}' specified")
        end
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The network interface '#{network_interface_id}' does not exist")
      end
    end

revoke_security_group_ingress(group_name, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/revoke_security_group_ingress.rb, line 61
    def revoke_security_group_ingress(group_name, options = {})
      options = Fog::AWS.parse_security_group_options(group_name, options)
      if options.key?('GroupName')
        group_name = options['GroupName']
      else
        group_name = self.data[:security_groups].reject { |k,v| v['groupId'] != options['GroupId'] } .keys.first
      end

      response = Excon::Response.new
      group = self.data[:security_groups][group_name]

      if group
        verify_permission_options(options, group['vpcId'] != nil)

        normalized_permissions = normalize_permissions(options)

        normalized_permissions.each do |permission|
          if matching_permission = find_matching_permission(group, permission)
            matching_permission['ipRanges'] -= permission['ipRanges']
            matching_permission['groups'] -= permission['groups']

            if matching_permission['ipRanges'].empty? && matching_permission['groups'].empty?
              group['ipPermissions'].delete(matching_permission)
            end
          end
        end

        response.status = 200
        response.body = {
          'requestId' => Fog::AWS::Mock.request_id,
          'return'    => true
        }
        response
      else
        raise Fog::Compute::AWS::NotFound.new("The security group '#{group_name}' does not exist")
      end
    end

run_instances(image_id, min_count, max_count, options = {}) click to toggle source

    # File lib/fog/aws/requests/compute/run_instances.rb, line 126
    def run_instances(image_id, min_count, max_count, options = {})
      response = Excon::Response.new
      response.status = 200

      group_set = [ (options['SecurityGroup'] || 'default') ].flatten
      instances_set = []
      reservation_id = Fog::AWS::Mock.reservation_id

      if options['KeyName'] && describe_key_pairs('key-name' => options['KeyName']).body['keySet'].empty?
        raise Fog::Compute::AWS::NotFound.new("The key pair '#{options['KeyName']}' does not exist")
      end

      min_count.times do |i|
        instance_id = Fog::AWS::Mock.instance_id
        instance = {
          'amiLaunchIndex'      => i,
          'architecture'        => 'i386',
          'blockDeviceMapping'  => [],
          'clientToken'         => options['clientToken'],
          'dnsName'             => nil,
          'imageId'             => image_id,
          'instanceId'          => instance_id,
          'instanceState'       => { 'code' => 0, 'name' => 'pending' },
          'instanceType'        => options['InstanceType'] || 'm1.small',
          'kernelId'            => options['KernelId'] || Fog::AWS::Mock.kernel_id,
          'keyName'             => options['KeyName'],
          'launchTime'          => Time.now,
          'monitoring'          => { 'state' => options['Monitoring.Enabled'] || false },
          'placement'           => { 'availabilityZone' => options['Placement.AvailabilityZone'] || Fog::AWS::Mock.availability_zone(@region), 'groupName' => nil, 'tenancy' => 'default' },
          'privateDnsName'      => nil,
          'productCodes'        => [],
          'reason'              => nil,
          'rootDeviceType'      => 'instance-store',
          'ebsOptimized'        => options['EbsOptimized'] || false
        }
        instances_set << instance
        self.data[:instances][instance_id] = instance.merge({
          'groupIds'            => [],
          'groupSet'            => group_set,
          'iamInstanceProfile'  => {},
          'networkInterfaces'   => [],
          'ownerId'             => self.data[:owner_id],
          'privateIpAddress'    => nil,
          'reservationId'       => reservation_id,
          'stateReason'         => {}
        })
      end
      response.body = {
        'groupSet'      => group_set,
        'instancesSet'  => instances_set,
        'ownerId'       => self.data[:owner_id],
        'requestId'     => Fog::AWS::Mock.request_id,
        'reservationId' => reservation_id
      }
      response
    end

setup_credentials(options) click to toggle source

    # File lib/fog/aws/compute.rb, line 285
    def setup_credentials(options)
      @aws_access_key_id = options[:aws_access_key_id]
    end

start_instances(instance_id) click to toggle source

    # File lib/fog/aws/requests/compute/start_instances.rb, line 32
    def start_instances(instance_id)
      instance_ids = Array(instance_id)

      instance_set = self.data[:instances].values
      instance_set = apply_tag_filters(instance_set, {'instance_id' => instance_ids}, 'instanceId')
      instance_set = instance_set.find_all {|x| instance_ids.include?(x["instanceId"]) }

      if instance_set.empty?
        raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_ids.first}' does not exist")
      else
        response = Excon::Response.new
        response.status = 200

        response.body = {
          'instancesSet' => instance_set.inject([]) do |ia, instance|
                              ia << {'currentState' => { 'code' => 0, 'name' => 'pending' },
                                     'previousState' => instance['instanceState'],
                                     'instanceId' => instance['instanceId'] }
                              instance['instanceState'] = {'code'=>0, 'name'=>'pending'}
                              ia
          end
        }
        response
      end
    end

stop_instances(instance_id, force = false) click to toggle source

    # File lib/fog/aws/requests/compute/stop_instances.rb, line 33
    def stop_instances(instance_id, force = false)
      instance_ids = Array(instance_id)

      instance_set = self.data[:instances].values
      instance_set = apply_tag_filters(instance_set, {'instance_id' => instance_ids}, 'instanceId')
      instance_set = instance_set.find_all {|x| instance_ids.include?(x["instanceId"]) }

      if instance_set.empty?
        raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_ids.first}' does not exist")
      else
        response = Excon::Response.new
        response.status = 200

        response.body = {
          'instancesSet' => instance_set.inject([]) do |ia, instance|
                              ia << {'currentState' => { 'code' => 0, 'name' => 'stopping' },
                                     'previousState' => instance['instanceState'],
                                     'instanceId' => instance['instanceId'] }
                              instance['instanceState'] = {'code'=>0, 'name'=>'stopping'}
                              ia
          end
        }
        response
      end
    end

terminate_instances(instance_id) click to toggle source

    # File lib/fog/aws/requests/compute/terminate_instances.rb, line 40
    def terminate_instances(instance_id)
      response = Excon::Response.new
      instance_id = [*instance_id]
      if (self.data[:instances].keys & instance_id).length == instance_id.length
        response.body = {
          'requestId'     => Fog::AWS::Mock.request_id,
          'instancesSet'  => []
        }
        response.status = 200
        for id in instance_id
          instance = self.data[:instances][id]
          self.data[:deleted_at][id] = Time.now
          code = case instance['instanceState']['name']
          when 'pending'
            0
          when 'running'
            16
          when 'shutting-down'
            32
          when 'terminated'
            48
          when 'stopping'
            64
          when 'stopped'
            80
          end
          state = { 'name' => 'shutting-down', 'code' => 32}
          response.body['instancesSet'] << {
            'instanceId'    => id,
            'previousState' => instance['instanceState'],
            'currentState'  => state
          }
          instance['instanceState'] = state
        end

        describe_addresses.body['addressesSet'].each do |address|
          if instance_id.include?(address['instanceId'])
            disassociate_address(address['publicIp'])
          end
        end

        describe_volumes.body['volumeSet'].each do |volume|
          if volume['attachmentSet'].first && instance_id.include?(volume['attachmentSet'].first['instanceId'])
            detach_volume(volume['volumeId'])
          end
        end

        response
      else
        raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_id}' does not exist")
      end
    end

unmonitor_instances(instance_ids) click to toggle source

    # File lib/fog/aws/requests/compute/unmonitor_instances.rb, line 35
    def unmonitor_instances(instance_ids)
      response        = Excon::Response.new
      response.status = 200
      [*instance_ids].each do |instance_id|
        if instance = self.data[:instances][instance_id]
          instance['monitoring']['state'] = 'enabled'
        else
          raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_ids}' does not exist")
        end
      end
      instances_set = [*instance_ids].inject([]) { |memo, id| memo << {'instanceId' => id, 'monitoring' => 'disabled'} }
      response.body = {'requestId' => 'some_request_id', 'instancesSet' => instances_set}
      response
    end

visible_images() click to toggle source

    # File lib/fog/aws/compute.rb, line 242
    def visible_images
      images = self.data[:images].values.inject({}) do |h, image|
        h.update(image['imageId'] => image)
      end

      self.region_data.each do |aws_access_key_id, data|
        data[:image_launch_permissions].each do |image_id, list|
          if list[:users].include?(self.data[:owner_id])
            images.update(image_id => data[:images][image_id])
          end
        end
      end

      images
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.