You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Failed to check if storage container %q exists: failed to get cluster %q: %s. This is usually a temporary error. Please retry.", ///nolint:lll // Message is long.
"Found %d Clusters (Prism Elements) in Prism Central that match identifier %q. There must be exactly 1 Cluster that matches this identifier. Make the Cluster identifiers unique, and then retry.", ///nolint:lll // Message is long.
89
+
"Found %d Clusters (Prism Elements) in Prism Central that match identifier %q. There must be exactly 1 Cluster that matches this identifier. Use a unique Cluster name, or identify the Cluster by its UUID, then retry.", ///nolint:lll // Message is long.
"Failed to check if Storage Container %q exists in cluster %q: %s. This is usually a temporary error. Please retry.", ///nolint:lll // Message is long.
"Found %d Storage Containers that match identifier %q on Cluster %q. There must be exactly 1 Storage Container that matches this identifier. Make the Storage Container identifiers unique, or use a different Storage Container, and then retry.", ///nolint:lll // Message is long.
122
-
len(containers),
123
-
storageContainer,
124
+
"Found no Storage Containers with name %q on Cluster %q. Create a Storage Container with this name on Cluster %q, and then retry.", ///nolint:lll // Message is long.
125
+
storageContainerName,
126
+
clusterIdentifier,
124
127
clusterIdentifier,
125
128
),
126
129
Field: c.field,
127
130
})
131
+
case1:
128
132
continue
133
+
default: // 2 or more Storage Containers with the same name found on the same Cluster.
134
+
// This is an unexpected situation, as Storage Container names should be unique within a Cluster.
135
+
// We log this as an internal error, as it indicates a potential issue with the Nutanix API or the
"Found %d Storage Containers with name %q on Cluster %q. This should not happen under normal circumstances. Please report.", ///nolint:lll // Message is long.
expectedCauseMessage: "Found 0 Storage Containers that match identifier \"missing-container\" on Cluster \"test-cluster\". There must be exactly 1 Storage Container that matches this identifier. Make the Storage Container identifiers unique, or use a different Storage Container, and then retry.", //nolint:lll // Message is long.
387
+
expectedCauseMessage: "Found no Storage Containers with name \"missing-container\" on Cluster \"test-cluster\". Create a Storage Container with this name on Cluster \"test-cluster\", and then retry.", //nolint:lll // Message is long.
388
388
},
389
389
{
390
-
name: "multiple storage containers found",
390
+
name: "multiple storage containers with same name in same cluster found",
expectedCauseMessage: "Found 2 Storage Containers that match identifier \"duplicate-container\" on Cluster \"test-cluster\". There must be exactly 1 Storage Container that matches this identifier. Make the Storage Container identifiers unique, or use a different Storage Container, and then retry.", //nolint:lll // The message is long.
461
+
expectedError: true,
462
+
expectedCauseMessage: "Found 2 Storage Containers with name \"duplicate-container\" on Cluster \"test-cluster\". This should not happen under normal circumstances. Please report.", //nolint:lll // The message is long.
expectedCauseMessage: "Found 2 Clusters (Prism Elements) in Prism Central that match identifier \"test-cluster\". There must be exactly 1 Cluster that matches this identifier. Make the Cluster identifiers unique, and then retry.", //nolint:lll // The message is long.
584
+
expectedCauseMessage: "Found 2 Clusters (Prism Elements) in Prism Central that match identifier \"test-cluster\". There must be exactly 1 Cluster that matches this identifier. Use a unique Cluster name, or identify the Cluster by its UUID, then retry.", //nolint:lll // The message is long.
expectedCauseMessage: "Found 0 Storage Containers that match identifier \"valid-container\" on Cluster \"test-cluster\". There must be exactly 1 Storage Container that matches this identifier. Make the Storage Container identifiers unique, or use a different Storage Container, and then retry.", //nolint:lll // The message is long.
816
+
expectedCauseMessage: "Found no Storage Containers with name \"valid-container\" on Cluster \"test-cluster\". Create a Storage Container with this name on Cluster \"test-cluster\", and then retry.", //nolint:lll // The message is long.
817
817
},
818
818
{
819
819
name: "multiple storage class configs with success",
0 commit comments