FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-libjuju/examples/local_refresh.py at master · Maxcode123/python-libjuju · GitHub
Maxcode123
python-libjuju
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-libjuju
/
examples
/
local_refresh.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (22 loc) · 682 Bytes
Breadcrumbs
python-libjuju
/
examples
/
local_refresh.py
Copy path
File metadata and controls
30 lines (22 loc) · 682 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
This example:
1. Connects to the current model
2. Upgrades previously deployed ubuntu charm
"""
from
juju
import
jasyncio
from
juju
.
model
import
Model
async
def
main
():
model
=
Model
()
print
(
'Connecting to model'
)
# connect to current model with current user, per Juju CLI
await
model
.
connect
()
try
:
print
(
'Get deployed application'
)
app
=
model
.
appplications
[
"ubuntu"
]
print
(
'Refresh/Upgrade Ubuntu charm with local charm'
)
await
app
.
refresh
(
path
=
"path/to/local/ubuntu.charm"
)
finally
:
print
(
'Disconnecting from model'
)
await
model
.
disconnect
()
if
__name__
==
'__main__'
:
jasyncio
.
run
(
main
())
Back
|
FazBrowse Home
|
New Git URL