From ba48c6a20082efcf198f987af16efb47bd9c0917 Mon Sep 17 00:00:00 2001 From: Christian Pelster <pelle@pelle.io> Date: Wed, 16 Jan 2019 20:44:19 +0100 Subject: [PATCH 1/2] add support for server labels --- .../tomsdevsn/hetznercloud/objects/request/ServerRequest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/me/tomsdevsn/hetznercloud/objects/request/ServerRequest.java b/src/main/java/me/tomsdevsn/hetznercloud/objects/request/ServerRequest.java index d156418d..66325a4b 100644 --- a/src/main/java/me/tomsdevsn/hetznercloud/objects/request/ServerRequest.java +++ b/src/main/java/me/tomsdevsn/hetznercloud/objects/request/ServerRequest.java @@ -4,7 +4,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Data @Builder @@ -23,6 +25,8 @@ public class ServerRequest { @JsonProperty("start_after_create") private boolean startAfterCreate; + private Map<String, String> labels = new HashMap<>(); + /** * The objects in the list have to be a Long or a String, or it will throw an Exception {@link me.tomsdevsn.hetznercloud.exception.InvalidParametersException} */ From 20cb2f6a7a78af1acdde9c608d0a9436ef4bb28e Mon Sep 17 00:00:00 2001 From: Christian Pelster <pelle@pelle.io> Date: Fri, 25 Jan 2019 18:01:57 +0100 Subject: [PATCH 2/2] add labels support to floating ip creation --- .../hetznercloud/objects/request/FloatingIPRequest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/me/tomsdevsn/hetznercloud/objects/request/FloatingIPRequest.java b/src/main/java/me/tomsdevsn/hetznercloud/objects/request/FloatingIPRequest.java index 25a59876..142f4d02 100644 --- a/src/main/java/me/tomsdevsn/hetznercloud/objects/request/FloatingIPRequest.java +++ b/src/main/java/me/tomsdevsn/hetznercloud/objects/request/FloatingIPRequest.java @@ -7,6 +7,9 @@ import lombok.Data; import lombok.Getter; +import java.util.HashMap; +import java.util.Map; + @Data @Builder @AllArgsConstructor @@ -18,6 +21,7 @@ public class FloatingIPRequest { private String homeLocation; private Long server; private String description; + private Map<String, String> labels = new HashMap<>(); @Getter @AllArgsConstructor