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:
commit
a4909f5953
3 changed files with 11 additions and 3 deletions
|
@ -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})
|
||||
|
|
|
@ -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={})
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue