コード例 #1
0
def detach_disk(disk_id, pool):
    if request.method == 'GET' or request.method == 'POST':

        manage_disk = ManageDisk()
        status = manage_disk.detach_disk(disk_id, pool)
        if (status != Status.done):
            # session['success'] = "ui_admin_detach_disk_success"
            # else:
            session['err'] = "ui_admin_detach_disk_error"

        return redirect(url_for('disk_controller.disk_list'))
コード例 #2
0
def deattach_disk(disk_id):
    ceph_manage = ManageDisk()
    ceph_manage.detach_disk(disk_id)
    disk = ceph_manage.get_disk(disk_id)
    print disk.id, disk.disk_name, disk.size, [p for p in disk.paths]