mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Bug fixes for GCP modules (#52616)
This commit is contained in:
parent
a94d16adef
commit
a6752f002b
4 changed files with 118 additions and 7 deletions
|
@ -435,6 +435,7 @@ sourceType:
|
|||
|
||||
from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, remove_nones_from_dict, replace_resource_dict
|
||||
import json
|
||||
import re
|
||||
import time
|
||||
|
||||
################################################################################
|
||||
|
@ -628,6 +629,15 @@ def response_to_hash(module, response):
|
|||
}
|
||||
|
||||
|
||||
def license_selflink(name, params):
|
||||
if name is None:
|
||||
return
|
||||
url = r"https://www.googleapis.com/compute/v1//projects/.*/global/licenses/[a-z1-9\-]*"
|
||||
if not re.match(url, name):
|
||||
name = "https://www.googleapis.com/compute/v1//projects/{project}/global/licenses/%s".format(**params) % name
|
||||
return name
|
||||
|
||||
|
||||
def async_op_url(module, extra_data=None):
|
||||
if extra_data is None:
|
||||
extra_data = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue