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
e2bdaaa6
Commit
e2bdaaa6
authored
Oct 30, 2012
by
Christos Stavrakakis
Browse files
Remove depricated settings and update migrations
parent
d103e3d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/app_settings/default/backend.py
View file @
e2bdaaa6
...
...
@@ -3,11 +3,6 @@
# Ganeti backend configuration
###################################
# The RAPI endpoint and associated credentials to use
# for talking to the Ganeti backend.
GANETI_MASTER_IP
=
"10.0.0.1"
GANETI_CLUSTER_INFO
=
(
GANETI_MASTER_IP
,
5080
,
"username"
,
"password"
)
# This prefix gets used when determining the instance names
# of Synnefo VMs at the Ganeti backend.
# The dash must always appear in the name!
...
...
snf-cyclades-app/synnefo/db/migrations/0035_default_backend.py
View file @
e2bdaaa6
...
...
@@ -11,9 +11,12 @@ class Migration(DataMigration):
def
forwards
(
self
,
orm
):
"Write your forwards methods here."
try
:
# Do NOT import external code as can be depricated when the
# migration will run
cluster_info
=
settings
.
GANETI_CLUSTER_INFO
except
AttributeError
:
raise
AttributeError
(
"Missing settings GANETI_CLUSTER_INFO"
)
except
(
AttributeError
,
ImportError
):
return
(
ip
,
port
,
username
,
password
)
=
cluster_info
backend
=
orm
.
Backend
.
objects
.
create
(
clustername
=
ip
,
port
=
port
,
...
...
snf-cyclades-app/synnefo/db/migrations/0037_network_migration.py
View file @
e2bdaaa6
...
...
@@ -10,9 +10,10 @@ class Migration(DataMigration):
def
forwards
(
self
,
orm
):
"Write your forwards methods here."
print
'
\033
[91m'
+
'Subnet of all networks is set to 10.0.0.0/24.'
print
'Gateway of all networks is set to null.'
print
"Use `snf-manage network-modify` to change them."
+
'
\033
[0m'
if
orm
.
Network
.
objects
.
exists
():
print
'
\033
[91m'
+
'Subnet of all networks is set to 10.0.0.0/24.'
print
'Gateway of all networks is set to null.'
print
"Use `snf-manage network-modify` to change them."
+
'
\033
[0m'
create_bridge
=
orm
.
BridgePool
.
objects
.
create
for
link
in
orm
.
NetworkLink
.
objects
.
order_by
(
'id'
).
all
():
...
...
@@ -29,6 +30,8 @@ class Migration(DataMigration):
network
.
netlink
=
network
.
link
.
name
try
:
# Do NOT import external code as can be depricated when the
# migration will run
base
=
settings
.
MAC_POOL_BASE
assert
(
len
(
base
)
==
7
)
network
.
mac_prefix
=
base
...
...
snf-cyclades-app/synnefo/db/migrations/0043_encrypt_passwords.py
View file @
e2bdaaa6
...
...
@@ -5,6 +5,8 @@ from south.v2 import DataMigration
from
django.db
import
models
try
:
# Do NOT import external code as can be depricated when the
# migration will run
from
synnefo.db.aes_encrypt
import
encrypt_db_charfield
as
encrypt
from
synnefo.db.aes_encrypt
import
decrypt_db_charfield
as
decrypt
except
ImportError
:
...
...
snf-cyclades-app/synnefo/db/migrations/0052_migrate_pool_entries.py
View file @
e2bdaaa6
...
...
@@ -37,6 +37,8 @@ class Migration(DataMigration):
bridges
=
orm
.
BridgePool
.
objects
.
all
()
if
bridges
:
try
:
# Do NOT import external code as can be depricated when the
# migration will run
pool_prefix
=
settings
.
PRIVATE_PHYSICAL_VLAN_BRIDGE_PREFIX
except
AttributeError
:
pool_prefix
=
''
...
...
@@ -65,6 +67,8 @@ class Migration(DataMigration):
mac_prefixes
=
orm
.
MacPrefixPool
.
objects
.
all
()
if
mac_prefixes
:
try
:
# Do NOT import external code as can be depricated when the
# migration will run
macp_base
=
settings
.
MAC_POOL_BASE
except
AttributeError
:
first
=
mac_prefixes
[
0
]
...
...
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