Commit 3c57a0c
authored
Merge pull request #1038 from Aflynn50/fix-consume
#1038
#### Description
`consume` takes a `controller_name` argument. This is not needed and should be automatically generated from the offer url. A deprecation warning is logged and the variable is not used.
Also update offer and consume integration tests to no longer be skipped.
This helps avoid #1031
#### QA Steps
```
juju bootstrap lxd c1
juju add-model offerer
juju deploy juju-qa-dummy-source dummy-source
juju offer dummy-source:sink
juju bootstrap lxd c2
python -m asyncio
# In REPL
from juju import model
m = model.Model()
await m.connect()
await m.consume("c1:admin/offerer.dummy-source")
# Exit REPL
juju status
# Confirm SAAS exists
juju remove-saas dummy-source
# Confirm removal
python -m asyncio
# In REPL
from juju import model
m = model.Model()
await m.connect()
await m.consume("admin/offerer.dummy-source", controller_name="c1")
# Exit REPL
juju status
# Confirm SAAS exists
juju remove-saas dummy-source
# Confirm removal
python -m asyncio
# In REPL
from juju import model
m = model.Model()
await m.connect()
await m.consume("c1:admin/offerer.dummy-source", controller_name="c1")
```
All CI tests need to pass.2 files changed
Lines changed: 77 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
1530 | | - | |
| 1529 | + | |
1531 | 1530 | | |
1532 | 1531 | | |
1533 | 1532 | | |
| |||
2535 | 2534 | | |
2536 | 2535 | | |
2537 | 2536 | | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
2538 | 2541 | | |
| 2542 | + | |
2539 | 2543 | | |
2540 | 2544 | | |
2541 | 2545 | | |
| |||
2549 | 2553 | | |
2550 | 2554 | | |
2551 | 2555 | | |
2552 | | - | |
2553 | 2556 | | |
2554 | | - | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
2555 | 2565 | | |
2556 | 2566 | | |
2557 | 2567 | | |
| |||
2766 | 2776 | | |
2767 | 2777 | | |
2768 | 2778 | | |
2769 | | - | |
| 2779 | + | |
2770 | 2780 | | |
2771 | 2781 | | |
2772 | 2782 | | |
2773 | 2783 | | |
2774 | 2784 | | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
2775 | 2788 | | |
2776 | 2789 | | |
2777 | 2790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
0 commit comments