aboutsummaryrefslogtreecommitdiffstats
path: root/src/liblaas/views.py
diff options
context:
space:
mode:
authorJustin Choquette <jchoquette@iol.unh.edu>2023-10-23 16:24:13 -0400
committerJustin Choquette <jchoquette@iol.unh.edu>2023-10-25 16:26:17 -0400
commita4ba880252b2bad72df3f16dd11fdf2206825335 (patch)
tree3d2852284728814ba546ae2719f47fe641b0f544 /src/liblaas/views.py
parentaff53e072502d63d8002d9c83213ce7f9d12c352 (diff)
Single Template Selection For Compatible Dashboardsliblaas-mvp
Change-Id: I0a795c2c49fdbe0427182a8789d622003997efcd Signed-off-by: Justin Choquette <jchoquette@iol.unh.edu>
Diffstat (limited to 'src/liblaas/views.py')
-rw-r--r--src/liblaas/views.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/liblaas/views.py b/src/liblaas/views.py
index 5edc727..8eb1dd0 100644
--- a/src/liblaas/views.py
+++ b/src/liblaas/views.py
@@ -75,19 +75,8 @@ def flavor_list_flavors(project: str) -> requests.Response:
return None
# GET
-def flavor_get_flavor_by_id(flavor_id: str) -> requests.Response:
- endpoint = f'flavor/name/{flavor_id}/'
- url = f'{base}{endpoint}'
- try:
- response = requests.get(url)
- return response.json()
- except:
- print(f"Error at {url}")
- return None
-
-# GET
def flavor_list_hosts(project: str) -> requests.Response:
- endpoint = f'flavor/hosts/{project}'
+ endpoint = f'flavor/hosts/{project}' #todo - support project in liblaas
url = f'{base}{endpoint}'
try:
response = requests.get(url)
@@ -100,7 +89,7 @@ def flavor_list_hosts(project: str) -> requests.Response:
# GET
def template_list_templates(uid: str) -> requests.Response:
- endpoint = f'template/list/{uid}'
+ endpoint = f'template/list/{uid}' # todo - templates need to be restricted by project
url = f'{base}{endpoint}'
try:
response = requests.get(url)
@@ -122,7 +111,7 @@ def template_delete_template(template_id: str) -> requests.Response:
#POST
def template_make_template(template_blob: dict) -> requests.Response:
- endpoint = f'template/create'
+ endpoint = f'template/create' # todo - needs to be restricted by project
url = f'{base}{endpoint}'
try:
response = requests.post(url, data=json.dumps(template_blob), headers=post_headers)