Revision 2d88fdd3 lib/backend.py

b/lib/backend.py
283 283
  return decorator
284 284

  
285 285

  
286
def _BuildMasterIpHookEnv():
287
  """Builds environment variables for master IP hooks.
288

  
289
  """
290
  cfg = _GetConfig()
291
  env = {
292
    "MASTER_NETDEV": cfg.GetMasterNetdev(),
293
    "MASTER_IP": cfg.GetMasterIP(),
294
  }
295

  
296
  return env
297

  
298

  
299
@RunLocalHooks(constants.FAKE_OP_MASTER_TURNUP, "master-ip-turnup",
300
               _BuildMasterIpHookEnv)
286 301
def ActivateMasterIp():
287 302
  """Activate the IP address of the master daemon.
288 303

  
......
353 368
    _Fail(msg)
354 369

  
355 370

  
371
@RunLocalHooks(constants.FAKE_OP_MASTER_TURNDOWN, "master-ip-turndown",
372
               _BuildMasterIpHookEnv)
356 373
def DeactivateMasterIp():
357 374
  """Deactivate the master IP on this node.
358 375

  

Also available in: Unified diff