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

Unable to edit tenant name with API #978

Open
szajac01 opened this issue Dec 11, 2020 · 6 comments
Open

Unable to edit tenant name with API #978

szajac01 opened this issue Dec 11, 2020 · 6 comments
Assignees

Comments

@szajac01
Copy link

szajac01 commented Dec 11, 2020

Hi, a little bug from the manage iq jansa2 tenants api
<
url: "{{ miq_api }}/tenants/1"
method: POST
body: "{"action" : "edit", "resource" : { "name" : "test", "description" : "test" } }"
>
does update only the description and not the name.
I also does not fail

Updating name is possible via the UI in the Company Name field froé server settings.

@akhilkr128
Copy link
Member

@miq-bot assign @akhilkr128

@miq-bot
Copy link
Member

miq-bot commented Jun 2, 2022

@akhilkr128 'akhilkr128' is an invalid assignee, ignoring...

@akhilkr128
Copy link
Member

If we pass use_config_for_attributes as false along with the body we can edit tenant's name other wise it will pick the company name from settings.
An example curl:
curl --user username:password -i -X POST -H "Accept: application/json" -d '{ "action": "edit", "resource" : { "name" : "test", "description" : "test", "use_config_for_attributes" : "false" } }' http://url/api/tenants/1

if you want to pick the name, login text from settings pass the use_config_for_attributes as true.

@Fryguy
Copy link
Member

Fryguy commented Jun 7, 2022

That's a weird requirement - @kbrock Do you recall why this is needed? I would think "false" should be the default if one does not pass the parameter.

@akhilkr128
Copy link
Member

akhilkr128 commented Jun 10, 2022

This issue will happen only when the table value of use_config_for_attributes is true. If we create a new record in the tenant table use_config_for_attributes default value will be false and then "use_config_for_attributes": "false" is not required in the resource body to edit the tenant name.

@miq-bot miq-bot added the stale label Feb 27, 2023
@miq-bot
Copy link
Member

miq-bot commented Feb 27, 2023

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@Fryguy Fryguy removed the stale label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants