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 instance module #60180

Merged
merged 3 commits into from
Oct 19, 2019
Merged

Add instance module #60180

merged 3 commits into from
Oct 19, 2019

Conversation

zhongjun2
Copy link
Contributor

@zhongjun2 zhongjun2 commented Aug 7, 2019

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

COMPONENT NAME
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance" returned exit status 1.
>>> Standard Error
ERROR! module hwc_ecs_instance missing documentation (or could not parse documentation): while parsing a block collection
  in "<unicode string>", line 209, column 13
did not find expected '-' indicator
  in "<unicode string>", line 216, column 15

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 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 774, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 853, in _yaml.CParser._compose_sequence_node
  File "ext/_yaml.pyx", line 905, in _yaml.CParser._parse_next_event
yaml.parser.ParserError: while parsing a block collection
  in "<unicode string>", line 209, column 13
did not find expected '-' indicator
  in "<unicode string>", line 216, column 15
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_ecs_instance.py:1182: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_ecs_instance.py:1182:11: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E322 Argument 'delete' found in timeouts is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E322 Argument 'device' found in data_volumes is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E322 Argument 'ip_address' found in nics is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E322 Argument 'size' found in root_volume is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E322 Argument 'snapshot_id' found in root_volume is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E322 Argument 'subnet_id' found in nics is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E322 Argument 'volume_id' found in data_volumes is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E322 Argument 'volume_type' found in root_volume is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E324 Argument 'create' in argument_spec found in timeouts defines default as ('30m') but documentation defines default as (None)
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E324 Argument 'delete' in argument_spec found in timeouts defines default as ('30m') but documentation defines default as (None)
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E324 Argument 'update' in argument_spec found in timeouts defines default as ('30m') but documentation defines default as (None)
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'admin_pass' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'availability_zone' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'data_volumes' in argument_spec defines type as 'list' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'delete' in argument_spec found in timeouts defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'description' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'device' in argument_spec found in data_volumes defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'eip_id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'enable_auto_recovery' in argument_spec defines type as 'bool' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'flavor_name' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'image_id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'ip_address' in argument_spec found in nics defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'name' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'nics' in argument_spec defines type as 'list' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.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_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'root_volume' in argument_spec defines type as 'dict' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'security_groups' in argument_spec defines type as 'list' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'server_metadata' in argument_spec defines type as 'dict' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'server_tags' in argument_spec defines type as 'dict' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'size' in argument_spec found in root_volume defines type as 'int' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'snapshot_id' in argument_spec found in root_volume defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'ssh_key_name' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'subnet_id' in argument_spec found in nics defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.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_ecs_instance.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_ecs_instance.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_ecs_instance.py:0:0: E337 Argument 'user_data' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'volume_id' in argument_spec found in data_volumes defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'volume_type' in argument_spec found in root_volume defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E337 Argument 'vpc_id' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E340 Argument 'data_volumes' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E340 Argument 'nics' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E340 Argument 'root_volume' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E340 Argument 'timeouts' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:234:15: E302 DOCUMENTATION is not valid YAML
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:485:18: E313 RETURN is not valid YAML

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

lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:234:15: error DOCUMENTATION: syntax error: expected <block end>, but found '<scalar>'
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:485:18: error RETURN: syntax error: expected alphabetic or numeric character, but found ';'

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 pylint [explain] failed with 1 error:

lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:1177:37: undefined-variable Undefined variable 'result'

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

Command "ansible-doc -t module hwc_ecs_instance" returned exit status 250.
>>> Standard Error
ERROR! Unexpected Exception, this is probably a bug: expected string or bytes-like object

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

lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E305 DOCUMENTATION.options.data_volumes.type: not a valid value for dictionary value @ data['options']['data_volumes']['type']. Got 'complex'
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E305 DOCUMENTATION.options.enable_auto_recovery.description.0: expected str @ data['options']['enable_auto_recovery']['description'][0]. Got {"Specifies whether automatic recovery is enabled on the ECS. 'true": None, 'enables this function. false': "disables this function'."}
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E305 DOCUMENTATION.options.nics.type: not a valid value for dictionary value @ data['options']['nics']['type']. Got 'complex'
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E305 DOCUMENTATION.options.root_volume.type: not a valid value for dictionary value @ data['options']['root_volume']['type']. Got 'complex'
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E319 RETURN.enable_auto_recovery.description.0: expected str @ data['enable_auto_recovery']['description'][0]. Got {'Specifies whether automatic recovery is enabled on the ECS. "true': None, 'enables this function. false': 'disables this function".'}
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E325 Argument 'data_volumes' in argument_spec defines type as 'list' but documentation defines type as 'complex'
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E325 Argument 'nics' in argument_spec defines type as 'list' but documentation defines type as 'complex'
lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: E325 Argument 'root_volume' in argument_spec defines type as 'dict' but documentation defines type as 'complex'

click here for bot help

@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
@zengchen1024
Copy link
Contributor

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

ansibot commented Sep 4, 2019

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

lib/ansible/modules/cloud/huawei/hwc_ecs_instance.py:0:0: module-incorrect-version-added: version_added should be '2.10'. Currently '2.9'

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. and removed shipit This PR is ready to be merged by Core labels Sep 4, 2019
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Sep 4, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed 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. labels Sep 10, 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 stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed affects_2.9 This issue/PR affects Ansible v2.9 labels Oct 3, 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. labels Oct 17, 2019
@resmo resmo merged commit 39201d1 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

5 participants