diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/OntapStorage.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/OntapStorage.java index 8b450331b50a..a42cd02912b3 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/OntapStorage.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/OntapStorage.java @@ -24,20 +24,18 @@ public class OntapStorage { private final String username; private final String password; - private final String managementLIF; + private final String storageIP; private final String svmName; private final Long size; private final ProtocolType protocolType; - private final Boolean isDisaggregated; - public OntapStorage(String username, String password, String managementLIF, String svmName, Long size, ProtocolType protocolType, Boolean isDisaggregated) { + public OntapStorage(String username, String password, String storageIP, String svmName, Long size, ProtocolType protocolType) { this.username = username; this.password = password; - this.managementLIF = managementLIF; + this.storageIP = storageIP; this.svmName = svmName; this.size = size; this.protocolType = protocolType; - this.isDisaggregated = isDisaggregated; } public String getUsername() { @@ -48,13 +46,9 @@ public String getPassword() { return password; } - public String getManagementLIF() { - return managementLIF; - } + public String getStorageIP() { return storageIP; } - public String getSvmName() { - return svmName; - } + public String getSvmName() { return svmName; } public Long getSize() { return size; @@ -63,8 +57,4 @@ public Long getSize() { public ProtocolType getProtocol() { return protocolType; } - - public Boolean getIsDisaggregated() { - return isDisaggregated; - } } diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java index a7df490b9b95..75d36ec431b8 100755 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java @@ -88,7 +88,6 @@ public DataStore initialize(Map dsInfos) { if (dsInfos == null) { throw new CloudRuntimeException("Datastore info map is null, cannot create primary storage"); } - String url = (String) dsInfos.get("url"); Long zoneId = (Long) dsInfos.get("zoneId"); Long podId = (Long) dsInfos.get("podId"); Long clusterId = (Long) dsInfos.get("clusterId"); @@ -152,39 +151,20 @@ public DataStore initialize(Map dsInfos) { throw new CloudRuntimeException("ONTAP primary storage must be managed"); } + //Required ONTAP detail keys Set requiredKeys = Set.of( Constants.USERNAME, Constants.PASSWORD, Constants.SVM_NAME, Constants.PROTOCOL, - Constants.MANAGEMENT_LIF + Constants.STORAGE_IP ); - Set optionalKeys = Set.of( - Constants.IS_DISAGGREGATED - ); - - Set allowedKeys = new java.util.HashSet<>(requiredKeys); - allowedKeys.addAll(optionalKeys); - - // Parse key=value pairs from URL into details (skip empty segments) - if (url != null && !url.isEmpty()) { - for (String segment : url.split(Constants.SEMICOLON)) { - if (segment.isEmpty()) { - continue; - } - String[] kv = segment.split(Constants.EQUALS, 2); - if (kv.length == 2) { - details.put(kv[0].trim(), kv[1].trim()); - } - } - } - // Validate existing entries (reject unexpected keys, empty values) for (Map.Entry e : details.entrySet()) { String key = e.getKey(); String val = e.getValue(); - if (!allowedKeys.contains(key)) { + if (!requiredKeys.contains(key)) { throw new CloudRuntimeException("Unexpected ONTAP detail key in URL: " + key); } if (val == null || val.isEmpty()) { @@ -202,9 +182,6 @@ public DataStore initialize(Map dsInfos) { details.put(Constants.SIZE, capacityBytes.toString()); - // Default for IS_DISAGGREGATED if needed - details.putIfAbsent(Constants.IS_DISAGGREGATED, "false"); - ProtocolType protocol = ProtocolType.valueOf(details.get(Constants.PROTOCOL)); // Connect to ONTAP and create volume @@ -212,11 +189,10 @@ public DataStore initialize(Map dsInfos) { OntapStorage ontapStorage = new OntapStorage( details.get(Constants.USERNAME), details.get(Constants.PASSWORD), - details.get(Constants.MANAGEMENT_LIF), + details.get(Constants.STORAGE_IP), details.get(Constants.SVM_NAME), volumeSize, - protocol, - Boolean.parseBoolean(details.get(Constants.IS_DISAGGREGATED).toLowerCase())); + protocol); StorageStrategy storageStrategy = StorageProviderFactory.getStrategy(ontapStorage); boolean isValid = storageStrategy.connect(); diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderFactory.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderFactory.java index 5947212efd96..bdd1665938d6 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderFactory.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderFactory.java @@ -38,21 +38,15 @@ public static StorageStrategy getStrategy(OntapStorage ontapStorage) { s_logger.info("Initializing StorageProviderFactory with protocol: " + protocol); switch (protocol) { case NFS3: - if (!ontapStorage.getIsDisaggregated()) { - UnifiedNASStrategy unifiedNASStrategy = new UnifiedNASStrategy(ontapStorage); - ComponentContext.inject(unifiedNASStrategy); - unifiedNASStrategy.setOntapStorage(ontapStorage); - return unifiedNASStrategy; - } - throw new CloudRuntimeException("Unsupported configuration: Disaggregated ONTAP is not supported."); + UnifiedNASStrategy unifiedNASStrategy = new UnifiedNASStrategy(ontapStorage); + ComponentContext.inject(unifiedNASStrategy); + unifiedNASStrategy.setOntapStorage(ontapStorage); + return unifiedNASStrategy; case ISCSI: - if (!ontapStorage.getIsDisaggregated()) { - UnifiedSANStrategy unifiedSANStrategy = new UnifiedSANStrategy(ontapStorage); - ComponentContext.inject(unifiedSANStrategy); - unifiedSANStrategy.setOntapStorage(ontapStorage); - return unifiedSANStrategy; - } - throw new CloudRuntimeException("Unsupported configuration: Disaggregated ONTAP is not supported."); + UnifiedSANStrategy unifiedSANStrategy = new UnifiedSANStrategy(ontapStorage); + ComponentContext.inject(unifiedSANStrategy); + unifiedSANStrategy.setOntapStorage(ontapStorage); + return unifiedSANStrategy; default: throw new CloudRuntimeException("Unsupported protocol: " + protocol); } diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java index fb26f37a7bd6..d9f98dcf7cb1 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java @@ -79,7 +79,7 @@ public abstract class StorageStrategy { public StorageStrategy(OntapStorage ontapStorage) { storage = ontapStorage; - String baseURL = Constants.HTTPS + storage.getManagementLIF(); + String baseURL = Constants.HTTPS + storage.getStorageIP(); s_logger.info("Initializing StorageStrategy with base URL: " + baseURL); // Initialize FeignClientFactory and create clients this.feignClientFactory = new FeignClientFactory(); @@ -93,7 +93,7 @@ public StorageStrategy(OntapStorage ontapStorage) { // Connect method to validate ONTAP cluster, credentials, protocol, and SVM public boolean connect() { - s_logger.info("Attempting to connect to ONTAP cluster at " + storage.getManagementLIF() + " and validate SVM " + + s_logger.info("Attempting to connect to ONTAP cluster at " + storage.getStorageIP() + " and validate SVM " + storage.getSvmName() + ", protocol " + storage.getProtocol()); //Get AuthHeader String authHeader = Utility.generateAuthHeader(storage.getUsername(), storage.getPassword()); diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java index b5fe354896cb..4d3355cd748b 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java @@ -72,7 +72,7 @@ public class UnifiedNASStrategy extends NASStrategy { public UnifiedNASStrategy(OntapStorage ontapStorage) { super(ontapStorage); - String baseURL = Constants.HTTPS + ontapStorage.getManagementLIF(); + String baseURL = Constants.HTTPS + ontapStorage.getStorageIP(); this.feignClientFactory = new FeignClientFactory(); this.nasFeignClient = feignClientFactory.createClient(NASFeignClient.class, baseURL); this.volumeFeignClient = feignClientFactory.createClient(VolumeFeignClient.class,baseURL ); diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java index b3deee4daacf..c42e5cb6f516 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java @@ -54,7 +54,7 @@ public class UnifiedSANStrategy extends SANStrategy { public UnifiedSANStrategy(OntapStorage ontapStorage) { super(ontapStorage); - String baseURL = Constants.HTTPS + ontapStorage.getManagementLIF(); + String baseURL = Constants.HTTPS + ontapStorage.getStorageIP(); // Initialize FeignClientFactory and create SAN client this.feignClientFactory = new FeignClientFactory(); this.sanFeignClient = feignClientFactory.createClient(SANFeignClient.class, baseURL); diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Constants.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Constants.java index 920bd45fd0d7..5e8729ad1917 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Constants.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Constants.java @@ -22,7 +22,7 @@ public class Constants { - public static final String ONTAP_PLUGIN_NAME = "ONTAP"; + public static final String ONTAP_PLUGIN_NAME = "NetApp ONTAP"; public static final int NFS3_PORT = 2049; public static final int ISCSI_PORT = 3260; @@ -34,7 +34,7 @@ public class Constants { public static final String USERNAME = "username"; public static final String PASSWORD = "password"; public static final String DATA_LIF = "dataLIF"; - public static final String MANAGEMENT_LIF = "managementLIF"; + public static final String STORAGE_IP = "storageIP"; public static final String VOLUME_NAME = "volumeName"; public static final String VOLUME_UUID = "volumeUUID"; public static final String EXPORT_POLICY_ID = "exportPolicyId"; diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Utility.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Utility.java index 2f805c1784d6..c8f3b924ae22 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Utility.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/Utility.java @@ -126,9 +126,8 @@ public static StorageStrategy getStrategyByStoragePoolDetails(Map dsInfos = new HashMap<>(); - dsInfos.put("username", "testUser"); - dsInfos.put("password", "testPassword"); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); - dsInfos.put("zoneId",1L); - dsInfos.put("podId",1L); - dsInfos.put("clusterId", 1L); - dsInfos.put("name", "testStoragePool"); - dsInfos.put("providerName", "testProvider"); - dsInfos.put("capacityBytes",200000L); - dsInfos.put("managed",true); - dsInfos.put("tags", "testTag"); - dsInfos.put("isTagARule", false); - dsInfos.put("details", new HashMap()); - - try(MockedStatic storageProviderFactory = Mockito.mockStatic(StorageProviderFactory.class)) { - storageProviderFactory.when(() -> StorageProviderFactory.getStrategy(any())).thenReturn(storageStrategy); - ontapPrimaryDatastoreLifecycle.initialize(dsInfos); - } - } - - @Test - public void testInitialize_positiveWithIsDisaggregated() { + HashMap detailsMap = new HashMap(); + detailsMap.put(Constants.USERNAME, "testUser"); + detailsMap.put(Constants.PASSWORD, "testPassword"); + detailsMap.put(Constants.STORAGE_IP, "10.10.10.10"); + detailsMap.put(Constants.SVM_NAME, "vs0"); + detailsMap.put(Constants.PROTOCOL, "NFS3"); Map dsInfos = new HashMap<>(); - dsInfos.put("username", "testUser"); - dsInfos.put("password", "testPassword"); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1;isDisaggregated=false"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -195,7 +175,7 @@ public void testInitialize_positiveWithIsDisaggregated() { dsInfos.put("managed",true); dsInfos.put("tags", "testTag"); dsInfos.put("isTagARule", false); - dsInfos.put("details", new HashMap()); + dsInfos.put("details", detailsMap); try(MockedStatic storageProviderFactory = Mockito.mockStatic(StorageProviderFactory.class)) { storageProviderFactory.when(() -> StorageProviderFactory.getStrategy(any())).thenReturn(storageStrategy); @@ -212,8 +192,14 @@ public void testInitialize_null_Arg() { @Test public void testInitialize_missingRequiredDetailKey() { + + HashMap detailsMap = new HashMap(); + detailsMap.put(Constants.USERNAME, "testUser"); + detailsMap.put(Constants.PASSWORD, "testPassword"); + detailsMap.put(Constants.STORAGE_IP, "10.10.10.10"); + detailsMap.put(Constants.SVM_NAME, "vs0"); + Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -223,7 +209,7 @@ public void testInitialize_missingRequiredDetailKey() { dsInfos.put("managed",true); dsInfos.put("tags", "testTag"); dsInfos.put("isTagARule", false); - dsInfos.put("details", new HashMap()); + dsInfos.put("details", detailsMap); try (MockedStatic storageProviderFactory = Mockito.mockStatic(StorageProviderFactory.class)) { storageProviderFactory.when(() -> StorageProviderFactory.getStrategy(any())).thenReturn(storageStrategy); @@ -234,8 +220,15 @@ public void testInitialize_missingRequiredDetailKey() { @Test public void testInitialize_invalidCapacityBytes() { + + HashMap detailsMap = new HashMap(); + detailsMap.put(Constants.USERNAME, "testUser"); + detailsMap.put(Constants.PASSWORD, "testPassword"); + detailsMap.put(Constants.STORAGE_IP, "10.10.10.10"); + detailsMap.put(Constants.SVM_NAME, "vs0"); + detailsMap.put(Constants.PROTOCOL, "NFS3"); + Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -245,7 +238,7 @@ public void testInitialize_invalidCapacityBytes() { dsInfos.put("managed",true); dsInfos.put("tags", "testTag"); dsInfos.put("isTagARule", false); - dsInfos.put("details", new HashMap()); + dsInfos.put("details", detailsMap); try (MockedStatic storageProviderFactory = Mockito.mockStatic(StorageProviderFactory.class)) { storageProviderFactory.when(() -> StorageProviderFactory.getStrategy(any())).thenReturn(storageStrategy); @@ -256,7 +249,6 @@ public void testInitialize_invalidCapacityBytes() { @Test public void testInitialize_unmanagedStorage() { Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -280,7 +272,6 @@ public void testInitialize_unmanagedStorage() { @Test public void testInitialize_nullStoragePoolName() { Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -304,7 +295,6 @@ public void testInitialize_nullStoragePoolName() { @Test public void testInitialize_nullProviderName() { Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -328,7 +318,6 @@ public void testInitialize_nullProviderName() { @Test public void testInitialize_nullPodAndClusterAndZone() { Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); dsInfos.put("zoneId",null); dsInfos.put("podId",null); dsInfos.put("clusterId", null); @@ -356,7 +345,6 @@ public void testInitialize_clusterNotKVM() { when(_clusterDao.findById(2L)).thenReturn(clusterVO); Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 2L); @@ -379,8 +367,16 @@ public void testInitialize_clusterNotKVM() { @Test public void testInitialize_unexpectedDetailKey() { + + HashMap detailsMap = new HashMap(); + detailsMap.put(Constants.USERNAME, "testUser"); + detailsMap.put(Constants.PASSWORD, "testPassword"); + detailsMap.put(Constants.STORAGE_IP, "10.10.10.10"); + detailsMap.put(Constants.SVM_NAME, "vs0"); + detailsMap.put(Constants.PROTOCOL, "NFS3"); + detailsMap.put("unexpectedKey", "unexpectedValue"); + Map dsInfos = new HashMap<>(); - dsInfos.put("url", "username=testUser;password=testPassword;svmName=testSVM;protocol=NFS3;managementLIF=192.168.1.1;unexpectedKey=unexpectedValue"); dsInfos.put("zoneId",1L); dsInfos.put("podId",1L); dsInfos.put("clusterId", 1L); @@ -390,7 +386,7 @@ public void testInitialize_unexpectedDetailKey() { dsInfos.put("managed",true); dsInfos.put("tags", "testTag"); dsInfos.put("isTagARule", false); - dsInfos.put("details", new HashMap()); + dsInfos.put("details", detailsMap); Exception ex = assertThrows(CloudRuntimeException.class, () -> { try (MockedStatic storageProviderFactory = Mockito.mockStatic(StorageProviderFactory.class)) { diff --git a/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/StorageStrategyTest.java b/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/StorageStrategyTest.java index 2df4fe09ae5e..467c01b2c995 100644 --- a/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/StorageStrategyTest.java +++ b/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/StorageStrategyTest.java @@ -187,7 +187,7 @@ public Map getLogicalAccess(Map values) { void setUp() { // Create OntapStorage using constructor (immutable object) OntapStorage ontapStorage = new OntapStorage("admin", "password", "192.168.1.100", - "svm1", null, ProtocolType.NFS3, false); + "svm1", null, ProtocolType.NFS3); // Note: In real implementation, StorageStrategy constructor creates Feign clients // For testing, we'll need to mock the FeignClientFactory behavior @@ -290,7 +290,7 @@ public void testConnect_iscsiNotEnabled() { // Note: Protocol validation is currently broken in StorageStrategy (enum vs string comparison) // so this test verifies connection succeeds even when iSCSI is disabled OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100", - "svm1", null, ProtocolType.ISCSI, false); + "svm1", null, ProtocolType.ISCSI); storageStrategy = new TestableStorageStrategy(iscsiStorage, aggregateFeignClient, volumeFeignClient, svmFeignClient, jobFeignClient, networkFeignClient, sanFeignClient); @@ -611,7 +611,7 @@ public void testDeleteStorageVolume_feignException() { public void testGetStoragePath_iscsi() { // Setup - recreate with iSCSI protocol OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100", - "svm1", null, ProtocolType.ISCSI, false); + "svm1", null, ProtocolType.ISCSI); storageStrategy = new TestableStorageStrategy(iscsiStorage, aggregateFeignClient, volumeFeignClient, svmFeignClient, jobFeignClient, networkFeignClient, sanFeignClient); @@ -641,7 +641,7 @@ public void testGetStoragePath_iscsi() { public void testGetStoragePath_iscsi_noService() { // Setup - recreate with iSCSI protocol OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100", - "svm1", null, ProtocolType.ISCSI, false); + "svm1", null, ProtocolType.ISCSI); storageStrategy = new TestableStorageStrategy(iscsiStorage, aggregateFeignClient, volumeFeignClient, svmFeignClient, jobFeignClient, networkFeignClient, sanFeignClient); @@ -662,7 +662,7 @@ public void testGetStoragePath_iscsi_noService() { public void testGetStoragePath_iscsi_noTargetIqn() { // Setup - recreate with iSCSI protocol OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100", - "svm1", null, ProtocolType.ISCSI, false); + "svm1", null, ProtocolType.ISCSI); storageStrategy = new TestableStorageStrategy(iscsiStorage, aggregateFeignClient, volumeFeignClient, svmFeignClient, jobFeignClient, networkFeignClient, sanFeignClient); @@ -712,7 +712,7 @@ public void testGetNetworkInterface_nfs() { public void testGetNetworkInterface_iscsi() { // Setup - recreate with iSCSI protocol OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100", - "svm1", null, ProtocolType.ISCSI, false); + "svm1", null, ProtocolType.ISCSI); storageStrategy = new TestableStorageStrategy(iscsiStorage, aggregateFeignClient, volumeFeignClient, svmFeignClient, jobFeignClient, networkFeignClient, sanFeignClient); diff --git a/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java b/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java index 1310ceafab7a..84ac72f3fb30 100644 --- a/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java +++ b/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java @@ -122,8 +122,7 @@ public void setUp() throws Exception { "192.168.1.100", "svm1", 100L, - ProtocolType.NFS3, - false + ProtocolType.NFS3 ); strategy = new TestableUnifiedNASStrategy(ontapStorage, nasFeignClient, volumeFeignClient, jobFeignClient, aggregateFeignClient, svmFeignClient, networkFeignClient, sanFeignClient); injectField("volumeDao", volumeDao); diff --git a/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedSANStrategyTest.java b/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedSANStrategyTest.java index f74ac7dd72f6..29971af8f453 100644 --- a/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedSANStrategyTest.java +++ b/plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedSANStrategyTest.java @@ -89,7 +89,7 @@ class UnifiedSANStrategyTest { @BeforeEach void setUp() { - lenient().when(ontapStorage.getManagementLIF()).thenReturn("192.168.1.100"); + lenient().when(ontapStorage.getStorageIP()).thenReturn("192.168.1.100"); lenient().when(ontapStorage.getUsername()).thenReturn("admin"); lenient().when(ontapStorage.getPassword()).thenReturn("password"); lenient().when(ontapStorage.getSvmName()).thenReturn("svm1"); diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 20546991acfa..98737427c687 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -2921,6 +2921,12 @@ "label.leased": "Leased", "label.totalduration": "Total duration", "label.usestoragereplication": "Use primary storage replication", +"label.ontap.username.tooltip": "The Username for the NetApp ONTAP storage array", +"label.ontap.password.tooltip": "The Password for the NetApp ONTAP storage array", +"label.ontap.ip.tooltip": "The IP for the NetApp ONTAP storage array", +"label.ontap.svm.name.tooltip": "The SVM Name for the NetApp ONTAP storage array", +"label.ontap.ip": "Storage Array IP", +"label.ontap.svm.name": "SVM Name", "message.acquire.ip.failed": "Failed to acquire IP.", "message.action.acquire.ip": "Please confirm that you want to acquire new IP.", "message.action.cancel.maintenance": "Your host has been successfully canceled for maintenance. This process can take up to several minutes.", diff --git a/ui/src/views/infra/AddPrimaryStorage.vue b/ui/src/views/infra/AddPrimaryStorage.vue index d46396bbb3a5..06c7ccaa39f6 100644 --- a/ui/src/views/infra/AddPrimaryStorage.vue +++ b/ui/src/views/infra/AddPrimaryStorage.vue @@ -242,7 +242,7 @@ -
+