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

Add eip module #60182

Merged
merged 2 commits into from
Oct 19, 2019
Merged

Add eip module #60182

merged 2 commits into from
Oct 19, 2019

Conversation

zhongjun2
Copy link
Contributor

@zhongjun2 zhongjun2 commented Aug 7, 2019

SUMMARY
Add a new modules hwc_vpc_eip that can fetch huaweicloud Simple Message Notification.

COMPONENT NAME
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py

ISSUE TYPE
New Module Pull Request

ANSIBLE VERSION
ansible 2.10

ADDITIONAL INFORMATION
I have tested the changes on the real environment.

@ansibot
Copy link
Contributor

ansibot commented Aug 7, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 cloud community_review In order to be merged, this PR must follow the community review workflow. huawei Huawei community module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. labels Aug 7, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 7, 2019

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

Command "ansible-doc -t module hwc_vpc_eip" returned exit status 1.
>>> Standard Error
ERROR! module hwc_vpc_eip missing documentation (or could not parse documentation): while parsing a block mapping
  in "<unicode string>", line 105, column 9
did not find expected key
  in "<unicode string>", line 108, column 10

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 ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 698, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, 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 59, in read_docstring
    data[varkey] = AnsibleLoader(child.value.s, file_name=filename).get_single_data()
  File "/usr/local/lib/python3.6/dist-packages/yaml/constructor.py", line 41, in get_single_data
    node = self.get_single_node()
  File "ext/_yaml.pyx", line 707, in _yaml.CParser.get_single_node
  File "ext/_yaml.pyx", line 725, in _yaml.CParser._compose_document
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 892, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 905, in _yaml.CParser._parse_next_event
yaml.parser.ParserError: while parsing a block mapping
  in "<unicode string>", line 105, column 9
did not find expected key
  in "<unicode string>", line 108, column 10
make: *** [modules] Error 1

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

lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:576:11: SyntaxError: for key, path in path_parameters.items()

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

lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:576:11: SyntaxError: invalid syntax

The test ansible-test sanity --test validate-modules [explain] failed with 39 errors:

lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.1: expected str @ data['type']['description'][1]. Got {'CN Northeast-Dalian': '5_telcom and 5_union.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.2: expected str @ data['type']['description'][2]. Got {'CN South-Guangzhou': '5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.3: expected str @ data['type']['description'][3]. Got {'CN East-Shanghai2': '5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.4: expected str @ data['type']['description'][4]. Got {'CN North-Beijing1': '5_bgp and 5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.5: expected str @ data['type']['description'][5]. Got {'AP-Hong Kong': '5_bgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E322 Argument 'charge_mode' found in dedicated_bandwidth is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E322 Argument 'create' found in timeouts is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E322 Argument 'name' found in dedicated_bandwidth is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E322 Argument 'size' found in dedicated_bandwidth is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E322 Argument 'update' found in timeouts is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E324 Argument 'create' in argument_spec found in timeouts defines default as ('5m') but documentation defines default as (None)
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E324 Argument 'state' in argument_spec defines default as ('present') but documentation defines default as (None)
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E324 Argument 'update' in argument_spec found in timeouts defines default as ('5m') but documentation defines default as (None)
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E326 Argument 'state' in argument_spec defines choices as (['present', 'absent']) but documentation defines choices as ([])
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'charge_mode' in argument_spec found in dedicated_bandwidth defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'create' in argument_spec found in timeouts defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'dedicated_bandwidth' in argument_spec defines type as 'dict' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'domain' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'enterprise_project_id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'filters' in argument_spec defines type as 'list' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'identity_endpoint' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'ip_version' in argument_spec defines type as 'int' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'ipv4_address' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'name' in argument_spec found in dedicated_bandwidth defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'password' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'port_id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'project' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'region' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'shared_bandwidth_id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'size' in argument_spec found in dedicated_bandwidth defines type as 'int' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'state' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'timeouts' in argument_spec defines type as 'dict' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'type' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'update' in argument_spec found in timeouts defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E337 Argument 'user' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E340 Argument 'dedicated_bandwidth' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E340 Argument 'timeouts' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:126:10: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:126:10: error DOCUMENTATION: syntax error: expected <block end>, but found '<block mapping start>'

click here for bot help

@ansibot ansibot added 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 Aug 7, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 7, 2019

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

lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E305 DOCUMENTATION.options.dedicated_bandwidth.type: not a valid value for dictionary value @ data['options']['dedicated_bandwidth']['type']. Got 'complex'
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.1: expected str @ data['type']['description'][1]. Got {'CN Northeast-Dalian': '5_telcom and 5_union.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.2: expected str @ data['type']['description'][2]. Got {'CN South-Guangzhou': '5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.3: expected str @ data['type']['description'][3]. Got {'CN East-Shanghai2': '5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.4: expected str @ data['type']['description'][4]. Got {'CN North-Beijing1': '5_bgp and 5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.5: expected str @ data['type']['description'][5]. Got {'AP-Hong Kong': '5_bgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E325 Argument 'dedicated_bandwidth' in argument_spec defines type as 'dict' but documentation defines type as 'complex'
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E325 Argument 'ip_version' in argument_spec defines type as 'int' but documentation defines type as 'str'

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Aug 7, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 7, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 5 errors:

lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.1: expected str @ data['type']['description'][1]. Got {'CN Northeast-Dalian': '5_telcom and 5_union.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.2: expected str @ data['type']['description'][2]. Got {'CN South-Guangzhou': '5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.3: expected str @ data['type']['description'][3]. Got {'CN East-Shanghai2': '5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.4: expected str @ data['type']['description'][4]. Got {'CN North-Beijing1': '5_bgp and 5_sbgp.'}
lib/ansible/modules/cloud/huawei/hwc_vpc_eip.py:0:0: E319 RETURN.type.description.5: expected str @ data['type']['description'][5]. Got {'AP-Hong Kong': '5_bgp.'}

click here for bot help

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Aug 7, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 7, 2019

@QijunPan @TommyLike @edisonxiang @freesky-edward @huaweicloud @hwDCN @niuzhenguo @xuxiaowei0512 @zengchen1024

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 7, 2019
@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 Aug 15, 2019
@zhongjun2
Copy link
Contributor Author

-label affects_2.9
+label affects_2.10

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 and removed affects_2.9 This issue/PR affects Ansible v2.9 labels Sep 25, 2019
@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 Oct 15, 2019
@niuzhenguo
Copy link

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. needs_triage Needs a first human triage before being processed. labels Oct 15, 2019
@zhongjun2
Copy link
Contributor Author

ready_for_review

@resmo resmo merged commit 64989be into ansible:devel Oct 19, 2019
@ansible ansible locked and limited conversation to collaborators Nov 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 cloud huawei Huawei community module This issue/PR relates to a module. new_module This PR includes a new module. new_plugin This PR includes a new plugin. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants