Revision 5ce6fa9a

b/lib/client/gnt_cluster.py
121 121

  
122 122
  master_netdev = opts.master_netdev
123 123
  if master_netdev is None:
124
    if not opts.nicparams[constants.NIC_MODE]:
124
    nic_mode = opts.nicparams.get(constants.NIC_MODE, None)
125
    if not nic_mode:
125 126
      # default case, use bridging
126 127
      master_netdev = constants.DEFAULT_BRIDGE
127
    elif opts.nicparams[constants.NIC_MODE] == constants.NIC_MODE_OVS:
128
    elif nic_mode == constants.NIC_MODE_OVS:
128 129
      # default ovs is different from default bridge
129 130
      master_netdev = constants.DEFAULT_OVS
130 131
      opts.nicparams[constants.NIC_LINK] = constants.DEFAULT_OVS
b/lib/cmdlib/instance.py
391 391

  
392 392
    """
393 393
    for nic in self.op.nics:
394
      if nic[constants.INIC_VLAN]:
395
        vlan = nic[constants.INIC_VLAN]
394
      vlan = nic.get(constants.INIC_VLAN, None)
395
      if vlan:
396 396
        if vlan[0] == ".":
397 397
          # vlan starting with dot means single untagged vlan,
398 398
          # might be followed by trunk (:)

Also available in: Unified diff