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

modified storageaccount fact return curated result with connection string #49702

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
5 participants
@yuwzho
Copy link
Contributor

yuwzho commented Dec 10, 2018

SUMMARY

Fixes #37934
Fixes #49791

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

azure_rm_storageaccount

ADDITIONAL INFORMATION
2.7.0
@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 10, 2018

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:0: syntax-error invalid syntax (<unknown>, line 337)
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:225:0: trailing-whitespace Trailing whitespace

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/ 
Makefile:93: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../bin/plugin_formatter.py", line 720, in <module>
    main()
  File "../bin/plugin_formatter.py", line 678, 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 269, 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 96, 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 337
    except Exception as exc:
         ^
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/azure/azure_rm_storageaccount.py:337:26: SyntaxError: except Exception as exc:

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: except Exception as exc:

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: except Exception as exc:

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: except Exception as exc:

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: except Exception as exc:

The test ansible-test sanity --test import --python 2.6 [explain] failed with 2 errors:

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: invalid syntax
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:143:0: SyntaxError: Non-ASCII character '\xef' in file /root/ansible/lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py on line 144, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

The test ansible-test sanity --test import --python 2.7 [explain] failed with 2 errors:

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: invalid syntax
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:143:0: SyntaxError: Non-ASCII character '\xef' in file /root/ansible/lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py on line 144, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: SyntaxError: invalid syntax

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:120:32: W291 trailing whitespace
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:225:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:243:5: E303 too many blank lines (2)

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:0:0: E401 Python SyntaxError while parsing module
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:0:0: E322 "format" is listed in the argument_spec, but not documented in the module
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:0:0: E324 Value for "default" from the argument_spec ('raw') for "format" does not match the documentation (None)
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:0:0: E326 Value for "choices" from the argument_spec (['raw', 'curated']) for "format" does not match the documentation ([])
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:144:24: E313 RETURN is not valid YAML

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:337:26: python-syntax-error invalid syntax (<unknown>, line 337)
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:144:24: error RETURN: syntax error: could not find expected ':'

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 10, 2018

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:241:5: E303 too many blank lines (2)

click here for bot help

return [self.account_obj_to_dict(item) for item in raw]

