mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-03-09 15:40:18 +00:00
Change unique ID form.
This commit is contained in:
parent
f74257cc2b
commit
868c6509f2
1 changed files with 5 additions and 4 deletions
|
@ -156,16 +156,17 @@ class Instance:
|
||||||
""" CREATE NEWS INSTANCES"""
|
""" CREATE NEWS INSTANCES"""
|
||||||
count = json.loads(web.data().decode('utf-8'))["count"]
|
count = json.loads(web.data().decode('utf-8'))["count"]
|
||||||
|
|
||||||
""" GENERATE UNIQ COMMAND ID """
|
|
||||||
randtext = ''.join(random.choice('0123456789ABCDEF') for i in range(8))
|
|
||||||
command_id = "{0}_{1}_{2}".format(time.time(), count, randtext)
|
|
||||||
|
|
||||||
""" LOAD CLUSTER CONFIGURATIONS """
|
""" LOAD CLUSTER CONFIGURATIONS """
|
||||||
select = Analyse(core.clusters_conf, generalconf)
|
select = Analyse(core.clusters_conf, generalconf)
|
||||||
sorted_nodes = dict(select.set_attribution(count))
|
sorted_nodes = dict(select.set_attribution(count))
|
||||||
|
|
||||||
""" START ALL Thread """
|
""" START ALL Thread """
|
||||||
for nodeid, count in sorted_nodes.items():
|
for nodeid, count in sorted_nodes.items():
|
||||||
|
""" GENERATE UNIQ COMMAND ID """
|
||||||
|
randtext = ''.join(random.choice('AZERTYUIOPQSDFGHJKLMWXCVBN') for i in range(8))
|
||||||
|
command_id = "Please, do not change or delete this ID \n" \
|
||||||
|
"id={0}_{1}".format(time.time(), randtext)
|
||||||
|
|
||||||
""" Find information by id mongodb"""
|
""" Find information by id mongodb"""
|
||||||
realnode = core.generalsearch('{ "_id": {id} }'.format(id=nodeid))
|
realnode = core.generalsearch('{ "_id": {id} }'.format(id=nodeid))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue