The azlin storage delete command was failing with error:
Error deleting storage: 'NoneType' object has no attribute 'get'
In src/azlin/commands/storage.py, the config cleanup code was trying to save a config object after modifying a dictionary representation of it, but not updating the actual config object attributes. This caused the ConfigManager to try to serialize incomplete data.
Updated the config cleanup logic in the delete command to:
- Load the config
- Get the dictionary representation
- Modify the dictionary to remove storage references
- Update the config object's attributes with the modified values
- Only save if changes were actually made
$ azlin storage list
Storage Accounts in rysweet-linux-vm-pool:
================================================================================
testhomedir1760805343
Endpoint: testhomedir1760805343.file.core.windows.net:/testhomedir1760805343/home
Size: 100GB
Tier: Standard
Region: eastus
testhomedir1760805409
Endpoint: testhomedir1760805409.file.core.windows.net:/testhomedir1760805409/home
Size: 100GB
Tier: Standard
Region: eastus
Total: 2 storage account(s)✅ PASS
$ azlin storage status testhomedir1760805343
Storage Account: testhomedir1760805343
================================================================================
Endpoint: testhomedir1760805343.file.core.windows.net:/testhomedir1760805343/home
Region: eastus
Tier: Standard
Capacity:
Total: 100GB
Used: 0.00GB (0.0%)
Available: 100.00GB
Cost:
Monthly: $4.00
Connected VMs:
(none)✅ PASS
$ azlin storage delete testhomedir1760805409 --force
Deleting storage account 'testhomedir1760805409'...
Deleted storage account testhomedir1760805409
✓ Storage account 'testhomedir1760805409' deleted successfully✅ PASS - No more error!
$ azlin storage create testcreate1760809713 --size 100 --tier Standard
Creating Standard NFS storage account 'testcreate1760809713'...
Size: 100GB
Resource Group: rysweet-linux-vm-pool
Region: eastus
Estimated cost: $1.84/month
✓ Storage account created successfully
Name: testcreate1760809713
NFS Endpoint: testcreate1760809713.blob.core.windows.net:/testcreate1760809713/home
Size: 100GB
To mount on a VM: azlin storage mount testcreate1760809713 --vm <vm-name>✅ PASS
# Create storage
$ azlin storage create testcreate1760809713 --size 100 --tier Standard
✓ Storage account created successfully
# List storage
$ azlin storage list
Total: 2 storage account(s)
# Get status
$ azlin storage status testcreate1760809713
Storage Account: testcreate1760809713
...
✓ Connected VMs: (none)
# Delete storage
$ azlin storage delete testcreate1760809713 --force
✓ Storage account 'testcreate1760809713' deleted successfully
# Verify deletion
$ azlin storage list
Total: 1 storage account(s)✅ PASS - Complete workflow works!
$ uv run pytest tests/unit/test_storage_manager.py -v
================================================= test session starts ==================================================
tests/unit/test_storage_manager.py ............................ [100%]
================================================== 28 passed in 0.17s ==================================================✅ PASS - All 28 unit tests pass
- Moved all markdown documentation files from project root to
docs/directory for better organization - This follows best practices of keeping project root clean with only essential files (README.md, pyproject.toml, etc.)
src/azlin/commands/storage.py- Fixed config cleanup logic in delete command- Moved 14 markdown files to
docs/directory
All storage commands are now fully functional and tested:
- ✅
azlin storage create- Creates new NFS storage - ✅
azlin storage list- Lists all storage accounts - ✅
azlin storage status- Shows detailed status - ✅
azlin storage delete- Deletes storage (bug fixed!) - ✅ All unit tests pass
- ✅ Complete end-to-end workflow tested