mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-03-09 15:40:18 +00:00
Multiples fix
This commit is contained in:
parent
cd7eaabde6
commit
97bc2a0248
2 changed files with 5 additions and 3 deletions
|
@ -10,7 +10,6 @@ import time
|
|||
import random
|
||||
import ast
|
||||
|
||||
|
||||
""" CLASS MONGO CACHE """
|
||||
class Purge:
|
||||
def POST(self):
|
||||
|
@ -87,9 +86,12 @@ class Cluster:
|
|||
|
||||
return json.dumps(result)
|
||||
|
||||
def POST(self):
|
||||
def POST(self, cluster=None):
|
||||
try:
|
||||
data = json.loads(web.data().decode('utf-8'))
|
||||
""" Overwrite name """
|
||||
if cluster:
|
||||
data["name"] = cluster
|
||||
result = core.insert_clusters_conf(data)
|
||||
except BaseException as e:
|
||||
result = {
|
||||
|
|
|
@ -113,7 +113,7 @@ if __name__ == "__main__":
|
|||
# '/api/v1/login', 'Login'
|
||||
|
||||
# MANAGEMENT CLUSTER
|
||||
'/api/v1/administration/cluster/(?:[0-9a-zA-Z\_\-]+)', 'Cluster',
|
||||
'/api/v1/administration/cluster/([0-9a-zA-Z\_\-]+)', 'Cluster',
|
||||
'/api/v1/administration/cluster/', 'Cluster',
|
||||
'/api/v1/administration/cluster', 'Cluster',
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue