Skip to content

Commit facdad1

Browse files
committed
Add list_storage_pools
1 parent d2473c2 commit facdad1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

juju/model.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,16 @@ async def update_storage_pool(self, name, attributes=""):
933933
attrs=_attrs,
934934
)])
935935

936+
async def list_storage_pools(self):
937+
"""List storage pools.
938+
939+
:return:
940+
"""
941+
# TODO (cderici): Filter on pool type, name.
942+
storage_facade = client.StorageFacade.from_connection(self.connection)
943+
res = await storage_facade.ListPools(filters=[])
944+
return res.results
945+
936946
async def remove_storage(self, force=False, destroy_storage=False, *storage_ids):
937947
"""Removes storage from the model.
938948

0 commit comments

Comments
 (0)