Commit e1a0492c by Dudás Ádám

vm: use tuples instead of lists for immutable literal collections

parent 6e443d3e
...@@ -135,7 +135,7 @@ class InstanceTemplate(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -135,7 +135,7 @@ class InstanceTemplate(AclBase, VirtualMachineDescModel, TimeStampedModel):
class Meta: class Meta:
app_label = 'vm' app_label = 'vm'
db_table = 'vm_instancetemplate' db_table = 'vm_instancetemplate'
ordering = ['name', ] ordering = ('name', )
permissions = ( permissions = (
('create_template', _('Can create an instance template.')), ('create_template', _('Can create an instance template.')),
) )
...@@ -235,7 +235,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -235,7 +235,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
class Meta: class Meta:
app_label = 'vm' app_label = 'vm'
db_table = 'vm_instance' db_table = 'vm_instance'
ordering = ['pk', ] ordering = ('pk', )
permissions = ( permissions = (
('access_console', _('Can access the graphical console of a VM.')), ('access_console', _('Can access the graphical console of a VM.')),
('change_resources', _('Can change resources of a running VM.')), ('change_resources', _('Can change resources of a running VM.')),
...@@ -269,7 +269,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -269,7 +269,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
self.instance = instance self.instance = instance
def __unicode__(self): def __unicode__(self):
parts = [self.name, "(" + str(self.id) + ")"] parts = (self.name, "(" + str(self.id) + ")")
return " ".join([s for s in parts if s != ""]) return " ".join([s for s in parts if s != ""])
@property @property
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment