[PATCH V2 0/4] check the python code with pyflakes
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V1 -> V2
address Crístian'comment:
remove the whole statement "info = self._get_vm(name).inf"
address ming's comment:
break down the patch into small patches by the pyflakes error.
Pyflakes analyzes programs and detects various errors. It works by
parsing the source file, not importing it, so it is safe to use on
modules with side effects. It's also much faster.
This is important to improve the code quality.
ShaoHe Feng (4):
make pyflakes happly, remove the unused import module
make pyflakes happly, remove unused availables
add template_delete to rollback after create a template
run pyflakes when make check
Makefile.am | 7 +++++++
configure.ac | 7 +++++++
contrib/DEBIAN/control.in | 1 +
contrib/kimchi.spec.fedora.in | 1 +
docs/README.md | 6 +++---
src/kimchi/control/plugins.py | 2 +-
src/kimchi/featuretests.py | 2 --
src/kimchi/mockmodel.py | 5 ++---
src/kimchi/model/storagepools.py | 2 +-
src/kimchi/screenshot.py | 1 -
src/kimchi/template.py | 1 -
tests/test_model.py | 1 +
tests/test_server.py | 1 -
ui/pages/help/gen-index.py | 1 -
14 files changed, 24 insertions(+), 14 deletions(-)
--
1.8.5.3
10 years, 9 months
[PATCH] Controller: Improve Kimchi Specific Exception Reporting
by zhshzhou@linux.vnet.ibm.com
From: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
The resource and collection class catches exception in the index method
and translates to HTTP error code with error message. While this is good
and friendly to the user, the exception handling code is somewhat
ad-hoc.
The first problem is that it does not catch and translate all the Kimchi
exception. When new code or feature is added to Kimchi, it's possible
that the new code raises an exception that is not expected before. In
this case it fails to translate the error message, so the cherrypy
framework translates it to HTTP code 500 with a vague message saying "The
server encountered an internal error". This is not friendly to the user.
In this patch it "except KimchiException" at the last of the except
sequence, and translates it into HTTP error code 500 with specific error
message, so that the user knows what's going on.
The second problem is that the index method handles GET, POST, PUT and
DELETE requests, and the error translating code for each type of request
is duplicated. This is not necessary. So this patch merges the error
handling code.
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
src/kimchi/control/base.py | 76 +++++++++++++++++++---------------------------
1 file changed, 32 insertions(+), 44 deletions(-)
diff --git a/src/kimchi/control/base.py b/src/kimchi/control/base.py
index d2d041e..320239b 100644
--- a/src/kimchi/control/base.py
+++ b/src/kimchi/control/base.py
@@ -26,6 +26,7 @@ from kimchi.control.utils import get_class_name, internal_redirect, model_fn
from kimchi.control.utils import parse_request, validate_method
from kimchi.control.utils import validate_params
from kimchi.exception import InvalidOperation, InvalidParameter
+from kimchi.exception import KimchiException
from kimchi.exception import MissingParameter, NotFoundError, OperationFailed
@@ -87,6 +88,8 @@ class Resource(object):
raise cherrypy.HTTPError(500, e.message)
except NotFoundError, e:
raise cherrypy.HTTPError(404, e.message)
+ except KimchiException, e:
+ raise cherrypy.HTTPError(500, e.message)
wrapper.__name__ = action_name
wrapper.exposed = True
@@ -116,31 +119,20 @@ class Resource(object):
@cherrypy.expose
def index(self):
method = validate_method(('GET', 'DELETE', 'PUT'))
- if method == 'GET':
- try:
- return self.get()
- except NotFoundError, e:
- raise cherrypy.HTTPError(404, e.message)
- except InvalidOperation, e:
- raise cherrypy.HTTPError(400, e.message)
- except OperationFailed, e:
- raise cherrypy.HTTPError(406, e.message)
- elif method == 'DELETE':
- try:
- return self.delete()
- except NotFoundError, e:
- raise cherrypy.HTTPError(404, e.message)
- except InvalidParameter, e:
- raise cherrypy.HTTPError(400, e.message)
- elif method == 'PUT':
- try:
- return self.update()
- except InvalidParameter, e:
- raise cherrypy.HTTPError(400, e.message)
- except InvalidOperation, e:
- raise cherrypy.HTTPError(400, e.message)
- except NotFoundError, e:
- raise cherrypy.HTTPError(404, e.message)
+ try:
+ return {'GET': self.get,
+ 'DELETE': self.delete,
+ 'PUT': self.update}[method]()
+ except InvalidOperation, e:
+ raise cherrypy.HTTPError(400, e.message)
+ except InvalidParameter, e:
+ raise cherrypy.HTTPError(400, e.message)
+ except NotFoundError, e:
+ raise cherrypy.HTTPError(404, e.message)
+ except OperationFailed, e:
+ raise cherrypy.HTTPError(500, e.message)
+ except KimchiException, e:
+ raise cherrypy.HTTPError(500, e.message)
def update(self):
try:
@@ -269,29 +261,25 @@ class Collection(object):
@cherrypy.expose
def index(self, *args, **kwargs):
method = validate_method(('GET', 'POST'))
- if method == 'GET':
- try:
+ try:
+ if method == 'GET':
filter_params = cherrypy.request.params
validate_params(filter_params, self, 'get_list')
return self.get(filter_params)
- except InvalidOperation, e:
- raise cherrypy.HTTPError(400, e.message)
- except NotFoundError, e:
- raise cherrypy.HTTPError(404, e.message)
-
- elif method == 'POST':
- try:
+ elif method == 'POST':
return self.create(parse_request(), *args)
- except MissingParameter, e:
- raise cherrypy.HTTPError(400, e.message)
- except InvalidParameter, e:
- raise cherrypy.HTTPError(400, e.message)
- except OperationFailed, e:
- raise cherrypy.HTTPError(500, e.message)
- except InvalidOperation, e:
- raise cherrypy.HTTPError(400, e.message)
- except NotFoundError, e:
- raise cherrypy.HTTPError(404, e.message)
+ except InvalidOperation, e:
+ raise cherrypy.HTTPError(400, e.message)
+ except InvalidParameter, e:
+ raise cherrypy.HTTPError(400, e.message)
+ except MissingParameter, e:
+ raise cherrypy.HTTPError(400, e.message)
+ except NotFoundError, e:
+ raise cherrypy.HTTPError(404, e.message)
+ except OperationFailed, e:
+ raise cherrypy.HTTPError(500, e.message)
+ except KimchiException, e:
+ raise cherrypy.HTTPError(500, e.message)
class AsyncCollection(Collection):
--
1.8.5.3
10 years, 9 months
[PATCH v2] VLAN: Do not allow bridge to be the trunk device
by zhshzhou@linux.vnet.ibm.com
From: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
In Linux networking, a usual VLAN + bridge network setup is as the
following.
eth0 |-> eth0.10 -> br10 -> vnet101, vnet102, ...
|-> eth0.20 -> br20 -> vnet201, vnet202, ...
While the eth0 trunk and VLAN interfaces provide the isolation service,
the bridges provide the switching inside the respective VLAN.
It's not very useful to have a bridge device as the trunk because the
VLAN interfaces on a trunk should be isolated.
This patch contains changes to the back-end and front-end.
The back-end checks if the front-end submits an invalid setup to use a
bridge as the VLAN trunk device and raises exception.
Before this patch, if the user creates a bridged network over an
existing bridge with VLAN tag set. The back-end just ignores the VLAN
and creates an ordinary bridged network. After this patch, the back-end
raises an exception with an explanation in this case.
The front-end also checks the currently selected interface type. If the
selected interface is a bridge, it disables the vlan check box,
otherwise it enables the vlan check box.
V2
Add front-end code to disable vlan check box if the selected interface
is a bridge.
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
src/kimchi/i18n.py | 1 +
src/kimchi/model/networks.py | 2 ++
ui/js/src/kimchi.network.js | 11 +++++++++++
3 files changed, 14 insertions(+)
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 589c8cb..b463bd1 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -182,6 +182,7 @@ messages = {
"KCHNET0016E": _("Specify name and type to create a Network"),
"KCHNET0017E": _("Unable to delete network %(name)s. There are some virtual machines and/or templates linked to this network."),
"KCHNET0018E": _("Unable to deactivate network %(name)s. There are some virtual machines and/or templates linked to this network."),
+ "KCHNET0019E": _("Bridge device %(name)s can not be the trunk device of a VLAN."),
"KCHDR0001E": _("Debug report %(name)s does not exist"),
"KCHDR0002E": _("Debug report tool not found in system"),
diff --git a/src/kimchi/model/networks.py b/src/kimchi/model/networks.py
index 27abd54..7872a73 100644
--- a/src/kimchi/model/networks.py
+++ b/src/kimchi/model/networks.py
@@ -151,6 +151,8 @@ class NetworksModel(object):
raise MissingParameter("KCHNET0004E", {'name': params['name']})
if netinfo.is_bridge(iface):
+ if 'vlan_id' in params:
+ raise InvalidParameter('KCHNET0019E', {'name': iface})
params['bridge'] = iface
elif netinfo.is_bare_nic(iface) or netinfo.is_bonding(iface):
if params.get('vlan_id') is None:
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index 7c4bc77..2467425 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -215,10 +215,21 @@ kimchi.initNetworkDialog = function() {
kimchi.openNetworkDialog = function(okCallback) {
kimchi.getInterfaces(function(result) {
var options = "";
+ var nics = {};
for (var i = 0; i < result.length; i++) {
options += "<option value=" + result[i].name + ">" + result[i].name + "</option>";
+ nics[result[i].name] = result[i];
}
$("#networkInterface").append(options);
+ onChange = function() {
+ if (nics[$("#networkInterface").val()].type === "bridge") {
+ $("#enableVlan").prop("disabled", true);
+ } else {
+ $("#enableVlan").prop("disabled", false);
+ }
+ };
+ $("#networkInterface").on("change", onChange);
+ onChange();
kimchi.setDefaultNetworkType(result.length!==0);
});
$("#networkConfig").dialog({
--
1.8.5.3
10 years, 9 months
[PATCH] VLAN: Do not allow bridge to be the trunk device
by zhshzhou@linux.vnet.ibm.com
From: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
In Linux networking, a usual VLAN + bridge network setup is as the
following.
eth0 |-> eth0.10 -> br10 -> vnet101, vnet102, ...
|-> eth0.20 -> br20 -> vnet201, vnet202, ...
While the eth0 trunk and VLAN interfaces provide the isolation service,
the bridges provide the switching inside the respective VLAN.
It's not very useful to have a bridge device as the trunk because the
VLAN interfaces on a trunk should be isolated.
This patch checks if the front-end submits an invalid setup to use a
bridge as the VLAN trunk device and raises exception.
Before this patch, if the user creates a bridged network over an
existing bridge with VLAN tag set. The back-end just ignores the VLAN
and creates an ordinary bridged network. After this patch, the back-end
raises an exception with an explanation in this case, so the user knows
what's going on and can re-try with correct parameters.
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
src/kimchi/i18n.py | 1 +
src/kimchi/model/networks.py | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 589c8cb..b463bd1 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -182,6 +182,7 @@ messages = {
"KCHNET0016E": _("Specify name and type to create a Network"),
"KCHNET0017E": _("Unable to delete network %(name)s. There are some virtual machines and/or templates linked to this network."),
"KCHNET0018E": _("Unable to deactivate network %(name)s. There are some virtual machines and/or templates linked to this network."),
+ "KCHNET0019E": _("Bridge device %(name)s can not be the trunk device of a VLAN."),
"KCHDR0001E": _("Debug report %(name)s does not exist"),
"KCHDR0002E": _("Debug report tool not found in system"),
diff --git a/src/kimchi/model/networks.py b/src/kimchi/model/networks.py
index 0242156..531f614 100644
--- a/src/kimchi/model/networks.py
+++ b/src/kimchi/model/networks.py
@@ -151,6 +151,8 @@ class NetworksModel(object):
raise MissingParameter("KCHNET0004E", {'name': params['name']})
if netinfo.is_bridge(iface):
+ if 'vlan_id' in params:
+ raise InvalidParameter('KCHNET0019E', {'name': iface})
params['bridge'] = iface
elif netinfo.is_bare_nic(iface) or netinfo.is_bonding(iface):
if params.get('vlan_id') is None:
--
1.8.5.3
10 years, 9 months
[PATCH 0/6] [WIP] update manage repository UI to work with new API
by Adam King
host tab table population works.
Edit populates fields correctly.
Parse contents from the form does not yet work. Updae needed to kimchi.form.js
Consider changing the name notation from [] to . to make it simpler to parse.
Haven't touched add yet, but it should be a linear extrapolation from edit->save
Patch set includes latest UI from the list.
Adam King (1):
manageRep update to match new BE
Hongliang Wang (5):
Repository Management - Add i18n Strings
Repository Management - Add API Support
Repository Management - Add Repository Support
Repository Management - Edit Repository Support
Repository Management - Integrate into Host Tab
docs/API.html | 978 +++++++++++++++++++++++++++++++
po/POTFILES.in | 2 +
ui/css/theme-default/host.css | 8 +
ui/css/theme-default/repository-add.css | 39 ++
ui/css/theme-default/repository-edit.css | 128 ++++
ui/js/src/kimchi.api.js | 76 ++-
ui/js/src/kimchi.grid.js | 17 +-
ui/js/src/kimchi.host.js | 186 +++++-
ui/js/src/kimchi.repository_add_main.js | 84 +++
ui/js/src/kimchi.repository_edit_main.js | 99 ++++
ui/pages/i18n.html.tmpl | 19 +
ui/pages/repository-add.html.tmpl | 104 ++++
ui/pages/repository-edit.html.tmpl | 115 ++++
ui/pages/tabs/host.html.tmpl | 15 +
14 files changed, 1865 insertions(+), 5 deletions(-)
create mode 100644 docs/API.html
create mode 100644 ui/css/theme-default/repository-add.css
create mode 100644 ui/css/theme-default/repository-edit.css
create mode 100644 ui/js/src/kimchi.repository_add_main.js
create mode 100644 ui/js/src/kimchi.repository_edit_main.js
create mode 100644 ui/pages/repository-add.html.tmpl
create mode 100644 ui/pages/repository-edit.html.tmpl
--
1.8.1.4
10 years, 9 months
[PATCH v3] Remove debug report's file path from UI
by Mark Wu
Now the file path displayed on UI is "/data/debugreports/<reportname>/",
It's misleading because people could assume it's path on file system,
but it's the uri path in fact. We don't need expose the URI path because
the download button can help user to get the file. So this patch removes
it from UI. And this patch also renames debug report's 'file' attribute
to 'uri', because we use it to represent the download uri path.
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
docs/API.md | 2 +-
src/kimchi/control/debugreports.py | 2 +-
src/kimchi/model/debugreports.py | 2 +-
ui/css/theme-default/host.css | 4 ----
ui/js/src/kimchi.host.js | 4 ----
ui/pages/i18n.html.tmpl | 1 -
6 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/docs/API.md b/docs/API.md
index 672ef14..105498a 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -672,7 +672,7 @@ specific to the low level collection tool being used.
* **GET**: Retrieve the full description of Debug Report
* name: The debug report name used to identify the report
- * file: The debug report file name used to identify the report
+ * uri: The URI path to download a debug report
* time: The time when the debug report is created
* **DELETE**: Remove the Debug Report
diff --git a/src/kimchi/control/debugreports.py b/src/kimchi/control/debugreports.py
index 9922cfa..6efae23 100644
--- a/src/kimchi/control/debugreports.py
+++ b/src/kimchi/control/debugreports.py
@@ -37,7 +37,7 @@ class DebugReport(Resource):
@property
def data(self):
return {'name': self.ident,
- 'file': self.info['file'],
+ 'uri': self.info['uri'],
'time': self.info['ctime']}
diff --git a/src/kimchi/model/debugreports.py b/src/kimchi/model/debugreports.py
index c6e698b..6ae282a 100644
--- a/src/kimchi/model/debugreports.py
+++ b/src/kimchi/model/debugreports.py
@@ -162,7 +162,7 @@ class DebugReportModel(object):
ctime = time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime(ctime))
file_target = os.path.split(file_target)[-1]
file_target = os.path.join("/data/debugreports", file_target)
- return {'file': file_target,
+ return {'uri': file_target,
'ctime': ctime}
def delete(self, name):
diff --git a/ui/css/theme-default/host.css b/ui/css/theme-default/host.css
index 0f8b941..8af34f5 100644
--- a/ui/css/theme-default/host.css
+++ b/ui/css/theme-default/host.css
@@ -215,14 +215,10 @@
}
.debug-report-name,
-.debug-report-file,
.debug-report-time {
width: 200px;
}
-.debug-report-file {
- width: 300px;
-}
/* End of Debug Report */
/* Software Updates */
diff --git a/ui/js/src/kimchi.host.js b/ui/js/src/kimchi.host.js
index 6300f37..fa7b4c8 100644
--- a/ui/js/src/kimchi.host.js
+++ b/ui/js/src/kimchi.host.js
@@ -186,10 +186,6 @@ kimchi.host_main = function() {
label: i18n['KCHDR6003M'],
'class': 'debug-report-name'
}, {
- name: 'file',
- label: i18n['KCHDR6004M'],
- 'class': 'debug-report-file'
- }, {
name: 'time',
label: i18n['KCHDR6005M'],
'class': 'debug-report-time'
diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl
index 2f47e50..a626759 100644
--- a/ui/pages/i18n.html.tmpl
+++ b/ui/pages/i18n.html.tmpl
@@ -92,7 +92,6 @@ var i18n = {
'KCHDR6001M': "$_("Debug report will be removed permanently and can't be recovered. Do you want to continue?")",
'KCHDR6002M': "$_("Debug Reports")",
'KCHDR6003M': "$_("Name")",
- 'KCHDR6004M': "$_("File Path")",
'KCHDR6005M': "$_("Generated Time")",
'KCHDR6006M': "$_("Generate")",
'KCHDR6007M': "$_("Generating...")",
--
1.8.4.2
10 years, 9 months
[PATCH] [UI] Software Update: Enable "Update All" Button when Task Fails
by Hongliang Wang
"Update All" Button stays disabled even when the updating task fails.
Fix it in this patch.
Signed-off-by: Hongliang Wang <hlwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.host.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.host.js b/ui/js/src/kimchi.host.js
index f9696ea..91ac894 100644
--- a/ui/js/src/kimchi.host.js
+++ b/ui/js/src/kimchi.host.js
@@ -57,7 +57,9 @@ kimchi.host_main = function() {
kimchi.topic('kimchi/softwareUpdated').publish({
result: result
});
- }, function() {}, reloadProgressArea);
+ }, function(result) {
+ $(updateButton).text(i18n['KCHUPD6006M']).prop('disabled', false);
+ }, reloadProgressArea);
}
}],
frozenFields: [],
--
1.8.1.4
10 years, 9 months
dita warning when make.
by Sheldon
not sure are these warnings harmful.
1.
xsltproc -o guests.html dita-help.xsl guests.dita
2.
guests.dita:4: warning: failed to load external entity "-//IBM//DTD
DITA CSHelp//EN"
3.
"..\dtd\cshelp.dtd">
4.
^
5.
xsltproc -o host.html dita-help.xsl host.dita
6.
host.dita:4: warning: failed to load external entity "-//IBM//DTD
DITA CSHelp//EN"
7.
"..\dtd\cshelp.dtd">
8.
^
9.
xsltproc -o network.html dita-help.xsl network.dita
10.
network.dita:4: warning: failed to load external entity "-//IBM//DTD
DITA CSHelp//EN"
11.
"..\dtd\cshelp.dtd">
12.
^
13.
xsltproc -o storage.html dita-help.xsl storage.dita
14.
storage.dita:4: warning: failed to load external entity "-//IBM//DTD
DITA CSHelp//EN"
15.
"..\dtd\cshelp.dtd">
16.
^
17.
xsltproc -o templates.html dita-help.xsl templates.dita
18.
templates.dita:4: warning: failed to load external entity
"-//IBM//DTD DITA CSHelp//EN"
19.
"..\dtd\cshelp.dtd">
20.
^
--
Thanks and best regards!
Sheldon Feng(???)<shaohef(a)linux.vnet.ibm.com>
IBM Linux Technology Center
10 years, 9 months
[PATCH] Changes to help
by Kersten Richter
Added information for software updates, adding storage device, and replacing contents of CDROM. Plus a couple of clean up things.
Signed-off-by: Kersten Richter <kersten(a)us.ibm.com>
---
ui/pages/help/guests.dita | 83 ++++++++++++++++++++++++++++++------------
ui/pages/help/host.dita | 44 +++++++++++++----------
ui/pages/help/templates.dita | 18 +++++-----
3 files changed, 93 insertions(+), 52 deletions(-)
diff --git a/ui/pages/help/guests.dita b/ui/pages/help/guests.dita
index bae98bb..0456bbb 100644
--- a/ui/pages/help/guests.dita
+++ b/ui/pages/help/guests.dita
@@ -23,26 +23,28 @@ KVM virtual machines.</shortdesc>
<dd>Network input/output transmission rate in KB per seconds.</dd>
</dlentry><dlentry>
<dt>Disk I/O</dt>
-<dd> Disk input/output transmission rate in KB per seconds.</dd>
+<dd>Disk input/output transmission rate in KB per seconds.</dd>
</dlentry><dlentry>
<dt>Livetile</dt>
-<dd rev="rev1">State of guest operating system console, or an icon
-that represents the <tm tmtype="tm" trademark="Linux">Linux</tm> distribution
-if the guest is not active.</dd>
+<dd>State of guest operating system console, or an icon that represents
+the <tm tmtype="tm" trademark="Linux">Linux</tm> distribution if the
+guest is not active.</dd>
</dlentry></dl></p>
<p>The following actions icons are displayed for each guest:<dl>
<dlentry>
-<dt rev="rev1">Reset</dt>
-<dd rev="rev1">Click to reset the guest. </dd>
+<dt>Reset</dt>
+<dd>Click to reset the guest. </dd>
</dlentry><dlentry>
-<dt><tm tmclass="IGNORE" tmtype="reg" trademark="Power">Power</tm> (Start
-or Stop)</dt>
+<dt>Power (Start or Stop)</dt>
<dd>Click to power on or power off the guest. If the icon is red,
the power is off; if the icon is green, the power is on.</dd>
</dlentry></dl> </p>
<p>The following actions can be selected for each guest:<ul>
-<li>Select <uicontrol>VNC</uicontrol> to connect to the remote console
-for the guest operating system.</li>
+<li>Select <uicontrol>Connect</uicontrol> to connect to the remote
+console for the guest operating system.</li>
+<li>Select <uicontrol>Manage media</uicontrol> to change the path
+to the installation media.</li>
+<li>Select <uicontrol>Reset</uicontrol> to reset the guest.</li>
<li>Select <uicontrol>Edit</uicontrol> to edit the properties of an
existing guest. Guests can be edited only while stopped.</li>
<li>Select <uicontrol>Delete</uicontrol> to delete the guest.</li>
@@ -66,16 +68,12 @@ create a template.</li>
</cshelp>
<cshelp id="kimhvirtmedit" xml:lang="en-us">
<title>Edit guest</title>
-<shortdesc rev="rev1">Edit the properties of an existing virtual machine.
-Guests can be edited only while stopped.</shortdesc>
-<csprolog><csmetadata>
-<cswindowtitle>Title of window or panel associated with this help;
-for review output only.</cswindowtitle>
-<cswidgetlabel>Name of field or control associated with this help;
-for review output only</cswidgetlabel>
-</csmetadata></csprolog>
+<shortdesc>Edit the properties of an existing virtual machine. Guests
+can be edited only while stopped.</shortdesc>
+<csprolog><csmetadata></csmetadata></csprolog>
<csbody>
-<p>For each guest, the following information is displayed:<dl><dlentry>
+<p>For each guest, the following information is displayed on the <wintitle>General</wintitle> tab:<dl>
+<dlentry>
<dt>Name</dt>
<dd>Name of the virtual machine.</dd>
</dlentry><dlentry>
@@ -86,14 +84,51 @@ for review output only</cswidgetlabel>
<dd>Amount of memory in MB.</dd>
</dlentry><dlentry>
<dt>Icon</dt>
-<dd rev="rev2"> Graphic image representing the Linux distribution
-to be displayed in place of current status (Livetile) when the guest
-is not active.</dd>
+<dd>Graphic image representing the Linux distribution to be displayed
+in place of current status (Livetile) when the guest is not active.</dd>
</dlentry></dl></p>
+<p>The following information is displayed on the <wintitle>Storage</wintitle> tab.</p>
+<dl><dlentry>
+<dt>Storage</dt>
+<dd>Displays the location of the ISO file used for installation.</dd>
+</dlentry></dl><?Pub Caret -2?>
<p> Fields that are not disabled can be edited. After you edit a field,
click <uicontrol>Save</uicontrol>. </p>
</csbody>
-</cshelp><?Pub Caret -1?>
+</cshelp>
+<cshelp id="kimstoragedevice" xml:lang="en-us">
+<title>Add, replace, or detach a storage device</title>
+<shortdesc rev="rev1">You can add, replace, or detach a storage device
+to your virtual machine. The only supported device is CDROM. To edit
+your storage devices, follow these steps:</shortdesc>
+<csbody>
+<ol>
+<li>On the <wintitle>Edit Guest</wintitle> window, select <wintitle>Storage</wintitle>.</li>
+<li>To replace a storage device, click the first icon with the <uicontrol>orange
+slash (/)</uicontrol>. Enter the ISO file path and click <uicontrol>Replace</uicontrol>.</li>
+<li>To detach a storage device, click the second icon with the <uicontrol>red
+dash (-)</uicontrol>. Confirm the deletion and click <uicontrol>OK</uicontrol>.</li>
+<li>To add a storage device, click the third icon with the green <uicontrol>plus
+sign (+)</uicontrol>. Enter a device name and ISO file path and click <uicontrol>Attach</uicontrol>.</li>
+</ol>
+</csbody>
+</cshelp>
+<cshelp id="kimreplacemedia" xml:lang="en-us">
+<title>Replace a CDROM of VM</title>
+<shortdesc rev="rev1">You can replace the contents of the CDROM for
+a virtual machine after the installation is complete.</shortdesc>
+<csbody>
+<ol>
+<li>Ensure that the virtual machine is started.</li>
+<li>From the Actions menu, select <uicontrol>Manage Media</uicontrol>.</li>
+<li>To change what is currently loaded in the CDROM, click the <uicontrol>orange
+slash (/)</uicontrol> icon next to the hdc field.</li>
+<li>On the <wintitle>Replace a CDROM of VM</wintitle> page, enter
+the ISO file path. The other two fields are read-only.</li>
+<li>Click <uicontrol>Replace</uicontrol>.</li>
+</ol>
+</csbody>
+</cshelp>
<?tm 1391540919 3?>
</cshelp>
-<?Pub *0000003805?>
+<?Pub *0000005541?>
diff --git a/ui/pages/help/host.dita b/ui/pages/help/host.dita
index d961edc..1b60b27 100644
--- a/ui/pages/help/host.dita
+++ b/ui/pages/help/host.dita
@@ -9,16 +9,16 @@ For support please see:
https://w3.opensource.ibm.com/projects/dita-cshelp/-->
<cshelp id="kimhhost" xml:lang="en-us">
<title>Host</title>
-<shortdesc rev="rev1">The <wintitle>Host</wintitle> page shows information
-about the host system, and allows you to shut down, restart, and connect
+<shortdesc>The <wintitle>Host</wintitle> page shows information about
+the host system, and allows you to shut down, restart, and connect
to the host.</shortdesc>
<csbody>
<p>You can perform the following actions on the host:<ul>
<li>Select <uicontrol>Shut down</uicontrol> to shut down the host
system.</li>
<li>Select <uicontrol>Restart</uicontrol> to restart the host system.</li>
-<li rev="rev1">Select <uicontrol>Connect</uicontrol> to open a VNC
-connection to the host system, if it is not already connected.</li>
+<li>Select <uicontrol>Connect</uicontrol> to open a VNC connection
+to the host system, if it is not already connected.</li>
</ul></p>
<p>Click the following sections to display information about the host:<dl>
<dlentry>
@@ -28,24 +28,30 @@ version, and code name, as well as the processor type and amount of
memory in GB.</dd>
</dlentry><dlentry>
<dt>System statistics</dt>
-<dd rev="rev1">This section displays graphs to show statistics for
-CPU, memory, disk I/O, and network I/O for the host. Select <uicontrol>Collecting
+<dd>This section displays graphs to show statistics for CPU, memory,
+disk I/O, and network I/O for the host. Select <uicontrol>Collecting
data after leaving this page</uicontrol> to continue collecting data
when the host tab is out of view.</dd>
</dlentry><dlentry>
+<dt>Software Updates</dt>
+<dd>This section displays information for all of the packages that
+have updates available, including package name, version, architecture,
+and repository. You can update all of the packages listed by selecting <uicontrol>Update
+All</uicontrol>. You cannot select individual packages for updates.</dd>
+</dlentry><dlentry>
<dt>Debug reports</dt>
-<dd rev="rev1">This section displays debug reports, including name
-and file path. You can select from options to generate a new report,
-or rename, remove, or download an existing report.<p>The debug report
-is generated using the <cmdname>sosreport</cmdname> command. It is
-available for Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>,
-Fedora, and Ubuntu distributions. The command generates a .tar file
-that contains configuration and diagnostic information, such as the
-running kernel version, loaded modules, and system and service configuration
-files. The command also runs external programs to collect further
-information and stores this output in the resulting archive.</p> </dd>
-</dlentry></dl></p>
-</csbody><?Pub Caret -2?>
+<dd>This section displays debug reports, including name and file path.
+You can select from options to generate a new report, or rename, remove,
+or download an existing report.<p>The debug report is generated using
+the <cmdname>sosreport</cmdname> command. It is available for Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora,
+and Ubuntu distributions. The command generates a .tar file that contains
+configuration and diagnostic information, such as the running kernel
+version, loaded modules, and system and service configuration files.
+The command also runs external programs to collect further information
+and stores this output in the resulting archive.</p> </dd>
+</dlentry></dl><?Pub Caret 693?></p>
+</csbody>
<?tm 1392659967 1?>
</cshelp>
-<?Pub *0000002392?>
+<?Pub *0000002695?>
diff --git a/ui/pages/help/templates.dita b/ui/pages/help/templates.dita
index d0122ec..8306681 100644
--- a/ui/pages/help/templates.dita
+++ b/ui/pages/help/templates.dita
@@ -56,7 +56,7 @@ is configured to use.</dd>
<dd>Amount of memory in MB to be allocated to the virtual machine.</dd>
</dlentry><dlentry>
<dt>Disk</dt>
-<dd rev="rev1">Disk size in GB.</dd>
+<dd>Disk size in GB.</dd>
</dlentry><dlentry>
<dt>CDROM</dt>
<dd>File path to the location of the ISO file used to install the
@@ -66,10 +66,10 @@ KVM guest.</dd>
<dd>Specific storage pool or the default storage pool.</dd>
</dlentry><dlentry>
<dt>Network</dt>
-<dd rev="rev1">Default network interfaces available to the KVM guest.
-You can select multiple networks.</dd>
-</dlentry></dl><?Pub Caret 681?> Fields that are not disabled can
-be edited. After you edit a field, click <uicontrol>Save</uicontrol>. </p>
+<dd>Default network interfaces available to the KVM guest. You can
+select multiple networks.</dd>
+</dlentry></dl> Fields that are not disabled can be edited. After
+you edit a field, click <uicontrol>Save</uicontrol>. </p>
</csbody>
</cshelp>
<cshelp id="kimhaddtempl">
@@ -108,15 +108,15 @@ Templates from Selected ISO</uicontrol>.</li>
<li>Select <uicontrol>All</uicontrol> to create a template from each
listed ISO image, then click <uicontrol>Create Templates from Selected
ISO</uicontrol>.</li>
-<li rev="rev1">If the ISO image that you want to use does not appear
-in the scan results, you can select from the following options:<ul>
+<li>If the ISO image that you want to use does not appear in the scan
+results, you can select from the following options:<ul>
<li>Select <uicontrol>I want to use a specific ISO file</uicontrol> to
specify a path to the ISO image.</li>
<li>Click <uicontrol>Search more ISOs</uicontrol> to search for more
ISO images.</li>
-</ul></li>
+</ul></li><?Pub Caret 0?>
</ul></p>
</csbody>
</cshelp>
</cshelp>
-<?Pub *0000004468?>
+<?Pub *0000004433?>
--
1.7.1
10 years, 9 months
[PATCH] Remove bridge and vlan interface unconditionally on removing vlan network
by Mark Wu
It's observed that the low layer interfaces could be down for some reason,
such as that the physical interface is in disconnected state. In this case,
we still need destroy the interfaces to avoid that they're left on the system
util reboot.
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
src/kimchi/model/networks.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/kimchi/model/networks.py b/src/kimchi/model/networks.py
index 0242156..38e42e9 100644
--- a/src/kimchi/model/networks.py
+++ b/src/kimchi/model/networks.py
@@ -336,6 +336,5 @@ class NetworkModel(object):
if bridge.startswith('kimchi-'):
conn = self.conn.get()
iface = conn.interfaceLookupByName(bridge)
- if iface.isActive():
- iface.destroy(0)
+ iface.destroy(0)
iface.undefine()
--
1.8.4.2
10 years, 9 months