@staticmethod
def _disk_size_from_instance(instance, info):
    'Determines the disk size from instance properties\n\n        Returns the disk size by using the disk name to determine whether it\n        is a root or an ephemeral disk, then by checking properties of the\n        instance returns the size converted to bytes.\n\n        Returns 0 if the disk name not match (disk, disk.local).\n        '
    fname = os.path.basename(info['path'])
    if (fname == 'disk'):
        size = instance['root_gb']
    elif (fname == 'disk.local'):
        size = instance['ephemeral_gb']
    else:
        size = 0
    return (size * units.Gi)
Determines the disk size from instance properties

Returns the disk size by using the disk name to determine whether it
is a root or an ephemeral disk, then by checking properties of the
instance returns the size converted to bytes.

Returns 0 if the disk name not match (disk, disk.local).
@staticmethod
def _disk_size_from_instance(instance, info):
    'Determines the disk size from instance properties\n\n        Returns the disk size by using the disk name to determine whether it\n        is a root or an ephemeral disk, then by checking properties of the\n        instance returns the size converted to bytes.\n\n        Returns 0 if the disk name not match (disk, disk.local).\n        '
    fname = os.path.basename(info['path'])
    if (fname == 'disk'):
        size = instance['root_gb']
    elif (fname == 'disk.local'):
        size = instance['ephemeral_gb']
    else:
        size = 0
    return (size * units.Gi)