Skip to content

add Gateway.update_credentials#94

Merged
outscale-mgo merged 2 commits intomasterfrom
update_credentials
Jan 30, 2023
Merged

add Gateway.update_credentials#94
outscale-mgo merged 2 commits intomasterfrom
update_credentials

Conversation

@outscale-mgo
Copy link
Copy Markdown

add Gateway.update_credentials, so we can use the same Gateway object for multiple accounts.

Usage

from osc_sdk_python import Gateway
gw = Gateway(profile="default")
gw.ReadVms()['Vms'][1]['Tags']
gw.update_credentials(profile="my")
gw.ReadVms()['Vms'][1]['Tags']

Signed-off-by: Matthias Gatto matthias.gatto@outscale.com

Usage

```python
from osc_sdk_python import Gateway
gw = Gateway(profile="default")
gw.ReadVms()['Vms'][1]['Tags']
gw.update_credentials(profile="my")
gw.ReadVms()['Vms'][1]['Tags']
```

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
@outscale-mgo
Copy link
Copy Markdown
Author

outscale-mgo commented Jan 26, 2023

Note that I just test with

>>> gw = Gateway(access_key="XXX", secret_key="YYYYYYY") # replace with real AK/SK
>>> gw.ReadVms()['Vms'][1]['Tags']
[{'Value': 'Packer Builder', 'Key': 'Name'}]
>>> gw.update_credentials(access_key="XYZ", secret_key="C1TYHUNT3R")  # replace with real AK/SK
[{'Value': 'Mine', 'Key': 'Name'}]

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
@outscale-mgo outscale-mgo merged commit 7b8a253 into master Jan 30, 2023
@jobs62 jobs62 deleted the update_credentials branch August 20, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants