On Tue, Dec 06, 2011 at 06:52:12PM +0100, Agata Murawska wrote:
> Cluster initialization can now take instance policy specs as arguments.
> Sanity checks are performed to ensure, that for every policy element we
> have min <= std <= max.
> 
> Signed-off-by: Agata Murawska <[email protected]>
> ---
>  lib/bootstrap.py          |   12 +++++++++++-
>  lib/client/gnt_cluster.py |   12 ++++++++++++
>  2 files changed, 23 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/bootstrap.py b/lib/bootstrap.py
> index 62d59ce..ba729be 100644
> --- a/lib/bootstrap.py
> +++ b/lib/bootstrap.py
> @@ -289,7 +289,7 @@ def InitCluster(cluster_name, mac_prefix, # pylint: 
> disable=R0913
>                  hvparams=None, diskparams=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,
> +                default_iallocator=None, primary_ip_version=None, 
> ipolicy=None,
>                  prealloc_wipe_disks=False, use_external_mip_script=False):
>    """Initialise the cluster.
>  
> @@ -413,7 +413,16 @@ def InitCluster(cluster_name, mac_prefix, # pylint: 
> disable=R0913
>    objects.UpgradeBeParams(beparams)
>    utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
>    utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
> +  for key, val in ipolicy.iteritems():

items() again please.

Rest LGTM.

Reply via email to