summaryrefslogtreecommitdiffstats
path: root/cobbler/modules
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-11-28 14:08:56 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-11-28 14:08:56 -0500
commitc2dc5397d3f18c3aedd2de2b99e5414b39ba09ec (patch)
treea8ea0426eec9d813def77a8f2871cbd3636696c9 /cobbler/modules
parentcb02309cc41fbae69e3ff3efcb3e3feb763189ff (diff)
downloadthird_party-cobbler-c2dc5397d3f18c3aedd2de2b99e5414b39ba09ec.tar.gz
third_party-cobbler-c2dc5397d3f18c3aedd2de2b99e5414b39ba09ec.tar.xz
third_party-cobbler-c2dc5397d3f18c3aedd2de2b99e5414b39ba09ec.zip
Allow xenfv as a virt type, also make --interface=N work for system edits
Diffstat (limited to 'cobbler/modules')
-rw-r--r--cobbler/modules/cli_system.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cobbler/modules/cli_system.py b/cobbler/modules/cli_system.py
index dc7e6bc..4056359 100644
--- a/cobbler/modules/cli_system.py
+++ b/cobbler/modules/cli_system.py
@@ -78,7 +78,11 @@ class SystemFunction(commands.CobblerFunction):
if self.options.virt_path: obj.set_virt_path(self.options.virt_path)
if self.options.virt_type: obj.set_virt_type(self.options.virt_type)
- my_interface = "intf%s" % self.options.interface
+ if self.options.interface:
+ my_interface = "intf%s" % self.options.interface
+ else:
+ my_interface = "intf0"
+
if self.options.hostname: obj.set_hostname(self.options.hostname, my_interface)
if self.options.mac: obj.set_mac_address(self.options.mac, my_interface)
if self.options.ip: obj.set_ip_address(self.options.ip, my_interface)