FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AsyncOpenStackClient/src/asyncopenstackclient/nova.py at master · DreamLab/AsyncOpenStackClient · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
DreamLab
/
AsyncOpenStackClient
Public
Notifications
You must be signed in to change notification settings
Fork
7
Star
18
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
AsyncOpenStackClient
/
src
/
asyncopenstackclient
/
nova.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (22 loc) · 1.4 KB
Breadcrumbs
AsyncOpenStackClient
/
src
/
asyncopenstackclient
/
nova.py
Copy path
File metadata and controls
25 lines (22 loc) · 1.4 KB
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
from
.
client
import
Client
class
NovaClient
(
Client
):
def
__init__
(
self
,
session
=
None
,
api_url
=
None
):
super
().
__init__
(
'nova'
, [
'flavors'
,
'servers'
,
'metadata'
],
session
,
api_url
)
async
def
init_api
(
self
,
timeout
=
60
):
await
super
().
init_api
(
timeout
)
self
.
api
.
servers
.
actions
[
"force_delete"
]
=
{
"method"
:
"DELETE"
,
"url"
:
"servers/{}"
}
self
.
api
.
servers
.
actions
[
"get"
]
=
{
"method"
:
"GET"
,
"url"
:
"servers/{}"
}
self
.
api
.
servers
.
actions
[
"list"
]
=
{
"method"
:
"GET"
,
"url"
:
"servers/detail"
}
self
.
api
.
servers
.
actions
[
"run_action"
]
=
{
"method"
:
"POST"
,
"url"
:
"servers/{}/action"
}
self
.
api
.
servers
.
add_action
(
"force_delete"
)
self
.
api
.
servers
.
add_action
(
"get"
)
self
.
api
.
servers
.
add_action
(
"run_action"
)
self
.
api
.
flavors
.
actions
[
"list"
]
=
{
"method"
:
"GET"
,
"url"
:
"flavors/detail"
}
self
.
api
.
metadata
.
actions
[
'get'
]
=
{
"method"
:
"GET"
,
"url"
:
"servers/{}/metadata"
}
self
.
api
.
metadata
.
actions
[
'set'
]
=
{
"method"
:
"POST"
,
"url"
:
"servers/{}/metadata"
}
self
.
api
.
metadata
.
actions
[
'get_item'
]
=
{
"method"
:
"GET"
,
"url"
:
"servers/{}/metadata/{}"
}
self
.
api
.
metadata
.
actions
[
'set_item'
]
=
{
"method"
:
"PUT"
,
"url"
:
"servers/{}/metadata/{}"
}
self
.
api
.
metadata
.
add_action
(
"set_item"
)
self
.
api
.
metadata
.
add_action
(
"get_item"
)
self
.
api
.
metadata
.
add_action
(
"get"
)
self
.
api
.
metadata
.
add_action
(
"set"
)
Back
|
FazBrowse Home
|
New Git URL