2017-06-06 21:22:03 +00:00
|
|
|
def set_vhost_controller_coalescing(args):
|
|
|
|
params = {
|
|
|
|
'ctrlr': args.ctrlr,
|
|
|
|
'delay_base_us': args.delay_base_us,
|
|
|
|
'iops_threshold': args.iops_threshold,
|
|
|
|
}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('set_vhost_controller_coalescing', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
2018-02-14 21:34:55 +00:00
|
|
|
|
2017-06-06 21:22:03 +00:00
|
|
|
def construct_vhost_scsi_controller(args):
|
|
|
|
params = {'ctrlr': args.ctrlr}
|
|
|
|
|
|
|
|
if args.cpumask:
|
|
|
|
params['cpumask'] = args.cpumask
|
|
|
|
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('construct_vhost_scsi_controller', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def add_vhost_scsi_lun(args):
|
|
|
|
params = {
|
|
|
|
'ctrlr': args.ctrlr,
|
|
|
|
'bdev_name': args.bdev_name,
|
|
|
|
'scsi_target_num': args.scsi_target_num
|
|
|
|
}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('add_vhost_scsi_lun', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def remove_vhost_scsi_target(args):
|
|
|
|
params = {
|
|
|
|
'ctrlr': args.ctrlr,
|
|
|
|
'scsi_target_num': args.scsi_target_num
|
|
|
|
}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('remove_vhost_scsi_target', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def construct_vhost_blk_controller(args):
|
|
|
|
params = {
|
|
|
|
'ctrlr': args.ctrlr,
|
|
|
|
'dev_name': args.dev_name,
|
|
|
|
}
|
|
|
|
if args.cpumask:
|
|
|
|
params['cpumask'] = args.cpumask
|
|
|
|
if args.readonly:
|
|
|
|
params['readonly'] = args.readonly
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('construct_vhost_blk_controller', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def get_vhost_controllers(args):
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('get_vhost_controllers')
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def remove_vhost_controller(args):
|
|
|
|
params = {'ctrlr': args.ctrlr}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('remove_vhost_controller', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def construct_virtio_user_scsi_bdev(args):
|
|
|
|
params = {
|
|
|
|
'path': args.path,
|
|
|
|
'name': args.name,
|
|
|
|
}
|
|
|
|
if args.vq_count:
|
|
|
|
params['vq_count'] = args.vq_count
|
|
|
|
if args.vq_size:
|
|
|
|
params['vq_size'] = args.vq_size
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('construct_virtio_user_scsi_bdev', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def construct_virtio_pci_scsi_bdev(args):
|
|
|
|
params = {
|
|
|
|
'pci_address': args.pci_address,
|
|
|
|
'name': args.name,
|
|
|
|
}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('construct_virtio_pci_scsi_bdev', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def remove_virtio_scsi_bdev(args):
|
|
|
|
params = {'name': args.name}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('remove_virtio_scsi_bdev', params)
|
2017-12-27 15:22:48 +00:00
|
|
|
|
|
|
|
|
2018-03-25 18:17:11 +00:00
|
|
|
def get_virtio_scsi_devs(args):
|
|
|
|
return args.client.call('get_virtio_scsi_devs')
|
|
|
|
|
|
|
|
|
2017-12-27 15:22:48 +00:00
|
|
|
def construct_virtio_user_blk_bdev(args):
|
|
|
|
params = {
|
|
|
|
'path': args.path,
|
|
|
|
'name': args.name,
|
|
|
|
}
|
|
|
|
if args.vq_count:
|
|
|
|
params['vq_count'] = args.vq_count
|
|
|
|
if args.vq_size:
|
|
|
|
params['vq_size'] = args.vq_size
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('construct_virtio_user_blk_bdev', params)
|
2017-12-27 15:22:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
def construct_virtio_pci_blk_bdev(args):
|
|
|
|
params = {
|
|
|
|
'pci_address': args.pci_address,
|
|
|
|
'name': args.name,
|
|
|
|
}
|
2018-03-19 22:24:32 +00:00
|
|
|
return args.client.call('construct_virtio_pci_blk_bdev', params)
|