aledsage commented on this pull request.
Thanks @ygy - LGTM. Only some very minor comments.
> @@ -91,15 +90,58 @@ public static LinuxConfiguration create(final String
> disablePasswordAuthenticati
@AutoValue
public abstract static class WinRM {
+ public enum ListenerProtocol {
+
+ HTTP("http"),
+ HTTPS("https"),
+ UNRECOGNIZED("Unrecognized");
+
+ private String value;
+
+ ListenerProtocol(String value) {
+ this.value = value;
+ }
+
+ public static ListenerProtocol fromValue(String value) {
+ ListenerProtocol[] items = ListenerProtocol.values();
Could use the same pattern as is in
https://github.com/jclouds/jclouds-labs/blob/master/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ComputeNode.java#L28
> @@ -91,15 +90,58 @@ public static LinuxConfiguration create(final String
> disablePasswordAuthenticati
@AutoValue
public abstract static class WinRM {
+ public enum Protocol {
+
+ HTTP("http"),
+ HTTPS("https"),
+ UNRECOGNIZED("Unrecognized");
+
+ private String value;
+
+ Protocol(String value) {
+ this.value = value;
+ }
+
+ public static Protocol fromValue(String value) {
+ Protocol[] items = Protocol.values();
Could use the same pattern as
https://github.com/jclouds/jclouds-labs/blob/master/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ComputeNode.java#L28,
i.e.
return (Protocol) GetEnumValue.fromValueOrDefault(value,
Protocol.UNRECOGNIZED);
> +
+/**
+ * Certificate stored in a Key Vault
+ */
+@AutoValue
+public abstract class VaultCertificate {
+
+ /**
+ * The URL of the certificate
+ */
+ public abstract String certificateUrl();
+
+ /**
+ * Certificate's store name
+ */
+ public abstract String certificateStore();
Needs `@Nullable` - both here, and on the arg to `create` - see
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update#bk_vaultcert,
which says that it is not required.
I believe that if you don't include `@Nullable` then `AutoValue`'s
auto-generated code will throw a `NullPointerException` if the value is null.
(Actually, probably don't need it on the arg to `create()` - we don't do that
elsewhere).
> +
> "\"plan\":{\"name\":\"deadline-slave-7-2\",\"publisher\":\"thinkboxsoftware\",\"product\":\"deadline7-2\"}}");
}
+ // See
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update
A slightly more accurate comment would be:
// See
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update
// for where part of the example json response comes from. Unfortunately
examples in the microsoft docs
// are not valid json (e.g. missing commas, illegal quotes). Therefore this
example merges the original
// real-world example (presumably taken from the jclouds wire log), and
snippets from the microsoft docs.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/393#pullrequestreview-39969372