Revision ef756965
b/lib/cmdlib.py | ||
---|---|---|
4131 | 4131 |
args['memory'] = self.mem |
4132 | 4132 |
if self.vcpus: |
4133 | 4133 |
args['vcpus'] = self.vcpus |
4134 |
if self.do_ip or self.do_bridge: |
|
4134 |
if self.do_ip or self.do_bridge or self.mac:
|
|
4135 | 4135 |
if self.do_ip: |
4136 | 4136 |
ip = self.ip |
4137 | 4137 |
else: |
... | ... | |
4140 | 4140 |
bridge = self.bridge |
4141 | 4141 |
else: |
4142 | 4142 |
bridge = self.instance.nics[0].bridge |
4143 |
args['nics'] = [(ip, bridge)] |
|
4143 |
if self.mac: |
|
4144 |
mac = self.mac |
|
4145 |
else: |
|
4146 |
mac = self.instance.nics[0].mac |
|
4147 |
args['nics'] = [(ip, bridge, mac)] |
|
4144 | 4148 |
env = _BuildInstanceHookEnvByObject(self.instance, override=args) |
4145 | 4149 |
nl = [self.sstore.GetMasterNode(), |
4146 | 4150 |
self.instance.primary_node] + list(self.instance.secondary_nodes) |
Also available in: Unified diff