|
3 | 3 | from chaoslib import Configuration, Secrets |
4 | 4 | from logzero import logger |
5 | 5 |
|
6 | | -from chaosazure import init_client |
| 6 | +from chaosazure import init_compute_management_client |
7 | 7 | from chaosazure.common import cleanse |
8 | 8 | from chaosazure.common.compute import command |
9 | 9 | from chaosazure.vmss.fetcher import fetch_vmss, fetch_instances |
@@ -48,7 +48,7 @@ def delete_vmss(filter: str = None, |
48 | 48 | for instance in instances: |
49 | 49 | logger.debug( |
50 | 50 | "Deleting instance: {}".format(instance['name'])) |
51 | | - client = init_client(secrets, configuration) |
| 51 | + client = init_compute_management_client(secrets, configuration) |
52 | 52 | client.virtual_machine_scale_set_vms.delete( |
53 | 53 | scale_set['resourceGroup'], |
54 | 54 | scale_set['name'], |
@@ -90,7 +90,7 @@ def restart_vmss(filter: str = None, |
90 | 90 | for instance in instances: |
91 | 91 | logger.debug( |
92 | 92 | "Restarting instance: {}".format(instance['name'])) |
93 | | - client = init_client(secrets, configuration) |
| 93 | + client = init_compute_management_client(secrets, configuration) |
94 | 94 | client.virtual_machine_scale_set_vms.restart( |
95 | 95 | scale_set['resourceGroup'], |
96 | 96 | scale_set['name'], |
@@ -154,7 +154,7 @@ def stop_vmss(filter: str = None, |
154 | 154 | for instance in instances: |
155 | 155 | logger.debug( |
156 | 156 | "Stopping instance: {}".format(instance['name'])) |
157 | | - client = init_client(secrets, configuration) |
| 157 | + client = init_compute_management_client(secrets, configuration) |
158 | 158 | client.virtual_machine_scale_set_vms.power_off( |
159 | 159 | scale_set['resourceGroup'], |
160 | 160 | scale_set['name'], |
@@ -196,7 +196,7 @@ def deallocate_vmss(filter: str = None, |
196 | 196 | for instance in instances: |
197 | 197 | logger.debug( |
198 | 198 | "Deallocating instance: {}".format(instance['name'])) |
199 | | - client = init_client(secrets, configuration) |
| 199 | + client = init_compute_management_client(secrets, configuration) |
200 | 200 | client.virtual_machine_scale_set_vms.deallocate( |
201 | 201 | scale_set['resourceGroup'], |
202 | 202 | scale_set['name'], |
|
0 commit comments