Commit d2c1cae
authored
Merge pull request #973 from cderici/app-refresh-with-resources-on-3.x
#973
#### Description
This is a forward port of #960, bringing support for refreshing application with providing `resources` as arguments.
Fixes #955 and #883 for 3.x track.
#### QA Steps
QA steps should be the same with #960:
So the fix for the #955 can be tested manually by recreating the scenario above with pylibjuju as follows:
```python
$ python -m asyncio
>>> import asyncio
>>> from juju import model;m=model.Model();await m.connect()
>>> await m.deploy('ceph-mon', channel='octopus/stable')
```
Check the resources for that using juju-cli:
```sh
$ juju resources ceph-mon
No resources to display.
```
Go back to the python repl:
```python
>>> await m.applications['ceph-mon'].refresh(channel='quincy/stable')
This should succeed
```
And check the resources again external to pylibjuju, you should see the resource is added:
```sh
$ juju resources ceph-juju
Resource Supplied by Revision
alert-rules charmstore 1
```
Additionally, an integration test for the second part of the PR that adds the resource argument to refresh is added, so just run that, and maybe play with it manually for different charms:
```
tox -e integration -- tests/integration/test_application.py::test_refresh_with_resource_argument
```
All CI tests need to pass.
#### Notes & Discussion
JUJU-47363 files changed
Lines changed: 63 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | 689 | | |
693 | 690 | | |
694 | 691 | | |
| |||
736 | 733 | | |
737 | 734 | | |
738 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
739 | 752 | | |
740 | 753 | | |
741 | 754 | | |
| |||
749 | 762 | | |
750 | 763 | | |
751 | 764 | | |
752 | | - | |
| 765 | + | |
753 | 766 | | |
754 | 767 | | |
755 | 768 | | |
756 | 769 | | |
757 | 770 | | |
758 | 771 | | |
| 772 | + | |
759 | 773 | | |
760 | 774 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
766 | 780 | | |
767 | 781 | | |
768 | 782 | | |
| 783 | + | |
769 | 784 | | |
770 | 785 | | |
771 | 786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| 543 | + | |
543 | 544 | | |
544 | 545 | | |
545 | 546 | | |
| 547 | + | |
546 | 548 | | |
547 | 549 | | |
548 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
549 | 554 | | |
550 | 555 | | |
551 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
213 | 246 | | |
214 | 247 | | |
215 | 248 | | |
| |||
0 commit comments