Skip to content

Commit

Permalink
Fixes NIO add and delete requests for VPCS.
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed May 22, 2014
1 parent 1482cec commit 1a9861a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
5 changes: 4 additions & 1 deletion gns3/modules/iou/ui/iou_device_configuration_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="uiL1KeepalivesCheckBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Enable layer 1 keepalive messages</string>
<string>Enable layer 1 keepalive messages (testing only)</string>
</property>
<property name="checked">
<bool>false</bool>
Expand Down
5 changes: 3 additions & 2 deletions gns3/modules/iou/ui/iou_device_configuration_page_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file '/home/grossmj/workspace/git/gns3-gui/gns3/modules/iou/ui/iou_device_configuration_page.ui'
#
# Created: Tue May 20 11:19:36 2014
# Created: Wed May 21 19:12:10 2014
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -72,6 +72,7 @@ def setupUi(self, iouDeviceConfigPageWidget):
self.gridLayout_2 = QtGui.QGridLayout(self.uiAdvancedGroupBox)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.uiL1KeepalivesCheckBox = QtGui.QCheckBox(self.uiAdvancedGroupBox)
self.uiL1KeepalivesCheckBox.setEnabled(True)
self.uiL1KeepalivesCheckBox.setChecked(False)
self.uiL1KeepalivesCheckBox.setObjectName(_fromUtf8("uiL1KeepalivesCheckBox"))
self.gridLayout_2.addWidget(self.uiL1KeepalivesCheckBox, 0, 0, 1, 2)
Expand Down Expand Up @@ -156,7 +157,7 @@ def retranslateUi(self, iouDeviceConfigPageWidget):
self.uiStartupConfigToolButton.setText(_translate("iouDeviceConfigPageWidget", "...", None))
self.uiConsolePortLabel.setText(_translate("iouDeviceConfigPageWidget", "Console port:", None))
self.uiAdvancedGroupBox.setTitle(_translate("iouDeviceConfigPageWidget", "Advanced", None))
self.uiL1KeepalivesCheckBox.setText(_translate("iouDeviceConfigPageWidget", "Enable layer 1 keepalive messages", None))
self.uiL1KeepalivesCheckBox.setText(_translate("iouDeviceConfigPageWidget", "Enable layer 1 keepalive messages (testing only)", None))
self.uiDefaultValuesCheckBox.setText(_translate("iouDeviceConfigPageWidget", "Use default IOU values for memories", None))
self.uiRamLabel.setText(_translate("iouDeviceConfigPageWidget", "RAM size:", None))
self.uiRamSpinBox.setSuffix(_translate("iouDeviceConfigPageWidget", " MB", None))
Expand Down
2 changes: 1 addition & 1 deletion gns3/modules/vpcs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# default path to Dynamips executable
if sys.platform.startswith("win"):
DEFAULT_VPCS_PATH = "vpcs\vpcs.exe"
DEFAULT_VPCS_PATH = r"vpcs\vpcs.exe"
elif sys.platform.startswith('darwin') and hasattr(sys, "frozen"):
DEFAULT_VPCS_PATH = os.path.join(os.getcwd(), "../Resources/vpcs")
else:
Expand Down
4 changes: 1 addition & 3 deletions gns3/modules/vpcs/vpcs_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ def addNIO(self, port, nio):
"""

params = {"id": self._vpcs_id,
"slot": port.slotNumber(),
"port": port.portNumber(),
"port_id": port.id()}

Expand Down Expand Up @@ -363,8 +362,7 @@ def deleteNIO(self, port):
"""

params = {"id": self._vpcs_id,
"port": port.portNumber(),
"slot": port.slotNumber()}
"port": port.portNumber()}

log.debug("{} is deleting an NIO: {}".format(self.name(), params))
self._server.send_message("vpcs.delete_nio", params, self._deleteNIOCallback)
Expand Down

0 comments on commit 1a9861a

Please sign in to comment.