Merge pull request #3678 from blomquisg/fix_deprecation_warnings
Fix deprecation warnings
This commit is contained in:
commit
a4909f5953
|
@ -212,7 +212,7 @@ module Fog
|
||||||
def security_groups
|
def security_groups
|
||||||
requires :id
|
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|
|
groups.map do |group|
|
||||||
Fog::Compute::OpenStack::SecurityGroup.new group.merge({:service => service})
|
Fog::Compute::OpenStack::SecurityGroup.new group.merge({:service => service})
|
||||||
|
|
|
@ -45,7 +45,7 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def resources(options={})
|
def resources(options={})
|
||||||
@resources ||= service.resources.all(self, options)
|
@resources ||= service.resources.all({:stack => self}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
def events(options={})
|
def events(options={})
|
||||||
|
|
|
@ -29,7 +29,15 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
class Mock
|
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
|
security_groups = self.data[:security_groups].values
|
||||||
|
|
||||||
groups = if server_id then
|
groups = if server_id then
|
||||||
|
|
Loading…
Reference in New Issue