mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Fix NIC naming, make MAC address copy-and-pastable again
This commit is contained in:
parent
b6f4d007cd
commit
21d090d6fa
@ -415,7 +415,6 @@ class vmmDetails(gobject.GObject):
|
|||||||
self.window.get_widget("network-source-device").set_text(netinfo[1])
|
self.window.get_widget("network-source-device").set_text(netinfo[1])
|
||||||
else:
|
else:
|
||||||
self.window.get_widget("network-source-device").set_text("-")
|
self.window.get_widget("network-source-device").set_text("-")
|
||||||
self.window.get_widget("network-target-device").set_text(netinfo[2])
|
|
||||||
self.window.get_widget("network-mac-address").set_text(netinfo[3])
|
self.window.get_widget("network-mac-address").set_text(netinfo[3])
|
||||||
|
|
||||||
def config_vcpus_changed(self, src):
|
def config_vcpus_changed(self, src):
|
||||||
@ -427,8 +426,6 @@ class vmmDetails(gobject.GObject):
|
|||||||
self.vm.set_vcpu_count(vcpus)
|
self.vm.set_vcpu_count(vcpus)
|
||||||
self.window.get_widget("config-vcpus-apply").set_sensitive(False)
|
self.window.get_widget("config-vcpus-apply").set_sensitive(False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def config_memory_changed(self, src):
|
def config_memory_changed(self, src):
|
||||||
self.window.get_widget("config-memory-apply").set_sensitive(True)
|
self.window.get_widget("config-memory-apply").set_sensitive(True)
|
||||||
|
|
||||||
@ -541,13 +538,13 @@ class vmmDetails(gobject.GObject):
|
|||||||
row[3] = nic
|
row[3] = nic
|
||||||
missing = False
|
missing = False
|
||||||
|
|
||||||
# Insert poisition is at end....
|
# Insert position is at end....
|
||||||
# XXX until we add support for Mice, etc
|
# XXX until we add support for Mice, etc
|
||||||
insertAt = insertAt + 1
|
insertAt = insertAt + 1
|
||||||
|
|
||||||
# Add in row
|
# Add in row
|
||||||
if missing:
|
if missing:
|
||||||
hw_list_model.insert(insertAt, ["NIC %s" % nic[2], self.pixbuf_nic, VMM_HW_NIC, nic])
|
hw_list_model.insert(insertAt, ["NIC #%d" % len(currentNICs), self.pixbuf_nic, VMM_HW_NIC, nic])
|
||||||
|
|
||||||
# Now remove any no longer current devs
|
# Now remove any no longer current devs
|
||||||
devs = range(len(hw_list_model))
|
devs = range(len(hw_list_model))
|
||||||
|
@ -497,13 +497,11 @@ class vmmDomain(gobject.GObject):
|
|||||||
try:
|
try:
|
||||||
ret = ctx.xpathEval("/domain/devices/interface")
|
ret = ctx.xpathEval("/domain/devices/interface")
|
||||||
|
|
||||||
n = 0
|
|
||||||
for node in ret:
|
for node in ret:
|
||||||
type = node.prop("type")
|
type = node.prop("type")
|
||||||
devmac = None
|
devmac = None
|
||||||
source = None
|
source = None
|
||||||
target = "eth%d" % n
|
target = None
|
||||||
n = n + 1
|
|
||||||
for child in node.children:
|
for child in node.children:
|
||||||
if child.name == "source":
|
if child.name == "source":
|
||||||
if type == "bridge":
|
if type == "bridge":
|
||||||
@ -518,7 +516,8 @@ class vmmDomain(gobject.GObject):
|
|||||||
source = None
|
source = None
|
||||||
elif child.name == "mac":
|
elif child.name == "mac":
|
||||||
devmac = child.prop("address")
|
devmac = child.prop("address")
|
||||||
|
elif child.name == "target":
|
||||||
|
target = child.prop("dev")
|
||||||
# XXX Hack - ignore devs without a MAC, since we
|
# XXX Hack - ignore devs without a MAC, since we
|
||||||
# need mac for uniqueness. Some reason XenD doesn't
|
# need mac for uniqueness. Some reason XenD doesn't
|
||||||
# always complete kill the NIC record
|
# always complete kill the NIC record
|
||||||
|
@ -2341,7 +2341,7 @@
|
|||||||
<widget class="GtkTable" id="table31">
|
<widget class="GtkTable" id="table31">
|
||||||
<property name="border_width">3</property>
|
<property name="border_width">3</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="n_rows">4</property>
|
<property name="n_rows">3</property>
|
||||||
<property name="n_columns">2</property>
|
<property name="n_columns">2</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="row_spacing">3</property>
|
<property name="row_spacing">3</property>
|
||||||
@ -2425,36 +2425,8 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="right_attach">1</property>
|
<property name="right_attach">1</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="bottom_attach">4</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="x_options">fill</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="network-mac-address">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">label396</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="bottom_attach">4</property>
|
|
||||||
<property name="x_options">fill</property>
|
<property name="x_options">fill</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
@ -2488,62 +2460,6 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label398">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Target device:</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="right_attach">1</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options">fill</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="network-target-device">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">label399</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options">fill</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="network-source-device">
|
<widget class="GtkLabel" id="network-source-device">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -2571,6 +2487,27 @@
|
|||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="network-mac-address">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">•</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -2658,7 +2595,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label400">
|
<widget class="GtkLabel" id="label400">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes"><b>Tip:</b> 'source' refers to information seen from the host OS, while 'target' refers to information seen from the guest OS</property>
|
<property name="label" translatable="yes"><b>Tip:</b> 'Source device' refers to the name of the device as seen from the host OS.</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">True</property>
|
<property name="use_markup">True</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user