Revision 432e8e2f test/ganeti.objects_unittest.py

b/test/ganeti.objects_unittest.py
1 1
#!/usr/bin/python
2 2
#
3 3

  
4
# Copyright (C) 2006, 2007, 2008, 2010 Google Inc.
4
# Copyright (C) 2006, 2007, 2008, 2010, 2012 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
78 78
        },
79 79
      }
80 80
    ndparams = {
81
        constants.ND_OOB_PROGRAM: "/bin/cluster-oob"
81
        constants.ND_OOB_PROGRAM: "/bin/cluster-oob",
82
        constants.ND_SPINDLE_COUNT: 1
82 83
        }
83 84

  
84 85
    self.fake_cl = objects.Cluster(hvparams=hvparams, os_hvp=os_hvp,
......
161 162
                             ndparams={},
162 163
                             group="testgroup")
163 164
    group_ndparams = {
164
        constants.ND_OOB_PROGRAM: "/bin/group-oob"
165
        constants.ND_OOB_PROGRAM: "/bin/group-oob",
166
        constants.ND_SPINDLE_COUNT: 10,
165 167
        }
166 168
    fake_group = objects.NodeGroup(name="testgroup",
167 169
                                   ndparams=group_ndparams)
......
170 172

  
171 173
  def testFillNdParamsNode(self):
172 174
    node_ndparams = {
173
        constants.ND_OOB_PROGRAM: "/bin/node-oob"
175
        constants.ND_OOB_PROGRAM: "/bin/node-oob",
176
        constants.ND_SPINDLE_COUNT: 2,
174 177
        }
175 178
    fake_node = objects.Node(name="test",
176 179
                             ndparams=node_ndparams,
......
182 185

  
183 186
  def testFillNdParamsAll(self):
184 187
    node_ndparams = {
185
        constants.ND_OOB_PROGRAM: "/bin/node-oob"
188
        constants.ND_OOB_PROGRAM: "/bin/node-oob",
189
        constants.ND_SPINDLE_COUNT: 5,
186 190
        }
187 191
    fake_node = objects.Node(name="test",
188 192
                             ndparams=node_ndparams,
189 193
                             group="testgroup")
190 194
    group_ndparams = {
191
        constants.ND_OOB_PROGRAM: "/bin/group-oob"
195
        constants.ND_OOB_PROGRAM: "/bin/group-oob",
196
        constants.ND_SPINDLE_COUNT: 4,
192 197
        }
193 198
    fake_group = objects.NodeGroup(name="testgroup",
194 199
                                   ndparams=group_ndparams)

Also available in: Unified diff