Update a provider plug-in

PUT method to update a provider plug-in configuration in the cluster.

Method URL Description
PUT https://host_name:port/platform/rest/hostfactory/providerplugins/$plugin_name Update a provider plug-in configuration detail. If a provider plug-in is under-used, the update function fails and the provider plug-in name cannot update.

Prerequisites

You must be the cluster administrator, or your user account must be assigned the HF_ALL_PROVIDER_MANAGE permission.

Request

PUT https://host_name:port/platform/rest/hostfactory/providerplugins/$plugin_name
where plugin_name identifies the provider plug-in.

Table 1. Request parameter
Parameter Type Required/Optional Description
hfcsrftoken string Optional CSRF token that is obtained with successful login.

If you use curl, the command might look like the following example:

curl --header -b /tmp/cookie --cacert /opt/ibm/spectrumcomputing/wlp/usr/shared/resources/security/cacert.pem --tlsv1.2 -X PUT https://myprimaryhost.example.com:9443/platform/rest/hostfactory/providerplugins/$pluginname?hfcsrftoken=915ee7644f431e630dac68b9ab3e40bc -d '{"name": "ibmcloudgen2","enabled": 1, "scriptPath": "${HF_TOP}/${HF_VERSION}/providerplugins/ibmcloudgen2/scripts/"}'
This command takes a JSON request string to update a provider plug-in with the following sample configuration details:
{
   "name": "ibmcloudgen2",
   "enabled": 1,
   "scriptPath": "${HF_TOP}/${HF_VERSION}/providerplugins/ibmcloudgen2/scripts/"
}

Response

The command returns to the updated hostProviderPlugins.json provider file at:
  • $EGO_CONFDIR/../../hostfactory/conf/providerplugins/ on Linux®
  • %EGO_CONFDIR%\..\..\hostfactory\conf\providerplugins\ on Windows
Status code Description
200 OK.
404 Not found.
500 Internal server error. Check the log files and look for hints in the API response body.