Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Ansible: falses being lost in network requests (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
modular-magician authored and rambleraptor committed May 20, 2019
1 parent b398002 commit 8dfbc06
Show file tree
Hide file tree
Showing 47 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_ssl_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_url_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_container_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_pubsub_topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_spanner_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def resource_to_request(module):
request = encode_request(request, module)
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_spanner_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_sql_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_sql_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def resource_to_request(module):
}
return_vals = {}
for k, v in request.items():
if v or v is False:
if v is not None:
return_vals[k] = v

return return_vals
Expand Down
Loading

0 comments on commit 8dfbc06

Please sign in to comment.