Commit fd94f06
authored
Merge pull request #720 from cderici/deploy-attach-storage-param
#720
#### Description
As the name suggests, this adds `--attach-storage` parameter to the `model.deploy()`.
Fixes #716
#### QA Steps
The following test is added for this. However, see the Notes below.
```
tox -e integration -- tests/integration/test_model.py::test_model_attach_storage_at_deploy
```
All CI tests need to pass.
#### Notes & Discussion
Currently the `attach-storage` and `detach-storage` is not working consistently on the Juju side. So we're skipping the storage tests that need those functions. (Investigating on the Juju side) The reason we need them is that the `--attach-storage` parameter on the `deploy()` expects an already existing storage. And the only way that I know how to get one that's attachable is to `add_storage()` to a unit and `unit.detach_storage()` it, which makes the storage available and retain it in the model. For some reason, however, either the `detach` doesn't detach properly I'm not sure, the `remove_application` wipes the storage out of the model (in the juju cli as well).2 files changed
Lines changed: 52 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1670 | 1670 | | |
1671 | 1671 | | |
1672 | 1672 | | |
1673 | | - | |
| 1673 | + | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
| |||
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
| 1703 | + | |
| 1704 | + | |
1703 | 1705 | | |
1704 | 1706 | | |
1705 | 1707 | | |
| |||
1713 | 1715 | | |
1714 | 1716 | | |
1715 | 1717 | | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
1716 | 1721 | | |
1717 | 1722 | | |
1718 | 1723 | | |
| |||
1820 | 1825 | | |
1821 | 1826 | | |
1822 | 1827 | | |
1823 | | - | |
| 1828 | + | |
| 1829 | + | |
1824 | 1830 | | |
1825 | 1831 | | |
1826 | 1832 | | |
| |||
2037 | 2043 | | |
2038 | 2044 | | |
2039 | 2045 | | |
2040 | | - | |
| 2046 | + | |
2041 | 2047 | | |
2042 | 2048 | | |
2043 | 2049 | | |
| |||
2064 | 2070 | | |
2065 | 2071 | | |
2066 | 2072 | | |
| 2073 | + | |
2067 | 2074 | | |
2068 | 2075 | | |
2069 | 2076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1080 | 1122 | | |
1081 | 1123 | | |
1082 | 1124 | | |
| |||
0 commit comments