You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
5.5 KiB

From 53a4dff9797a9d36918ec14fa560efde4d5142e5 Mon Sep 17 00:00:00 2001
From: Xu Wang <gesaint@linux.vnet.ibm.com>
Date: Fri, 4 Apr 2014 11:16:47 -0400
Subject: [PATCH 55/60] Controller: Add associations for KVM_Controller
Add the various associations to make the KVM_Controller work
Signed-off-by: John Ferlan <jferlan@redhat.com>
---
src/Virt_ElementAllocatedFromPool.c | 4 +++-
src/Virt_ElementSettingData.c | 3 ++-
src/Virt_ServiceAffectsElement.c | 8 +++++---
src/Virt_SettingsDefineState.c | 4 +++-
src/Virt_SystemDevice.c | 3 ++-
src/Virt_VSSDComponent.c | 3 ++-
6 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/Virt_ElementAllocatedFromPool.c b/src/Virt_ElementAllocatedFromPool.c
index 2c2f2d1..262c9b9 100644
--- a/src/Virt_ElementAllocatedFromPool.c
+++ b/src/Virt_ElementAllocatedFromPool.c
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 2007
+ * Copyright IBM Corp. 2007-2014
*
* Authors:
* Dan Smith <danms@us.ibm.com>
@@ -275,6 +275,7 @@ static char* device[] = {
"KVM_LogicalDisk",
"KVM_DisplayController",
"KVM_PointingDevice",
+ "KVM_Controller",
"LXC_Processor",
"LXC_Memory",
"LXC_NetworkPort",
@@ -297,6 +298,7 @@ static char* device_or_pool[] = {
"KVM_LogicalDisk",
"KVM_DisplayController",
"KVM_PointingDevice",
+ "KVM_Controller",
"LXC_Processor",
"LXC_Memory",
"LXC_NetworkPort",
diff --git a/src/Virt_ElementSettingData.c b/src/Virt_ElementSettingData.c
index c088e49..5845c86 100644
--- a/src/Virt_ElementSettingData.c
+++ b/src/Virt_ElementSettingData.c
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 2007
+ * Copyright IBM Corp. 2007-2014
*
* Authors:
* Kaitlin Rupert <karupert@us.ibm.com>
@@ -137,6 +137,7 @@ static char* resource_allocation_setting_data[] = {
"KVM_GraphicsResourceAllocationSettingData",
"KVM_ConsoleResourceAllocationSettingData",
"KVM_InputResourceAllocationSettingData",
+ "KVM_ControllerResourceAllocationSettingData",
"LXC_DiskResourceAllocationSettingData",
"LXC_MemResourceAllocationSettingData",
"LXC_NetResourceAllocationSettingData",
diff --git a/src/Virt_ServiceAffectsElement.c b/src/Virt_ServiceAffectsElement.c
index 9810e02..d64a877 100644
--- a/src/Virt_ServiceAffectsElement.c
+++ b/src/Virt_ServiceAffectsElement.c
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 2008
+ * Copyright IBM Corp. 2008-2014
*
* Authors:
* Kaitlin Rupert <karupert@us.ibm.com>
@@ -101,9 +101,10 @@ static CMPIStatus validate_cs_or_dev_ref(const CMPIContext *context,
if (STREQC(classname, "ComputerSystem")) {
s = get_domain_by_ref(_BROKER, ref, &inst);
- } else if ((STREQC(classname, "PointingDevice")) ||
+ } else if ((STREQC(classname, "PointingDevice")) ||
+ (STREQC(classname, "Controller")) ||
(STREQC(classname, "DisplayController"))) {
- s = get_device_by_ref(_BROKER, ref, &inst);
+ s = get_device_by_ref(_BROKER, ref, &inst);
}
free(classname);
@@ -146,6 +147,7 @@ static char* affected_ele[] = {
"Xen_DisplayController",
"KVM_DisplayController",
"LXC_DisplayController",
+ "KVM_Controller",
NULL
};
diff --git a/src/Virt_SettingsDefineState.c b/src/Virt_SettingsDefineState.c
index c8cda97..6338d7c 100644
--- a/src/Virt_SettingsDefineState.c
+++ b/src/Virt_SettingsDefineState.c
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 2007
+ * Copyright IBM Corp. 2007-2014
*
* Authors:
* Dan Smith <danms@us.ibm.com>
@@ -336,6 +336,7 @@ static char* logical_device[] = {
"KVM_DisplayController",
"KVM_ConsoleDisplayController",
"KVM_PointingDevice",
+ "KVM_Controller",
"LXC_Processor",
"LXC_Memory",
"LXC_NetworkPort",
@@ -361,6 +362,7 @@ static char* resource_allocation_setting_data[] = {
"KVM_GraphicsResourceAllocationSettingData",
"KVM_InputResourceAllocationSettingData",
"KVM_ConsoleResourceAllocationSettingData",
+ "KVM_ControllerResourceAllocationSettingData",
"LXC_DiskResourceAllocationSettingData",
"LXC_MemResourceAllocationSettingData",
"LXC_NetResourceAllocationSettingData",
diff --git a/src/Virt_SystemDevice.c b/src/Virt_SystemDevice.c
index d2e526d..ae13ecb 100644
--- a/src/Virt_SystemDevice.c
+++ b/src/Virt_SystemDevice.c
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 2007
+ * Copyright IBM Corp. 2007-2014
*
* Authors:
* Dan Smith <danms@us.ibm.com>
@@ -144,6 +144,7 @@ static char* part_component[] = {
"KVM_DisplayController",
"KVM_ConsoleDisplayController",
"KVM_PointingDevice",
+ "KVM_Controller",
"LXC_Processor",
"LXC_Memory",
"LXC_NetworkPort",
diff --git a/src/Virt_VSSDComponent.c b/src/Virt_VSSDComponent.c
index 35bffde..fc223c2 100644
--- a/src/Virt_VSSDComponent.c
+++ b/src/Virt_VSSDComponent.c
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 2007
+ * Copyright IBM Corp. 2007-2014
*
* Authors:
* Dan Smith <danms@us.ibm.com>
@@ -141,6 +141,7 @@ static char* part_component[] = {
"KVM_GraphicsResourceAllocationSettingData",
"KVM_InputResourceAllocationSettingData",
"KVM_ConsoleResourceAllocationSettingData",
+ "KVM_ControllerResourceAllocationSettingData",
"LXC_DiskResourceAllocationSettingData",
"LXC_MemResourceAllocationSettingData",
"LXC_NetResourceAllocationSettingData",
--
2.1.0