Skip to content

Commit

Permalink
Added all_tenants option for openstack list_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
zestrada committed Jun 6, 2014
1 parent f58ef3b commit c521f52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libcloud/compute/drivers/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,12 @@ def destroy_node(self, node):
def reboot_node(self, node):
return self._reboot_node(node, reboot_type='HARD')

def list_nodes(self):
def list_nodes(self, all_tenants=False):
params = {}
if all_tenants:
params = {'all_tenants': 1}
return self._to_nodes(
self.connection.request('/servers/detail').object)
self.connection.request('/servers/detail', params=params).object)

def create_volume(self, size, name, location=None, snapshot=None):
if snapshot:
Expand Down

0 comments on commit c521f52

Please sign in to comment.