summaryrefslogtreecommitdiffstats
path: root/src/spdk/scripts/rpc/nbd.py
blob: 70cba1676e198247ca0c03cfdb9bedfea269133a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def start_nbd_disk(client, bdev_name, nbd_device):
    params = {
        'bdev_name': bdev_name,
        'nbd_device': nbd_device
    }
    return client.call('start_nbd_disk', params)


def stop_nbd_disk(client, nbd_device):
    params = {'nbd_device': nbd_device}
    return client.call('stop_nbd_disk', params)


def get_nbd_disks(client, nbd_device=None):
    params = {}
    if nbd_device:
        params['nbd_device'] = nbd_device
    return client.call('get_nbd_disks', params)