Commit 64037295 by cloud

dashboard: some change

parent 15add231
...@@ -29,7 +29,6 @@ from .common import BaseResourceConfigModel, Lease ...@@ -29,7 +29,6 @@ from .common import BaseResourceConfigModel, Lease
from .network import Interface from .network import Interface
from .node import Node, Trait from .node import Node, Trait
import os
import random import random
import string import string
...@@ -804,10 +803,9 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin, ...@@ -804,10 +803,9 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
# create hardlink # create hardlink
hlinkname = ''.join(random.choice(string.ascii_uppercase + hlinkname = ''.join(random.choice(string.ascii_uppercase +
string.digits) for _ in range(20)) string.digits) for _ in range(20))
remotedest = '/mnt/vmdisks/' + hlinkname return pass
localdest = '/home/cloud/nfs/' + hlinkname remotedest = '/home/gergo/vmdisks/' + hlinkname
localsrc = '/home/cloud' + descriptor['disk_list'][0]['source'] localsrc = descriptor['disk_list'][0]['source']
os.link(localsrc, localdest)
descriptor['disk_list'][0]['source'] = remotedest descriptor['disk_list'][0]['source'] = remotedest
return descriptor return descriptor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment