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 update of containerinfra cluster template's labels #1455

Conversation

pawcykca
Copy link
Contributor

This PR fixes errors while updating cluster template's labels.

Current data format (request body) send to Magnum API

[
  {
    "op": "replace",
    "path": "/labels",
    "value": "boot_volume_size=5"
  }
]

causes error (respond body) like below

{
	"errors": [{
			"request_id": "",
			"code": "client",
			"status": 400,
			"title": "Couldn't apply patch '[{'path': '/labels', 'op': 'replace', 'value': 'boot_volume_size=5",
			"detail": "Couldn't apply patch '[{'path': '/labels', 'op': 'replace', 'value': 'boot_volume_size=5'}]'. Reason: invalid syntax (<unknown>, line 1)",
			"links": []
		}
	]
}

Valid data format:

[
  {
    "op": "replace",
    "path": "/labels",
    "value": "{'boot_volume_size':'5'}"
  }
]

pawcykca added a commit to pawcykca/terraform-provider-openstack that referenced this pull request Nov 14, 2022
- merged two test into one
- use provided image (env 'OS_MAGNUM_IMAGE') instead of creating a new one during test
- depends on fix from PR terraform-provider-openstack#1455
Copy link
Member

@nikParasyr nikParasyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@nikParasyr nikParasyr merged commit c5f2886 into terraform-provider-openstack:main Nov 17, 2022
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.

None yet

2 participants