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

os_subnet: allow using non-default subnet pool #52608

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@jamescassell
Copy link
Contributor

jamescassell commented Feb 20, 2019

SUMMARY

os_subnet currently errors out if you pass a subnetpool_id rather than use_default_subnetpool or cidr. This change also allows subnetpool_id in case the other two are absent.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

os_subnet

ADDITIONAL INFORMATION

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 20, 2019

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:0: syntax-error invalid syntax (<unknown>, line 276)

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

lib/ansible/modules/cloud/openstack/os_subnet.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/cloud/openstack/os_subnet.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/cloud/openstack/os_subnet.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/cloud/openstack/os_subnet.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/cloud/openstack/os_subnet.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/cloud/openstack/os_subnet.py:0:0: has a documentation error formatting or is missing documentation.

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
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
cat _themes/srtd/static/css/theme.css | sed -e 's/^[ 	]*//g; s/[ 	]*$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$/d' | sed -e :a -e '$!N; s/\n\(.\)/\1/; ta' > _themes/srtd/static/css/theme.min.css
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 774, in <module>
    main()
  File "../bin/plugin_formatter.py", line 729, 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 294, 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 103, 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 276
    not extra_specs.get('subnetpool_id', False):
                                               ^
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/openstack/os_subnet.py:276:60: SyntaxError: not extra_specs.get('subnetpool_id', False):

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: not extra_specs.get('subnetpool_id', False):

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: not extra_specs.get('subnetpool_id', False):

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: not extra_specs.get('subnetpool_id', False):

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: not extra_specs.get('subnetpool_id', False):

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: not extra_specs.get('subnetpool_id', False):

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:17: E127 continuation line over-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:280:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:281:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:281:13: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:281:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:282:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:283:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:283:13: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:283:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:285:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:286:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:288:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:288:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:288:17: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:289:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:290:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:291:17: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:291:19: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:294:23: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:294:25: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:295:20: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:295:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:296:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:297:23: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:297:25: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:298:20: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:298:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:300:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:300:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:300:17: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:302:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:306:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:308:23: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:308:25: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:321:25: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:321:27: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:326:53: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:326:55: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:327:23: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:327:25: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:328:23: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:328:25: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:329:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:329:26: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:340:28: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:340:30: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:342:28: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:342:30: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:347:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:349:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:349:26: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:351:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:351:26: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/openstack/os_subnet.py:355:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:356:9: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:359:1: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:360:5: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/openstack/os_subnet.py:361:1: E901 TokenError: EOF in multi-line statement

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

lib/ansible/modules/cloud/openstack/os_subnet.py:0:0: E401 Python SyntaxError while parsing module
test/sanity/validate-modules/ignore.txt:210:1: A102 Remove since "lib/ansible/modules/cloud/openstack/os_subnet.py" passes "E326" test

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

lib/ansible/modules/cloud/openstack/os_subnet.py:276:60: python-syntax-error invalid syntax (<unknown>, line 276)

click here for bot help

@jamescassell

This comment has been minimized.

Copy link
Contributor Author

jamescassell commented Feb 20, 2019

What did I do? Seems like an innocent enough change to me.

edit: looks like I missed a closing paren in refactoring... hopefully fixed now

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 20, 2019

Build failed (third-party-check pipeline) integration testing with
OpenStack. For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@jamescassell jamescassell force-pushed the jamescassell:os-subnet-allow-subnetpool branch from b6cfd44 to 14b6944 Feb 20, 2019

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 20, 2019

Build failed (third-party-check pipeline) integration testing with
OpenStack. For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@jamescassell

This comment has been minimized.

Copy link
Contributor Author

jamescassell commented Feb 20, 2019

Since Shippable passed, does that mean that I've addressed the comments from ansibot?

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 20, 2019

Build failed (third-party-check pipeline) integration testing with
OpenStack. For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@jamescassell jamescassell force-pushed the jamescassell:os-subnet-allow-subnetpool branch from da637e5 to 14b6944 Feb 20, 2019

@jamescassell

This comment has been minimized.

Copy link
Contributor Author

jamescassell commented Feb 20, 2019

As far as I can tell, the tests by openstack-zuul are failing for unrelated reasons.

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 21, 2019

Build failed (third-party-check pipeline) integration testing with
OpenStack. For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 25, 2019

Build succeeded (third-party-check pipeline).

@ansibot ansibot added the stale_ci label Mar 5, 2019

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.