[cli] adding apps to env template doesn't work

Bug #1545513 reported by Jacek Tomasiak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-muranoclient
Fix Released
High
Jacek Tomasiak

Bug Description

Example command:
MURANO_URL=http://localhost:8082/ OS_USERNAME=admin OS_PASSWORD=<pass> OS_AUTH_URL=http://localhost:5000/v2.0 OS_TENANT_NAME=demo murano env-template-add-app <envtemplateid> <apptemplatefile>

Not sure if this is a (missing) documentation problem or an actual bug in the code.
By looking at the API code I assumed that the <apptemplatefile> needs to be json file.
With such a file, above command returns:
'list' object has no attribute 'items'

Looks like the part reading the file doesn't try to parse the JSON but simply reads the file lines and pushes these to the API.

Jacek Tomasiak (skazi)
Changed in python-muranoclient:
assignee: nobody → Jacek Tomasiak (skazi)
Jacek Tomasiak (skazi)
Changed in python-muranoclient:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/280024

Changed in python-muranoclient:
status: Confirmed → In Progress
Stan Lagun (slagun)
Changed in python-muranoclient:
milestone: none → 0.8.2
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-muranoclient (master)

Reviewed: https://review.openstack.org/280024
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=24bf34ea32dae661bbb4768c0d0e69577a3b0cb9
Submitter: Jenkins
Branch: master

commit 24bf34ea32dae661bbb4768c0d0e69577a3b0cb9
Author: Jacek Tomasiak <email address hidden>
Date: Sun Feb 14 22:00:31 2016 +0100

    Fix reading of app template file when adding to env template

    When running env-template-add-app subcommand via CLI, user is supposed to
    pass "application template file" as a second argument. It seems that there
    is no documentation for this template file format but the code shows that
    this is a simple pass-through to the API which expects JSON (documented in
    the API docs). However current CLI code reads this file as a set of plain
    text lines and there's no sign of JSON parsing.

    This commit changes this to load the file as JSON and pass further as python
    object.

    Change-Id: I53fe295424dcaf2ab4fa7e165c30a571d021ef21
    Closes-Bug: #1545513

Changed in python-muranoclient:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.