[PATCH] Add a README.DMTF to the base_schema
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200334917 28800
# Node ID 4909cfcdc6288cd20d8c06a54b1fd458d8d298f3
# Parent 6cf619d174232d9c4f2cfab1543ed863443a92d2
Add a README.DMTF to the base_schema
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 6cf619d17423 -r 4909cfcdc628 base_schema/Makefile.am
--- a/base_schema/Makefile.am Mon Jan 14 09:33:40 2008 -0800
+++ b/base_schema/Makefile.am Mon Jan 14 10:21:57 2008 -0800
@@ -6,4 +6,6 @@ dist_pkgdata_SCRIPTS = install_base_sche
dist_pkgdata_SCRIPTS = install_base_schema.sh
$(CIM_SCHEMA_ZIP):
- wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCH...
\ No newline at end of file
+ wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCH...
+
+EXTRA_DIST = README.DMTF
diff -r 6cf619d17423 -r 4909cfcdc628 base_schema/README.DMTF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/base_schema/README.DMTF Mon Jan 14 10:21:57 2008 -0800
@@ -0,0 +1,9 @@
+The DMTF CIM schema files included here are required for proper
+initialization of the CIM server environment. They are permitted for
+distribution per the guidelines at the top of the main MOF file:
+
+// DMTF is a not-for-profit association of industry members dedicated
+// to promoting enterprise and systems management and interoperability.
+// DMTF specifications and documents may be reproduced for uses
+// consistent with this purpose by members and non-members,
+// provided that correct attribution is given.
16 years, 11 months
[PATCH] Bump version to 0.2
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200323991 28800
# Node ID 29c9bb8cb88428491764aa58f9bb214c3d7f5f03
# Parent db25d5f62c9d662cd262ea82efb6d3fde2806b62
Bump version to 0.2
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r db25d5f62c9d -r 29c9bb8cb884 configure.ac
--- a/configure.ac Mon Jan 14 07:19:12 2008 -0800
+++ b/configure.ac Mon Jan 14 07:19:51 2008 -0800
@@ -1,6 +1,6 @@
# (C) Copyright IBM Corp. 2005
-AC_INIT(libvirt CMPI provider, 0.1, danms(a)us.ibm.com, libvirt-cim)
+AC_INIT(libvirt CMPI provider, 0.2, danms(a)us.ibm.com, libvirt-cim)
AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c])
16 years, 11 months
[PATCH] Relax the KVM type detection logic
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200067225 28800
# Node ID a353b12b24858b16b3b6d77940178f5cd672bdce
# Parent 4ae48640b6dfaf77c60300aa2f41a3be9395bf83
Relax the KVM type detection logic
since it was too strict for no reason.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 4ae48640b6df -r a353b12b2485 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Fri Jan 11 07:59:47 2008 -0800
+++ b/libxkutil/device_parsing.c Fri Jan 11 08:00:25 2008 -0800
@@ -652,8 +652,7 @@ static int parse_os(struct domain *domin
if ((STREQC(dominfo->os_info.fv.type, "hvm")) &&
(STREQC(dominfo->typestr, "xen")))
dominfo->type = DOMAIN_XENFV;
- else if ((STREQC(dominfo->os_info.fv.type, "hvm")) &&
- (STREQC(dominfo->typestr, "kvm")))
+ else if (STREQC(dominfo->typestr, "kvm"))
dominfo->type = DOMAIN_KVM;
else if (STREQC(dominfo->os_info.pv.type, "linux"))
dominfo->type = DOMAIN_XENPV;
16 years, 11 months
[PATCH] Make cleanup_dominfo() handle KVM domains
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200067187 28800
# Node ID 4ae48640b6dfaf77c60300aa2f41a3be9395bf83
# Parent e834b93342a431c9414fbb07c2aa34e28002744d
Make cleanup_dominfo() handle KVM domains
This avoids the following message in the CIMOM logs:
device_parsing.c(818): Unknown domain type 2
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r e834b93342a4 -r 4ae48640b6df libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Fri Jan 11 07:40:28 2008 -0800
+++ b/libxkutil/device_parsing.c Fri Jan 11 07:59:47 2008 -0800
@@ -810,7 +810,8 @@ void cleanup_dominfo(struct domain **dom
free(dom->os_info.pv.kernel);
free(dom->os_info.pv.initrd);
free(dom->os_info.pv.cmdline);
- } else if (dom->type == DOMAIN_XENFV) {
+ } else if ((dom->type == DOMAIN_XENFV) ||
+ (dom->type == DOMAIN_KVM)) {
free(dom->os_info.fv.type);
free(dom->os_info.fv.loader);
free(dom->os_info.fv.boot);
16 years, 11 months
[PATCH] CodingStyle updates based on experience gained in the past few months
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200085592 28800
# Node ID a541f98f909ab469ebd1631899045cf81faf4657
# Parent a42d6f035ed6d5d519e2efd5aa2fd45d5a7a95be
CodingStyle updates based on experience gained in the past few months.
Comments and adjustments welcomed.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r a42d6f035ed6 -r a541f98f909a doc/CodingStyle
--- a/doc/CodingStyle Fri Jan 11 17:15:53 2008 +0800
+++ b/doc/CodingStyle Fri Jan 11 13:06:32 2008 -0800
@@ -1,6 +1,64 @@
+
+The CodingStyle for libvirt-cim (and libcmpiutil) is mostly kernel
+style, but with the following "clarifications":
+
- Eight-space indents
-- No single-line if statements
+
+- No single-line if statements. This means none of this:
+
+ if (foo) bar;
+
- Keywords and parens separated by one space (i.e. "if (" not "if(")
-- 80-char width limit
-- Identifier style: use_underbars_and_lowercase
-- Macro style: ALL_UPPERCASE
+
+- 80-char width limit. Break long function calls by putting *every*
+ parameter of the call on its own line. There are a few exceptions
+ to the "every parameter" rule, such as for cu_statusf() calls.
+ Unless you've seen another example in the code, put each parameter
+ on a line.
+
+- Identifiers should be named with underbars_and_lowercase. The
+ libvirt style is to use CamelCase, but try to limit that to
+ operations directly related to libvirt and don't spread it to the
+ rest of the code.
+
+- Macros should be ALL_UPPERCASE
+
+- Braces around blocks should look like this:
+
+ if (foo) {
+ . . .
+ } else if (bar) {
+ . . .
+ } else {
+ . . .
+ }
+
+- Absolutely all files should contain the following block at the end:
+
+ /*
+ * Local Variables:
+ * mode: C
+ * c-set-style: "K&R"
+ * tab-width: 8
+ * c-basic-offset: 8
+ * indent-tabs-mode: nil
+ * End:
+ */
+
+ This ensures that emacs folks will have the style correct (they're
+ already halfway there by their choice in editor anyway).
+
+- Pointer and integer comparisons should be against something
+ concrete. The only time the following style should be used is if
+ foo is a bool:
+
+ if (!foo) /* ONLY if foo is a bool */
+ bar;
+
+ For pointers and integers, do this:
+
+ if (foo == NULL) /* if foo is a pointer */
+ bar;
+
+ if (foo == -1) /* if foo is an integer */
+ bar;
16 years, 11 months
Xen_ElementCapabilities return expected result from one side querying by non existing instance
by Guo Lian Yun
With a non existing instance, e.g. a wrong key name or value,
Xen_VirtualSystemManagementCapabilities still return expected results
below:
wbemcli ain -ac Xen_ElementCapabilities
http://root:password@localhost/root/virt:Xen_VirtualSystemManagementCapab..."
wrong"
localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit"
wbemcli ain -ac Xen_ElementCapabilities
http://root:password@localhost/root/virt:Xen_VirtualSystemManagementCapab....
Wrong="wrong"
localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit"
The same problem with Xen_VirtualSystemMigrationCapabilities.
In conclusion, four association providers have the same problems, that is
still return expected result with non existing instance from one or two
sides querying.
They are Xen_HostedResourcePool, Xen_ResourceAllocationFromPool,
Xen_HostedService and Xen_ElementCapabilities.
Please who can have a look into them? Thanks a lot!
Best,
Regards
Daisy Guo Lian Yun
E-mail: yunguol(a)cn.ibm.com
IBM China Development Lab, Shanghai, China
TEL: (86)-21-61008057
16 years, 11 months
Xen_HostedService return expected queried result with non existing instance by two sides
by Guo Lian Yun
Hi,
With a non existing instance, e.g. a wrong key name or value,
Xen_HostedService still return expected results below:
wbemcli ain -ac Xen_HostedService
http://root:password@localhost/root/virt:Xen_ResourcePoolConfigurationSer..."
wrong"
localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit"
wbemcli ain -ac Xen_HostedService
http://root:password@localhost/root/virt:Xen_HostSystem.CreationClassName="
wrong",Wrong="zeit"
localhost:5988/root/virt:Xen_ResourcePoolConfigurationService.CreationClassName="Xen_ResourcePoolConfigurationService",Name="RPCS",SystemCreationClassName="Xen_HostSystem",SystemName="zei"
localhost:5988/root/virt:Xen_VirtualSystemManagementService.CreationClassName="Xen_VirtualSystemManagementService",Name="Management
Service",SystemCreationClassName="Xen_HostSystem",SystemName="zeit"
localhost:5988/root/virt:Xen_VirtualSystemMigrationService.CreationClassName="Xen_VirtualSystemMigrationService",Name="MigrationService",SystemCreationClassName="",SystemName=""
Also, some keys value of Xen_VirtualSystemMigrationService are NULL.
I think it's maybe provider's fault, the same issue of
Xen_HostedResourcePool and Xen_ResourceAllocationFromPool, which have been
reported before.
Please who can have a look into them? Thanks a lot!
Best,
Regards
Daisy Guo Lian Yun
E-mail: yunguol(a)cn.ibm.com
IBM China Development Lab, Shanghai, China
TEL: (86)-21-61008057
16 years, 11 months
[PATCH] Add code style phrase to inst_list.c
by Heidi Eckhart
# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1200052746 -3600
# Node ID eec4b4e334563efaf7e3f64e1e4d0770969dc925
# Parent 5278b5fa14a754ea8c6cfdd7870cdb7fc6c62fe7
Add code style phrase to inst_list.c
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 5278b5fa14a7 -r eec4b4e33456 inst_list.c
--- a/inst_list.c Fri Jan 11 12:57:49 2008 +0100
+++ b/inst_list.c Fri Jan 11 12:59:06 2008 +0100
@@ -75,3 +75,12 @@ int inst_list_add(struct inst_list *list
return 1;
}
+/*
+ * Local Variables:
+ * mode: C
+ * c-set-style: "K&R"
+ * tab-width: 8
+ * c-basic-offset: 8
+ * indent-tabs-mode: nil
+ * End:
+ */
16 years, 11 months
[PATCH] Make inst_list_free() handle NULL pointers
by Heidi Eckhart
# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1200052669 -3600
# Node ID 5278b5fa14a754ea8c6cfdd7870cdb7fc6c62fe7
# Parent 393ba1344f5be2ea42b21adea0d377de440516dc
Make inst_list_free() handle NULL pointers
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 393ba1344f5b -r 5278b5fa14a7 inst_list.c
--- a/inst_list.c Fri Jan 11 10:33:08 2008 +0100
+++ b/inst_list.c Fri Jan 11 12:57:49 2008 +0100
@@ -50,6 +50,9 @@ void inst_list_init(struct inst_list *li
void inst_list_free(struct inst_list *list)
{
+ if (!list)
+ return;
+
free(list->list);
inst_list_init(list);
}
16 years, 11 months