selected slave on post
This commit is contained in:
parent
00e0848d26
commit
0267be256f
1 changed files with 3 additions and 0 deletions
|
@ -74,10 +74,13 @@ def vmcreate(orderid):
|
|||
|
||||
form = SlaveForm()
|
||||
if form.validate_on_submit():
|
||||
selectedslaveswitch = form.slaveswitcher.data
|
||||
selectedslave = Server.query.filter_by(pid=int(selectedslaveswitch)).first()
|
||||
data = { 'clientid': str(order.user_id),
|
||||
'clientemail': str(order.owner.email),
|
||||
'hostname': 'c' + str(order.user_id) + '-' + str(order.parameter1),
|
||||
'region': str(order.region.name),
|
||||
'slave': str(selectedslave.name),
|
||||
'type': 'kvm',
|
||||
'cpu': str(int(order.parameter2)),
|
||||
'mem': str(int(order.parameter3)),
|
||||
|
|
Loading…
Reference in a new issue