Revision d30f29aa snf-cyclades-app/synnefo/db/models.py
b/snf-cyclades-app/synnefo/db/models.py | ||
---|---|---|
371 | 371 |
"""Returns the backend id for this VM by prepending backend-prefix.""" |
372 | 372 |
if not self.id: |
373 | 373 |
raise VirtualMachine.InvalidBackendIdError("self.id is None") |
374 |
return '%s%s' % (settings.BACKEND_PREFIX_ID, self.id)
|
|
374 |
return "%s%s" % (settings.BACKEND_PREFIX_ID, str(self.id))
|
|
375 | 375 |
|
376 | 376 |
class Meta: |
377 | 377 |
verbose_name = u'Virtual machine instance' |
... | ... | |
475 | 475 |
"""Return the backend id by prepending backend-prefix.""" |
476 | 476 |
if not self.id: |
477 | 477 |
raise Network.InvalidBackendIdError("self.id is None") |
478 |
return '%s%s' % (settings.BACKEND_PREFIX_ID, self.id)
|
|
478 |
return "%snet-%s" % (settings.BACKEND_PREFIX_ID, str(self.id))
|
|
479 | 479 |
|
480 | 480 |
@property |
481 | 481 |
def backend_tag(self): |
Also available in: Unified diff