You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(5) |
Feb
(16) |
Mar
(5) |
Apr
(5) |
May
(13) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(1) |
Dec
(29) |
| 2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(57) |
May
(35) |
Jun
(45) |
Jul
(132) |
Aug
(87) |
Sep
(141) |
Oct
(86) |
Nov
(17) |
Dec
(2) |
| 2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
|
|
3
|
4
|
5
(1) |
6
|
7
|
8
|
9
|
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: <jb...@us...> - 2009-05-05 14:57:57
|
Revision: 1173
http://omc.svn.sourceforge.net/omc/?rev=1173&view=rev
Author: jbgill
Date: 2009-05-05 14:56:53 +0000 (Tue, 05 May 2009)
Log Message:
-----------
added PXE boot option to provider and db schema to support vm-install's
new --pxe-boot flag.
Modified Paths:
--------------
contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof
contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec
contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c
contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c
contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c
Added Paths:
-----------
contrib/xen-vm-builder/trunk/pxeboot.patch
Modified: contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof
===================================================================
--- contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof 2009-04-02 22:29:05 UTC (rev 1172)
+++ contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof 2009-05-05 14:56:53 UTC (rev 1173)
@@ -157,5 +157,11 @@
Values{"Destroy", "Restart", "Preserve", "Rename-Restart",
"Coredump-Destroy", "Coredump-Restart"}]
uint16 OnCrash;
+
+ [Description("Tells whether or not the VM should PXE boot. "
+ "Applies only to fully-virtualized (HVM) VMs."),
+ ValueMap{"0", "1"},
+ Values{"No PXE Boot", "PXE Boot"}]
+ uint8 PXEBoot;
};
Added: contrib/xen-vm-builder/trunk/pxeboot.patch
===================================================================
--- contrib/xen-vm-builder/trunk/pxeboot.patch (rev 0)
+++ contrib/xen-vm-builder/trunk/pxeboot.patch 2009-05-05 14:56:53 UTC (rev 1173)
@@ -0,0 +1,172 @@
+Index: mof/XEN_VMBuilderVirtualSystemCreationData.mof
+===================================================================
+--- mof/XEN_VMBuilderVirtualSystemCreationData.mof (revision 1172)
++++ mof/XEN_VMBuilderVirtualSystemCreationData.mof (working copy)
+@@ -157,5 +157,11 @@
+ Values{"Destroy", "Restart", "Preserve", "Rename-Restart",
+ "Coredump-Destroy", "Coredump-Restart"}]
+ uint16 OnCrash;
++
++ [Description("Tells whether or not the VM should PXE boot. "
++ "Applies only to fully-virtualized (HVM) VMs."),
++ ValueMap{"0", "1"},
++ Values{"No PXE Boot", "PXE Boot"}]
++ uint8 PXEBoot;
+ };
+
+Index: src/providers/vm-builder/vmcreation-data.c
+===================================================================
+--- src/providers/vm-builder/vmcreation-data.c (revision 1172)
++++ src/providers/vm-builder/vmcreation-data.c (working copy)
+@@ -102,7 +102,8 @@
+ "VirtualSystemType," \
+ "OnPowerOff," \
+ "OnReboot," \
+- "OnCrash"
++ "OnCrash," \
++ "PXEBoot"
+
+ const char* all_cd_fields_query_with_where = "SELECT "CSV_FIELDS" FROM CreationData "
+ "WHERE InstanceID=%Q;";
+@@ -151,7 +152,8 @@
+ CDF_VirtualSystemType,
+ CDF_OnPowerOff,
+ CDF_OnReboot,
+- CDF_OnCrash
++ CDF_OnCrash,
++ CDF_PXEBoot
+ };
+
+ /*
+@@ -282,6 +284,21 @@
+
+ /*****************************************************************************/
+ static CMPIrc
++valid_pxe_boot(const CMPIData *pdata, CMPIStatus* pstatus)
++{
++ CMSetStatus(pstatus, CMPI_RC_OK);
++ if (!CMIsNullValue((*pdata))) {
++ if (pdata->value.uint8 > 1) {
++ CMSetStatusWithChars(_broker, pstatus,
++ CMPI_RC_ERR_INVALID_PARAMETER,
++ "Invalid 'PXEBoot' property");
++ }
++ }
++ return pstatus->rc;
++}
++
++/*****************************************************************************/
++static CMPIrc
+ valid_automatic_recovery_action(const CMPIData *pdata, CMPIStatus* pstatus)
+ {
+ CMSetStatus(pstatus, CMPI_RC_OK);
+@@ -328,17 +345,25 @@
+ /*****************************************************************************/
+ static int
+ add_u8_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance,
+- const char* prop_name)
++ const char* prop_name, int endstmt)
+ {
+ int cc = 0;
+ CMPIData data = CMGetProperty(instance, prop_name, NULL);
+ if (!CMIsNullValue(data)) {
+ char wkbfr[32];
+- snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8);
++ if (endstmt) {
++ snprintf(wkbfr, sizeof(wkbfr), "%u", data.value.uint8);
++ } else {
++ snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8);
++ }
+ cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0);
+ cc = 1;
+ } else {
+- cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0);
++ if (endstmt) {
++ cmpiutilStrBuf_cat(pstrbuf, "NULL", 0);
++ } else {
++ cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0);
++ }
+ }
+ return cc;
+ }
+@@ -523,6 +548,7 @@
+ set_u16_prop(dbctx, CDF_OnPowerOff, instance, "OnPowerOff");
+ set_u16_prop(dbctx, CDF_OnReboot, instance, "OnReboot");
+ set_u16_prop(dbctx, CDF_OnCrash, instance, "OnCrash");
++ set_u8_prop(dbctx, CDF_PXEBoot, instance, "PXEBoot");
+ }
+
+ /******************************************************************************
+@@ -1044,6 +1070,12 @@
+ return status;
+ }
+ }
++ if (mod_add_u8_prop(pstra, modified_instance, "PXEBoot", properties)) {
++ if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) {
++ cmpiutilStrArray_destroy(pstra);
++ return status;
++ }
++ }
+ pstrbuf = cmpiutilStrBuf_create();
+ if (!pstrbuf) {
+ CMSetStatusWithChars(_broker, &status, CMPI_RC_ERROR_SYSTEM,
+@@ -1221,7 +1253,7 @@
+ add_u32_prop_to_query(pstrbuf, newinstance, "Memory", NULL);
+ add_stra_prop_to_query(pstrbuf, newinstance, "Nics");
+ add_stra_prop_to_query(pstrbuf, newinstance, "Notes");
+- add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs");
++ add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs", 0);
+ if (add_u32_prop_to_query(pstrbuf, newinstance, "OSType", &data)) {
+ if (valid_os_type(&data, &status) != CMPI_RC_OK) {
+ cmpiutilStrBuf_destroy(pstrbuf);
+@@ -1256,12 +1288,19 @@
+ return status;
+ }
+ }
+- if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 1)) {
++ if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 0)) {
+ if (valid_on_crash(&data, &status) != CMPI_RC_OK) {
+ cmpiutilStrBuf_destroy(pstrbuf);
+ return status;
+ }
+ }
++ if (add_u8_prop_to_query(pstrbuf, newinstance, "PXEBoot", 1)) {
++ if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) {
++ cmpiutilStrBuf_destroy(pstrbuf);
++ return status;
++ }
++ }
++
+ cmpiutilStrBuf_cat(pstrbuf, ");", 0);
+
+ DEBUGOUT("SQL: %s\n", pstrbuf->bfr);
+Index: src/providers/vm-builder/builder-service.c
+===================================================================
+--- src/providers/vm-builder/builder-service.c (revision 1172)
++++ src/providers/vm-builder/builder-service.c (working copy)
+@@ -894,6 +894,11 @@
+ return NULL;
+ }
+
++ /**** PXEBoot ****/
++ data = CMGetProperty(cdci, "PXEBoot", NULL);
++ if (!CMIsNullValue(data) && data.value.uint8 == 1)
++ cmpiutilStrArray_append(pstra, "--pxe-boot");
++
+ /**** OnPowerOff ****/
+ data = CMGetProperty(cdci, "OnPowerOff", NULL);
+ if (!CMIsNullValue(data)) {
+Index: src/providers/vm-builder/vmbuilder-db.c
+===================================================================
+--- src/providers/vm-builder/vmbuilder-db.c (revision 1172)
++++ src/providers/vm-builder/vmbuilder-db.c (working copy)
+@@ -103,6 +103,9 @@
+ //-- 4: Coredump-Destroy
+ //-- 5: Coredump-Restart
+ "OnCrash INTEGER,"
++ //-- 0: No PXE Boot
++ //-- 1: PXE Boot
++ "PXEBoot INTEGER,"
+ "PRIMARY KEY(InstanceID COLLATE NOCASE));"
+ "CREATE TABLE Job("
+ "JobName TEXT NOT NULL,"
Modified: contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec
===================================================================
--- contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec 2009-04-02 22:29:05 UTC (rev 1172)
+++ contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec 2009-05-05 14:56:53 UTC (rev 1173)
@@ -34,8 +34,8 @@
%if 0%{?suse_version} >= 1100 || 0%{?sles_version} >= 11
Patch0: suse11_ostypes.patch
%endif
+Patch1: pxeboot.patch
-
%description
Linux CIM providers for CMPI instrumentation of XEN virtual machine
creation.
@@ -52,6 +52,7 @@
%if 0%{?suse_version} >= 1100 || 0%{?sles_version} >= 11
%patch0 -p0
%endif
+%patch1 -p0
%build
# If the LD_RUN_PATH environment variable is set at link time,
@@ -100,6 +101,7 @@
sfcbstage -n root/cimv2 -r %{REGISTRATION} %{SCHEMA}
sfcbrepos -f
/etc/init.d/sfcb condrestart
+%{__rm} -f /var/opt/xen-vm-builder/db/vmbuilder.db
%preun
# If removing (not upgrading) then de-register, before the files are gone
Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c
===================================================================
--- contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c 2009-04-02 22:29:05 UTC (rev 1172)
+++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c 2009-05-05 14:56:53 UTC (rev 1173)
@@ -894,6 +894,11 @@
return NULL;
}
+ /**** PXEBoot ****/
+ data = CMGetProperty(cdci, "PXEBoot", NULL);
+ if (!CMIsNullValue(data) && data.value.uint8 == 1)
+ cmpiutilStrArray_append(pstra, "--pxe-boot");
+
/**** OnPowerOff ****/
data = CMGetProperty(cdci, "OnPowerOff", NULL);
if (!CMIsNullValue(data)) {
Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c
===================================================================
--- contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c 2009-04-02 22:29:05 UTC (rev 1172)
+++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c 2009-05-05 14:56:53 UTC (rev 1173)
@@ -103,6 +103,9 @@
//-- 4: Coredump-Destroy
//-- 5: Coredump-Restart
"OnCrash INTEGER,"
+ //-- 0: No PXE Boot
+ //-- 1: PXE Boot
+ "PXEBoot INTEGER,"
"PRIMARY KEY(InstanceID COLLATE NOCASE));"
"CREATE TABLE Job("
"JobName TEXT NOT NULL,"
Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c
===================================================================
--- contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c 2009-04-02 22:29:05 UTC (rev 1172)
+++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c 2009-05-05 14:56:53 UTC (rev 1173)
@@ -102,7 +102,8 @@
"VirtualSystemType," \
"OnPowerOff," \
"OnReboot," \
- "OnCrash"
+ "OnCrash," \
+ "PXEBoot"
const char* all_cd_fields_query_with_where = "SELECT "CSV_FIELDS" FROM CreationData "
"WHERE InstanceID=%Q;";
@@ -151,7 +152,8 @@
CDF_VirtualSystemType,
CDF_OnPowerOff,
CDF_OnReboot,
- CDF_OnCrash
+ CDF_OnCrash,
+ CDF_PXEBoot
};
/*
@@ -282,6 +284,21 @@
/*****************************************************************************/
static CMPIrc
+valid_pxe_boot(const CMPIData *pdata, CMPIStatus* pstatus)
+{
+ CMSetStatus(pstatus, CMPI_RC_OK);
+ if (!CMIsNullValue((*pdata))) {
+ if (pdata->value.uint8 > 1) {
+ CMSetStatusWithChars(_broker, pstatus,
+ CMPI_RC_ERR_INVALID_PARAMETER,
+ "Invalid 'PXEBoot' property");
+ }
+ }
+ return pstatus->rc;
+}
+
+/*****************************************************************************/
+static CMPIrc
valid_automatic_recovery_action(const CMPIData *pdata, CMPIStatus* pstatus)
{
CMSetStatus(pstatus, CMPI_RC_OK);
@@ -328,17 +345,25 @@
/*****************************************************************************/
static int
add_u8_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance,
- const char* prop_name)
+ const char* prop_name, int endstmt)
{
int cc = 0;
CMPIData data = CMGetProperty(instance, prop_name, NULL);
if (!CMIsNullValue(data)) {
char wkbfr[32];
- snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8);
+ if (endstmt) {
+ snprintf(wkbfr, sizeof(wkbfr), "%u", data.value.uint8);
+ } else {
+ snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8);
+ }
cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0);
cc = 1;
} else {
- cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0);
+ if (endstmt) {
+ cmpiutilStrBuf_cat(pstrbuf, "NULL", 0);
+ } else {
+ cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0);
+ }
}
return cc;
}
@@ -523,6 +548,7 @@
set_u16_prop(dbctx, CDF_OnPowerOff, instance, "OnPowerOff");
set_u16_prop(dbctx, CDF_OnReboot, instance, "OnReboot");
set_u16_prop(dbctx, CDF_OnCrash, instance, "OnCrash");
+ set_u8_prop(dbctx, CDF_PXEBoot, instance, "PXEBoot");
}
/******************************************************************************
@@ -1044,6 +1070,12 @@
return status;
}
}
+ if (mod_add_u8_prop(pstra, modified_instance, "PXEBoot", properties)) {
+ if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) {
+ cmpiutilStrArray_destroy(pstra);
+ return status;
+ }
+ }
pstrbuf = cmpiutilStrBuf_create();
if (!pstrbuf) {
CMSetStatusWithChars(_broker, &status, CMPI_RC_ERROR_SYSTEM,
@@ -1221,7 +1253,7 @@
add_u32_prop_to_query(pstrbuf, newinstance, "Memory", NULL);
add_stra_prop_to_query(pstrbuf, newinstance, "Nics");
add_stra_prop_to_query(pstrbuf, newinstance, "Notes");
- add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs");
+ add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs", 0);
if (add_u32_prop_to_query(pstrbuf, newinstance, "OSType", &data)) {
if (valid_os_type(&data, &status) != CMPI_RC_OK) {
cmpiutilStrBuf_destroy(pstrbuf);
@@ -1256,12 +1288,19 @@
return status;
}
}
- if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 1)) {
+ if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 0)) {
if (valid_on_crash(&data, &status) != CMPI_RC_OK) {
cmpiutilStrBuf_destroy(pstrbuf);
return status;
}
}
+ if (add_u8_prop_to_query(pstrbuf, newinstance, "PXEBoot", 1)) {
+ if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) {
+ cmpiutilStrBuf_destroy(pstrbuf);
+ return status;
+ }
+ }
+
cmpiutilStrBuf_cat(pstrbuf, ");", 0);
DEBUGOUT("SQL: %s\n", pstrbuf->bfr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|