Commit 588d1da3 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Fix parameter formatting.

Reviewed-by: iustinp
parent 28cc354f
......@@ -79,7 +79,7 @@ class ServerObject(pb.Avatar):
# the new block devices --------------------------
def perspective_blockdev_create(self,params):
def perspective_blockdev_create(self, params):
bdev_s, size, on_primary = params
bdev = objects.ConfigObject.Loads(bdev_s)
if bdev is None:
......@@ -87,13 +87,13 @@ class ServerObject(pb.Avatar):
return backend.CreateBlockDevice(bdev, size, on_primary)
def perspective_blockdev_remove(self,params):
def perspective_blockdev_remove(self, params):
bdev_s = params[0]
bdev = objects.ConfigObject.Loads(bdev_s)
return backend.RemoveBlockDevice(bdev)
def perspective_blockdev_assemble(self,params):
def perspective_blockdev_assemble(self, params):
bdev_s, on_primary = params
bdev = objects.ConfigObject.Loads(bdev_s)
if bdev is None:
......@@ -101,7 +101,7 @@ class ServerObject(pb.Avatar):
return backend.AssembleBlockDevice(bdev, on_primary)
def perspective_blockdev_shutdown(self,params):
def perspective_blockdev_shutdown(self, params):
bdev_s = params[0]
bdev = objects.ConfigObject.Loads(bdev_s)
if bdev is None:
......@@ -109,7 +109,7 @@ class ServerObject(pb.Avatar):
return backend.ShutdownBlockDevice(bdev)
def perspective_blockdev_addchild(self,params):
def perspective_blockdev_addchild(self, params):
bdev_s, ndev_s = params
bdev = objects.ConfigObject.Loads(bdev_s)
ndev = objects.ConfigObject.Loads(ndev_s)
......@@ -118,7 +118,7 @@ class ServerObject(pb.Avatar):
return backend.MirrorAddChild(bdev, ndev)
def perspective_blockdev_removechild(self,params):
def perspective_blockdev_removechild(self, params):
bdev_s, ndev_s = params
bdev = objects.ConfigObject.Loads(bdev_s)
ndev = objects.ConfigObject.Loads(ndev_s)
......@@ -135,25 +135,25 @@ class ServerObject(pb.Avatar):
disk = objects.ConfigObject.Loads(params[0])
return backend.FindBlockDevice(disk)
def perspective_blockdev_snapshot(self,params):
def perspective_blockdev_snapshot(self, params):
cfbd = objects.ConfigObject.Loads(params[0])
return backend.SnapshotBlockDevice(cfbd)
# export/import --------------------------
def perspective_snapshot_export(self,params):
def perspective_snapshot_export(self, params):
disk = objects.ConfigObject.Loads(params[0])
dest_node = params[1]
instance = objects.ConfigObject.Loads(params[2])
return backend.ExportSnapshot(disk,dest_node,instance)
def perspective_finalize_export(self,params):
def perspective_finalize_export(self, params):
instance = objects.ConfigObject.Loads(params[0])
snap_disks = [objects.ConfigObject.Loads(str_data)
for str_data in params[1]]
return backend.FinalizeExport(instance, snap_disks)
def perspective_export_info(self,params):
def perspective_export_info(self, params):
dir = params[0]
einfo = backend.ExportInfo(dir)
if einfo is None:
......@@ -169,22 +169,22 @@ class ServerObject(pb.Avatar):
# volume --------------------------
def perspective_volume_list(self,params):
def perspective_volume_list(self, params):
vgname = params[0]
return backend.GetVolumeList(vgname)
def perspective_vg_list(self,params):
def perspective_vg_list(self, params):
return backend.ListVolumeGroups()
# bridge --------------------------
def perspective_bridges_exist(self,params):
def perspective_bridges_exist(self, params):
bridges_list = params[0]
return backend.BridgesExist(bridges_list)
# instance --------------------------
def perspective_instance_os_add(self,params):
def perspective_instance_os_add(self, params):
inst_s, os_disk, swap_disk = params
inst = objects.ConfigObject.Loads(inst_s)
return backend.AddOSToInstance(inst, os_disk, swap_disk)
......@@ -195,35 +195,35 @@ class ServerObject(pb.Avatar):
return backend.ImportOSIntoInstance(inst, os_disk, swap_disk,
src_node, src_image)
def perspective_instance_shutdown(self,params):
def perspective_instance_shutdown(self, params):
instance = objects.ConfigObject.Loads(params[0])
return backend.ShutdownInstance(instance)
def perspective_instance_start(self,params):
def perspective_instance_start(self, params):
instance = objects.ConfigObject.Loads(params[0])
extra_args = params[1]
return backend.StartInstance(instance, extra_args)
def perspective_instance_info(self,params):
def perspective_instance_info(self, params):
return backend.GetInstanceInfo(params[0])
def perspective_all_instances_info(self,params):
def perspective_all_instances_info(self, params):
return backend.GetAllInstancesInfo()
def perspective_instance_list(self,params):
def perspective_instance_list(self, params):
return backend.GetInstanceList()
# node --------------------------
def perspective_node_info(self,params):
def perspective_node_info(self, params):
vgname = params[0]
return backend.GetNodeInfo(vgname)
def perspective_node_add(self,params):
def perspective_node_add(self, params):
return backend.AddNode(params[0], params[1], params[2],
params[3], params[4], params[5])
def perspective_node_verify(self,params):
def perspective_node_verify(self, params):
return backend.VerifyNode(params[0])
def perspective_node_start_master(self, params):
......@@ -240,13 +240,13 @@ class ServerObject(pb.Avatar):
# cluster --------------------------
def perspective_version(self,params):
def perspective_version(self, params):
return constants.PROTOCOL_VERSION
def perspective_configfile_list(self,params):
def perspective_configfile_list(self, params):
return backend.ListConfigFiles()
def perspective_upload_file(self,params):
def perspective_upload_file(self, params):
return backend.UploadFile(*params)
......
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 to comment