Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e1a0492c
authored
Mar 09, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: use tuples instead of lists for immutable literal collections
parent
6e443d3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
circle/vm/models/instance.py
+3
-3
No files found.
circle/vm/models/instance.py
View file @
e1a0492c
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment