Revision 5abecc1c qa/qa_cluster.py

b/qa/qa_cluster.py
96 96

  
97 97
  AssertCommand(cmd)
98 98

  
99
  cmd = ["gnt-cluster", "modify"]
100
  # hypervisor parameter modifications
101
  hvp = qa_config.get("hypervisor-parameters", {})
102
  for k, v in hvp.items():
103
    cmd.extend(["-H", "%s:%s" % (k, v)])
104
  # backend parameter modifications
105
  bep = qa_config.get("backend-parameters", "")
106
  if bep:
107
    cmd.extend(["-B", bep])
108

  
109
  if len(cmd) > 2:
110
    AssertCommand(cmd)
111

  
112
  # OS parameters
113
  osp = qa_config.get("os-parameters", {})
114
  for k, v in osp.items():
115
    AssertCommand(["gnt-os", "modify", "-O", v, k])
116

  
117
  # OS hypervisor parameters
118
  os_hvp = qa_config.get("os-hvp", {})
119
  for os_name in os_hvp:
120
    for hv, hvp in os_hvp[os_name].items():
121
      AssertCommand(["gnt-os", "modify", "-H", "%s:%s" % (hv, hvp), os_name])
122

  
99 123

  
100 124
def TestClusterRename():
101 125
  """gnt-cluster rename"""
......
206 230
    ]:
207 231
    AssertCommand(cmd, fail=fail)
208 232

  
233
  # redo the original-requested BE parameters, if any
234
  bep = qa_config.get("backend-parameters", "")
235
  if bep:
236
    AssertCommand(["gnt-cluster", "modify", "-B", bep])
209 237

  
210 238
def TestClusterInfo():
211 239
  """gnt-cluster info"""

Also available in: Unified diff