Skip to content

Fix Azure SDK compatibility: use begin_* methods#529

Merged
Gauravtalreja1 merged 1 commit into
RedHatQE:masterfrom
shubhamsg199:fix-azure-begin-delete
May 19, 2026
Merged

Fix Azure SDK compatibility: use begin_* methods#529
Gauravtalreja1 merged 1 commit into
RedHatQE:masterfrom
shubhamsg199:fix-azure-begin-delete

Conversation

@shubhamsg199
Copy link
Copy Markdown
Contributor

@shubhamsg199 shubhamsg199 commented May 19, 2026

The newer Azure SDK versions (azure-mgmt-compute >= 30.0, azure-mgmt-network >= 25.0, azure-mgmt-resource >= 23.0) removed the synchronous delete/create_or_update/start/stop/restart/etc methods in favor of Long Running Operation (LRO) begin_* variants.

This updates all Azure SDK calls in msazure.py to use the begin_* methods (begin_delete, begin_create_or_update, begin_start, begin_deallocate, begin_restart, begin_power_off, begin_capture). The generalize method remains unchanged as it is still synchronous.

The existing _wait_on_operation() already handles LROPoller objects, so no additional changes are needed.

Test results:

swach azure --vms --pips --nics --discs

<<<<<<< Running the cleanup script in ACTION mode >>>>>>>
The AZURE providers settings are initialized and validated !

Resources from the region and resource group: eastus/SatelliteQEResources
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Removed VMs:
['test-flwjkpsrvm', 'test-fvajrgbuyz', 'test-hlvjcdpkmg', 'test-jwlagwiawx', 'test-kkmyzhojkf', 'test-ovhbdajwqb', 'test-rflstqlgmh', 'test-ribdostqut', 'test-vnaxtllcim', 'test-xouutqsrxb']
Skipped VMs:
[]
Removed Nics:
['test-aobwjkmcvt-nic0', 'test-doakgplgyw-nic0', 'test-dsuhabuoch-nic0', 'test-efelctrvix-nic0', 'test-eqvsnzcuhg-nic0', 'test-flwjkpsrvm-nic0', 'test-fvajrgbuyz-nic0', 'test-hlvjcdpkmg-nic0', 'test-jwlagwiawx-nic0', 'test-kkmyzhojkf-nic0', 'test-ovhbdajwqb-nic0', 'test-rflstqlgmh-nic0', 'test-ribdostqut-nic0', 'test-vnaxtllcim-nic0', 'test-xouutqsrxb-nic0']
Removed Discs:
['test-aobwjkmcvt-osdisk', 'test-doakgplgyw-osdisk', 'test-dsuhabuoch-osdisk', 'test-efelctrvix-osdisk', 'test-eqvsnzcuhg-osdisk', 'test-flwjkpsrvm-osdisk', 'test-fvajrgbuyz-data-disk0', 'test-fvajrgbuyz-osdisk', 'test-hlvjcdpkmg-osdisk', 'test-jwlagwiawx-osdisk', 'test-kkmyzhojkf-osdisk', 'test-ovhbdajwqb-osdisk', 'test-rflstqlgmh-osdisk', 'test-ribdostqut-osdisk', 'test-vnaxtllcim-osdisk', 'test-xouutqsrxb-data-disk0', 'test-xouutqsrxb-osdisk']
Removed Pips:
['test-aobwjkmcvt-pip0', 'test-doakgplgyw-pip0', 'test-dsuhabuoch-pip0', 'test-efelctrvix-pip0', 'test-eqvsnzcuhg-pip0', 'test-flwjkpsrvm-pip0', 'test-fvajrgbuyz-pip0', 'test-hlvjcdpkmg-pip0', 'test-jwlagwiawx-pip0', 'test-kkmyzhojkf-pip0', 'test-nhymyhclhf-pip0', 'test-ovhbdajwqb-pip0', 'test-rflstqlgmh-pip0', 'test-ribdostqut-pip0', 'test-vnaxtllcim-pip0', 'test-xouutqsrxb-pip0']

The newer Azure SDK versions (azure-mgmt-compute >= 30.0,
azure-mgmt-network >= 25.0, azure-mgmt-resource >= 23.0) removed
the synchronous delete/create_or_update/start/stop/restart/etc
methods in favor of Long Running Operation (LRO) begin_* variants.

This updates all Azure SDK calls in msazure.py to use the begin_*
methods (begin_delete, begin_create_or_update, begin_start,
begin_deallocate, begin_restart, begin_power_off, begin_capture).
The generalize method remains unchanged as it is still synchronous.

The existing _wait_on_operation() already handles LROPoller objects,
so no additional changes are needed.

Signed-off-by: Shubham Ganar <shubhamsg123m@gmail.com>
@shubhamsg199 shubhamsg199 force-pushed the fix-azure-begin-delete branch from 51180ff to 634e67d Compare May 19, 2026 07:40
@shubhamsg199 shubhamsg199 changed the title Fix Azure SDK compatibility: use begin_* LRO methods Fix Azure SDK compatibility: use begin_* methods May 19, 2026
@Gauravtalreja1 Gauravtalreja1 merged commit f9eb110 into RedHatQE:master May 19, 2026
4 checks passed
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.

2 participants