Commit 48144d8
Create Azure adapter: ElasticSanVolume (#4535)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
This PR adds a new Azure adapter for Elastic SAN Volumes
(`ElasticSanVolume`), following the azure-adapter-creation skill
workflow.
## Changes
### Client Interface
- `sources/azure/clients/elastic-san-volume-client.go`: Client interface
wrapping Azure SDK's `VolumesClient`
- `sources/azure/shared/mocks/mock_elastic_san_volume_client.go`:
Generated mock for testing
### Adapter Implementation
- `sources/azure/manual/elastic-san-volume.go`: SearchableWrapper
implementation for ElasticSanVolume
- `Get`: Retrieves a single volume by elasticSanName, volumeGroupName,
volumeName
- `Search`: Lists all volumes under a volume group
- `SearchStream`: Streaming variant of Search
- Linked item queries to parent ElasticSan, VolumeGroup, source
snapshot/volume, ManagedBy VM, and DNS hostname
### Registration
- `sources/azure/manual/adapters.go`: Added client creation and adapter
registration
### Tests
- `sources/azure/manual/elastic-san-volume_test.go`: Unit tests with
mocks
- `sources/azure/integration-tests/elastic-san-volume_test.go`:
Integration tests against real Azure APIs
## Linked Item Queries
The adapter creates linked item queries for:
- **Parent ElasticSan** (GET)
- **Parent ElasticSanVolumeGroup** (GET with composite key)
- **Source ElasticSanVolumeSnapshot** (GET when created from snapshot)
- **Source ElasticSanVolume** (GET when cloned from volume)
- **ManagedBy ComputeVirtualMachine** (GET when managed by VM)
- **StorageTarget DNS hostname** (SEARCH via NetworkDNS)
## Self-Review Checklist
- [x] **IAMPermissions**: Present, references
`Microsoft.ElasticSan/elasticSans/volumegroups/volumes/read`
- [x] **PredefinedRole**: Present, uses `Reader`
- [x] **LinkedItemQueries**: 6 link types verified (ElasticSan,
VolumeGroup, VolumeSnapshot, Volume, VM, DNS). DNS link for
StorageTarget hostname included.
- [x] **PotentialLinks**: 6 types listed (ElasticSan,
ElasticSanVolumeGroup, ElasticSanVolumeSnapshot, ElasticSanVolume,
ComputeVirtualMachine, NetworkDNS), matches LinkedItemQueries
- [x] **Unit tests**: All passing (Get, GetWithLinks,
GetWithInsufficientQueryParts, GetWithEmpty*, ErrorHandling, Search,
SearchWithEmpty*, SearchStream, StaticTests)
- [x] **Integration test**: All sub-tests passing (Setup, Run/GetVolume,
Run/SearchVolumes, Run/VerifyLinkedItems, Run/VerifyItemAttributes,
Teardown) against live Azure APIs
All checklist items passed. Ready for review.
## Related
- Linear Issue: ENG-3546
- Parent Adapter: `elastic-san-volume-group.go` (already has SEARCH link
to ElasticSanVolume)
<!-- CURSOR_AGENT_PR_BODY_END -->
Linear Issue:
[ENG-3546](https://linear.app/overmind/issue/ENG-3546/create-azure-adapter-elasticsanvolume)
<div><a
href="https://cursor.com/agents/bc-2a755c21-1fe0-4be9-b498-c4f3f7520652"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-2a755c21-1fe0-4be9-b498-c4f3f7520652"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Lionel Wilson <Lionel-Wilson@users.noreply.github.com>
GitOrigin-RevId: 2708a089bc7b13fbe57e03128564d18e602013741 parent 393d565 commit 48144d8
7 files changed
Lines changed: 1364 additions & 0 deletions
File tree
- sources/azure
- clients
- integration-tests
- manual
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments