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

Fix [magnum].label formatting #1247

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

freyes
Copy link
Member

@freyes freyes commented Jul 29, 2024

Fixes the formatting of the labels configuration key, error raised with the current formatting:

Traceback (most recent call last):
  File "/mnt/git/charmed-openstack-tester/.tox/func-target/lib/python3.8/site-packages/magnum_tempest_plugin/tests/api/base.py", line 39, in setUpClass
config.Config.setUp()
  File "/mnt/git/charmed-openstack-tester/.tox/func-target/lib/python3.8/site-packages/magnum_tempest_plugin/common/config.py", line 187, in setUp
cls.set_labels(config)
  File "/mnt/git/charmed-openstack-tester/.tox/func-target/lib/python3.8/site-packages/magnum_tempest_plugin/common/config.py", line 162, in set_labels
cls.labels = ast.literal_eval(CONF.magnum.labels)
  File "/usr/lib/python3.8/ast.py", line 59, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    container_infra_prefix:10.245.164.190:5000
                          ^
SyntaxError: invalid syntax

Fixes the formatting of the labels configuration key, error raised with
the current formatting:

    Traceback (most recent call last):
      File "/mnt/git/charmed-openstack-tester/.tox/func-target/lib/python3.8/site-packages/magnum_tempest_plugin/tests/api/base.py", line 39, in setUpClass
    config.Config.setUp()
      File "/mnt/git/charmed-openstack-tester/.tox/func-target/lib/python3.8/site-packages/magnum_tempest_plugin/common/config.py", line 187, in setUp
    cls.set_labels(config)
      File "/mnt/git/charmed-openstack-tester/.tox/func-target/lib/python3.8/site-packages/magnum_tempest_plugin/common/config.py", line 162, in set_labels
    cls.labels = ast.literal_eval(CONF.magnum.labels)
      File "/usr/lib/python3.8/ast.py", line 59, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
      File "/usr/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
      File "<unknown>", line 1
        container_infra_prefix:10.245.164.190:5000
                              ^
    SyntaxError: invalid syntax
@freyes freyes requested a review from ajkavanagh July 29, 2024 19:06
@javacruft javacruft merged commit 0718782 into openstack-charmers:master Jul 29, 2024
3 checks passed
@freyes freyes deleted the fix-labels-fmt branch July 30, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants