(self)
| 203 | raise CloudInternalException("Missing bridge/device network configuration, need to add your network configuration into /etc/network/interfaces at first") |
| 204 | |
| 205 | def config(self): |
| 206 | try: |
| 207 | if super(networkConfigUbuntu, self).isPreConfiged(): |
| 208 | return True |
| 209 | |
| 210 | self.netMgrRunning = self.syscfg.svo.isServiceRunning("network-manager") |
| 211 | super(networkConfigUbuntu, self).cfgNetwork() |
| 212 | if self.netMgrRunning: |
| 213 | self.syscfg.svo.stopService("network-manager") |
| 214 | self.syscfg.svo.disableService("network-manager") |
| 215 | |
| 216 | ifup_op = bash("ifup %s"%self.brName) |
| 217 | if not ifup_op.isSuccess(): |
| 218 | raise CloudInternalException("Can't start network:%s %s" % (self.brName, ifup_op.getErrMsg())) |
| 219 | |
| 220 | self.syscfg.env.nics.append(self.brName) |
| 221 | self.syscfg.env.nics.append(self.brName) |
| 222 | self.syscfg.env.nics.append(self.brName) |
| 223 | return True |
| 224 | except: |
| 225 | raise |
| 226 | |
| 227 | def restore(self): |
| 228 | try: |
nothing calls this directly
no test coverage detected