Merge "Export custom Share model properties with _extra_keys"

This commit is contained in:
Jenkins 2015-06-04 15:08:01 +00:00 committed by Gerrit Code Review
commit 814c3cdf71
2 changed files with 3 additions and 2 deletions

View File

@ -1136,8 +1136,8 @@ def share_create(context, values):
session = get_session()
with session.begin():
share_ref.save(session=session)
return share_ref
# NOTE(u_glide): Do so to prevent errors with relationships
return share_get(context, share_ref['id'], session=session)
@require_admin_context

View File

@ -164,6 +164,7 @@ class Reservation(BASE, ManilaBase):
class Share(BASE, ManilaBase):
"""Represents an NFS and CIFS shares."""
__tablename__ = 'shares'
_extra_keys = ['name', 'export_location']
@property
def name(self):