hyperv: add hypervMsvmVSMSModifyResourceSettings

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Matt Coleman 2020-11-11 01:48:31 -05:00 committed by Michal Privoznik
parent 5f3915a334
commit 5df9f9dadf
2 changed files with 45 additions and 0 deletions

View File

@ -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, &params, NULL) < 0)
goto cleanup;
result = 0;
cleanup:
*resourceSettingsPtr = NULL;
return result;
}

View File

@ -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);