Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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):
class
Meta
:
app_label
=
'vm'
db_table
=
'vm_instancetemplate'
ordering
=
[
'name'
,
]
ordering
=
(
'name'
,
)
permissions
=
(
(
'create_template'
,
_
(
'Can create an instance template.'
)),
)
...
...
@@ -235,7 +235,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
class
Meta
:
app_label
=
'vm'
db_table
=
'vm_instance'
ordering
=
[
'pk'
,
]
ordering
=
(
'pk'
,
)
permissions
=
(
(
'access_console'
,
_
(
'Can access the graphical console of a VM.'
)),
(
'change_resources'
,
_
(
'Can change resources of a running VM.'
)),
...
...
@@ -269,7 +269,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
self
.
instance
=
instance
def
__unicode__
(
self
):
parts
=
[
self
.
name
,
"("
+
str
(
self
.
id
)
+
")"
]
parts
=
(
self
.
name
,
"("
+
str
(
self
.
id
)
+
")"
)
return
" "
.
join
([
s
for
s
in
parts
if
s
!=
""
])
@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