Skip to content

CSTACKEX-367: Remove LUN-map logical unit number dead code - #138

Open
sandeeplocharla wants to merge 3 commits into
mainfrom
bugfix/CSTACKEX-367
Open

sandeeplocharla wants to merge 3 commits into
mainfrom
bugfix/CSTACKEX-367

Conversation

@sandeeplocharla

Copy link
Copy Markdown
Collaborator

Since the managed iSCSI path became // (PR #114), nothing consumes the LUN-map logical unit number. Stop fetching and returning it:

  • enableLogicalAccess/ensureLunMapped now return void; the follow-up lun-maps GET that only read the number is removed
  • getLogicalAccess returns boolean (mapping exists)
  • drop OntapStorageConstants.LOGICAL_UNIT_NUMBER and LUN-number logging in OntapPrimaryDatastoreDriver
  • update unit tests, asserting a new mapping needs one lookup and one create

Description

This PR...

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?

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.98%
Branch coverage 20.28%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@sandeeplocharla sandeeplocharla self-assigned this Nov 11, 2026
@netapp-cloudstack

netapp-cloudstack Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

ONTAP storage plugin test coverage

Line Branch Method
Unit tests 68.3% 58.0% 58.0%
Functional (Marvin) tests 45.9% 30.0% 52.8%
Combined 77.5%

Least covered files (by lines not covered by either run):

File Lines Unit Functional Combined
driver/OntapPrimaryDatastoreDriver.java 1332 75.6% 51.6% 86.0%
service/StorageStrategy.java 543 70.5% 50.1% 71.5%
vmsnapshot/OntapVMSnapshotStrategy.java 567 65.8% 46.7% 80.6%
feign/model/FileInfo.java 105 20.0% 18.1% 20.0%
listener/OntapHostListener.java 123 0.0% 42.3% 42.3%
motion/OntapDataMotionStrategy.java 439 83.8% 0.9% 84.1%
service/UnifiedNASStrategy.java 435 81.1% 56.8% 84.1%
service/UnifiedSANStrategy.java 602 88.4% 40.4% 89.5%
lifecycle/OntapPrimaryDatastoreLifecycle.java 338 71.6% 70.7% 84.9%
asup/OntapAsupManager.java 253 74.3% 15.8% 81.0%

Unit coverage report
Functional coverage report

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

Since the managed iSCSI path became /<targetIQN>/<lunWwid> (PR #114),
nothing consumes the LUN-map logical unit number. Stop fetching and
returning it:

- enableLogicalAccess/ensureLunMapped now return void; the follow-up
  lun-maps GET that only read the number is removed
- getLogicalAccess returns boolean (mapping exists)
- drop OntapStorageConstants.LOGICAL_UNIT_NUMBER and LUN-number logging
  in OntapPrimaryDatastoreDriver
- update unit tests, asserting a new mapping needs one lookup and one
  create

# Conflicts:
#	plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java
#	plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriverTest.java
#	plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedSANStrategyTest.java
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.

1 participant