Revision 45317e3a lib/cmdlib.py

b/lib/cmdlib.py
1367 1367
  return env
1368 1368

  
1369 1369

  
1370
def _BuildNetworkHookEnvByObject(net):
1371
  """Builds network related env varliables for hooks
1372

  
1373
  @type net: L{objects.Network}
1374
  @param net: the network object
1375

  
1376
  """
1377
  args = {
1378
    "name": net.name,
1379
    "subnet": net.network,
1380
    "gateway": net.gateway,
1381
    "network6": net.network6,
1382
    "gateway6": net.gateway6,
1383
    "network_type": net.network_type,
1384
    "mac_prefix": net.mac_prefix,
1385
    "tags": net.tags,
1386
  }
1387

  
1388
  return _BuildNetworkHookEnv(**args) # pylint: disable=W0142
1389

  
1390

  
1391 1370
def _BuildInstanceHookEnv(name, primary_node, secondary_nodes, os_type, status,
1392 1371
                          minmem, maxmem, vcpus, nics, disk_template, disks,
1393 1372
                          bep, hvp, hypervisor_name, tags):

Also available in: Unified diff