19
19
from google .cloud import compute_v1
20
20
from google .cloud .compute_v1 .types import Tags
21
21
22
- from chaosgcp import load_credentials , wait_on_extended_operation , to_dict
22
+ from chaosgcp import load_credentials , wait_on_extended_operation
23
23
24
24
__all__ = ["set_instance_tags" ]
25
25
logger = logging .getLogger ("chaostoolkit" )
@@ -32,14 +32,14 @@ def set_instance_tags(
32
32
tags_list : list ,
33
33
configuration : Configuration = None ,
34
34
secrets : Secrets = None ,
35
- ) -> Dict [ str , Any ] :
35
+ ) -> None :
36
36
"""Set a Network Tags to a GCE VM instance
37
37
38
38
:param project_id : the project ID in which the DNS record is present
39
39
:param ip_address: the IP address for the A record that needs to be changed
40
40
:param zone: the name of the zone where the GCE VM is provisioned
41
41
:param tags_list : list of network tags to be set to the GCE VM instance
42
- :return JSON Response which is in form of dictionary
42
+ :return nothing
43
43
"""
44
44
credentials = load_credentials (secrets )
45
45
@@ -69,12 +69,9 @@ def set_instance_tags(
69
69
operation = client .set_tags (request = request )
70
70
71
71
# Handle the response
72
+ # do not return anything as extended operations do not carry a payload
72
73
wait_on_extended_operation (operation )
73
74
74
- response = operation .result ()
75
-
76
- return to_dict (response )
77
-
78
75
79
76
def suspend_vm_instance (
80
77
project_id : str , zone : str , instance_name : str , secrets : Secrets = None
0 commit comments