Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
154f63b4
Commit
154f63b4
authored
Jul 27, 2012
by
Christos Stavrakakis
Browse files
Start pool indexing from 0
parent
a5b12a9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/app_settings/default/api.py
View file @
154f63b4
...
...
@@ -29,6 +29,7 @@ GANETI_PUBLIC_NETWORK = 'snf-net-1'
# The first mac prefix to use
MAC_POOL_BASE
=
'aa:00:0'
# Max number of mac prefixes to use
MAC_POOL_LIMIT
=
65536
ENABLED_NETWORKS
=
[
'PUBLIC_ROUTED'
,
...
...
@@ -64,7 +65,7 @@ PRIVATE_MAC_FILTERED_TAGS = ['private-filtered']
# ------------------------------------------
# Each network of this type is mapped to an isolated physical VLAN, which must
# be preconfigured in the backend. Each vlan corresponds to a bridge named
# $PRIVATE_PHYSICAL_VLAN_PREFIX{
1
..$PRIVATE_PHYSICAL_VLAN_MAX_NUMBER} (e.g. prv5)
# $PRIVATE_PHYSICAL_VLAN_PREFIX{
0
..$PRIVATE_PHYSICAL_VLAN_MAX_NUMBER} (e.g. prv5)
# VirtualMachine's taps are eventually bridged to the corresponding bridge.
PRIVATE_PHYSICAL_VLAN_BRIDGE_PREFIX
=
'prv'
# The max limit of physical vlan pool
...
...
snf-cyclades-app/synnefo/db/models.py
View file @
154f63b4
...
...
@@ -715,7 +715,7 @@ class Pool(models.Model):
last
=
cls
.
objects
.
order_by
(
'-index'
)[
0
]
index
=
last
.
index
+
1
except
IndexError
:
index
=
1
index
=
0
if
index
<=
cls
.
max_index
:
return
cls
.
objects
.
create
(
index
=
index
,
...
...
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