Skip to content

Commit 137a687

Browse files
committed
Add attach_storage argument for add_unit
Fixes #695
1 parent 09d7113 commit 137a687

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

juju/application.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ async def relate(self, local_relation, remote_relation):
126126

127127
return await self.model.relate(local_relation, remote_relation)
128128

129-
async def add_unit(self, count=1, to=None):
129+
async def add_unit(self, count=1, to=None, attach_storage=[]):
130130
"""Add one or more units to this application.
131131
132132
:param int count: Number of units to add
133+
:param [str] attach_storage: Existing storage to attach to the deployed unit
134+
(not available on k8s models)
133135
:param str to: Placement directive, e.g.::
134136
'23' - machine 23
135137
'lxc:7' - new lxc container on machine 7
@@ -153,6 +155,7 @@ async def add_unit(self, count=1, to=None):
153155
application=self.name,
154156
placement=parse_placement(to) if to else None,
155157
num_units=count,
158+
attach_storage=attach_storage,
156159
)
157160

158161
return await jasyncio.gather(*[

0 commit comments

Comments
 (0)