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

[compute|aws] fix deprecated compute service accessor usage

This commit is contained in:
geemus 2011-06-23 11:51:31 -07:00
parent 9bbf91537c
commit a67a1cf1b3
4 changed files with 5 additions and 5 deletions

View file

@ -8,7 +8,7 @@ Shindo.tests("AWS::RDS | security_group", ['aws', 'rds']) do
tests("#description").returns('fog test') { @instance.description }
tests("#authorize_ec2_security_group").succeeds do
@ec2_sec_group = AWS[:compute].security_groups.create(:name => 'fog-test', :description => 'fog test')
@ec2_sec_group = Compute[:aws].security_groups.create(:name => 'fog-test', :description => 'fog test')
@instance.authorize_ec2_security_group(@ec2_sec_group.name)
returns('authorizing') do

View file

@ -85,7 +85,7 @@ Shindo.tests('AWS::CloudFormation | stack requests', ['aws', 'cloudformation'])
unless Fog.mocking?
@stack_name = 'fogstack' << Time.now.to_i.to_s
@keypair = AWS[:compute].key_pairs.create(:name => 'cloudformation')
@keypair = Compute[:aws].key_pairs.create(:name => 'cloudformation')
@template_url = 'https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceSample-1.0.0.template'
end

View file

@ -44,7 +44,7 @@ Shindo.tests('AWS::ELB | models', ['aws', 'elb']) do
raises(Fog::AWS::ELB::InvalidInstance) { elb.deregister_instances('i-00000000') }
end
server = AWS[:compute].servers.create
server = Compute[:aws].servers.create
tests('register instance') do
begin
elb.register_instances(server.id)

View file

@ -79,11 +79,11 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
@instance_id = nil
# Use a MS Windows AMI to test #get_password_data
@windows_ami = 'ami-ee926087' # Microsoft Windows Server 2008 R2 Base 64-bit
@windows_ami = 'ami-1cbd4475' # Microsoft Windows Server 2008 R2 Base 64-bit
# Create a keypair for decrypting the password
key_name = 'fog-test-key'
key = AWS.key_pairs.create(:name => key_name)
key = Fog::Compute[:aws].key_pairs.create(:name => key_name)
tests("#run_instances").formats(@run_instances_format) do
data = Fog::Compute[:aws].run_instances(@windows_ami, 1, 1, 'InstanceType' => 't1.micro', 'KeyName' => key_name).body