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

added initial file for v2 api of newrelic #40029

Closed
wants to merge 11 commits into from
Closed

added initial file for v2 api of newrelic #40029

wants to merge 11 commits into from

Conversation

116davinder
Copy link

@116davinder 116davinder commented May 11, 2018

SUMMARY
  1. Removed Support for NewRelic V1 api for recording deployment
  2. Added support for NewRelic V2 Api
ISSUE TYPE

New Module Pull Request

COMPONENT NAME

newrelic_deployment

ANSIBLE VERSION
[davinderp@ansible-srv ~]$ ansible --version
ansible 2.5.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/davinderp/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
ADDITIONAL INFORMATION

After checking NewRelic Website, as they have depricated v1 api with xml format and they also exposed new v2 api with json/xml so i start this PR to support new v2 api and remove old version.


@ansibot
Copy link
Contributor

ansibot commented May 11, 2018

cc @mcodd
click here for bot help

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. labels May 11, 2018
@ansibot
Copy link
Contributor

ansibot commented May 11, 2018

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

lib/ansible/modules/monitoring/newrelic_deployment.py:121:9: singleton-comparison Comparison to None should be 'expr is None'
lib/ansible/modules/monitoring/newrelic_deployment.py:125:11: singleton-comparison Comparison to None should be 'expr is None'
lib/ansible/modules/monitoring/newrelic_deployment.py:136:0: trailing-whitespace Trailing whitespace

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

lib/ansible/modules/monitoring/newrelic_deployment.py:81:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/monitoring/newrelic_deployment.py:89:44: E202 whitespace before ')'
lib/ansible/modules/monitoring/newrelic_deployment.py:100:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:103:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:105:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:107:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:110:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:110:11: E225 missing whitespace around operator
lib/ansible/modules/monitoring/newrelic_deployment.py:111:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:114:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:117:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:119:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:121:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:121:15: E711 comparison to None should be 'if cond is None:'
lib/ansible/modules/monitoring/newrelic_deployment.py:123:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:125:19: E711 comparison to None should be 'if cond is None:'
lib/ansible/modules/monitoring/newrelic_deployment.py:126:11: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:128:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:132:9: E225 missing whitespace around operator
lib/ansible/modules/monitoring/newrelic_deployment.py:132:11: E201 whitespace after '{'
lib/ansible/modules/monitoring/newrelic_deployment.py:132:28: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:133:25: E126 continuation line over-indented for hanging indent
lib/ansible/modules/monitoring/newrelic_deployment.py:133:69: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:134:71: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:135:75: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:136:59: W291 trailing whitespace
lib/ansible/modules/monitoring/newrelic_deployment.py:137:25: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/monitoring/newrelic_deployment.py:137:27: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:138:11: E124 closing bracket does not match visual indentation
lib/ansible/modules/monitoring/newrelic_deployment.py:145:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:147:7: E111 indentation is not a multiple of four
lib/ansible/modules/monitoring/newrelic_deployment.py:150:3: E111 indentation is not a multiple of four

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

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: E105 GPLv3 license header not found in the first 20 lines of the module

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels May 11, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label May 12, 2018
@ansibot
Copy link
Contributor

ansibot commented May 12, 2018

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

