From fd7f5b411ca61be2e4eff638773ba6c0fac7eb32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Nussbaumer?= <rn@google.com>
Date: Mon, 29 Nov 2010 11:10:14 +0100
Subject: [PATCH] InitCluster support for ndparams
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: RenΓ© Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/bootstrap.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/bootstrap.py b/lib/bootstrap.py
index 24f9a0add..0da28bf24 100644
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@ -223,10 +223,10 @@ def _InitFileStorage(file_storage_dir):
 def InitCluster(cluster_name, mac_prefix,
                 master_netdev, file_storage_dir, candidate_pool_size,
                 secondary_ip=None, vg_name=None, beparams=None,
-                nicparams=None, hvparams=None, enabled_hypervisors=None,
-                modify_etc_hosts=True, modify_ssh_setup=True,
-                maintain_node_health=False, drbd_helper=None,
-                uid_pool=None, default_iallocator=None,
+                nicparams=None, ndparams=None, hvparams=None,
+                enabled_hypervisors=None, modify_etc_hosts=True,
+                modify_ssh_setup=True, maintain_node_health=False,
+                drbd_helper=None, uid_pool=None, default_iallocator=None,
                 primary_ip_version=None, prealloc_wipe_disks=False):
   """Initialise the cluster.
 
@@ -338,6 +338,7 @@ def InitCluster(cluster_name, mac_prefix,
 
   utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
   utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
+  utils.ForceDictType(ndparams, constants.NDS_PARAMETER_TYPES)
   objects.NIC.CheckParameterSyntax(nicparams)
 
   # hvparams is a mapping of hypervisor->hvparams dict
@@ -383,6 +384,7 @@ def InitCluster(cluster_name, mac_prefix,
     enabled_hypervisors=enabled_hypervisors,
     beparams={constants.PP_DEFAULT: beparams},
     nicparams={constants.PP_DEFAULT: nicparams},
+    ndparams=ndparams,
     hvparams=hvparams,
     candidate_pool_size=candidate_pool_size,
     modify_etc_hosts=modify_etc_hosts,
-- 
GitLab