from .xlate import XLATOR
-__version__ = '0.4.7'
+__version__ = '0.4.8'
LOG = logging.getLogger(__name__)
if ks_meta:
args.append('--ksmeta')
args.append(ks_meta)
+ args.append('--kickstart')
+ args.append(str(self.config.system_ks))
+ args.append('--power-type')
+ args.append('apc')
+ args.append('--hostname')
+ args.append(fqdn)
+ args.append('--mac-address')
+ args.append(mac_address)
+ args.append('--interface')
+ args.append('eth0')
+ args.append('--management')
+ args.append('true')
cmd_str = 'cobbler ' + ' '.join(map(lambda x: pipes.quote(x), args))
LOG.debug("Should execute: {}".format(cmd_str))
if self.verbose > 1:
LOG.debug(_("Cobbler arguments for creating a new system:") + "\n" + pp(args))
+ proc = self.exec_cobbler(args)
+
+ if proc.returncode:
+ err = _('No error message')
+ if proc.stderr:
+ err = proc.stderr
+ elif proc.stdout:
+ err = proc.stdout
+ msg = _("Error creating a cobbler system - returncode was {rc}: {err}").format(
+ rc=proc.returncode, err=err)
+ raise ExpectedCobblerError(msg)
+
# =============================================================================
if __name__ == "__main__":