def _vsa_view(context, vsa, details=False, instances=None):
    d = {}

    d['id'] = vsa.get('id')
    d['name'] = vsa.get('name')
    d['displayName'] = vsa.get('display_name')
    d['displayDescription'] = vsa.get('display_description')

    d['createTime'] = vsa.get('created_at')
    d['status'] = vsa.get('status')

    if 'vsa_instance_type' in vsa:
        d['vcType'] = vsa['vsa_instance_type'].get('name', None)
    else:
        d['vcType'] = vsa['instance_type_id']

    d['vcCount'] = vsa.get('vc_count')
    d['driveCount'] = vsa.get('vol_count')

    d['ipAddress'] = None
    for instance in instances:
        fixed_addr = None
        floating_addr = None
        if instance['fixed_ips']:
            fixed = instance['fixed_ips'][0]
            fixed_addr = fixed['address']
            if fixed['floating_ips']:
                floating_addr = fixed['floating_ips'][0]['address']

        if floating_addr:
            d['ipAddress'] = floating_addr
            break
        else:
            d['ipAddress'] = d['ipAddress'] or fixed_addr

    return d
Map keys for vsa summary/detailed view.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/contrib/virtual_storage_arrays.py/_vsa_view