'Helper method for getting the size of a backend object
If app_inst is provided, we\'ll just parse the dict to get
the size instead of making a separate http request'

def _get_size_2(self, volume, app_inst=None, si_name=None, vol_name=None):

    policies = self._get_policies_for_resource(volume)
    si_name = (si_name if si_name else policies['default_storage_name'])
    vol_name = (vol_name if vol_name else policies['default_volume_name'])
    if (not app_inst):
        vol_url = datc.URL_TEMPLATES['ai_inst']().format(datc._get_name(volume['id']))
        app_inst = self._issue_api_request(vol_url)
    size = app_inst['storage_instances'][si_name]['volumes'][vol_name]['size']
    return size
