tacker vnfd-create with empty vnfd-file or vnfd argument throws a non meaningful error

Bug #1490067 reported by Sripriya
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-tackerclient
Fix Released
Undecided
dharmendra
tacker
Fix Released
Low
dharmendra

Bug Description

Actual scenario:

tacker vnfd-create --vnfd-file ""
local variable 'vnfd' referenced before assignment

tacker vnfd-create --vnfd-file None
[Errno 2] No such file or directory: u'None'

tacker vnfd-create --vnfd ""
local variable 'vnfd' referenced before assignment

tacker vnfd-create --vnfd None
Request Failed: internal server error while processing your request.

Expected scenario:
tacker vnfd-create with empty arguments should error out gracefully.

Sripriya (sseetha)
Changed in tacker:
assignee: nobody → Sripriya (sseetha)
Revision history for this message
Sridhar Ramaswamy (srics-r) wrote :

In the current code .. the above invalid commands goes an created a dummy vnfd... that is bad too and need to be fixed.

stack@tacker-dev:~/tacker/templates$ tacker vnfd-create --vnfd-file ""
Created a new vnfd:
+---------------+------------------------------------------------------------------------+
| Field | Value |
+---------------+------------------------------------------------------------------------+
| description | |
| id | 27df2ff4-7d48-4001-8155-2a0e38f9b218 |
| infra_driver | heat |
| mgmt_driver | noop |
| name | |
| service_types | {"service_type": "vnfd", "id": "b7a31d9b-c20e-4d49-bb8c-6fb33d920bea"} |
| tenant_id | d56ff2e585f34f1d8d72c3189a978289 |
+---------------+------------------------------------------------------------------------+
stack@tacker-dev:~/tacker/templates$ tacker vnfd-create --vnfd ""
Created a new vnfd:
+---------------+------------------------------------------------------------------------+
| Field | Value |
+---------------+------------------------------------------------------------------------+
| description | |
| id | 1325f99e-522f-41c9-87fb-c21144ff5e58 |
| infra_driver | heat |
| mgmt_driver | noop |
| name | |
| service_types | {"service_type": "vnfd", "id": "e8bda48b-855c-4dcb-9436-5753ef6ab49d"} |
| tenant_id | d56ff2e585f34f1d8d72c3189a978289 |
+---------------+------------------------------------------------------------------------+

Changed in tacker:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sridhar Ramaswamy (srics-r) wrote :

Sripriya - are you planning to work on this ? If not, can you please un-assign so that someone else from the community could pick this up.

Perhaps this -ve behavior changed in the latest code base.

Changed in tacker:
assignee: Sripriya (sseetha) → dharmendra (dharmendra-kushwaha)
Changed in python-tackerclient:
assignee: nobody → dharmendra (dharmendra-kushwaha)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tackerclient (master)

Reviewed: https://review.openstack.org/464091
Committed: https://git.openstack.org/cgit/openstack/python-tackerclient/commit/?id=a11344c3185717cb2e264ed126b904a56b6ea38b
Submitter: Jenkins
Branch: master

commit a11344c3185717cb2e264ed126b904a56b6ea38b
Author: vagrant <email address hidden>
Date: Mon Jul 3 08:13:26 2017 +0000

    Error handling for vnfd-create with empty vnfd-file

    Error handling for empty vnfd-file and yaml load.

    Closes-Bug: #1490067
    Change-Id: I48c21d193251a95c8fc7b10d3c6549b74c5287df

Changed in python-tackerclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tackerclient 0.11.0

This issue was fixed in the openstack/python-tackerclient 0.11.0 release.

Changed in tacker:
status: Confirmed → 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.