Skip to content

Commit

Permalink
Fix Ansible spurious diffs (#2685)
Browse files Browse the repository at this point in the history
Merged PR #2685.
  • Loading branch information
rambleraptor authored and nat-henderson committed Nov 14, 2019
1 parent 589b20c commit 9eaaa89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion provider/ansible/documentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module Ansible
module Documentation
# Builds out the DOCUMENTATION for a property.
# This will eventually be converted to YAML
#
# TODO(alexstephen): Ansible docs don't like defaults of 0, because 0 == null
def documentation_for_property(prop)
required = prop.required && !prop.default_value ? true : false
{
Expand All @@ -39,7 +41,7 @@ def documentation_for_property(prop)
'default' => (
if prop.default_value&.is_a?(::Hash)
prop.default_value
else
elsif prop.default_value.to_s != '0'
prop.default_value&.to_s
end),
'type' => python_type(prop),
Expand Down
4 changes: 4 additions & 0 deletions provider/ansible/gcp_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Copyright (c), Google Inc, 2017
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)

from __future__ import (absolute_import, division, print_function)

__metaclass__ = type

try:
import requests
HAS_REQUESTS = True
Expand Down

0 comments on commit 9eaaa89

Please sign in to comment.