Class UpdateServerMetadataRequest
- java.lang.Object
-
- com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest<java.lang.Void>
-
- com.elastisys.scale.cloudpool.openstack.requests.UpdateServerMetadataRequest
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Void>
public class UpdateServerMetadataRequest extends AbstractOpenstackRequest<java.lang.Void>
An request that, when executed, updates the metadata tags of aServerinstance.
-
-
Constructor Summary
Constructors Constructor Description UpdateServerMetadataRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String serverId, java.util.Map<java.lang.String,java.lang.String> metadata)Constructs aUpdateServerMetadataRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.VoiddoRequest(org.openstack4j.api.OSClient api)Carries out the request and returns the response.-
Methods inherited from class com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest
call, getApiAccessConfig, getClientFactory
-
-
-
-
Constructor Detail
-
UpdateServerMetadataRequest
public UpdateServerMetadataRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String serverId, java.util.Map<java.lang.String,java.lang.String> metadata)Constructs aUpdateServerMetadataRequest.- Parameters:
clientFactory- OpenStack API client factory.serverId- The server whose metadata is to be updated.metadata- Meta data tags to be copied to the server. Any meta data keys that already exist on the node will be overwritten.
-
-
Method Detail
-
doRequest
public java.lang.Void doRequest(org.openstack4j.api.OSClient api) throws NotFoundException, org.openstack4j.api.exceptions.ResponseExceptionDescription copied from class:AbstractOpenstackRequestCarries out the request and returns the response.- Specified by:
doRequestin classAbstractOpenstackRequest<java.lang.Void>- Parameters:
api- An authenticated OpenStack API client that is instructed to operate against the configured region.- Returns:
- The response.
- Throws:
org.openstack4j.api.exceptions.ResponseException- if the request failed.NotFoundException
-
-