From 472707f8813a9cec2597b94fa63bad27b2db8242 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 13 Oct 2022 17:48:56 +1300 Subject: [PATCH] Make suggested changes Signed-off-by: Thomas Farr --- abstractions/src/OpenSearch.Stack.ArtifactsApi/Artifact.cs | 2 +- .../src/OpenSearch.Stack.ArtifactsApi/OpenSearchVersion.cs | 2 +- src/OpenSearch.Client/Cluster/NodesInfo/NodeInfo.cs | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/abstractions/src/OpenSearch.Stack.ArtifactsApi/Artifact.cs b/abstractions/src/OpenSearch.Stack.ArtifactsApi/Artifact.cs index 769aaaec30..dd1e248305 100644 --- a/abstractions/src/OpenSearch.Stack.ArtifactsApi/Artifact.cs +++ b/abstractions/src/OpenSearch.Stack.ArtifactsApi/Artifact.cs @@ -41,7 +41,7 @@ public class Artifact internal Artifact(Product product, Version version, string downloadUrl, ArtifactBuildState state, string buildHash) { - ProductName = "opensearch"; + ProductName = product?.ProductName ?? "opensearch"; Version = version; DownloadUrl = product?.PatchDownloadUrl(downloadUrl); State = state; diff --git a/abstractions/src/OpenSearch.Stack.ArtifactsApi/OpenSearchVersion.cs b/abstractions/src/OpenSearch.Stack.ArtifactsApi/OpenSearchVersion.cs index 34064c0e0e..456bc20b67 100644 --- a/abstractions/src/OpenSearch.Stack.ArtifactsApi/OpenSearchVersion.cs +++ b/abstractions/src/OpenSearch.Stack.ArtifactsApi/OpenSearchVersion.cs @@ -89,7 +89,7 @@ public Artifact Artifact(Product product) /// Resolves an OpenSearch version using either format '$version' or '$ServerType-$version', where version could be 'x.y.z' or 'latest' or even 'latest-x' /// public static OpenSearchVersion From(string managedVersionString) => - // TODO resolve `latest` and `latest-x` for OpenSearchÏ + // TODO resolve `latest` and `latest-x` for OpenSearch managedVersionString == null ? null : new OpenSearchVersion(managedVersionString, ArtifactBuildState.Released, ""); public bool InRange(string range) diff --git a/src/OpenSearch.Client/Cluster/NodesInfo/NodeInfo.cs b/src/OpenSearch.Client/Cluster/NodesInfo/NodeInfo.cs index b9e1036831..21032d220b 100644 --- a/src/OpenSearch.Client/Cluster/NodesInfo/NodeInfo.cs +++ b/src/OpenSearch.Client/Cluster/NodesInfo/NodeInfo.cs @@ -51,9 +51,6 @@ public class NodeInfo [DataMember(Name = "version")] public string Version { get; internal set; } - [DataMember(Name = "build_flavor")] - public string BuildFlavor { get; internal set; } - [DataMember(Name = "build_type")] public string BuildType { get; internal set; }