Skip to content

Commit

Permalink
SM-Storage: Moved Live-Migration config from server to cluster.
Browse files Browse the repository at this point in the history
Unit testing:
1. Provisioned cluster live-migration disabled/enabled.

Change-Id: I13805fd66bab769117d8b980b8fc1e695b88ca38
  • Loading branch information
Dheeraj Gautam committed Feb 12, 2015
1 parent d755062 commit 9067d1b
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions src/server_mgr_main.py
Expand Up @@ -3019,23 +3019,18 @@ def provision_server(self):
else:
pass

for role_server in role_servers['storage-master']:
server_params_master = eval(role_server['parameters'])
if 'live_migration' in server_params_master and server_params_master['live_migration'] == "enable":
if 'live_migration_nfs_vm_host' in server_params_master and len(server_params_master['live_migration_nfs_vm_host']) > 0 :
live_migration = "enable"
live_migration_host = server_params_master['live_migration_nfs_vm_host']
else:
live_migration = "disable"
live_migration_host = ""

if 'live_migration_storage_scope' in server_params_master :
live_migration_storage_scope = server_params_master['live_migration_storage_scope']
else:
pass

else:
pass
if 'live_migration' in cluster_params.keys() and cluster_params['live_migration'] == "enable":
if 'live_migration_nfs_vm_host' in cluster_params.keys() and cluster_params['live_migration_nfs_vm_host'] and len(cluster_params['live_migration_nfs_vm_host']) > 0 :
live_migration = "enable"
live_migration_host = cluster_params['live_migration_nfs_vm_host']
else:
live_migration = "disable"
live_migration_host = ""

if 'live_migration_storage_scope' in cluster_params.keys() and cluster_params['live_migration_storage_scope']:
live_migration_storage_scope = cluster_params['live_migration_storage_scope']
else:
pass

if live_migration_storage_scope == "local" or live_migration_storage_scope == "global":
pass
Expand Down

0 comments on commit 9067d1b

Please sign in to comment.