Skip to content

Commit 04617d3

Browse files
Locharla, SandeepLocharla, Sandeep
authored andcommitted
CSTACKEX-50: Fixed some issues seen while testing
1 parent 997d03b commit 04617d3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.apache.logging.log4j.LogManager;
4343
import org.apache.logging.log4j.Logger;
4444

45+
import java.util.HashMap;
4546
import java.util.List;
4647
import java.util.Map;
4748
import java.util.Objects;
@@ -287,14 +288,15 @@ public String getNetworkInterface() {
287288
// Feign call to get network interfaces
288289
String authHeader = Utility.generateAuthHeader(storage.getUsername(), storage.getPassword());
289290
try {
290-
Map<String, Object> queryParams = Map.of(Constants.SVMNAME, storage.getSvmName());
291+
Map<String, Object> queryParams = new HashMap<>();
292+
queryParams.put(Constants.SVMDOTNAME, storage.getSvmName());
291293
if (storage.getProtocol() != null) {
292294
switch (storage.getProtocol()) {
293295
case NFS3:
294-
queryParams = Map.of(Constants.SERVICES, Constants.DATA_NFS);
296+
queryParams .put(Constants.SERVICES, Constants.DATA_NFS);
295297
break;
296298
case ISCSI:
297-
queryParams = Map.of(Constants.SERVICES, Constants.DATA_ISCSI);
299+
queryParams.put(Constants.SERVICES, Constants.DATA_ISCSI);
298300
break;
299301
default:
300302
s_logger.error("Unsupported protocol: " + storage.getProtocol());

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Constants.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.apache.cloudstack.storage.utils;
2121

22-
import org.opensaml.xml.encryption.Public;
2322

2423
public class Constants {
2524

@@ -53,7 +52,7 @@ public class Constants {
5352
public static final String FIELDS = "fields";
5453
public static final String AGGREGATES = "aggregates";
5554
public static final String STATE = "state";
56-
public static final String SVMNAME = "svm.name";
55+
public static final String SVMDOTNAME = "svm.name";
5756
public static final String DATA_NFS = "data_nfs";
5857
public static final String DATA_ISCSI = "data_iscsi";
5958
public static final String IP_ADDRESS = "ip.address";

0 commit comments

Comments
 (0)