def account_obj_to_dict(self, account_obj):
account_dict = dict(

This comment has been minimized.

@yungezz

yungezz Dec 12, 2018

Contributor

add support get keys/connectionstrings in separate pr.

Show resolved Hide resolved lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py
Show resolved Hide resolved lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py Outdated
@yungezz

This comment has been minimized.

Copy link
Contributor

yungezz commented Dec 12, 2018

ready_for_review

@ansibot ansibot removed the needs_triage label Dec 12, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 13, 2018

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:187:21: error RETURN: syntax error: could not find expected ':'

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:187:21: E313 RETURN is not valid YAML

click here for bot help

@yuwzho yuwzho changed the title modified storageaccount fact return curated result modified storageaccount fact return curated result with connection string Dec 14, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 14, 2018

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:414:43: E126 continuation line over-indented for hanging indent

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 21, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 21, 2018

The test ansible-test sanity --test pylint [explain] failed with 12 errors:

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:205:14: bad-whitespace Exactly one space required around assignment cors_rule_spec=dict(               ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:378:32: bad-whitespace No space allowed around keyword argument assignment                 allowed_origins = to_native(x.allowed_origins),                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:379:32: bad-whitespace No space allowed around keyword argument assignment                 allowed_methods = to_native(x.allowed_methods),                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:380:35: bad-whitespace No space allowed around keyword argument assignment                 max_age_in_seconds = x.max_age_in_seconds,                                    ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:381:32: bad-whitespace No space allowed around keyword argument assignment                 exposed_headers = to_native(x.exposed_headers),                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:382:32: bad-whitespace No space allowed around keyword argument assignment                 allowed_headers = to_native(x.allowed_headers)                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:424:32: bad-whitespace No space allowed around keyword argument assignment                 allowed_origins = to_native(x.allowed_origins),                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:425:32: bad-whitespace No space allowed around keyword argument assignment                 allowed_methods = to_native(x.allowed_methods),                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:426:35: bad-whitespace No space allowed around keyword argument assignment                 max_age_in_seconds = x.max_age_in_seconds,                                    ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:427:32: bad-whitespace No space allowed around keyword argument assignment                 exposed_headers = to_native(x.exposed_headers),                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:428:32: bad-whitespace No space allowed around keyword argument assignment                 allowed_headers = to_native(x.allowed_headers)                                 ^
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:449:37: trailing-whitespace Trailing whitespace

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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/azure/azure_rm_storageaccount.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 754, in <module>
    main()
  File "../bin/plugin_formatter.py", line 709, 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 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 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 82, in compose_node
    node = self.compose_sequence_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 110, in compose_sequence_node
    while not self.check_event(SequenceEndEvent):
  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 393, in parse_block_sequence_entry
    "expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block collection
  in "<unicode string>", line 80, column 13:
                - Specifies CORS rules for the B ... 
                ^
expected <block end>, but found '<scalar>'
  in "<unicode string>", line 83, column 121:
     ... e, explicitly set blob_cors: []".
                                         ^
make: *** [modules] Error 1

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:205:15: E225 missing whitespace around operator
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:378:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:378:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:379:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:379:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:380:35: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:380:37: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:381:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:381:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:382:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:382:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:424:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:424:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:425:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:425:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:426:35: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:426:37: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:427:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:427:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:428:32: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:428:34: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/azure/azure_rm_storageaccount_facts.py:449:38: W291 trailing whitespace

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 21, 2018

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:224:5: E129 visually indented line with same indent as next logical line

click here for bot help

@mattclay

This comment has been minimized.

Copy link
Member

mattclay commented Dec 21, 2018

CI failure in multiple integration tests. Here's one of them:

https://app.shippable.com/github/ansible/ansible/runs/99660/78/tests

@ansibot ansibot removed the ci_verified label Dec 24, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 24, 2018

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:224:5: E129 visually indented line with same indent as next logical line

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 24, 2018

@yuwzho yuwzho force-pushed the VSChina:yuwzho-storageaccount branch from c93505d to 1c5a47d Dec 24, 2018

@ansibot ansibot added the stale_ci label Jan 3, 2019

@yuwzho yuwzho force-pushed the VSChina:yuwzho-storageaccount branch from 1c5a47d to 5e2f00b Jan 4, 2019

@ansibot ansibot removed the stale_ci label Jan 4, 2019

@yungezz
Copy link
Contributor

yungezz left a comment

LGTM, some minor comments

from ansible.module_utils._text import to_native

cors_rule_spec = dict(
allowed_origins=dict(type='list', required=True),

This comment has been minimized.

@yungezz

yungezz Jan 7, 2019

Contributor

with element type str?

and set(rule1['allowed_headers']) == set(rule2['allowed_headers'])
and set(rule1['exposed_headers']) == set(rule2['exposed_headers'])):
matched = True
copy2.remove(rule2)

This comment has been minimized.

@yungezz

yungezz Jan 7, 2019

Contributor

if this safe during a loop?

@@ -110,16 +293,21 @@ def __init__(self):
name=dict(type='str'),
resource_group=dict(type='str', aliases=['resource_group_name']),
tags=dict(type='list'),
show_connection_string=dict(type='bool'),
show_blob_cors=dict(type='bool')

This comment has been minimized.

@yungezz

yungezz Jan 7, 2019

Contributor

is the show_blob_cors necessary? why return it by default? we add flag for show credentials like connection_string for security concern, although weak. but is cors info something need special flag?

This comment has been minimized.

@yuwzho

yuwzho Jan 8, 2019

Contributor

My thought is getting the blob cors setting needs another API call (coming table/queue/file may need one API call for each), which will cause a lot of network overhead when listing resources in a resource group or subscription. So I make this as an option to let user explicitly get the CORS setting.

@sivel

This comment has been minimized.

Copy link
Member

sivel commented Jan 7, 2019

This PR seems to be triggering the following error which is causing CI to fail:

ERROR: lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:0:0: E321 Exception attempting to import module for argument_spec introspection, 'APIVersion 2018-07-01 is not available'

The error isn't being properly exposed, and that is due to an issue with one of our sanity checks, but that check should be fixed soon, which will then expose the error mentioned above.

@yuwzho

This comment has been minimized.

Copy link
Contributor

yuwzho commented Jan 8, 2019

@sivel Thanks for pointing it! But my question is why the importing cause a sanity error, the integration test show we can successfully get the APIVersion 2018-07-01 and use it. (Since the new feature is introduced from this api version)

@sivel

This comment has been minimized.

Copy link
Member

sivel commented Jan 8, 2019

But my question is why the importing cause a sanity error

The sanity test is verifying that there are no side effects that can cause exceptions before AnsibleModule is instantiated.

I am guessing that it is due to not updating test/runner/requirements/integration.cloud.azure.txt to reflect the version change.

Additionally, it looks like this change may be required to https://github.com/ansible/default-test-container/blob/master/requirements/integration.cloud.azure.txt also

cc @mattclay

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Jan 8, 2019

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

lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py:0:0: E321 Exception attempting to import module for argument_spec introspection, 'APIVersion 2018-07-01 is not available'

click here for bot help

@ansibot ansibot added the ci_verified label Jan 8, 2019

description:
- Specifies CORS rules for the Blob service.
- You can include up to five CorsRule elements in the request.
- If no CorsRule elements are included in the request body, nothing about CORS will be changed.

This comment has been minimized.

@yungezz

yungezz Jan 14, 2019

Contributor

CorsRule to blob_cors, in the reqeust body to in argument list

azure_rm_storageaccount:
resource_group: Testing
name: clh002
type: Standard_RAGRS

This comment has been minimized.

@yungezz

yungezz Jan 14, 2019

Contributor

where's blob_cors configuration?

@ansibot ansibot added the stale_ci label Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment