Bug 1300146 - [fork][userinterface_public_576]Wrong prompt message when create from template contains invalid resource type
[fork][userinterface_public_576]Wrong prompt message when create from templat...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Management Console (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: bpeterse
yapei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-19 22:06 EST by yapei
Modified: 2016-05-12 13:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 13:12:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description yapei 2016-01-19 22:06:43 EST
Description of problem:
When creating from a template contains invalid resource type, it gives "Cannot create object. Unknown API version v1 for kind Test.", it should give error "Cannot create object. Unrecognized kind Test."

Version-Release number of selected component (if applicable):
fork_ami_openshift3_userinterface_public_576_177 

How reproducible:
Always

Steps to Reproduce:
1.Create a template "ruby-helloworld-sample" from examples/sample-app/application-template-stibuild.json
2. Change "kind": "Service" to "kind":"Test" for frontend service
3. Create from template on web console

Actual results:
Error "Cannot create object. Unknown API version v1 for kind Test" printed on next step page

Expected results:
Error "Cannot create object. Unrecognized kind Test" should printed

Additional info:
Comment 1 bpeterse 2016-01-20 16:35:44 EST
Here are some details about APIGroups that may require updating your tests.

- We have a list of v1 resources & can verify before making API calls
- We will not have a list of resources under each API Group.  We simply have to make the request and handle the 403, 404 errors if they happen

So in the template.json,
We can look this up and know if it will succeed or fail:
"kind": "Test",
"apiVersion": "v1", 

But, we will not know if this will succeed or fail:
"kind": "Test",
"apiVersion": "foo/v1", 


I'll have to update the error message to something like this:

- "Kind Test is invalid for API version v1"

And will try to pass up useful messages for 403,404 errors (from API groups) to the UI.
Comment 2 bpeterse 2016-01-22 12:29:45 EST
For 
"kind": "Test",
"apiVersion": "v1",

Message will be:
- Cannot create object. Kind Test is invalid for v1.
Comment 3 bpeterse 2016-01-22 12:31:25 EST
Fix will be coming in next fork_ami.  Will update trello card when fork_ami is generated.
Comment 4 yapei 2016-01-25 21:01:21 EST
tested on fork_ami_openshift3_userinterface_public_576_193, when create from template includes fakegroup, error info [Cannot create fakegroup.tests. User "yapei" cannot create fakegroup.tests in project "yapei-test".] will be displayed on next step page, works as expected

Note You need to log in before you can comment on or make changes to this bug.