Skip to content

Commit b3ed9de

Browse files
Merge branch 'master' into JUJU-1564_add_model.name
2 parents 55ea0e2 + 601bcf3 commit b3ed9de

25 files changed

Lines changed: 67026 additions & 76479 deletions

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.11
1+
3.0.1

docs/changelog.rst

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
11
Changelog
22
---------
3+
3.0.1
4+
^^^^^
5+
6+
Thursday August 11 2022
7+
8+
## What's Changed
9+
* [JUJU-1593] Fix `run_actions` and facade issues by @cderici in https://github.com/juju/python-libjuju/pull/706
10+
11+
3.0.0
12+
^^^^^
13+
14+
Tuesday August 9 2022
15+
16+
## What's Changed
17+
18+
Switching to semantic versioning. From this release on, at least the major release number matches
19+
the most recent Juju supported. Hence the jump to `3.0.0` since this release supports `Juju 3.0`.
20+
(This also means that `python-libjuju <= 2.9.11` only support up to `Juju 2.x`)
21+
22+
* [JUJU-1439] Initial fixes for `test_model` to pass with juju 3.0 by @cderici in https://github.com/juju/python-libjuju/pull/689
23+
* [JUJU-1464] More fixes for 3.0 compatibility by @cderici in https://github.com/juju/python-libjuju/pull/691
24+
* [JUJU-1457] Merge 3.0 compatibility branch onto master by @cderici in https://github.com/juju/python-libjuju/pull/692
25+
* Fix conditional by @sed-i in https://github.com/juju/python-libjuju/pull/696
26+
* [JUJU-1534] Fix `model.connect_current()` by @cderici in https://github.com/juju/python-libjuju/pull/697
27+
* [JUJU-1542] Fix run actions on units by @cderici in https://github.com/juju/python-libjuju/pull/698
28+
* [JUJU-1577] Replace k8s bundles with machine bundles for tests by @cderici in https://github.com/juju/python-libjuju/pull/703
29+
* [JUJU-1528] Add storage implementation by @cderici in https://github.com/juju/python-libjuju/pull/701
330

431
2.9.11
532
^^^^^^
633

734
Monday July 11 2022
835

9-
## What's Changed
10-
1136
* Add REPL quickstart subsection by @sed-i in https://github.com/juju/python-libjuju/pull/676
1237
* Revision of test onos.charm by @juanmanuel-tirado in https://github.com/juju/python-libjuju/pull/686
1338
* [JUJU-1353] Parse assume directives. by @juanmanuel-tirado in https://github.com/juju/python-libjuju/pull/685

juju/action.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33

44
class Action(model.ModelEntity):
5+
6+
def __init__(self, entity_id, model, history_index=-1, connected=True):
7+
super().__init__(entity_id, model, history_index, connected)
8+
self.results = {}
9+
510
@property
611
def status(self):
712
return self.data['status']
813

914
async def wait(self):
10-
return await self.model.get_action_output(self.id)
15+
self.results = await self.model.get_action_output(self.id)
16+
return self

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(*[

juju/client/_client.py

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,21 @@
44
from juju.client._definitions import *
55

66

7-
from juju.client import _client2, _client1, _client3, _client4, _client5, _client8, _client7, _client9, _client10, _client6, _client12, _client11, _client13, _client15, _client16, _client17, _client18, _client14
7+
from juju.client import _client7, _client1, _client3, _client2, _client14, _client4, _client6, _client5, _client11, _client9, _client18
88

99

1010
CLIENTS = {
11-
"2": _client2,
11+
"7": _client7,
1212
"1": _client1,
1313
"3": _client3,
14+
"2": _client2,
15+
"14": _client14,
1416
"4": _client4,
15-
"5": _client5,
16-
"8": _client8,
17-
"7": _client7,
18-
"9": _client9,
19-
"10": _client10,
2017
"6": _client6,
21-
"12": _client12,
18+
"5": _client5,
2219
"11": _client11,
23-
"13": _client13,
24-
"15": _client15,
25-
"16": _client16,
26-
"17": _client17,
27-
"18": _client18,
28-
"14": _client14
20+
"9": _client9,
21+
"18": _client18
2922
}
3023

3124

@@ -127,10 +120,6 @@ class ApplicationOffersFacade(TypeFactory):
127120
pass
128121

129122

130-
class ApplicationRelationsWatcherFacade(TypeFactory):
131-
pass
132-
133-
134123
class ApplicationScalerFacade(TypeFactory):
135124
pass
136125

@@ -247,10 +236,6 @@ class DeployerFacade(TypeFactory):
247236
pass
248237

249238

250-
class DiscoverSpacesFacade(TypeFactory):
251-
pass
252-
253-
254239
class DiskManagerFacade(TypeFactory):
255240
pass
256241

@@ -455,10 +440,6 @@ class RelationUnitsWatcherFacade(TypeFactory):
455440
pass
456441

457442

458-
class RemoteApplicationWatcherFacade(TypeFactory):
459-
pass
460-
461-
462443
class RemoteRelationWatcherFacade(TypeFactory):
463444
pass
464445

@@ -467,10 +448,6 @@ class RemoteRelationsFacade(TypeFactory):
467448
pass
468449

469450

470-
class RemoteRelationsWatcherFacade(TypeFactory):
471-
pass
472-
473-
474451
class ResourcesFacade(TypeFactory):
475452
pass
476453

0 commit comments

Comments
 (0)