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

More Helpful Error Message on api/v2/inventories Endpoint #5744

Closed
beeankha opened this issue Jan 22, 2020 · 1 comment
Closed

More Helpful Error Message on api/v2/inventories Endpoint #5744

beeankha opened this issue Jan 22, 2020 · 1 comment

Comments

@beeankha
Copy link
Contributor

ISSUE TYPE
  • Bug Report
SUMMARY

When trying to change a regular inventory into a "smart" inventory, the PUT and PATCH both error out (as they should), but the error message is not very informative. Please see screenshots below for both PUT and PATCH errors:

PUTNotAllowed

PATCHNotAllowed

It would be nice if the error was something more along the lines of 'You cannot turn a regular inventory into a "smart" inventory.'

ENVIRONMENT
  • AWX version: 9.1.1
  • AWX install method: docker for mac
  • Web Browser: Chrome
STEPS TO REPRODUCE

Navigate to a pre-existing regular inventory endpoint via api/v2/inventories/[id], then try to PUT or PATCH to try to make it into a "smart" inventory:

{
    "name": "[inventory_name]",
    "description": "",
    "organization": [inventory_id],
    "kind": "smart",
    "host_filter": null,
    "variables": "",
    "insights_credential": null
}
EXPECTED RESULTS

An error message that tells the user that a regular inventory can't be turned into a smart inventory.

ACTUAL RESULTS
{
    "detail": "Method \"PATCH\" not allowed."
}
@nixocio nixocio assigned nixocio and unassigned nixocio Jan 30, 2020
ryanpetrello added a commit to kldavis52/awx that referenced this issue Aug 25, 2020
see: ansible#5744

Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
ryanpetrello added a commit to kldavis52/awx that referenced this issue Aug 25, 2020
see: ansible#5744
Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
chrismeyersfsu pushed a commit to chrismeyersfsu/awx that referenced this issue Aug 27, 2020
see: ansible#5744
Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
mabashian pushed a commit to mabashian/awx that referenced this issue Aug 31, 2020
see: ansible#5744
Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
elyezer pushed a commit to ryanpetrello/awx that referenced this issue Sep 1, 2020
see: ansible#5744
Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
@one-t
Copy link
Contributor

one-t commented Sep 1, 2020

Verified on 3.8.0- this now returns the clean error message

@one-t one-t closed this as completed Sep 1, 2020
AlanCoding pushed a commit to AlanCoding/awx that referenced this issue Sep 10, 2020
see: ansible#5744
Co-Authored-By: kldavis52 <kyle.linnard.davis@gmail.com>
AlanCoding pushed a commit to AlanCoding/awx that referenced this issue Apr 26, 2022
…associateHybridInstance

[Backport] Prevent disassociate hybrid instance
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