mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fixes #1822 Joyent list_machines is slower than it needs to be
[joyent|compute] list_machines unnecessarily fetches tags for each server
This commit is contained in:
parent
11fb98a53b
commit
22a3cc36ab
2 changed files with 4 additions and 2 deletions
|
@ -14,6 +14,7 @@ module Fog
|
||||||
attribute :memory
|
attribute :memory
|
||||||
attribute :disk
|
attribute :disk
|
||||||
attribute :metadata
|
attribute :metadata
|
||||||
|
attribute :tags
|
||||||
|
|
||||||
attribute :created, :type => :time
|
attribute :created, :type => :time
|
||||||
attribute :updated, :type => :time
|
attribute :updated, :type => :time
|
||||||
|
@ -89,7 +90,7 @@ module Fog
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def list_tags
|
||||||
requires :id
|
requires :id
|
||||||
service.list_machine_tags(id).body
|
service.list_machine_tags(id).body
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,8 @@ module Fog
|
||||||
request(
|
request(
|
||||||
:path => "/my/machines",
|
:path => "/my/machines",
|
||||||
:method => "GET",
|
:method => "GET",
|
||||||
:query => options
|
:query => options,
|
||||||
|
:expects => 200
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue