Bug 1567755 - Service Dialog: While ordering the services via API, tag_control array is not getting parsed.
Summary: Service Dialog: While ordering the services via API, tag_control array is not...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: GA
: 5.8.4
Assignee: Tina Fitzgerald
QA Contact: Yadnyawalk Tale
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-16 07:28 UTC by Neha Chugh
Modified: 2021-09-09 13:42 UTC (History)
10 users (show)

Fixed In Version: 5.8.4.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-31 12:05:47 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Neha Chugh 2018-04-16 07:28:08 UTC
Description of problem:

While ordering the service via API, tag_control array is not getting parsed.

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

How reproducible:
Always

Steps to Reproduce:

1. Create a service catalog and provide a service dialog with values based on tag_control filter.

2. When we pass classificaiton ID in the API query, it gives the response as "Classification::<classification ID>"

3. Now try to pass classification description in the payload and it will give you blank value in the API response

Below is an example:

vmdb_production=# select * from classifications where id='93000000000283';
       id       | description | icon | read_only | syntax | single_value | example_text |     tag_id     |   parent_id    | show | default | perf_by_tag 
----------------+-------------+------+-----------+--------+--------------+--------------+----------------+----------------+------+---------+-------------
 93000000000283 | common      |      | f         | string | f            |              | 93000000000304 | 93000000000165 | t    |         | 
(1 row)

vmdb_production=# select * from tags where id='93000000000304';
       id       |                name                
----------------+------------------------------------
 93000000000304 | /managed/asip_application/0_common
(1 row)



https://<cfmehost>/api/service_catalogs/93000000000002/service_templates/93000000000027

{
  "action" : "order",
  "resource" : {
    "href" : "https://<cfmehost>/api/service_catalogs/93000000000002/service_templates/93000000000027",
    "option_0_asip_vlan" : "middle",
    "name_0_asip_application" : "93000000000283",
    "tag_0_asip_environment" : "bt_dev1",
    "tag_0_asip_role" : "JDK 6",
    "option_0_extra_storage_size" : "5",
    "option_0_extra_storage_path" : "/data"
  }
}

"options": {
        "dialog": {
            "dialog_option_0_cname": "",
            "dialog_option_0_asip_vlan": "middle",
            "Array::dialog_name_0_asip_application": "Classification::93000000000283",
            "dialog_tag_0_asip_environment": "bt_dev1",
            "Array::dialog_tag_0_asip_role": "",
            "dialog_option_0_extra_storage_size": 5,
            "dialog_option_0_extra_storage_path": "/data"
        },




https://<cfmehost>/api/service_catalogs/93000000000002/service_templates/93000000000027
{
  "action" : "order",
  "resource" : {
    "href" : "https://<cfmehost>/api/service_catalogs/93000000000002/service_templates/93000000000027",
    "option_0_asip_vlan" : "middle",
    "name_0_asip_application" : "common",
    "tag_0_asip_environment" : "bt_dev1",
    "tag_0_asip_role" : "JDK 6",
    "option_0_extra_storage_size" : "5",
    "option_0_extra_storage_path" : "/data"
  }
}


 "options": {
        "dialog": {
            "dialog_option_0_cname": "",
            "dialog_option_0_asip_vlan": "middle",
            "Array::dialog_name_0_asip_application": "",
            "dialog_tag_0_asip_environment": "bt_dev1",
            "Array::dialog_tag_0_asip_role": "",
            "dialog_option_0_extra_storage_size": 5,
            "dialog_option_0_extra_storage_path": "/data"
        },,
Actual results:

Dialog parser is not able to parse the tag_control type variables. Though this kind of behavior is not observed in other datatypes


Expected results:
Dialog Parser should be able to parse the tag_control type variables' values.

Additional info:

Comment 2 Dave Johnson 2018-04-16 07:44:59 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 6 drew uhlmann 2018-05-08 16:33:13 UTC
I can't reproduce on 5.9.

Comment 8 Tina Fitzgerald 2018-05-09 11:51:17 UTC
Hi Satoe,

Sorry, that was my mistake. 
Setting the status back to on_dev, and we'll see if the problem is present in 5.8.z.

Thanks,
Tina

Comment 9 drew uhlmann 2018-05-09 12:03:28 UTC
This was commit that fixed it: https://github.com/ManageIQ/manageiq/pull/16955 just fyi, Tina.

Comment 10 drew uhlmann 2018-05-09 12:37:12 UTC
Also broken in 5.8.4.2.20180424224202_be9b69f

Comment 11 drew uhlmann 2018-05-09 13:32:20 UTC
https://github.com/ManageIQ/manageiq/pull/17398

Comment 12 Shveta 2018-05-18 17:52:19 UTC
Hi Martin , 

can you please verify this BZ.
I have created a tag_dialog at https://10.8.198.6.
and tagservice to test .
I am not sure about ordering service via API .

Comment 14 Tina Fitzgerald 2018-05-30 21:07:04 UTC
Hi Yadnyawalk,

Can you test this on master?

Thanks,
Tina

Comment 16 drew uhlmann 2018-05-31 12:05:47 UTC
I'm closing this as not a bug, because we've never supported querying classification by name in this way. The classification should be queried by ID, not name.


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