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
2ae2ac99
Commit
2ae2ac99
authored
Jul 27, 2012
by
Christos Stavrakakis
Browse files
Revert "Start pool indexing from 0"
This reverts commit 2f998a3756c6fc7ddce9e0f83dea738e473320b8.
parent
b4dc7df5
Changes
2
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/app_settings/default/api.py
View file @
2ae2ac99
...
...
@@ -29,7 +29,6 @@ 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'
,
...
...
@@ -65,7 +64,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{
0
..$PRIVATE_PHYSICAL_VLAN_MAX_NUMBER} (e.g. prv5)
# $PRIVATE_PHYSICAL_VLAN_PREFIX{
1
..$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 @
2ae2ac99
...
...
@@ -715,7 +715,7 @@ class Pool(models.Model):
last
=
cls
.
objects
.
order_by
(
'-index'
)[
0
]
index
=
last
.
index
+
1
except
IndexError
:
index
=
0
index
=
1
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