Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ In the file, you can set a default profile, naming `default`. It will be used if
## Environment variables

```bash
$ export OSC_PROFILE=<PROFILE> (default: "default")
$ # or
$ export OSC_ACCESS_KEY=<ACCESS_KEY>
$ export OSC_SECRET_KEY=<SECRET_KEY>
$ # optional
$ export OSC_REGION=<REGION> (default: eu-west-2)
$ export OSC_MAX_RETRIES=<INT> (default: 3)
$ export OSC_RETRY_BACKOFF_FACTOR=<FLOAT> (default: 1.0)
$ export OSC_RETRY_BACKOFF_JITTER=<FLOAT> (default: 3.0)
```

## Credentials files
Expand Down Expand Up @@ -81,9 +86,25 @@ gw = Gateway(email="your@email.com", password="youAccountPassword")
keys = gw.ReadAccessKeys()
```

## Retry Options

The following options can be provided when initializing the Gateway to customize the retry behavior of the SDK.

These options are:
- max_retries (integer, default 3)
- retry_backoff_factor (float, default 1.0)
- retry_backoff_jitter (float, default 3.0)

Those options correspond to their counterparts in [urllib3](https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry)

Example:
```python
gw = Gateway(max_retries=5, retry_backoff_factor=0.5, retry_backoff_jitter=1.0)
````

# Example

A simple example which prints all your Virtual Machine and Volume ids.
A simple example that prints all your Virtual Machine and Volume IDs.
```python
from osc_sdk_python import Gateway

Expand Down
Loading