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

VMware: Gather facts about vlan id from DVS Portgroup in vmware_dvs_portgroup_facts #58948

Closed
wants to merge 14 commits into from

Conversation

@dx0xm
Copy link
Contributor

commented Jul 11, 2019

New arguments

SUMMARY

two items that I found very useful and needed to add to my project:

  • wouldn't be great to add a variable for particular dvswitch?

  • wouldn't be great to get also the vlan information of the port group?

I added it to the code

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_dvs_portgroup_facts

@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

@dx0xm, just so you are aware we have a dedicated Working Group for vmware.
You can find other people interested in this in #ansible-vmware on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@Akasurde
Copy link
Member

left a comment

Thanks for the contribution. Could you please address review comments and add test case for this change here ?

@Akasurde Akasurde changed the title Update vmware_dvs_portgroup_facts.py VMware: Update vmware_dvs_portgroup_facts.py Jul 11, 2019

@Akasurde Akasurde changed the title VMware: Update vmware_dvs_portgroup_facts.py VMware: Gather facts about vlan id from DVS Portgroup in vmware_dvs_portgroup_facts Jul 11, 2019

@Akasurde Akasurde self-assigned this Jul 11, 2019

@Akasurde Akasurde removed the needs_triage label Jul 11, 2019

@Akasurde Akasurde requested review from jillr and goneri Jul 11, 2019

dx0xm and others added some commits Jul 11, 2019

Update lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
Update lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
Update lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:0: syntax-error invalid syntax (&lt;unknown&gt;, line 164)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 164)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 164)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 164)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 164)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 164)

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

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../bin/dump_config.py --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ -d ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../bin/generate_man.py --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../bin/dump_keywords.py --template-dir=../templates --output-dir=rst/reference_appendices/ -d ./keyword_desc.yml
PYTHONPATH=../../lib ../bin/plugin_formatter.py -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:93: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../bin/plugin_formatter.py", line 815, in <module>
    main()
  File "../bin/plugin_formatter.py", line 770, in main
    plugin_info, categories = get_plugin_info(options.module_dir, limit_to=options.limit_to, verbose=(options.verbosity > 0))
  File "../bin/plugin_formatter.py", line 300, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 111, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 40, in read_docstring
    M = ast.parse(b_module_data.read())
  File "/usr/lib/python3.6/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 164
    else:
       ^
SyntaxError: invalid syntax
make: *** [modules] Error 1

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 164)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: else:

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: else:

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: else:

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: else:

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: else:

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:9: SyntaxError: else:

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:9: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:158:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:161:14: E114 indentation is not a multiple of four (comment)
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:161:14: E117 over-indented (comment)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: E401 Python SyntaxError while parsing module

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:12: python-syntax-error invalid syntax (<unknown>, line 164)

click here for bot help

dx0xm added some commits Jul 12, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:0: syntax-error invalid syntax (&lt;unknown&gt;, line 157)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 157)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 157)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 157)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 157)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 157)

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 157)

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

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../bin/dump_config.py --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ -d ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../bin/generate_man.py --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../bin/dump_keywords.py --template-dir=../templates --output-dir=rst/reference_appendices/ -d ./keyword_desc.yml
PYTHONPATH=../../lib ../bin/plugin_formatter.py -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:93: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../bin/plugin_formatter.py", line 815, in <module>
    main()
  File "../bin/plugin_formatter.py", line 770, in main
    plugin_info, categories = get_plugin_info(options.module_dir, limit_to=options.limit_to, verbose=(options.verbosity > 0))
  File "../bin/plugin_formatter.py", line 300, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 111, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 40, in read_docstring
    M = ast.parse(b_module_data.read())
  File "/usr/lib/python3.6/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 157
    dvs_lists = [dvsn]
            ^
SyntaxError: invalid syntax
make: *** [modules] Error 1

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: dvs_lists = [dvsn]

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: dvs_lists = [dvsn]

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: dvs_lists = [dvsn]

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: dvs_lists = [dvsn]

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: dvs_lists = [dvsn]

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:13: SyntaxError: dvs_lists = [dvsn]

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:13: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:13: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:158:9: E122 continuation line missing indentation or outdented
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:160:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:160:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:162:9: E122 continuation line missing indentation or outdented
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:162:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:162:17: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:163:9: E122 continuation line missing indentation or outdented
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:29: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:164:31: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:166:31: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:166:33: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:167:31: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:167:33: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:168:28: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:168:30: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:169:26: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:169:28: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:172:35: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:172:37: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:176:21: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:178:35: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:178:37: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:183:21: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:186:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:186:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:198:21: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:201:29: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:201:31: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:203:37: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:203:39: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:209:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:209:36: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:212:25: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:214:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:214:36: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:217:25: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:219:29: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:219:31: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:229:17: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:232:9: E122 continuation line missing indentation or outdented
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:235:1: E122 continuation line missing indentation or outdented
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:236:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:236:20: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:244:5: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:245:11: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:245:13: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:248:5: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:250:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:250:17: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:255:1: E122 continuation line missing indentation or outdented
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:257:1: E901 TokenError: EOF in multi-line statement

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: E401 Python SyntaxError while parsing module

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:157:21: python-syntax-error invalid syntax (<unknown>, line 157)

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

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

lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py:0:0: E338 Argument 'dvswitch' in argument_spec uses default type ('str') but documentation doesn't define type

click here for bot help

@ansibot ansibot added the ci_verified label Jul 12, 2019

@ansibot ansibot removed the ci_verified label Jul 12, 2019

@goneri
Copy link
Contributor

left a comment

Thank you @dx0xm for the patch and welcome in the Ansible contributor community :-). It needs some minor improvements before getting merged. In addition, you will need to extend the functional tests: https://github.com/ansible/ansible/blob/devel/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml

Show resolved Hide resolved lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_facts.py
@@ -193,6 +240,8 @@ def main():
show_network_policy=dict(type='bool', default=True),
show_teaming_policy=dict(type='bool', default=True),
show_port_policy=dict(type='bool', default=True),
dvswitch=dict(),

This comment has been minimized.

Copy link
@goneri

goneri Jul 12, 2019

Contributor

could you explicitly define the format of the dvswitch parameter: dvswitch=dict(type='str', required=False)

This comment has been minimized.

Copy link
@Akasurde

Akasurde Jul 12, 2019

Member

@goneri I think these are defaults so not required.

This comment has been minimized.

Copy link
@dx0xm

dx0xm Jul 15, 2019

Author Contributor

Waiting for final answer.

if datacenter is None:
self.module.fail_json(msg="Failed to find the datacenter %s" % self.dc_name)
if self.dvs_name:

This comment has been minimized.

Copy link
@goneri

goneri Jul 12, 2019

Contributor

The logic used to prepare dvs_lists increase the global complexity of the gather_dvs_portgroup_facts() method. I've the feeling it would be cleaner to create a new new that init dvs_lists variable, and call it in the class constructor.

This comment has been minimized.

Copy link
@dx0xm

dx0xm Jul 15, 2019

Author Contributor

what about doing all the logic in the init as implemented in vmware_local_role_facts ?

Already in the code, have a look and let me know

dx0xm added some commits Jul 15, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2019

@dx0xm this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

dx0xm added some commits Jul 15, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2019

@dx0xm this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2019

@dx0xm This PR was evaluated as a potentially problematic PR for the following reasons:

  • More than 50 changed files.

Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on irc.freenode.net

click here for bot help

@dx0xm

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

Something went wrong with this pull, closing it and will re open a new one shortly

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.