Revision 15552312 lib/backend.py

b/lib/backend.py
1594 1594
  result = {}
1595 1595
  result['OS_API_VERSION'] = '%d' % constants.OS_API_VERSION
1596 1596
  result['INSTANCE_NAME'] = instance.name
1597
  result['INSTANCE_OS'] = instance.os
1597 1598
  result['HYPERVISOR'] = instance.hypervisor
1598 1599
  result['DISK_COUNT'] = '%d' % len(instance.disks)
1599 1600
  result['NIC_COUNT'] = '%d' % len(instance.nics)
......
1606 1607
    real_disk.Open()
1607 1608
    result['DISK_%d_PATH' % idx] = real_disk.dev_path
1608 1609
    # FIXME: When disks will have read-only mode, populate this
1609
    result['DISK_%d_ACCESS' % idx] = 'W'
1610
    result['DISK_%d_ACCESS' % idx] = disk.mode
1610 1611
    if constants.HV_DISK_TYPE in instance.hvparams:
1611 1612
      result['DISK_%d_FRONTEND_TYPE' % idx] = \
1612 1613
        instance.hvparams[constants.HV_DISK_TYPE]

Also available in: Unified diff