lib/ansible/modules/monitoring/newrelic_deployment.py:103:0: syntax-error inconsistent use of tabs and spaces in indentation (<string>, line 103)

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: SyntaxError: params["app_name"] = module.params["app_name"]

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: SyntaxError: params["app_name"] = module.params["app_name"]

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: SyntaxError: params["app_name"] = module.params["app_name"]

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "test/sanity/code-smell/docs-build.py", line 101, in <module>
    main()
  File "test/sanity/code-smell/docs-build.py", line 17, in main
    raise subprocess.CalledProcessError(sphinx.returncode, cmd, output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['make', 'singlehtmldocs']' returned non-zero exit status 2.

The test ansible-test sanity --test import --python 3.5 [explain] failed with 2 errors:

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: TabError: inconsistent use of tabs and spaces in indentation (newrelic_deployment.py, line 103) (in /root/ansible/test/runner/.tox/minimal-py35/bin/importer.py:82)
lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: TabError: inconsistent use of tabs and spaces in indentation

The test ansible-test sanity --test import --python 3.6 [explain] failed with 2 errors:

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: TabError: inconsistent use of tabs and spaces in indentation (newrelic_deployment.py, line 103) (in /root/ansible/test/runner/.tox/minimal-py36/bin/importer.py:82)
lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: TabError: inconsistent use of tabs and spaces in indentation

The test ansible-test sanity --test import --python 3.7 [explain] failed with 2 errors:

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: TabError: inconsistent use of tabs and spaces in indentation (newrelic_deployment.py, line 103) (in /root/ansible/test/runner/.tox/minimal-py37/bin/importer.py:82)
lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: TabError: inconsistent use of tabs and spaces in indentation

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

lib/ansible/modules/monitoring/newrelic_deployment.py:82:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/monitoring/newrelic_deployment.py:103:1: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:103:1: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:104:1: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:105:5: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:105:5: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:107:5: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:107:5: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:110:1: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:110:1: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:110:6: E225 missing whitespace around operator
lib/ansible/modules/monitoring/newrelic_deployment.py:111:1: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:111:7: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:112:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:113:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:114:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:115:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:116:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:117:7: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:117:7: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:119:7: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:119:7: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:121:7: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:121:7: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:121:16: E711 comparison to None should be 'if cond is None:'
lib/ansible/modules/monitoring/newrelic_deployment.py:123:5: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:123:5: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:125:23: E711 comparison to None should be 'if cond is None:'
lib/ansible/modules/monitoring/newrelic_deployment.py:128:5: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:128:5: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:132:9: E225 missing whitespace around operator
lib/ansible/modules/monitoring/newrelic_deployment.py:132:11: E201 whitespace after '{'
lib/ansible/modules/monitoring/newrelic_deployment.py:132:28: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:133:25: E126 continuation line over-indented for hanging indent
lib/ansible/modules/monitoring/newrelic_deployment.py:133:69: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:134:71: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:135:75: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:137:25: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/monitoring/newrelic_deployment.py:137:27: E502 the backslash is redundant between brackets
lib/ansible/modules/monitoring/newrelic_deployment.py:138:11: E124 closing bracket does not match visual indentation
lib/ansible/modules/monitoring/newrelic_deployment.py:145:5: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:145:5: W191 indentation contains tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:147:5: E101 indentation contains mixed spaces and tabs
lib/ansible/modules/monitoring/newrelic_deployment.py:147:5: W191 indentation contains tabs

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

lib/ansible/modules/monitoring/newrelic_deployment.py:0:0: E401 Python SyntaxError while parsing module

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

lib/ansible/modules/monitoring/newrelic_deployment.py:103:48: python-syntax-error inconsistent use of tabs and spaces in indentation (<unknown>, line 103)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 12, 2018

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

lib/ansible/modules/monitoring/newrelic_deployment.py:121:11: singleton-comparison Comparison to None should be 'expr is None'
lib/ansible/modules/monitoring/newrelic_deployment.py:125:15: singleton-comparison Comparison to None should be 'expr is None'

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

lib/ansible/modules/monitoring/newrelic_deployment.py:82:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/monitoring/newrelic_deployment.py:110:13: E225 missing whitespace around operator
lib/ansible/modules/monitoring/newrelic_deployment.py:112:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:113:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:114:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:115:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:116:30: E128 continuation line under-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:121:17: E711 comparison to None should be 'if cond is None:'
lib/ansible/modules/monitoring/newrelic_deployment.py:125:23: E711 comparison to None should be 'if cond is None:'
lib/ansible/modules/monitoring/newrelic_deployment.py:132:9: E225 missing whitespace around operator
lib/ansible/modules/monitoring/newrelic_deployment.py:133:25: E126 continuation line over-indented for hanging indent
lib/ansible/modules/monitoring/newrelic_deployment.py:137:25: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/monitoring/newrelic_deployment.py:138:10: E124 closing bracket does not match visual indentation

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label May 12, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label May 12, 2018
@ansibot
Copy link
Contributor

ansibot commented May 12, 2018

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

lib/ansible/modules/monitoring/newrelic_deployment.py:120:33: E127 continuation line over-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:121:33: E122 continuation line missing indentation or outdented
lib/ansible/modules/monitoring/newrelic_deployment.py:122:33: E122 continuation line missing indentation or outdented
lib/ansible/modules/monitoring/newrelic_deployment.py:123:33: E122 continuation line missing indentation or outdented
lib/ansible/modules/monitoring/newrelic_deployment.py:124:33: E127 continuation line over-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:125:33: E127 continuation line over-indented for visual indent
lib/ansible/modules/monitoring/newrelic_deployment.py:145:25: E126 continuation line over-indented for hanging indent
lib/ansible/modules/monitoring/newrelic_deployment.py:149:25: E123 closing bracket does not match indentation of opening bracket's line

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label May 12, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label May 13, 2018
@ansibot
Copy link
Contributor

ansibot commented May 13, 2018

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

lib/ansible/modules/monitoring/newrelic_deployment.py:95:9: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/monitoring/newrelic_deployment.py:146:9: E123 closing bracket does not match indentation of opening bracket's line

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label May 13, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label May 13, 2018
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) support:community This issue/PR relates to code supported by the Ansible community. and removed core_review In order to be merged, this PR must follow the core review workflow. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 7, 2018
@nathanwebsterdotme
Copy link
Contributor

+1

@nathanwebsterdotme
Copy link
Contributor

@ansibot ready_for_review

@ansibot ansibot removed the needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) label Nov 9, 2018
@116davinder
Copy link
Author

anyone can merge it ?

@116davinder 116davinder reopened this Nov 17, 2018
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 17, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 26, 2018
@116davinder
Copy link
Author

@ansibot ready_for_review

1 similar comment
@116davinder
Copy link
Author

@ansibot ready_for_review

@ansibot ansibot added the monitoring Monitoring category label Feb 19, 2019
@Constantin07
Copy link
Contributor

when this PR is going to be reviewed ? Can it be merged ?

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Mar 27, 2020
@ansibot ansibot added collection Related to Ansible Collections work collection:community.general needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md labels Apr 29, 2020
@116davinder
Copy link
Author

@Constantin07 I don't know, It has been waiting for more than 2 year and I didn't manage to find the right process as well like who should review it / who should merge it.

@ansibot
Copy link
Contributor

ansibot commented Aug 16, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@116davinder
Copy link
Author

created PR on New Repository:
ansible-collections/community.general#876

@ansible ansible locked and limited conversation to collaborators Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bot_closed collection:community.general collection Related to Ansible Collections work module This issue/PR relates to a module. monitoring Monitoring category needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. new_plugin This PR includes a new plugin. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants