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 port_security_enabled option to openstack port #52502

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@514amir
Copy link

514amir commented Feb 18, 2019

SUMMARY

Its useful to be able to set port_security_enabled to false in some specific network configuration.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

openstack

ADDITIONAL INFORMATION

I made the matching fix in shade openstack-infra/shade#8 and i am waiting for the merge


@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 18, 2019

Build succeeded (third-party-check pipeline).

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 18, 2019

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

lib/ansible/modules/cloud/openstack/os_port.py:324:62: trailing-whitespace Trailing whitespace

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

lib/ansible/modules/cloud/openstack/os_port.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_port.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_port.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_port.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_port.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_port.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 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 35, in get_single_data
    node = self.get_single_node()
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/local/lib/python3.6/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/local/lib/python3.6/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
    "expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block mapping
  in "<unicode string>", line 12, column 4:
       network:
       ^
expected <block end>, but found '<block mapping start>'
  in "<unicode string>", line 78, column 5:
        version_added: "2.9"     
        ^
make: *** [modules] Error 1

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

lib/ansible/modules/cloud/openstack/os_port.py:92:25: W291 trailing whitespace
lib/ansible/modules/cloud/openstack/os_port.py:324:63: W291 trailing whitespace

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

lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'interface' in argument_spec defines default as ('public') but documentation defines default as (None)
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'port_security_enabled' in argument_spec defines default as (True) but documentation defines default as (False)
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'state' in argument_spec defines default as ('present') but documentation defines default as (None)
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'timeout' in argument_spec defines default as (180) but documentation defines default as (None)
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'vnic_type' in argument_spec defines default as ('normal') but documentation defines default as (None)
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'wait' in argument_spec defines default as (True) but documentation defines default as (False)
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E326 Argument 'interface' in argument_spec defines choices as (['public', 'internal', 'admin']) but documentation defines choices as ([])
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E326 Argument 'state' in argument_spec defines choices as (['absent', 'present']) but documentation defines choices as ([])
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E326 Argument 'vnic_type' in argument_spec defines choices as (['normal', 'direct', 'direct-physical', 'macvtap', 'baremetal', 'virtio-forwarder']) but documentation defines choices as ([])
lib/ansible/modules/cloud/openstack/os_port.py:92:5: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/cloud/openstack/os_port.py:92:5: error DOCUMENTATION: syntax error: expected <block end>, but found '<block mapping start>'

click here for bot help

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Feb 19, 2019

Build succeeded (third-party-check pipeline).

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 19, 2019

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

lib/ansible/modules/cloud/openstack/os_port.py:0:0: E309 version_added for new option (port_security_enabled) should be '2.8'. Currently StrictVersion ('2.9')
lib/ansible/modules/cloud/openstack/os_port.py:0:0: E324 Argument 'port_security_enabled' in argument_spec defines default as (True) but documentation defines default as (False)

click here for bot help

@ansibot ansibot added the ci_verified label Feb 19, 2019

@gtema
Copy link
Contributor

gtema left a comment

I would prefer not setting a default value here at all. We got a problem merging port_security_enabled for the os_network (which changed accidentally the default value)

@gtema

This comment has been minimized.

Copy link
Contributor

gtema commented Feb 19, 2019

duplicate of #47715

@ansibot ansibot added the stale_ci label Feb 27, 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.