File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -916,6 +916,23 @@ async def remove_storage_pool(self, name):
916916 storage_facade = client .StorageFacade .from_connection (self .connection )
917917 return await storage_facade .RemovePool (pools = [name ])
918918
919+ async def update_storage_pool (self , name , attributes = "" ):
920+ """ Update storage pool attributes.
921+
922+ :param name:
923+ :param attributes: "key=value key=value ..."
924+ :return:
925+ """
926+ _attrs = dict ([splt .split ("=" ) for splt in attributes .split ()])
927+ if len (_attrs ) == 0 :
928+ raise JujuError ("Expected at least one attribute to update" )
929+
930+ storage_facade = client .StorageFacade .from_connection (self .connection )
931+ return await storage_facade .UpdatePool (pools = [client .StoragePool (
932+ name = name ,
933+ attrs = _attrs ,
934+ )])
935+
919936 async def remove_storage (self , force = False , destroy_storage = False , * storage_ids ):
920937 """Removes storage from the model.
921938
You can’t perform that action at this time.
0 commit comments