Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created July 23, 2013 02:24
Show Gist options
  • Save j-griffith/6059386 to your computer and use it in GitHub Desktop.
Save j-griffith/6059386 to your computer and use it in GitHub Desktop.
class VolumeQOSSpecs(BASE, CinderBase):
"""Represents qos specs as key/value pairs for a volume_type."""
__tablename__ = 'volume_type_qos_specs'
id = Column(Integer, primary_key=True)
key = Column(String(255))
value = Column(String(255))
volume_type_id = Column(String(36),
ForeignKey('volume_types.id'),
nullable=False)
volume_type = relationship(
VolumeTypes,
backref="qos_specs",
foreign_keys=volume_type_id,
primaryjoin='and_('
'VolumeTypeQOSSpecs.volume_type_id == VolumeTypes.id,'
'VolumeTypeQOSSpecs.deleted == False)'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment