Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcp/gce inventory plugin/script conformance #54701

Open
wants to merge 8 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@maxamillion
Copy link
Contributor

commented Apr 2, 2019

Signed-off-by: Adam Miller admiller@redhat.com

SUMMARY

Add gcp_compute.py inventory plugin and gce.py inventory contrib script conformance testing

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gce.py
gcp_compute

@maxamillion maxamillion force-pushed the maxamillion:tests/gcp_conformance_no_Mock branch to 3623401 Apr 2, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

test/integration/targets/inventory_gcp_conformance/lib/google/oauth2/service_account.py:5:4: no-method-argument Method has no argument

The test ansible-test sanity --test pep8 [explain] failed with 14 errors:

test/integration/targets/inventory_gcp_conformance/lib/google/auth/credentials.py:75:9: E117 over-indented
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:138:161: E501 line too long (163 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:152:161: E501 line too long (190 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:174:161: E501 line too long (161 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:225:161: E501 line too long (166 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:251:161: E501 line too long (164 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:420:17: E128 continuation line under-indented for visual indent
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:437:161: E501 line too long (188 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:443:161: E501 line too long (164 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:444:161: E501 line too long (176 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:468:161: E501 line too long (161 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:469:161: E501 line too long (184 > 160 characters)
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:476:13: E122 continuation line missing indentation or outdented
test/integration/targets/inventory_gcp_conformance/lib/google/auth/transport/requests.py:477:9: E122 continuation line missing indentation or outdented

The test ansible-test sanity --test shellcheck [explain] failed with 2 errors:

test/integration/targets/inventory_gcp_conformance/gce.sh:20:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_gcp_conformance/runme.sh:6:9: SC2086 Double quote to prevent globbing and word splitting.

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

test/integration/targets/inventory_gcp_conformance/lib/google/auth/credentials.py:75:9: E117 over-indented

The test ansible-test sanity --test shellcheck [explain] failed with 2 errors:

test/integration/targets/inventory_gcp_conformance/gce.sh:20:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/inventory_gcp_conformance/runme.sh:6:9: SC2086 Double quote to prevent globbing and word splitting.

click here for bot help

@maxamillion maxamillion changed the title [WIP] gcp/gce inventory plugin/script conformance gcp/gce inventory plugin/script conformance Apr 3, 2019

@ansibot ansibot added needs_revision and removed WIP labels Apr 3, 2019

@s-hertel
Copy link
Contributor

left a comment

This looks good. I commented on some things that were cleaned up in the AWS tests. You might also have a couple __init__.py files you forgot to commit. To get the tests working I had to add

  • test/integration/targets/inventory_gcp_conformance/lib/google/__init__.py
  • test/integration/targets/inventory_gcp_conformance/lib/libcloud/compute/drivers/__init__.py
@mattclay

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Closing and re-opening to trigger CI.

@mattclay

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

Closing and re-opening PR to attempt to fix CI.

@mattclay mattclay closed this Apr 17, 2019

@mattclay mattclay reopened this Apr 17, 2019

@mattclay

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

@maxamillion There's something wrong with this PR on GitHub that is preventing Shippable from downloading the commits. You can try force pushing, pushing a new commit, or closing this PR and opening a new one.

maxamillion added some commits Mar 12, 2019

gcp/gce inventory plugin/script conformance
Signed-off-by: Adam Miller <admiller@redhat.com>
fix sanity tests
Signed-off-by: Adam Miller <admiller@redhat.com>
more sanity checks
Signed-off-by: Adam Miller <admiller@redhat.com>
clean up based on feedback
Signed-off-by: Adam Miller <admiller@redhat.com>
missed a dot notation
Signed-off-by: Adam Miller <admiller@redhat.com>
fix up PYTHONPATH for gce.sh, fix gce.sh on shertel's recommendation
Signed-off-by: Adam Miller <admiller@redhat.com>

@maxamillion maxamillion force-pushed the maxamillion:tests/gcp_conformance_no_Mock branch from 2aae9b2 to f2cb1de Apr 23, 2019

@ansibot ansibot removed the ci_verified label Apr 23, 2019

maxamillion added some commits Apr 24, 2019

skip the test for all platforms with too old a jinja2 version
Signed-off-by: Adam Miller <admiller@redhat.com>
revert back to previous ternary expression
Signed-off-by: Adam Miller <admiller@redhat.com>
@maxamillion

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2019

@mattclay I think we're good now .... what a journey that turned out to be. :)

@s-hertel
Copy link
Contributor

left a comment

Looks good to me.

gce_machine_type: machineType
gce_metadata: metadata.get("items", []) | items2dict(key_name="key", value_name="value")
gce_name: name
gce_network: networkInterfaces[0]['network']['name']

This comment has been minimized.

Copy link
@s-hertel

s-hertel Apr 24, 2019

Contributor

Your dot notation was lost in the rebase maybe, in a number of places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.