-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to remove wp eval code (#216)
- Loading branch information
1 parent
83b3df5
commit 4d56849
Showing
7 changed files
with
210 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<!-- markdownlint-disable --> | ||
|
||
<a href="../src/state.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
# <kbd>module</kbd> `state.py` | ||
Wordpress charm state. | ||
|
||
|
||
|
||
--- | ||
|
||
## <kbd>class</kbd> `CharmConfigInvalidError` | ||
Exception raised when a charm configuration is found to be invalid. | ||
|
||
|
||
|
||
**Attributes:** | ||
|
||
- <b>`msg`</b>: Explanation of the error. | ||
|
||
<a href="../src/state.py#L25"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>function</kbd> `__init__` | ||
|
||
```python | ||
__init__(msg: str) | ||
``` | ||
|
||
Initialize a new instance of the CharmConfigInvalidError exception. | ||
|
||
|
||
|
||
**Args:** | ||
|
||
- <b>`msg`</b>: Explanation of the error. | ||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
## <kbd>class</kbd> `ProxyConfig` | ||
Configuration for external access through proxy. | ||
|
||
|
||
|
||
**Attributes:** | ||
|
||
- <b>`http_proxy`</b>: The http proxy URL. | ||
- <b>`https_proxy`</b>: The https proxy URL. | ||
- <b>`no_proxy`</b>: Comma separated list of hostnames to bypass proxy. | ||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="../src/state.py#L47"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>classmethod</kbd> `from_env` | ||
|
||
```python | ||
from_env() → Optional[ForwardRef('ProxyConfig')] | ||
``` | ||
|
||
Instantiate ProxyConfig from juju charm environment. | ||
|
||
|
||
|
||
**Returns:** | ||
ProxyConfig if proxy configuration is provided, None otherwise. | ||
|
||
|
||
--- | ||
|
||
## <kbd>class</kbd> `State` | ||
The Wordpress k8s operator charm state. | ||
|
||
|
||
|
||
**Attributes:** | ||
|
||
- <b>`proxy_config`</b>: Proxy configuration to access Jenkins upstream through. | ||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="../src/state.py#L78"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>classmethod</kbd> `from_charm` | ||
|
||
```python | ||
from_charm(_: CharmBase) → State | ||
``` | ||
|
||
Initialize the state from charm. | ||
|
||
|
||
|
||
**Returns:** | ||
Current state of the charm. | ||
|
||
|
||
|
||
**Raises:** | ||
|
||
- <b>`CharmConfigInvalidError`</b>: if invalid state values were encountered. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters