mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Rebuilt bootstrap libvirt
This commit is contained in:
parent
e312fafc3c
commit
23b4d22a72
5 changed files with 147 additions and 69 deletions
|
|
@ -269,19 +269,22 @@ def instance(request, compute_id, vname):
|
|||
passwd_hash = crypt.crypt(passwd, '$6$kgPoiREy')
|
||||
data = {'passwd': passwd_hash, 'vname': vname}
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((compute.hostname, 16510))
|
||||
s.send(json.dumps(data))
|
||||
result = json.loads(s.recv(1024))
|
||||
s.close()
|
||||
if conn.get_status() == 5:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((compute.hostname, 16510))
|
||||
s.send(json.dumps(data))
|
||||
result = json.loads(s.recv(1024))
|
||||
s.close()
|
||||
msg = _("Reset root password")
|
||||
addlogmsg(request.user.username, instance.name, msg)
|
||||
|
||||
msg = _("Reset root password")
|
||||
addlogmsg(request.user.username, instance.name, msg)
|
||||
|
||||
if result['return'] == 'success':
|
||||
messages.append(msg)
|
||||
if result['return'] == 'success':
|
||||
messages.append(msg)
|
||||
else:
|
||||
error_messages.append(msg)
|
||||
else:
|
||||
error_messages(msg)
|
||||
msg = _("Please shutdow down your instance and then try again")
|
||||
error_messages.append(msg)
|
||||
|
||||
if 'resize' in request.POST:
|
||||
vcpu = request.POST.get('vcpu', '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue