Revision 2b8f654c
b/snf-cyclades-app/synnefo/db/models.py | ||
---|---|---|
1040 | 1040 |
|
1041 | 1041 |
@property |
1042 | 1042 |
def backend_volume_uuid(self): |
1043 |
return u"%svolume-%d" % (settings.BACKEND_PREFIX_ID, self.id)
|
|
1043 |
return u"%svol-%d" % (settings.BACKEND_PREFIX_ID, self.id) |
|
1044 | 1044 |
|
1045 | 1045 |
@property |
1046 | 1046 |
def backend_disk_uuid(self): |
b/snf-cyclades-app/synnefo/logic/utils.py | ||
---|---|---|
94 | 94 |
""" |
95 | 95 |
if not str(name).startswith(settings.BACKEND_PREFIX_ID): |
96 | 96 |
raise ValueError("Invalid Disk name: %s" % name) |
97 |
ns = str(name).replace(settings.BACKEND_PREFIX_ID + 'volume-', "", 1)
|
|
97 |
ns = str(name).replace(settings.BACKEND_PREFIX_ID + 'vol-', "", 1) |
|
98 | 98 |
if not ns.isdigit(): |
99 | 99 |
raise ValueError("Invalid Disk name: %s" % name) |
100 | 100 |
|
Also available in: Unified diff