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

Merge pull request #3678 from blomquisg/fix_deprecation_warnings

Fix deprecation warnings
This commit is contained in:
Wesley Beary 2015-09-01 09:04:26 -05:00
commit a4909f5953
3 changed files with 11 additions and 3 deletions

View file

@ -212,7 +212,7 @@ module Fog
def security_groups
requires :id
groups = service.list_security_groups(id).body['security_groups']
groups = service.list_security_groups(:server_id => id).body['security_groups']
groups.map do |group|
Fog::Compute::OpenStack::SecurityGroup.new group.merge({:service => service})

View file

@ -45,7 +45,7 @@ module Fog
end
def resources(options={})
@resources ||= service.resources.all(self, options)
@resources ||= service.resources.all({:stack => self}.merge(options))
end
def events(options={})

View file

@ -29,7 +29,15 @@ module Fog
end
class Mock
def list_security_groups(server_id = nil)
def list_security_groups(options = {})
if options.is_a?(Hash)
server_id = options.delete(:server_id)
query = options
else
server_id = options
query = {}
end
security_groups = self.data[:security_groups].values
groups = if server_id then