def get_volume_extra_specs(volume):
 ctxt = context.get_admin_context()
 type_id = volume.get('volume_type_id')
 if (type_id is None):
  return {}
 volume_type = volume_types.get_volume_type(ctxt, type_id)
 if (volume_type is None):
  return {}
 extra_specs = volume_type.get('extra_specs', {})
 log_extra_spec_warnings(extra_specs)
 return extra_specs

def get_volume_extra_specs ( volume ) : ctxt = context . get_admin_context ( ) type_id = volume . get ( 'volume_type_id' ) if ( type_id is None ) : return { } volume_type = volume_types . get_volume_type ( ctxt , type_id ) if ( volume_type is None ) : return { } extra_specs = volume_type . get ( 'extra_specs' , { } ) log_extra_spec_warnings ( extra_specs ) return extra_specs
provides extra specs associated with volume .