Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4236097590 Thank you!!! @DaanHoogland @sureshanaparti @winterhazel @weizhouapache @kiranchavala for helping us with this. Highly appreciate it! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4236077662 > @sandeeplocharla there are still some formatting suggestions by @sureshanaparti that were not addressed, but I'm already merging this one so that you can work on the subsequent PRs. Could you address these suggestions in them? I've addressed most of the formatting suggestions. The rest we'll plan in the next. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
winterhazel merged PR #12563: URL: https://github.com/apache/cloudstack/pull/12563 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
winterhazel commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4236057749 @sandeeplocharla there are still some formatting suggestions by @sureshanaparti that were not addressed, but I'm already merging this one so that you can work on the subsequent PRs. Could you address these suggestions in them? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4235407367 the smoke test error: 'Unable to migrate the VM s-2-VM (ID: 726c96ba-0e7a-4f61-bf9b-496c5e67c3c3) as it is not in Running state’ this seems a timing issue in the backend. @weizhouapache @winterhazel, do you guys feel comfortable merging this? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4235158813 [SF] Trillian test result (tid-15858) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 50756 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12563-t15858-kvm-ol8.zip Smoke tests completed. 150 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- ContextSuite context=TestClusterDRS>:setup | `Error` | 0.00 | test_cluster_drs.py -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4232232109 @sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4232227455 It seems some error during running this tests, and env is deleted. triggered tests again. cc @DaanHoogland @sandeeplocharla @blueorangutan test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4232201540 > Hi @DaanHoogland any idea on what happened with the tests triggered? No, but it is usually a sign that the lab is overloaded and may result in many false positives. Let's wait and see. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4231925704 Hi @DaanHoogland any idea on what happened with the tests triggered? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4230686738 > > Hi @DaanHoogland , any idea on how long would these tests take to complete? > > this one: [#12563 (comment)](https://github.com/apache/cloudstack/pull/12563#issuecomment-3922572495), with the results in [#12563 (comment)](https://github.com/apache/cloudstack/pull/12563#issuecomment-3927216457), seems to have taken about +- 18:12 Hi @DaanHoogland is there any dashboard or log somewhere to check what happened with these tests? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4224478527 > Hi @DaanHoogland , any idea on how long would these tests take to complete? this one: https://github.com/apache/cloudstack/pull/12563#issuecomment-3922572495, with the results in https://github.com/apache/cloudstack/pull/12563#issuecomment-3927216457, seems to have taken about +- 18:12 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4224294803 Hi @DaanHoogland , any idea on how long would these tests take to complete? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4221895553 @sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4221891459 @blueorangutan test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4221751098 Hi @DaanHoogland Can you please trigger the "test" ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4221484428 @blueorangutan test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4221171080 Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17438 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4220810776 @sandeeplocharla a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4220802088 @blueorangutan package -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4220151700 @sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4220136023 @blueorangutan test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4219958636 @blueorangutan test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4216441138 Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17428 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4216186965 @sandeeplocharla a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4216182543 @blueorangutan package -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039949774
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/Policy.java:
##
@@ -0,0 +1,60 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.util.Objects;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Policy {
+private int minThroughputIops;
Review Comment:
Not really necessary, as 'Policy' object's prime purpose is to be used in
another model object. We still created it separately as we might need it in the
near future.
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java:
##
@@ -0,0 +1,178 @@
+/*
+ * 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.driver;
+
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.agent.api.to.DataTO;
+import com.cloud.host.Host;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.Volume;
+import com.cloud.utils.Pair;
+import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import
org.apache.cloudstack.engine.subsystem.api.storage.DataStoreCapabilities;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class OntapPrimaryDatastoreDriver implements PrimaryDataStoreDriver {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreDriver.class);
Review Comment:
Sure, thank you!
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/FeignConfiguration.java:
##
@@ -0,0 +1,158 @@
+/*
+ * 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 expres
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3058183387
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags");
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4213315253 > > > Hi @DaanHoogland I'll be raising a diff addressing the comments by EOD. Maybe the final build run could be triggered tomorrow? Would that be alright? > > > > > > no problem, I’ll trigger as soon as I see packaging successfull. You can trigger that one yourself. > > "package" and "test" are the magic words to be used to trigger? if directed to @blueorangutan, yes ;) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4213245459 > Hi @DaanHoogland I'll be raising a diff addressing the comments by EOD. Maybe the final build run could be triggered tomorrow? Would that be alright? no problem, I’ll trigger as soon as I see packaging successfull. You can trigger that one yourself. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4213263230 > > Hi @DaanHoogland I'll be raising a diff addressing the comments by EOD. Maybe the final build run could be triggered tomorrow? Would that be alright? > > no problem, I’ll trigger as soon as I see packaging successfull. You can trigger that one yourself. "package" and "test" are the magic words to be used to trigger? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4213189978 Hi @DaanHoogland I'll be raising a diff addressing the comments by EOD. Maybe the final build run could be triggered tomorrow? Would that be alright? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4212757920 @sandeeplocharla , will you answer/apply the comments (if applicable) and we can do a final run. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4206556083 @sureshanaparti Thank you so much for taking time to review the PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050893129 ## plugins/storage/volume/ontap/README.md: ## @@ -0,0 +1,123 @@ + + +# Apache CloudStack - NetApp ONTAP Storage Plugin + +## Overview + +The NetApp ONTAP Storage Plugin provides integration between Apache CloudStack and NetApp ONTAP storage systems. This plugin enables CloudStack to provision and manage primary storage on ONTAP clusters, supporting both NAS (NFS) and SAN (iSCSI) protocols. + +## Features + +- **Primary Storage Support**: Provision and manage primary storage pools on NetApp ONTAP +- **Multiple Protocols**: Support for NFS 3.0 and iSCSI protocols +- **Unified Storage**: Integration with traditional ONTAP unified storage architecture +- **KVM Hypervisor Support**: Supports KVM hypervisor environments +- **Managed Storage**: Operates as managed storage with full lifecycle management +- **Flexible Scoping**: Support for Zone-wide and Cluster-scoped storage pools + +## Architecture + +### Component Structure + +| Package | Description | +|-|---| +| `driver` | Primary datastore driver implementation | +| `feign` | REST API clients and data models for ONTAP operations | +| `lifecycle` | Storage pool lifecycle management | +| `listener` | Host connection event handlers| +| `provider` | Main provider and strategy factory| +| `service` | ONTAP Storage strategy implementations (NAS/SAN) | +| `utils` | Constants and helper utilities| + +## Requirements + +### ONTAP Requirements + +- NetApp ONTAP 9.15.1 or higher +- Storage Virtual Machine (SVM) configured with appropriate protocols enabled +- Management LIF accessible from CloudStack management server +- Data LIF(s) accessible from hypervisor hosts and are of IPv4 type +- Aggregates assigned to the SVM with sufficient capacity + +### CloudStack Requirements + +- Apache CloudStack current version or higher +- KVM hypervisor hosts +- For iSCSI: Hosts must have iSCSI initiator configured with valid IQN +- For NFS: Hosts must have NFS client packages installed + +### Minimum Volume Size + +ONTAP requires a minimum volume size of **1.56 GB** (1,677,721,600 bytes). The plugin will automatically adjust requested sizes below this threshold. + +## Configuration + +### Storage Pool Creation Parameters + +When creating an ONTAP primary storage pool, provide the following details in the URL field (semicolon-separated key=value pairs): + +| Parameter | Required | Description | +|---|--|-| +| `username` | Yes | ONTAP cluster admin username | +| `password` | Yes | ONTAP cluster admin password | +| `svmName` | Yes | Storage Virtual Machine name | +| `protocol` | Yes | Storage protocol (`NFS3` or `ISCSI`) | +| `managementLIF` | Yes | ONTAP cluster management LIF IP address | Review Comment: @sandeeplocharla does the UI accepts these parameters during create storage pool with ONTAP? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050867515
##
plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycleTest.java:
##
@@ -0,0 +1,324 @@
+/*
+ * 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.lifecycle;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockedStatic;
+import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.mockito.junit.jupiter.MockitoSettings;
+import org.mockito.quality.Strictness;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.dc.ClusterVO;
+import java.util.Map;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.when;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import java.util.HashMap;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+
+
+@ExtendWith(MockitoExtension.class)
+@MockitoSettings(strictness = Strictness.LENIENT)
+public class OntapPrimaryDatastoreLifecycleTest {
+@InjectMocks
+private OntapPrimaryDatastoreLifecycle ontapPrimaryDatastoreLifecycle;
+
+@Mock
+private ClusterDao _clusterDao;
+
+@Mock
+private StorageStrategy storageStrategy;
+
+@Mock
+private PrimaryDataStoreHelper _dataStoreHelper;
+
+@BeforeEach
+void setUp() {
+
+ClusterVO clusterVO = new ClusterVO(1L, 1L, "clusterName");
+clusterVO.setHypervisorType("KVM");
+when(_clusterDao.findById(1L)).thenReturn(clusterVO);
+
+when(storageStrategy.connect()).thenReturn(true);
+
when(storageStrategy.getNetworkInterface()).thenReturn("testNetworkInterface");
+
+Volume volume = new Volume();
+volume.setUuid("test-volume-uuid");
+volume.setName("testVolume");
+when(storageStrategy.createStorageVolume(any(),
any())).thenReturn(volume);
+
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050863441
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageUtils.java:
##
@@ -0,0 +1,76 @@
+/*
+ * 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.utils;
+
+import com.cloud.storage.ScopeType;
+import com.cloud.utils.StringUtils;
+import com.cloud.utils.exception.CloudRuntimeException;
+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.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.util.Base64Utils;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+public class OntapStorageUtils {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapStorageUtils.class);
+
+private static final String BASIC = "Basic";
+private static final String AUTH_HEADER_COLON = ":";
+
+public static String generateAuthHeader (String username, String password)
{
+byte[] encodedBytes = Base64Utils.encode((username + AUTH_HEADER_COLON
+ password).getBytes(StandardCharsets.UTF_8));
+return BASIC + StringUtils.SPACE + new String(encodedBytes);
+}
+
+public static StorageStrategy getStrategyByStoragePoolDetails(Map details) {
+if (details == null || details.isEmpty()) {
+s_logger.error("getStrategyByStoragePoolDetails: Storage pool
details are null or empty");
+throw new CloudRuntimeException("getStrategyByStoragePoolDetails:
Storage pool details are null or empty");
Review Comment:
check/ensure that these method names in the errors are not passed to the user
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050857525
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageUtils.java:
##
@@ -0,0 +1,76 @@
+/*
+ * 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.utils;
+
+import com.cloud.storage.ScopeType;
+import com.cloud.utils.StringUtils;
+import com.cloud.utils.exception.CloudRuntimeException;
+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.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.util.Base64Utils;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+public class OntapStorageUtils {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapStorageUtils.class);
+
+private static final String BASIC = "Basic";
+private static final String AUTH_HEADER_COLON = ":";
+
+public static String generateAuthHeader (String username, String password)
{
+byte[] encodedBytes = Base64Utils.encode((username + AUTH_HEADER_COLON
+ password).getBytes(StandardCharsets.UTF_8));
+return BASIC + StringUtils.SPACE + new String(encodedBytes);
+}
+
+public static StorageStrategy getStrategyByStoragePoolDetails(Map details) {
+if (details == null || details.isEmpty()) {
Review Comment:
```suggestion
if (MapUtils.isEmpty(details)) {
```
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageUtils.java:
##
@@ -0,0 +1,76 @@
+/*
+ * 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.utils;
+
+import com.cloud.storage.ScopeType;
+import com.cloud.utils.StringUtils;
+import com.cloud.utils.exception.CloudRuntimeException;
+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.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.util.Base64Utils;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+public class OntapStorageUtils {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapStorageUtils.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(OntapStorageUtils.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050849317
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java:
##
@@ -0,0 +1,309 @@
+/*
+ * 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;
+
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.model.Igroup;
+import org.apache.cloudstack.storage.feign.model.Initiator;
+import org.apache.cloudstack.storage.feign.model.Svm;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class UnifiedSANStrategy extends SANStrategy {
+
+private static final Logger s_logger =
LogManager.getLogger(UnifiedSANStrategy.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(UnifiedSANStrategy.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050844637
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java:
##
@@ -0,0 +1,319 @@
+/*
+ * 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;
+
+import com.cloud.host.HostVO;
+import com.cloud.storage.dao.VolumeDao;
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NASFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.ExportPolicy;
+import org.apache.cloudstack.storage.feign.model.ExportRule;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class UnifiedNASStrategy extends NASStrategy {
+
+private static final Logger s_logger =
LogManager.getLogger(UnifiedNASStrategy.class);
+private final FeignClientFactory feignClientFactory;
+private final NASFeignClient nasFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final JobFeignClient jobFeignClient;
+@Inject private VolumeDao volumeDao;
+@Inject private EndPointSelector epSelector;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+
+public UnifiedNASStrategy(OntapStorage ontapStorage) {
+super(ontapStorage);
+String baseURL = OntapStorageConstants.HTTPS +
ontapStorage.getManagementLIF();
+this.feignClientFactory = new FeignClientFactory();
+this.nasFeignClient =
feignClientFactory.createClient(NASFeignClient.class, baseURL);
+this.volumeFeignClient =
feignClientFactory.createClient(VolumeFeignClient.class,baseURL );
+this.jobFeignClient =
feignClientFactory.createClient(JobFeignClient.class, baseURL );
+}
+
+public void setOntapStorage(OntapStorage ontapStorage) {
+this.storage = ontapStorage;
+}
+
+@Override
+public CloudStackVolume createCloudStackVolume(CloudStackVolume
cloudstackVolume) {
+return null;
+}
+
+@Override
+CloudStackVolume updateCloudStackVolume(CloudStackVolume cloudstackVolume)
{
+return null;
+}
+
+@Override
+public void deleteCloudStackVolume(CloudStackVolume cloudstackVolume) {
+}
+
+@Override
+public void copyCloudStackVolume(CloudStackVolume cloudstackVolume) {
+
+}
+
+@Override
+public CloudStackVolume getCloudStackVolume(Map
cloudStackVolumeMap) {
+return null;
+}
+
+@Override
+public AccessGroup createAccessGroup(AccessGroup accessGroup) {
+s_logger.info("createAccessGroup: Create access group {}: " ,
accessGroup);
+Map details =
accessGroup.getPrimaryDataStoreInfo().getDetails();
+String svmName = details.get(OntapStorageConstants.SVM_NAME);
+String volumeUUID = details.get(OntapStorageConstants.VOLUME_UUID);
+
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050841231
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java:
##
@@ -0,0 +1,319 @@
+/*
+ * 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;
+
+import com.cloud.host.HostVO;
+import com.cloud.storage.dao.VolumeDao;
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NASFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.ExportPolicy;
+import org.apache.cloudstack.storage.feign.model.ExportRule;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class UnifiedNASStrategy extends NASStrategy {
+
+private static final Logger s_logger =
LogManager.getLogger(UnifiedNASStrategy.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(UnifiedNASStrategy.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050836909
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##
@@ -0,0 +1,452 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.AggregateFeignClient;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NetworkFeignClient;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.client.SvmFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.Aggregate;
+import org.apache.cloudstack.storage.feign.model.IpInterface;
+import org.apache.cloudstack.storage.feign.model.IscsiService;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public abstract class StorageStrategy {
+private final FeignClientFactory feignClientFactory;
+private final AggregateFeignClient aggregateFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final SvmFeignClient svmFeignClient;
+private final JobFeignClient jobFeignClient;
+private final NetworkFeignClient networkFeignClient;
+private final SANFeignClient sanFeignClient;
+
+protected OntapStorage storage;
+
+private List aggregates;
+
+private static final Logger s_logger =
LogManager.getLogger(StorageStrategy.class);
+
+public StorageStrategy(OntapStorage ontapStorage) {
+storage = ontapStorage;
+String baseURL = OntapStorageConstants.HTTPS +
storage.getManagementLIF();
+s_logger.info("Initializing StorageStrategy with base URL: " +
baseURL);
+this.feignClientFactory = new FeignClientFactory();
+this.aggregateFeignClient =
feignClientFactory.createClient(AggregateFeignClient.class, baseURL);
+this.volumeFeignClient =
feignClientFactory.createClient(VolumeFeignClient.class, baseURL);
+this.svmFeignClient =
feignClientFactory.createClient(SvmFeignClient.class, baseURL);
+this.jobFeignClient =
feignClientFactory.createClient(JobFeignClient.class, baseURL);
+this.networkFeignClient =
feignClientFactory.createClient(NetworkFeignClient.class, baseURL);
+this.sanFeignClient =
feignClientFactory.createClient(SANFeignClient.class, baseURL);
+}
+
+public boolean connect() {
+s_logger.info("Attempting to connect to ONTAP cluster at " +
storage.getManagementLIF() + " and validate SVM " +
+storage.getSvmName() + ", protocol " + storage.getProtocol());
+String authHeader =
OntapStorageUtils.generateAuthHeader(storage.getUsername(),
storage.getPassword());
+String svmName = storage.getSvmName();
+try {
+Svm svm = new Svm();
+s_logger.info("Fetching the SVM details...");
+Map queryParams =
Map.of(OntapStorageConstants.NAME, svmName, OntapStorageConstants.FIELDS,
OntapStor
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050831831
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##
@@ -0,0 +1,452 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.AggregateFeignClient;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NetworkFeignClient;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.client.SvmFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.Aggregate;
+import org.apache.cloudstack.storage.feign.model.IpInterface;
+import org.apache.cloudstack.storage.feign.model.IscsiService;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public abstract class StorageStrategy {
+private final FeignClientFactory feignClientFactory;
+private final AggregateFeignClient aggregateFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final SvmFeignClient svmFeignClient;
+private final JobFeignClient jobFeignClient;
+private final NetworkFeignClient networkFeignClient;
+private final SANFeignClient sanFeignClient;
+
+protected OntapStorage storage;
+
+private List aggregates;
+
+private static final Logger s_logger =
LogManager.getLogger(StorageStrategy.class);
+
+public StorageStrategy(OntapStorage ontapStorage) {
+storage = ontapStorage;
+String baseURL = OntapStorageConstants.HTTPS +
storage.getManagementLIF();
+s_logger.info("Initializing StorageStrategy with base URL: " +
baseURL);
+this.feignClientFactory = new FeignClientFactory();
+this.aggregateFeignClient =
feignClientFactory.createClient(AggregateFeignClient.class, baseURL);
+this.volumeFeignClient =
feignClientFactory.createClient(VolumeFeignClient.class, baseURL);
+this.svmFeignClient =
feignClientFactory.createClient(SvmFeignClient.class, baseURL);
+this.jobFeignClient =
feignClientFactory.createClient(JobFeignClient.class, baseURL);
+this.networkFeignClient =
feignClientFactory.createClient(NetworkFeignClient.class, baseURL);
+this.sanFeignClient =
feignClientFactory.createClient(SANFeignClient.class, baseURL);
+}
+
+public boolean connect() {
+s_logger.info("Attempting to connect to ONTAP cluster at " +
storage.getManagementLIF() + " and validate SVM " +
+storage.getSvmName() + ", protocol " + storage.getProtocol());
+String authHeader =
OntapStorageUtils.generateAuthHeader(storage.getUsername(),
storage.getPassword());
+String svmName = storage.getSvmName();
+try {
+Svm svm = new Svm();
+s_logger.info("Fetching the SVM details...");
+Map queryParams =
Map.of(OntapStorageConstants.NAME, svmName, OntapStorageConstants.FIELDS,
OntapStor
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050823466
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##
@@ -0,0 +1,452 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.AggregateFeignClient;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NetworkFeignClient;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.client.SvmFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.Aggregate;
+import org.apache.cloudstack.storage.feign.model.IpInterface;
+import org.apache.cloudstack.storage.feign.model.IscsiService;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public abstract class StorageStrategy {
+private final FeignClientFactory feignClientFactory;
+private final AggregateFeignClient aggregateFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final SvmFeignClient svmFeignClient;
+private final JobFeignClient jobFeignClient;
+private final NetworkFeignClient networkFeignClient;
+private final SANFeignClient sanFeignClient;
+
+protected OntapStorage storage;
+
+private List aggregates;
+
+private static final Logger s_logger =
LogManager.getLogger(StorageStrategy.class);
+
+public StorageStrategy(OntapStorage ontapStorage) {
+storage = ontapStorage;
+String baseURL = OntapStorageConstants.HTTPS +
storage.getManagementLIF();
+s_logger.info("Initializing StorageStrategy with base URL: " +
baseURL);
+this.feignClientFactory = new FeignClientFactory();
+this.aggregateFeignClient =
feignClientFactory.createClient(AggregateFeignClient.class, baseURL);
+this.volumeFeignClient =
feignClientFactory.createClient(VolumeFeignClient.class, baseURL);
+this.svmFeignClient =
feignClientFactory.createClient(SvmFeignClient.class, baseURL);
+this.jobFeignClient =
feignClientFactory.createClient(JobFeignClient.class, baseURL);
+this.networkFeignClient =
feignClientFactory.createClient(NetworkFeignClient.class, baseURL);
+this.sanFeignClient =
feignClientFactory.createClient(SANFeignClient.class, baseURL);
+}
+
+public boolean connect() {
+s_logger.info("Attempting to connect to ONTAP cluster at " +
storage.getManagementLIF() + " and validate SVM " +
+storage.getSvmName() + ", protocol " + storage.getProtocol());
+String authHeader =
OntapStorageUtils.generateAuthHeader(storage.getUsername(),
storage.getPassword());
+String svmName = storage.getSvmName();
+try {
+Svm svm = new Svm();
+s_logger.info("Fetching the SVM details...");
+Map queryParams =
Map.of(OntapStorageConstants.NAME, svmName, OntapStorageConstants.FIELDS,
OntapStor
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050820820
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##
@@ -0,0 +1,452 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.AggregateFeignClient;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NetworkFeignClient;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.client.SvmFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.Aggregate;
+import org.apache.cloudstack.storage.feign.model.IpInterface;
+import org.apache.cloudstack.storage.feign.model.IscsiService;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public abstract class StorageStrategy {
+private final FeignClientFactory feignClientFactory;
+private final AggregateFeignClient aggregateFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final SvmFeignClient svmFeignClient;
+private final JobFeignClient jobFeignClient;
+private final NetworkFeignClient networkFeignClient;
+private final SANFeignClient sanFeignClient;
+
+protected OntapStorage storage;
+
+private List aggregates;
+
+private static final Logger s_logger =
LogManager.getLogger(StorageStrategy.class);
+
+public StorageStrategy(OntapStorage ontapStorage) {
+storage = ontapStorage;
+String baseURL = OntapStorageConstants.HTTPS +
storage.getManagementLIF();
+s_logger.info("Initializing StorageStrategy with base URL: " +
baseURL);
+this.feignClientFactory = new FeignClientFactory();
+this.aggregateFeignClient =
feignClientFactory.createClient(AggregateFeignClient.class, baseURL);
+this.volumeFeignClient =
feignClientFactory.createClient(VolumeFeignClient.class, baseURL);
+this.svmFeignClient =
feignClientFactory.createClient(SvmFeignClient.class, baseURL);
+this.jobFeignClient =
feignClientFactory.createClient(JobFeignClient.class, baseURL);
+this.networkFeignClient =
feignClientFactory.createClient(NetworkFeignClient.class, baseURL);
+this.sanFeignClient =
feignClientFactory.createClient(SANFeignClient.class, baseURL);
+}
+
+public boolean connect() {
+s_logger.info("Attempting to connect to ONTAP cluster at " +
storage.getManagementLIF() + " and validate SVM " +
+storage.getSvmName() + ", protocol " + storage.getProtocol());
+String authHeader =
OntapStorageUtils.generateAuthHeader(storage.getUsername(),
storage.getPassword());
+String svmName = storage.getSvmName();
+try {
+Svm svm = new Svm();
+s_logger.info("Fetching the SVM details...");
+Map queryParams =
Map.of(OntapStorageConstants.NAME, svmName, OntapStorageConstants.FIELDS,
OntapStor
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050816761
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##
@@ -0,0 +1,452 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.AggregateFeignClient;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NetworkFeignClient;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.client.SvmFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.Aggregate;
+import org.apache.cloudstack.storage.feign.model.IpInterface;
+import org.apache.cloudstack.storage.feign.model.IscsiService;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public abstract class StorageStrategy {
+private final FeignClientFactory feignClientFactory;
+private final AggregateFeignClient aggregateFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final SvmFeignClient svmFeignClient;
+private final JobFeignClient jobFeignClient;
+private final NetworkFeignClient networkFeignClient;
+private final SANFeignClient sanFeignClient;
+
+protected OntapStorage storage;
+
+private List aggregates;
+
+private static final Logger s_logger =
LogManager.getLogger(StorageStrategy.class);
+
+public StorageStrategy(OntapStorage ontapStorage) {
+storage = ontapStorage;
+String baseURL = OntapStorageConstants.HTTPS +
storage.getManagementLIF();
+s_logger.info("Initializing StorageStrategy with base URL: " +
baseURL);
+this.feignClientFactory = new FeignClientFactory();
+this.aggregateFeignClient =
feignClientFactory.createClient(AggregateFeignClient.class, baseURL);
+this.volumeFeignClient =
feignClientFactory.createClient(VolumeFeignClient.class, baseURL);
+this.svmFeignClient =
feignClientFactory.createClient(SvmFeignClient.class, baseURL);
+this.jobFeignClient =
feignClientFactory.createClient(JobFeignClient.class, baseURL);
+this.networkFeignClient =
feignClientFactory.createClient(NetworkFeignClient.class, baseURL);
+this.sanFeignClient =
feignClientFactory.createClient(SANFeignClient.class, baseURL);
+}
+
+public boolean connect() {
+s_logger.info("Attempting to connect to ONTAP cluster at " +
storage.getManagementLIF() + " and validate SVM " +
+storage.getSvmName() + ", protocol " + storage.getProtocol());
+String authHeader =
OntapStorageUtils.generateAuthHeader(storage.getUsername(),
storage.getPassword());
+String svmName = storage.getSvmName();
+try {
+Svm svm = new Svm();
+s_logger.info("Fetching the SVM details...");
+Map queryParams =
Map.of(OntapStorageConstants.NAME, svmName, OntapStorageConstants.FIELDS,
OntapStor
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050811762
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##
@@ -0,0 +1,452 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import feign.FeignException;
+import org.apache.cloudstack.storage.feign.FeignClientFactory;
+import org.apache.cloudstack.storage.feign.client.AggregateFeignClient;
+import org.apache.cloudstack.storage.feign.client.JobFeignClient;
+import org.apache.cloudstack.storage.feign.client.NetworkFeignClient;
+import org.apache.cloudstack.storage.feign.client.SANFeignClient;
+import org.apache.cloudstack.storage.feign.client.SvmFeignClient;
+import org.apache.cloudstack.storage.feign.client.VolumeFeignClient;
+import org.apache.cloudstack.storage.feign.model.Aggregate;
+import org.apache.cloudstack.storage.feign.model.IpInterface;
+import org.apache.cloudstack.storage.feign.model.IscsiService;
+import org.apache.cloudstack.storage.feign.model.Job;
+import org.apache.cloudstack.storage.feign.model.Nas;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
+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.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public abstract class StorageStrategy {
+private final FeignClientFactory feignClientFactory;
+private final AggregateFeignClient aggregateFeignClient;
+private final VolumeFeignClient volumeFeignClient;
+private final SvmFeignClient svmFeignClient;
+private final JobFeignClient jobFeignClient;
+private final NetworkFeignClient networkFeignClient;
+private final SANFeignClient sanFeignClient;
+
+protected OntapStorage storage;
+
+private List aggregates;
+
+private static final Logger s_logger =
LogManager.getLogger(StorageStrategy.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(StorageStrategy.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050806479
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/StorageProviderFactory.java:
##
@@ -0,0 +1,60 @@
+/*
+ * 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.provider;
+
+import com.cloud.utils.component.ComponentContext;
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+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.service.model.ProtocolType;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+
+public class StorageProviderFactory {
+private static final Logger s_logger =
LogManager.getLogger(StorageProviderFactory.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(StorageProviderFactory.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050798365
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/provider/OntapPrimaryDatastoreProvider.java:
##
@@ -0,0 +1,88 @@
+/*
+ * 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.provider;
+
+
+import com.cloud.utils.component.ComponentContext;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider;
+import org.apache.cloudstack.storage.driver.OntapPrimaryDatastoreDriver;
+import org.apache.cloudstack.storage.lifecycle.OntapPrimaryDatastoreLifecycle;
+import org.apache.cloudstack.storage.listener.OntapHostListener;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+@Component
+public class OntapPrimaryDatastoreProvider implements PrimaryDataStoreProvider
{
+
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreProvider.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(OntapPrimaryDatastoreProvider.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050791698
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/listener/OntapHostListener.java:
##
@@ -0,0 +1,186 @@
+/*
+ * 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.listener;
+
+import javax.inject.Inject;
+
+import com.cloud.agent.api.ModifyStoragePoolCommand;
+import com.cloud.agent.api.ModifyStoragePoolAnswer;
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.alert.AlertManager;
+import com.cloud.storage.StoragePoolHostVO;
+import com.cloud.storage.dao.StoragePoolHostDao;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.DeleteStoragePoolCommand;
+import com.cloud.host.Host;
+import com.cloud.storage.StoragePool;
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
+import com.cloud.host.dao.HostDao;
+
+public class OntapHostListener implements HypervisorHostListener {
+protected Logger logger = LogManager.getLogger(getClass());
+
+@Inject
+private AgentManager _agentMgr;
+@Inject
+private AlertManager _alertMgr;
+@Inject
+private PrimaryDataStoreDao _storagePoolDao;
+@Inject
+private HostDao _hostDao;
+@Inject private StoragePoolHostDao storagePoolHostDao;
+
+
+@Override
+public boolean hostConnect(long hostId, long poolId) {
+logger.info("Connect to host " + hostId + " from pool " + poolId);
+Host host = _hostDao.findById(hostId);
+if (host == null) {
+logger.error("host was not found with id : {}", hostId);
+return false;
+}
+
+StoragePool pool = _storagePoolDao.findById(poolId);
+if (pool == null) {
+logger.error("Failed to connect host - storage pool not found with
id: {}", poolId);
+return false;
+}
+logger.info("Connecting host {} to ONTAP storage pool {}",
host.getName(), pool.getName());
+try {
+ModifyStoragePoolCommand cmd = new ModifyStoragePoolCommand(true,
pool);
+
+Answer answer = _agentMgr.easySend(hostId, cmd);
+
+if (answer == null) {
+throw new CloudRuntimeException(String.format("Unable to get
an answer to the modify storage pool command (%s)", pool));
+}
+
+if (!answer.getResult()) {
+String msg = String.format("Unable to attach storage pool %s
to host %d", pool, hostId);
+
+_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST,
pool.getDataCenterId(), pool.getPodId(), msg, msg);
+
+throw new CloudRuntimeException(String.format(
+"Unable to establish a connection from agent to
storage pool %s due to %s", pool, answer.getDetails()));
+}
+
+if (!(answer instanceof ModifyStoragePoolAnswer)) {
+logger.error("Received unexpected answer type {} for storage
pool {}", answer.getClass().getName(), pool.getName());
+throw new CloudRuntimeException("Failed to connect to storage
pool. Please check agent logs for details.");
+}
+
+ModifyStoragePoolAnswer mspAnswer = (ModifyStoragePoolAnswer)
answer;
+StoragePoolInfo poolInfo = mspAnswer.getPoolInfo();
+if (poolInfo == null) {
+throw new CloudRuntimeException("ModifyStoragePoolAnswer
returned null poolInfo");
+}
+
+String localPath = poolInfo.getLocalPath();
+logger.info("Storage pool {} successfully mounted at: {}",
pool.getName(), localPath);
+
+StoragePoolHostVO storagePoolHost =
storagePoolHostDao.findByPoolHost(poolId, hostId);
+
+if (storagePoolHost == null) {
+storagePoolHost = new StoragePoolH
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050660279
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/listener/OntapHostListener.java:
##
@@ -0,0 +1,186 @@
+/*
+ * 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.listener;
+
+import javax.inject.Inject;
+
+import com.cloud.agent.api.ModifyStoragePoolCommand;
+import com.cloud.agent.api.ModifyStoragePoolAnswer;
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.alert.AlertManager;
+import com.cloud.storage.StoragePoolHostVO;
+import com.cloud.storage.dao.StoragePoolHostDao;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.DeleteStoragePoolCommand;
+import com.cloud.host.Host;
+import com.cloud.storage.StoragePool;
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
+import com.cloud.host.dao.HostDao;
+
+public class OntapHostListener implements HypervisorHostListener {
+protected Logger logger = LogManager.getLogger(getClass());
+
+@Inject
+private AgentManager _agentMgr;
+@Inject
+private AlertManager _alertMgr;
+@Inject
+private PrimaryDataStoreDao _storagePoolDao;
+@Inject
+private HostDao _hostDao;
+@Inject private StoragePoolHostDao storagePoolHostDao;
+
Review Comment:
```suggestion
```
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/listener/OntapHostListener.java:
##
@@ -0,0 +1,186 @@
+/*
+ * 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.listener;
+
+import javax.inject.Inject;
+
+import com.cloud.agent.api.ModifyStoragePoolCommand;
+import com.cloud.agent.api.ModifyStoragePoolAnswer;
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.alert.AlertManager;
+import com.cloud.storage.StoragePoolHostVO;
+import com.cloud.storage.dao.StoragePoolHostDao;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.DeleteStoragePoolCommand;
+import com.cloud.host.Host;
+import com.cloud.storage.StoragePool;
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
+import com.cloud.host.dao.HostDao;
+
+public class OntapHostListener implements HypervisorHostListener {
+protected Logger logger = LogManager.getLogger(getClass());
+
+@Inject
+private AgentManager _agentMgr;
+@Inject
+private AlertManager _alertMgr;
+@Inject
+private PrimaryDataStoreDao _storagePoolDao;
+@Inject
+private HostDao _hostDao;
+@Inject private StoragePoolHostDao storagePoolHostDao;
Review Comment:
```suggestion
@Inject
private StoragePoolHostDao storagePoolHostDao;
```
--
This is an automated mess
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050513898
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050508645
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4205003645 > @sandeeplocharla anything else you are working on this PR specifically (apart from other changes you are planning in your next PRs) ? Hi @harikrishna-patnala , except for addressing any mandatory comments, I'm not planning on adding any new features or code to this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050096369
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3050087537
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049991126
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
piyush5netapp commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4204760196 > @sandeeplocharla anything else you are working on this PR specifically (apart from other changes you are planning in your next PRs) ? @harikrishna-patnala Current PR has only changes scoped to as mentioned in scope of PR. Current ImplementationThe following operations are currently implemented: Operation | Description -- | -- Create Primary Storage Pool | Creates a FlexVolume on ONTAP and registers it as a primary storage pool in CloudStack Delete Primary Storage Pool | Removes the storage pool from CloudStack and deletes the FlexVolume from ONTAP Attach Cluster/Zone | Creates access groups (iGroups for iSCSI, export policies for NFS) and connects hosts Enable/Disable Storage Pool | Enables or disables the storage pool for use Enter/Cancel Maintenance | Places storage pool in maintenance mode or brings it back online We are ready with next set of changes which will cover CloudStack volume provisioning use cases for Netapp ONTAP. We can only raise our next PR once this PR gets merged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049991126
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049979252
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049978017
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049973848
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049852548
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags"
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049846076
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
Review Comment:
is the storage not managed by
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049835285
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
Review Comment:
```suggestion
private static final long ONTAP_MIN_VOLUME_SIZE_IN_BYTES = 1677721600L;
```
if, in bytes. update it as per its unit size. thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049824249
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/FeignConfiguration.java:
##
@@ -0,0 +1,158 @@
+/*
+ * 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.feign;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import feign.RequestInterceptor;
+import feign.Retryer;
+import feign.Client;
+import feign.httpclient.ApacheHttpClient;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+import feign.Response;
+import feign.codec.DecodeException;
+import feign.codec.EncodeException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import org.apache.http.conn.ConnectionKeepAliveStrategy;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.TimeUnit;
+
+public class FeignConfiguration {
+private static final Logger logger =
LogManager.getLogger(FeignConfiguration.class);
+
+private final int retryMaxAttempt = 3;
+private final int retryMaxInterval = 5;
Review Comment:
```suggestion
private final int retryMaxIntervalInSecs = 5;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049817184
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/FeignConfiguration.java:
##
@@ -0,0 +1,158 @@
+/*
+ * 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.feign;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import feign.RequestInterceptor;
+import feign.Retryer;
+import feign.Client;
+import feign.httpclient.ApacheHttpClient;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+import feign.Response;
+import feign.codec.DecodeException;
+import feign.codec.EncodeException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import org.apache.http.conn.ConnectionKeepAliveStrategy;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.TimeUnit;
+
+public class FeignConfiguration {
+private static final Logger logger =
LogManager.getLogger(FeignConfiguration.class);
+
+private final int retryMaxAttempt = 3;
+private final int retryMaxInterval = 5;
+private final String ontapFeignMaxConnection = "80";
+private final String ontapFeignMaxConnectionPerRoute = "20";
+private final ObjectMapper objectMapper;
+
+public FeignConfiguration() {
+this.objectMapper = new ObjectMapper();
+
this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
+}
+
+public Client createClient() {
+int maxConn;
+int maxConnPerRoute;
+try {
+maxConn = Integer.parseInt(this.ontapFeignMaxConnection);
+} catch (Exception e) {
+logger.error("ontapFeignClient: parse max connection failed, using
default");
+maxConn = 20;
+}
+try {
+maxConnPerRoute =
Integer.parseInt(this.ontapFeignMaxConnectionPerRoute);
+} catch (Exception e) {
+logger.error("ontapFeignClient: parse max connection per route
failed, using default");
+maxConnPerRoute = 2;
Review Comment:
is default 20 (as per `ontapFeignMaxConnectionPerRoute` defined above)?
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/FeignConfiguration.java:
##
@@ -0,0 +1,158 @@
+/*
+ * 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.feign;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import feign.RequestInterceptor;
+import feign.Retryer;
+import feign.Client;
+import feign.httpclient.ApacheHttpClient;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+import feign.Response;
+import feign.codec.DecodeException;
+import feign.codec.EncodeException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049814718
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/FeignConfiguration.java:
##
@@ -0,0 +1,158 @@
+/*
+ * 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.feign;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import feign.RequestInterceptor;
+import feign.Retryer;
+import feign.Client;
+import feign.httpclient.ApacheHttpClient;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+import feign.Response;
+import feign.codec.DecodeException;
+import feign.codec.EncodeException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import org.apache.http.conn.ConnectionKeepAliveStrategy;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.TimeUnit;
+
+public class FeignConfiguration {
+private static final Logger logger =
LogManager.getLogger(FeignConfiguration.class);
+
+private final int retryMaxAttempt = 3;
+private final int retryMaxInterval = 5;
+private final String ontapFeignMaxConnection = "80";
+private final String ontapFeignMaxConnectionPerRoute = "20";
+private final ObjectMapper objectMapper;
+
+public FeignConfiguration() {
+this.objectMapper = new ObjectMapper();
+
this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
+}
+
+public Client createClient() {
+int maxConn;
+int maxConnPerRoute;
+try {
+maxConn = Integer.parseInt(this.ontapFeignMaxConnection);
+} catch (Exception e) {
+logger.error("ontapFeignClient: parse max connection failed, using
default");
+maxConn = 20;
Review Comment:
is default 80 (as per `ontapFeignMaxConnection` )?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049800135
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/Volume.java:
##
@@ -0,0 +1,143 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+import java.util.Objects;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Volume {
+@JsonProperty("uuid")
+private String uuid;
+
+@JsonProperty("name")
+private String name;
+
+@JsonProperty("state")
+private String state;
+
+@JsonProperty("nas")
+private Nas nas;
+
+@JsonProperty("svm")
+private Svm svm;
+
+@JsonProperty("qos")
+private Qos qos;
+
+@JsonProperty("space")
+private VolumeSpace space;
+
+@JsonProperty("anti_ransomware")
+private AntiRansomware antiRansomware;
+
+@JsonProperty("aggregates")
+private List aggregates = null;
+
+@JsonProperty("size")
+private Long size = null;
+
+// Getters and setters
+public String getUuid() {
+return uuid;
+}
+public void setUuid(String uuid) {
+this.uuid = uuid;
+}
+public String getName() {
+return name;
+}
+public void setName(String name) {
+this.name = name;
+}
+public String getState() {
+return state;
+}
+
+public void setState(String state) {
+this.state = state;
+}
+
+public Nas getNas() {
+return nas;
+}
+
+public void setNas(Nas nas) {
+this.nas = nas;
+}
+
+public Svm getSvm() {
+return svm;
+}
+
+public void setSvm(Svm svm) {
+this.svm = svm;
+}
+
+public Qos getQos() {
+return qos;
+}
+
+public void setQos(Qos qos) {
+this.qos = qos;
+}
+
+public VolumeSpace getSpace() {
+return space;
+}
+
+public void setSpace(VolumeSpace space) {
+this.space = space;
+}
+
+public AntiRansomware getAntiRansomware() {
+return antiRansomware;
+}
+
+public void setAntiRansomware(AntiRansomware antiRansomware) {
+this.antiRansomware = antiRansomware;
+}
+
+public List getAggregates () { return aggregates; }
+
+public void setAggregates (List aggregates) { this.aggregates =
aggregates; }
+
+public Long getSize () { return size; }
+
+public void setSize (Long size) { this.size = size; }
+
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049774541
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/Igroup.java:
##
@@ -0,0 +1,255 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import
org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;
+
+import java.util.List;
+import java.util.Objects;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Igroup {
+@JsonProperty("delete_on_unmap")
+private Boolean deleteOnUnmap = null;
+@JsonProperty("initiators")
+private List initiators = null;
+@JsonProperty("lun_maps")
+private List lunMaps = null;
+@JsonProperty("os_type")
+private OsTypeEnum osType = null;
+
+@JsonProperty("parent_igroups")
+private List parentIgroups = null;
+
+@JsonProperty("igroups")
+private List igroups = null;
+
+@JsonProperty("name")
+private String name = null;
+
+@JsonProperty("protocol")
+private ProtocolEnum protocol = null;
+@JsonProperty("svm")
+private Svm svm = null;
+@JsonProperty("uuid")
+private String uuid = null;
+
+public enum OsTypeEnum {
+hyper_v("hyper_v"),
Review Comment:
```suggestion
HyperV("hyper_v"),
```
use initCaps or allCaps for the enum constants
HyperV, Linux, VMware, Windows, Xen
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049781933
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/ExportRule.java:
##
@@ -0,0 +1,182 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import
org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;
+import java.util.List;
+
+/**
+ * ExportRule
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class ExportRule {
+@JsonProperty("anonymous_user")
+private String anonymousUser ;
+
+@JsonProperty("clients")
+private List clients = null;
+
+@JsonProperty("index")
+private Integer index = null;
+
+public enum ProtocolsEnum {
+any("any"),
+
+nfs("nfs"),
+
+nfs3("nfs3"),
+
+nfs4("nfs4");
Review Comment:
use initCaps or allCaps for the enum constants
ANY, NFS, NFS3, NFS4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049774541
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/Igroup.java:
##
@@ -0,0 +1,255 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import
org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;
+
+import java.util.List;
+import java.util.Objects;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Igroup {
+@JsonProperty("delete_on_unmap")
+private Boolean deleteOnUnmap = null;
+@JsonProperty("initiators")
+private List initiators = null;
+@JsonProperty("lun_maps")
+private List lunMaps = null;
+@JsonProperty("os_type")
+private OsTypeEnum osType = null;
+
+@JsonProperty("parent_igroups")
+private List parentIgroups = null;
+
+@JsonProperty("igroups")
+private List igroups = null;
+
+@JsonProperty("name")
+private String name = null;
+
+@JsonProperty("protocol")
+private ProtocolEnum protocol = null;
+@JsonProperty("svm")
+private Svm svm = null;
+@JsonProperty("uuid")
+private String uuid = null;
+
+public enum OsTypeEnum {
+hyper_v("hyper_v"),
Review Comment:
```suggestion
HyperV("hyper_v"),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049734000
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java:
##
@@ -0,0 +1,178 @@
+/*
+ * 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.driver;
+
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.agent.api.to.DataTO;
+import com.cloud.host.Host;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.Volume;
+import com.cloud.utils.Pair;
+import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import
org.apache.cloudstack.engine.subsystem.api.storage.DataStoreCapabilities;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class OntapPrimaryDatastoreDriver implements PrimaryDataStoreDriver {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreDriver.class);
+
+@Override
+public Map getCapabilities() {
+s_logger.trace("OntapPrimaryDatastoreDriver: getCapabilities: Called");
+Map mapCapabilities = new HashMap<>();
+
mapCapabilities.put(DataStoreCapabilities.STORAGE_SYSTEM_SNAPSHOT.toString(),
Boolean.FALSE.toString());
+
mapCapabilities.put(DataStoreCapabilities.CAN_CREATE_VOLUME_FROM_SNAPSHOT.toString(),
Boolean.FALSE.toString());
+
+return mapCapabilities;
+}
+
+@Override
+public DataTO getTO(DataObject data) {
+return null;
+}
+
+@Override
+public DataStoreTO getStoreTO(DataStore store) { return null; }
Review Comment:
```suggestion
public DataStoreTO getStoreTO(DataStore store)
{
return null;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sureshanaparti commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3049730498
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java:
##
@@ -0,0 +1,178 @@
+/*
+ * 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.driver;
+
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.agent.api.to.DataTO;
+import com.cloud.host.Host;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.Volume;
+import com.cloud.utils.Pair;
+import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import
org.apache.cloudstack.engine.subsystem.api.storage.DataStoreCapabilities;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class OntapPrimaryDatastoreDriver implements PrimaryDataStoreDriver {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreDriver.class);
Review Comment:
```suggestion
private static final Logger logger =
LogManager.getLogger(OntapPrimaryDatastoreDriver.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
harikrishna-patnala commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4204392469 @sandeeplocharla anything else you are working on this PR specifically (apart from other changes you are planning in your next PRs) ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039904801
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039904801
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039903526
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039901976
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039885828
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/FeignConfiguration.java:
##
@@ -0,0 +1,158 @@
+/*
+ * 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.feign;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import feign.RequestInterceptor;
+import feign.Retryer;
+import feign.Client;
+import feign.httpclient.ApacheHttpClient;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+import feign.Response;
+import feign.codec.DecodeException;
+import feign.codec.EncodeException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import org.apache.http.conn.ConnectionKeepAliveStrategy;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.TimeUnit;
+
+public class FeignConfiguration {
+private static final Logger logger =
LogManager.getLogger(FeignConfiguration.class);
+
+private final int retryMaxAttempt = 3;
+private final int retryMaxInterval = 5;
+private final String ontapFeignMaxConnection = "80";
+private final String ontapFeignMaxConnectionPerRoute = "20";
Review Comment:
Maybe not right away. We want to see if its a user requirement and make this
configurable, if required.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039870623
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/Job.java:
##
@@ -0,0 +1,121 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import
org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;
+
+/**
+ * @author Administrator
+ *
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(Include.NON_NULL)
+public class Job {
+
+@JsonProperty("uuid")
+String uuid;
+@JsonProperty("description")
+String description;
+@JsonProperty("state")
+String state;
+@JsonProperty("message")
+String message;
+@JsonProperty("code")
+String code;
+@JsonProperty("_links")
Review Comment:
Yes, it is supposed to be _links
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039869129
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java:
##
@@ -0,0 +1,178 @@
+/*
+ * 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.driver;
+
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.agent.api.to.DataTO;
+import com.cloud.host.Host;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.Volume;
+import com.cloud.utils.Pair;
+import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import
org.apache.cloudstack.engine.subsystem.api.storage.DataStoreCapabilities;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class OntapPrimaryDatastoreDriver implements PrimaryDataStoreDriver {
+
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreDriver.class);
+
+@Override
+public Map getCapabilities() {
+s_logger.trace("OntapPrimaryDatastoreDriver: getCapabilities: Called");
+Map mapCapabilities = new HashMap<>();
+
mapCapabilities.put(DataStoreCapabilities.STORAGE_SYSTEM_SNAPSHOT.toString(),
Boolean.FALSE.toString());
+
mapCapabilities.put(DataStoreCapabilities.CAN_CREATE_VOLUME_FROM_SNAPSHOT.toString(),
Boolean.FALSE.toString());
+
+return mapCapabilities;
+}
+
+@Override
+public DataTO getTO(DataObject data) {
+return null;
+}
+
+@Override
+public DataStoreTO getStoreTO(DataStore store) { return null; }
+
+@Override
+public void createAsync(DataStore dataStore, DataObject dataObject,
AsyncCompletionCallback callback) {}
Review Comment:
Sure, we have planned to push the implementation of these as part of
upcoming PRs. But, will throw the exception for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4192713029 > @sandeeplocharla overall looks good. I left some minor remarks, could you have a look at them? Also, if you wish you can add a line to `.github/CODEOWNERS` containing your GitHub handle, as well as the handle of your colleagues, so that you are automatically marked as a reviewer whenever a PR that affects the ONTAP plugin is created. > > Agree with @DaanHoogland that we can merge with regression tests (after having a look at my comments). Thank you! for the review @winterhazel Will sure add our github usernames to CODEOWNERS -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
winterhazel commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3039486896
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##
@@ -0,0 +1,535 @@
+/*
+ * 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.lifecycle;
+
+
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.host.HostVO;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.resource.ResourceManager;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StorageManager;
+import com.cloud.storage.StoragePool;
+import com.cloud.storage.StoragePoolAutomation;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.base.Preconditions;
+import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
+import
org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
+import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import
org.apache.cloudstack.storage.datastore.lifecycle.BasePrimaryDataStoreLifeCycleImpl;
+import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Volume;
+import org.apache.cloudstack.storage.provider.StorageProviderFactory;
+import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.AccessGroup;
+import org.apache.cloudstack.storage.service.model.ProtocolType;
+import org.apache.cloudstack.storage.utils.OntapStorageConstants;
+import org.apache.cloudstack.storage.utils.OntapStorageUtils;
+import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class OntapPrimaryDatastoreLifecycle extends
BasePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
+@Inject private ClusterDao _clusterDao;
+@Inject private StorageManager _storageMgr;
+@Inject private ResourceManager _resourceMgr;
+@Inject private PrimaryDataStoreHelper _dataStoreHelper;
+@Inject private PrimaryDataStoreDetailsDao _datastoreDetailsDao;
+@Inject private StoragePoolAutomation _storagePoolAutomation;
+@Inject private PrimaryDataStoreDao storagePoolDao;
+@Inject private StoragePoolDetailsDao storagePoolDetailsDao;
+private static final Logger s_logger =
LogManager.getLogger(OntapPrimaryDatastoreLifecycle.class);
+
+private static final long ONTAP_MIN_VOLUME_SIZE = 1677721600L;
+
+@Override
+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");
+String storagePoolName = (String) dsInfos.get("name");
+String providerName = (String) dsInfos.get("providerName");
+Long capacityBytes = (Long) dsInfos.get("capacityBytes");
+boolean managed = (boolean) dsInfos.get("managed");
+String tags = (String) dsInfos.get("tags");
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
chank257 commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4190220035 @sureshanaparti , @weizhouapache Could you please expedite these reviews. We have PRs for volume and snapshot workflows waiting to be raised post merge of this. Please let us know if it helps to have online review to close this faster. Appreciate your help. Thanks, Krishnan -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4160820644 @weizhouapache @winterhazel , it would be good if we have ontap support in 23. Can you guys have look, please? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4160146144 Hi @DaanHoogland @harikrishna-patnala @sureshanaparti @weizhouapache I have addressed the comments from yesterday too and raised a diff on retesting the workflows that would be supported with this PR. Please take a look and let us know if there's anything else needed to get this PR to closure? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4159671753 [SF] Trillian test result (tid-15771) Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 55857 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12563-t15771-vmware-70u3.zip Smoke tests completed. 147 look OK, 4 have errors, 0 did not run Only failed and skipped tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_CRUD_operations_guest_OS_mapping | `Error` | 1.32 | test_guest_os.py test_guest_OS_mapping_check_with_hypervisor | `Error` | 2.42 | test_guest_os.py ContextSuite context=TestKubernetesCluster>:setup | `Error` | 0.00 | test_kubernetes_clusters.py test_01_vpn_usage | `Error` | 1.10 | test_usage.py test_08_migrate_vm | `Error` | 31.52 | test_vm_life_cycle.py -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4159427037 [SF] Trillian test result (tid-15769) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 50986 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12563-t15769-kvm-ol8.zip Smoke tests completed. 150 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_09_arping_in_cpvm | `Failure` | 5.20 | test_diagnostics.py -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
sandeeplocharla commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4155746872 Thank you! For reviewing and approving the PR @DaanHoogland and @harikrishna-patnala Will take a relook at the 'toString' methods. Will cross check its usecases in the code and if its needed will use ReflectionToStringBuilderUtils as suggested. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4154428818 [SF] Trillian Build Failed (tid-15770) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4154420723 [SF] Trillian Build Failed (tid-15772) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4154360629 @DaanHoogland a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4154346967 @blueorangutan test matrix -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4153212233 Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17283 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
harikrishna-patnala commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4153061656 > clgtm, some suggestions but nothing blocking. I think with regression testing done this can be merged. Agreed @DaanHoogland. I see all of the code changes are in a separate plugin and there is a good test report in the description. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4153014371 @blueorangutan package -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
blueorangutan commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4152942754 @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on PR #12563: URL: https://github.com/apache/cloudstack/pull/12563#issuecomment-4152932437 @blueorangutan package -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage [cloudstack]
DaanHoogland commented on code in PR #12563:
URL: https://github.com/apache/cloudstack/pull/12563#discussion_r3008031545
##
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileInfo.java:
##
@@ -0,0 +1,297 @@
+/*
+ * 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.feign.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+import java.time.OffsetDateTime;
+import java.util.Objects;
+
+/**
+ * Information about a single file.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class FileInfo {
+ @JsonProperty("bytes_used")
+ private Long bytesUsed = null;
+ @JsonProperty("creation_time")
+ private OffsetDateTime creationTime = null;
+ @JsonProperty("fill_enabled")
+ private Boolean fillEnabled = null;
+ @JsonProperty("is_empty")
+ private Boolean isEmpty = null;
+ @JsonProperty("is_snapshot")
+ private Boolean isSnapshot = null;
+ @JsonProperty("is_vm_aligned")
+ private Boolean isVmAligned = null;
+ @JsonProperty("modified_time")
+ private OffsetDateTime modifiedTime = null;
+ @JsonProperty("name")
+ private String name = null;
+ @JsonProperty("overwrite_enabled")
+ private Boolean overwriteEnabled = null;
+ @JsonProperty("path")
+ private String path = null;
+ @JsonProperty("size")
+ private Long size = null;
+ @JsonProperty("target")
+ private String target = null;
+
+ /**
+ * Type of the file.
+ */
+ public enum TypeEnum {
+FILE("file"),
+DIRECTORY("directory");
+
+private String value;
+
+TypeEnum(String value) {
+ this.value = value;
+}
+
+@JsonValue
+public String getValue() {
+ return value;
+}
+
+@Override
+public String toString() {
+ return String.valueOf(value);
+}
+
+@JsonCreator
+public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+if (b.value.equals(value)) {
+ return b;
+}
+ }
+ return null;
+}
+ }
+
+ @JsonProperty("type")
+ private TypeEnum type = null;
+
+ @JsonProperty("unique_bytes")
+ private Long uniqueBytes = null;
+
+ @JsonProperty("unix_permissions")
+ private Integer unixPermissions = null;
+
+ /**
+ * The actual number of bytes used on disk by this file. If byte_offset and
length parameters are specified, this will return the bytes used by the file
within the given range.
+ * @return bytesUsed
+ **/
+ public Long getBytesUsed() {
+return bytesUsed;
+ }
+
+ public OffsetDateTime getCreationTime() {
+return creationTime;
+ }
+
+ public FileInfo fillEnabled(Boolean fillEnabled) {
+this.fillEnabled = fillEnabled;
+return this;
+ }
+
+ public Boolean isFillEnabled() {
+return fillEnabled;
+ }
+
+ public void setFillEnabled(Boolean fillEnabled) {
+this.fillEnabled = fillEnabled;
+ }
+
+
+ public Boolean isIsEmpty() {
+return isEmpty;
+ }
+
+ public void setIsEmpty(Boolean isEmpty) {
+this.isEmpty = isEmpty;
+ }
+
+ public Boolean isIsSnapshot() {
+return isSnapshot;
+ }
+
+ public void setIsSnapshot(Boolean isSnapshot) {
+this.isSnapshot = isSnapshot;
+ }
+
+
+ public Boolean isIsVmAligned() {
+return isVmAligned;
+ }
+
+
+ public OffsetDateTime getModifiedTime() {
+return modifiedTime;
+ }
+
+ public FileInfo name(String name) {
+this.name = name;
+return this;
+ }
+
+ public String getName() {
+return name;
+ }
+
+ public void setName(String name) {
+this.name = name;
+ }
+
+ public FileInfo overwriteEnabled(Boolean overwriteEnabled) {
+this.overwriteEnabled = overwriteEnabled;
+return this;
+ }
+
+ public Boolean isOverwriteEnabled() {
+return overwriteEnabled;
+ }
+
+ public void setOverwriteEnabled(Boolean overwriteEnabled) {
+this.overwriteEnabled = overwriteEnabled;
+ }
+
+ public FileInfo path(String path) {
+this.path = path;
+return
