diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/SvmFeignClient.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/SvmFeignClient.java index 753595713c25..c0091c8733e9 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/SvmFeignClient.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/SvmFeignClient.java @@ -26,10 +26,7 @@ import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; - import java.net.URI; -import java.util.Map; @FeignClient(name = "SvmClient", url = "https://{clusterIP}/api/svm/svms", configuration = FeignConfiguration.class) public interface SvmFeignClient { 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 af986e5fdc39..017dfff23d27 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 @@ -19,70 +19,71 @@ package org.apache.cloudstack.storage.feign.model; -import org.apache.cloudstack.storage.utils.Constants.ProtocolType; + +import org.apache.cloudstack.storage.service.model.ProtocolType; public class OntapStorage { - public static String _username; - public static String _password; - public static String _managementLIF; - public static String _svmName; - public static ProtocolType _protocolType; - public static Boolean _isDisaggregated; + private String username; + private String password; + private String managementLIF; + private String svmName; + private ProtocolType protocolType; + private Boolean isDisaggregated; public OntapStorage(String username, String password, String managementLIF, String svmName, ProtocolType protocolType, Boolean isDisaggregated) { - _username = username; - _password = password; - _managementLIF = managementLIF; - _svmName = svmName; - _protocolType = protocolType; - _isDisaggregated = isDisaggregated; + this.username = username; + this.password = password; + this.managementLIF = managementLIF; + this.svmName = svmName; + this.protocolType = protocolType; + this.isDisaggregated = isDisaggregated; } public String getUsername() { - return _username; + return username; } public void setUsername(String username) { - _username = username; + username = username; } public String getPassword() { - return _password; + return password; } public void setPassword(String password) { - _password = password; + password = password; } public String getManagementLIF() { - return _managementLIF; + return managementLIF; } public void setManagementLIF(String managementLIF) { - _managementLIF = managementLIF; + managementLIF = managementLIF; } public String getSvmName() { - return _svmName; + return svmName; } public void setSvmName(String svmName) { - _svmName = svmName; + svmName = svmName; } public ProtocolType getProtocol() { - return _protocolType; + return protocolType; } public void setProtocol(ProtocolType protocolType) { - _protocolType = protocolType; + protocolType = protocolType; } public Boolean getIsDisaggregated() { - return _isDisaggregated; + return isDisaggregated; } public void setIsDisaggregated(Boolean isDisaggregated) { - _isDisaggregated = isDisaggregated; + isDisaggregated = isDisaggregated; } } diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/response/OntapResponse.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/response/OntapResponse.java index 87af68fe378e..1a77991f435b 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/response/OntapResponse.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/response/OntapResponse.java @@ -59,4 +59,4 @@ public void setRecords(List records) { this.records = records; this.numRecords = (records != null) ? records.size() : 0; } -} \ No newline at end of file +} 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 722ed1e8c707..1538cebfd373 100644 --- 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 @@ -42,8 +42,8 @@ import org.apache.cloudstack.storage.feign.model.OntapStorage; import org.apache.cloudstack.storage.provider.StorageProviderFactory; import org.apache.cloudstack.storage.service.StorageStrategy; +import org.apache.cloudstack.storage.service.model.ProtocolType; import org.apache.cloudstack.storage.utils.Constants; -import org.apache.cloudstack.storage.utils.Constants.ProtocolType; import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -145,7 +145,7 @@ public DataStore initialize(Map dsInfos) { boolean isValid = storageStrategy.connect(); if (isValid) { // String volumeName = storagePoolName + "_vol"; //TODO: Figure out a better naming convention - storageStrategy.createVolume(storagePoolName, Long.parseLong((details.get("size")))); // TODO: size should be in bytes, so see if conversion is needed + storageStrategy.createStorageVolume(storagePoolName, Long.parseLong((details.get("size")))); // TODO: size should be in bytes, so see if conversion is needed } else { throw new CloudRuntimeException("ONTAP details validation failed, cannot create primary storage"); } 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 1bc6f51798ba..f5b1b25aa2cc 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 @@ -24,8 +24,7 @@ import org.apache.cloudstack.storage.service.StorageStrategy; import org.apache.cloudstack.storage.service.UnifiedNASStrategy; import org.apache.cloudstack.storage.service.UnifiedSANStrategy; -import org.apache.cloudstack.storage.utils.Constants; -import org.apache.cloudstack.storage.utils.Constants.ProtocolType; +import org.apache.cloudstack.storage.service.model.ProtocolType; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.stereotype.Component; @@ -33,7 +32,7 @@ @Component public class StorageProviderFactory { private final StorageStrategy storageStrategy; - private static final Logger s_logger = (Logger) LogManager.getLogger(StorageProviderFactory.class); + private static final Logger s_logger = LogManager.getLogger(StorageProviderFactory.class); private StorageProviderFactory(OntapStorage ontapStorage) { ProtocolType protocol = ontapStorage.getProtocol(); diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/NASStrategy.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/NASStrategy.java index 4e03daae4b4a..27a4f3d2ce7d 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/NASStrategy.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/NASStrategy.java @@ -26,9 +26,4 @@ public NASStrategy(OntapStorage ontapStorage) { super(ontapStorage); } - public abstract String createExportPolicy(String svmName, String policyName); - public abstract String addExportRule(String policyName, String clientMatch, String[] protocols, String[] roRule, String[] rwRule); - public abstract String assignExportPolicyToVolume(String volumeUuid, String policyName); - public abstract String enableNFS(String svmUuid); } - diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/SANStrategy.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/SANStrategy.java index 4e6846ef7610..ce3b2806ef75 100644 --- a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/SANStrategy.java +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/SANStrategy.java @@ -26,8 +26,4 @@ public SANStrategy(OntapStorage ontapStorage) { super(ontapStorage); } - public abstract String createLUN(String svmName, String volumeName, String lunName, long sizeBytes, String osType); - public abstract String createIgroup(String svmName, String igroupName, String[] initiators); - public abstract String mapLUNToIgroup(String lunName, String igroupName); - public abstract String enableISCSI(String svmUuid); } 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 c608f039b381..dde5ab5b7a44 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 @@ -31,6 +31,8 @@ import org.apache.cloudstack.storage.feign.model.Volume; import org.apache.cloudstack.storage.feign.model.response.JobResponse; import org.apache.cloudstack.storage.feign.model.response.OntapResponse; +import org.apache.cloudstack.storage.service.model.AccessGroup; +import org.apache.cloudstack.storage.service.model.CloudStackVolume; import org.apache.cloudstack.storage.utils.Constants; import org.apache.cloudstack.storage.utils.Utility; import org.apache.logging.log4j.LogManager; @@ -42,6 +44,13 @@ import java.util.List; import java.util.Objects; +/** + * Storage Strategy represents the communication path for all the ONTAP storage options + * + * ONTAP storage operation would vary based on + * Supported protocols: NFS3.0, NFS4.1, FC, iSCSI, Nvme/TCP and Nvme/FC + * Supported platform: Unified and Disaggregated + */ public abstract class StorageStrategy { @Inject private Utility utils; @@ -57,12 +66,16 @@ public abstract class StorageStrategy { private final OntapStorage storage; + /** + * Presents aggregate object for the unified storage, not eligible for disaggregated + */ private List aggregates; private static final Logger s_logger = (Logger) LogManager.getLogger(StorageStrategy.class); public StorageStrategy(OntapStorage ontapStorage) { storage = ontapStorage; + } // Connect method to validate ONTAP cluster, credentials, protocol, and SVM @@ -108,7 +121,16 @@ public boolean connect() { } // Common methods like create/delete etc., should be here - public void createVolume(String volumeName, Long size) { + + /** + * Creates ONTAP Flex-Volume + * Eligible only for Unified ONTAP storage + * throw exception in case of disaggregated ONTAP storage + * + * @param volumeName + * @param size + */ + public Volume createStorageVolume(String volumeName, Long size) { s_logger.info("Creating volume: " + volumeName + " of size: " + size + " bytes"); String svmName = storage.getSvmName(); @@ -168,5 +190,138 @@ public void createVolume(String volumeName, Long size) { throw new CloudRuntimeException("Failed to create volume: " + e.getMessage()); } s_logger.info("Volume created successfully: " + volumeName); + //TODO + return null; + } + + /** + * Updates ONTAP Flex-Volume + * Eligible only for Unified ONTAP storage + * throw exception in case of disaggregated ONTAP storage + * + * @param values + */ + public Volume updateStorageVolume(Volume volume) + { + //TODO + return null; } + + /** + * Delete ONTAP Flex-Volume + * Eligible only for Unified ONTAP storage + * throw exception in case of disaggregated ONTAP storage + * + * @param values + */ + public void deleteStorageVolume(Volume volume) + { + //TODO + } + + /** + * Updates ONTAP Flex-Volume + * Eligible only for Unified ONTAP storage + * throw exception in case of disaggregated ONTAP storage + * + * @param values + */ + public Volume getStorageVolume(Volume volume) + { + //TODO + return null; + } + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses. + * it is going to mimic + * createLun for iSCSI, FC protocols + * createFile for NFS3.0 and NFS4.1 protocols + * createNameSpace for Nvme/TCP and Nvme/FC protocol + * @param values + */ + abstract public CloudStackVolume createCloudStackVolume(CloudStackVolume cloudstackVolume); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses. + * it is going to mimic + * updateLun for iSCSI, FC protocols + * updateFile for NFS3.0 and NFS4.1 protocols + * updateNameSpace for Nvme/TCP and Nvme/FC protocol + * @param values + */ + abstract CloudStackVolume updateCloudStackVolume(CloudStackVolume cloudstackVolume); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses. + * it is going to mimic + * deleteLun for iSCSI, FC protocols + * deleteFile for NFS3.0 and NFS4.1 protocols + * deleteNameSpace for Nvme/TCP and Nvme/FC protocol + * @param values + */ + abstract void deleteCloudStackVolume(CloudStackVolume cloudstackVolume); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses. + * it is going to mimic + * getLun for iSCSI, FC protocols + * getFile for NFS3.0 and NFS4.1 protocols + * getNameSpace for Nvme/TCP and Nvme/FC protocol + * @param values + */ + abstract CloudStackVolume getCloudStackVolume(CloudStackVolume cloudstackVolume); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses + * createiGroup for iSCSI and FC protocols + * createExportPolicy for NFS 3.0 and NFS 4.1 protocols + * createSubsystem for Nvme/TCP and Nvme/FC protocols + * @param values + */ + abstract AccessGroup createAccessGroup(AccessGroup accessGroup); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses + * deleteiGroup for iSCSI and FC protocols + * deleteExportPolicy for NFS 3.0 and NFS 4.1 protocols + * deleteSubsystem for Nvme/TCP and Nvme/FC protocols + * @param values + */ + abstract void deleteAccessGroup(AccessGroup accessGroup); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses + * updateiGroup example add/remove-Iqn for iSCSI and FC protocols + * updateExportPolicy example add/remove-Rule for NFS 3.0 and NFS 4.1 protocols + * //TODO for Nvme/TCP and Nvme/FC protocols + * @param values + */ + abstract AccessGroup updateAccessGroup(AccessGroup accessGroup); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses + * getiGroup for iSCSI and FC protocols + * getExportPolicy for NFS 3.0 and NFS 4.1 protocols + * getNameSpace for Nvme/TCP and Nvme/FC protocols + * @param values + */ + abstract AccessGroup getAccessGroup(AccessGroup accessGroup); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses + * lunMap for iSCSI and FC protocols + * //TODO for Nvme/TCP and Nvme/FC protocols + * @param values + */ + abstract void enableLogicalAccess(Map values); + + /** + * Method encapsulates the behavior based on the opted protocol in subclasses + * lunUnmap for iSCSI and FC protocols + * //TODO for Nvme/TCP and Nvme/FC protocols + * @param values + */ + abstract void disableLogicalAccess(Map values); + } 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 6c9a8735c4c1..865a5925168f 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 @@ -20,6 +20,10 @@ package org.apache.cloudstack.storage.service; import org.apache.cloudstack.storage.feign.model.OntapStorage; +import org.apache.cloudstack.storage.service.model.AccessGroup; +import org.apache.cloudstack.storage.service.model.CloudStackVolume; + +import java.util.Map; public class UnifiedNASStrategy extends NASStrategy{ public UnifiedNASStrategy(OntapStorage ontapStorage) { @@ -27,22 +31,59 @@ public UnifiedNASStrategy(OntapStorage ontapStorage) { } @Override - public String createExportPolicy(String svmName, String policyName) { - return ""; + public CloudStackVolume createCloudStackVolume(CloudStackVolume cloudstackVolume) { + //TODO + return null; + } + + @Override + public CloudStackVolume updateCloudStackVolume(CloudStackVolume cloudstackVolume) { + //TODO + return null; + } + + @Override + public void deleteCloudStackVolume(CloudStackVolume cloudstackVolume) { + + } + + @Override + public CloudStackVolume getCloudStackVolume(CloudStackVolume cloudstackVolume) { + //TODO + return null; + } + + @Override + public AccessGroup createAccessGroup(AccessGroup accessGroup) { + //TODO + return null; + } + + @Override + public void deleteAccessGroup(AccessGroup accessGroup) { + + } + + @Override + public AccessGroup updateAccessGroup(AccessGroup accessGroup) { + //TODO + return null; } @Override - public String addExportRule(String policyName, String clientMatch, String[] protocols, String[] roRule, String[] rwRule) { - return ""; + public AccessGroup getAccessGroup(AccessGroup accessGroup) { + //TODO + return null; } @Override - public String assignExportPolicyToVolume(String volumeUuid, String policyName) { - return ""; + void enableLogicalAccess(Map values) { + } @Override - public String enableNFS(String svmUuid) { - return ""; + void disableLogicalAccess(Map values) { + } + } 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 e954ec312006..7b654d8d0e98 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 @@ -20,6 +20,10 @@ package org.apache.cloudstack.storage.service; import org.apache.cloudstack.storage.feign.model.OntapStorage; +import org.apache.cloudstack.storage.service.model.AccessGroup; +import org.apache.cloudstack.storage.service.model.CloudStackVolume; + +import java.util.Map; public class UnifiedSANStrategy extends SANStrategy{ public UnifiedSANStrategy(OntapStorage ontapStorage) { @@ -27,22 +31,59 @@ public UnifiedSANStrategy(OntapStorage ontapStorage) { } @Override - public String createLUN(String svmName, String volumeName, String lunName, long sizeBytes, String osType) { - return ""; + public CloudStackVolume createCloudStackVolume(CloudStackVolume cloudstackVolume) { + //TODO + return null; + } + + @Override + CloudStackVolume updateCloudStackVolume(CloudStackVolume cloudstackVolume) { + //TODO + return null; + } + + @Override + void deleteCloudStackVolume(CloudStackVolume cloudstackVolume) { + + } + + @Override + CloudStackVolume getCloudStackVolume(CloudStackVolume cloudstackVolume) { + //TODO + return null; + } + + @Override + public AccessGroup createAccessGroup(AccessGroup accessGroup) { + //TODO + return null; + } + + @Override + public void deleteAccessGroup(AccessGroup accessGroup) { + + } + + @Override + public AccessGroup updateAccessGroup(AccessGroup accessGroup) { + //TODO + return null; } @Override - public String createIgroup(String svmName, String igroupName, String[] initiators) { - return ""; + public AccessGroup getAccessGroup(AccessGroup accessGroup) { + //TODO + return null; } @Override - public String mapLUNToIgroup(String lunName, String igroupName) { - return ""; + void enableLogicalAccess(Map values) { + } @Override - public String enableISCSI(String svmUuid) { - return ""; + void disableLogicalAccess(Map values) { + } + } diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/AccessGroup.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/AccessGroup.java new file mode 100644 index 000000000000..c4dfce7ce51c --- /dev/null +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/AccessGroup.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cloudstack.storage.service.model; + +import org.apache.cloudstack.storage.feign.model.ExportPolicy; +import org.apache.cloudstack.storage.feign.model.Igroup; + +public class AccessGroup { + + private Igroup igroup; + private ExportPolicy exportPolicy; + + public Igroup getIgroup() { + return igroup; + } + + public void setIgroup(Igroup igroup) { + this.igroup = igroup; + } + + public ExportPolicy getPolicy() { + return exportPolicy; + } + + public void setPolicy(ExportPolicy policy) { + this.exportPolicy = policy; + } +} diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/CloudStackVolume.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/CloudStackVolume.java new file mode 100644 index 000000000000..a7f5d8659d03 --- /dev/null +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/CloudStackVolume.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cloudstack.storage.service.model; + +import org.apache.cloudstack.storage.feign.model.FileInfo; +import org.apache.cloudstack.storage.feign.model.Lun; + +public class CloudStackVolume { + + private FileInfo file; + private Lun lun; + + public FileInfo getFile() { + return file; + } + + public void setFile(FileInfo file) { + this.file = file; + } + + public Lun getLun() { + return lun; + } + + public void setLun(Lun lun) { + this.lun = lun; + } +} diff --git a/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/ProtocolType.java b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/ProtocolType.java new file mode 100644 index 000000000000..47b55ec29bb7 --- /dev/null +++ b/plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/ProtocolType.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cloudstack.storage.service.model; + +public enum ProtocolType { + NFS, + ISCSI +} 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 4fe55eb2e1fd..a5b1a45bbb74 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 @@ -20,10 +20,6 @@ package org.apache.cloudstack.storage.utils; public class Constants { - public enum ProtocolType { - NFS, - ISCSI - } public static final String NFS = "nfs"; public static final String ISCSI = "iscsi";