mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-23 11:21:22 -07:00
WIP: fix compute instance + several tests
compute selflinks return back `wwww.googleapis.com` as the domain, which was causing a perma-diff. Fixing google.cloud's normalization fixes that. Fixing the following tests as well, since creating an instance now works: - gcp_compute_instance - gcp_compute_instance_group - gcp_compute_instance_group_manager - gcp_compute_instance_template - gcp_compute_region_autoscaler - gcp_compute_region_instance_group_manager - gcp_compute_target_instance - gcp_compute_target_pool
This commit is contained in:
parent
4816e97719
commit
0fc41bbda4
17 changed files with 36 additions and 32 deletions
|
@ -1379,9 +1379,9 @@ def disk_type_selflink(name, params):
|
|||
def machine_type_selflink(name, params):
|
||||
if name is None:
|
||||
return
|
||||
url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*/machineTypes/.*"
|
||||
url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/machineTypes/.*"
|
||||
if not re.match(url, name):
|
||||
name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/machineTypes/%s".format(**params) % name
|
||||
name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/machineTypes/%s".format(**params) % name
|
||||
return name
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue