File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 3333 - The Cloud Management ID
3434 vars:
3535 - name: ansible_cloud_mgmt_id
36+ target:
37+ type: str
38+ description:
39+ - target gateway
40+ vars:
41+ - name: ansible_checkpoint_target
3642"""
3743
3844import json
@@ -89,10 +95,14 @@ def get_session_uid(self):
8995 return self .connection ._session_uid
9096
9197 def send_request (self , path , body_params ):
92- data = json .dumps (body_params ) if body_params else "{}"
9398 cp_cloud_mgmt_id = self .get_option ("cloud_mgmt_id" )
9499 if cp_cloud_mgmt_id :
95100 path = "/" + cp_cloud_mgmt_id + path
101+ # we only replace gaia_ip/ with web_api/gaia-api/ if target is set and path contains gaia_ip/
102+ if 'gaia_api/' in path and self .get_option ("target" ):
103+ path = path .replace ("gaia_api/" , "web_api/gaia-api/" )
104+ body_params ['target' ] = self .get_option ("target" )
105+ data = json .dumps (body_params ) if body_params else '{}'
96106 try :
97107 self ._display_request ()
98108 response , response_data = self .connection .send (
You can’t perform that action at this time.
0 commit comments