mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
hyperv: add hypervMsvmVSMSModifyResourceSettings
Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5f3915a334
commit
5df9f9dadf
@ -1542,3 +1542,40 @@ hypervGetMemorySD(hypervPrivate *priv,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Msvm_VirtualSystemManagementService
|
||||
*/
|
||||
|
||||
int
|
||||
hypervMsvmVSMSModifyResourceSettings(hypervPrivate *priv,
|
||||
GHashTable **resourceSettingsPtr,
|
||||
hypervWmiClassInfoPtr wmiInfo)
|
||||
{
|
||||
int result = -1;
|
||||
GHashTable *resourceSettings = *resourceSettingsPtr;
|
||||
g_autoptr(hypervInvokeParamsList) params = NULL;
|
||||
|
||||
params = hypervCreateInvokeParamsList("ModifyResourceSettings",
|
||||
MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR,
|
||||
Msvm_VirtualSystemManagementService_WmiInfo);
|
||||
|
||||
if (!params)
|
||||
goto cleanup;
|
||||
|
||||
if (hypervAddEmbeddedParam(params, "ResourceSettings", &resourceSettings, wmiInfo) < 0) {
|
||||
hypervFreeEmbeddedParam(resourceSettings);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0)
|
||||
goto cleanup;
|
||||
|
||||
result = 0;
|
||||
|
||||
cleanup:
|
||||
*resourceSettingsPtr = NULL;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -243,3 +243,11 @@ int hypervGetProcessorSD(hypervPrivate *priv,
|
||||
int hypervGetMemorySD(hypervPrivate *priv,
|
||||
const char *vssd_instanceid,
|
||||
Msvm_MemorySettingData **list);
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Msvm_VirtualSystemManagementService
|
||||
*/
|
||||
|
||||
int hypervMsvmVSMSModifyResourceSettings(hypervPrivate *priv,
|
||||
GHashTable **resourceSettingsPtr,
|
||||
hypervWmiClassInfoPtr wmiInfo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user