Skip to content

Conversation

@suryag1201
Copy link

@suryag1201 suryag1201 commented Nov 6, 2025

Description

Create Async, Attach Cluster/Zone and Grant/Revoke Access

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copilot AI review requested due to automatic review settings November 6, 2025 03:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements asynchronous volume creation, cluster/zone attachment with access group management, and grant/revoke access operations for ONTAP storage integration. The changes introduce iSCSI protocol support with proper LUN mapping and unmapping capabilities.

Key Changes:

  • Implemented access group (igroup) creation, retrieval, and management for SAN protocols
  • Added logical access control through LUN mapping/unmapping operations
  • Enhanced cluster/zone attachment flows with host identifier validation and access group provisioning

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
Utility.java Added utility methods for access group creation, LUN/igroup naming, OS type mapping, and storage strategy initialization
Constants.java Renamed PATH_SEPARATOR to SLASH and added new constants for ONTAP API fields and naming conventions
UnifiedSANStrategy.java Implemented createAccessGroup, getAccessGroup, enableLogicalAccess, and disableLogicalAccess methods for iSCSI LUN operations
UnifiedNASStrategy.java Updated method signatures to match interface changes (public visibility and parameter types)
StorageStrategy.java Modified abstract method signatures to use Map parameters and public visibility for access control operations
OntapPrimaryDatastoreLifecycle.java Enhanced attachCluster and attachZone with protocol validation, host identifier collection, and access group creation
SANFeignClient.java Updated API endpoints with proper ONTAP REST API paths and added QueryMap support for flexible query parameters
OntapPrimaryDatastoreDriver.java Implemented grantAccess and revokeAccess methods with volume-level access control through LUN mapping
Comments suppressed due to low confidence (2)

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:1

  • Missing space after 'if' keyword. Add space for consistency with Java coding conventions: if (condition) instead of if(condition).
/*

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:1

  • Missing space after 'if' keyword. Add space for consistency with Java coding conventions: if (condition) instead of if(condition).
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 6, 2025 09:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 7, 2025 05:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 7, 2025 07:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:1

  • The method getAccessGroupByName uses Constants.NAME as a key, but the getAccessGroup method in UnifiedSANStrategy expects Constants.IGROUP_DOT_NAME (line 182). This mismatch will cause the access group retrieval to fail.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 7, 2025 08:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 7, 2025 08:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

private void grantAccessForVolume(StoragePoolVO storagePool, VolumeVO volumeVO, Host host) {
Map<String, String> details = storagePoolDetailsDao.listDetailsKeyPairs(storagePool.getId());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retrieving storagepool details is a common requirement, so, these 2 lines of code could be a good candidate for Utility class

throw new CloudRuntimeException(errMsg);
}
}
private boolean hostInitiatorFoundInIgroup(String hostInitiator, Igroup igroup) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to this, getLunName and getIgroupName methods could've been private methods in this class or we can create a helper class for such operations, instead of putting them in Utility

switch (protocol) {
case ISCSI:
// Access group name format: cs_svmName_scopeId
String igroupName = Utility.getIgroupName(svmName, scopeId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This getIgroupName could rather be in some helper class instead of Utility

Copilot AI review requested due to automatic review settings November 10, 2025 07:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 10, 2025 08:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 21 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 10, 2025 11:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 10, 2025 13:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants