[python-fuelclient] New CLI 'fuel2 graph upload' command doesn't take into account required args

Bug #1587837 reported by Vitalii Kulanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Vitalii Kulanov

Bug Description

Detailed bug description:
New CLI 'fuel2 graph upload' command doesn't take into account required args (-e ENV | -r RELEASE | -p PLUGIN).
If we try to execute command:
  [root@fuel ~]# fuel2 graph upload --file new_graph.yaml
  Deployment graph was uploaded from new_graph.yaml

Steps to reproduce:
1. Deploy Fuel (e.g. 1 master + 5 nodes).
2. Create new env.
3. Create some empty file (new_graph.yaml).
4. Try to upload new_graph.yaml with omitted required args (-e ENV | -r RELEASE | -p PLUGIN).

Expected results:
 fuel2 graph upload: error: one of the arguments -e/--env -r/--release -p/--plugin is required

Actual result:
 Deployment graph was uploaded from new_graph.yaml

Reproducibility:
 Always

Description of the environment:
cat /etc/fuel_build_id:
 206
cat /etc/fuel_build_number:
 206
cat /etc/fuel_release:
 10.0
cat /etc/fuel_openstack_version:
 newton-10.0

Additional information:
Here is a brief command usage example:
[root@fuel ~]# fuel2 graph upload --file
usage: fuel2 graph upload [-h] [-e ENV | -r RELEASE | -p PLUGIN] [-t TYPE] -f
                          FILE
fuel2 graph upload: error: argument -f/--file: expected one argument
Mutually exclusive group [-e ENV | -r RELEASE | -p PLUGIN] erroneously marked as not required.

Changed in fuel:
assignee: nobody → Vitalii Kulanov (vitaliy-t)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

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

Changed in fuel:
status: New → In Progress
Changed in fuel:
milestone: none → 10.0
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/323809
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=81cb49df72a3ae3571b52e38fcb0ad2eae809c85
Submitter: Jenkins
Branch: master

commit 81cb49df72a3ae3571b52e38fcb0ad2eae809c85
Author: tivaliy <email address hidden>
Date: Wed Jun 1 14:30:45 2016 +0300

    Align required args for 'fuel2 graph upload'

    Dissallow 'fuel2 graph uplod' command execution without
    required args (-e ENV | -r RELEASE | -p PLUGIN), e.g.:
      usage: fuel2 graph upload [-h]
             (-e ENV | -r RELEASE | -p PLUGIN) [-t TYPE] -f FILE

    Change-Id: I4fb1215874a849ea032afadb9604fca0dc0784a1
    Closes-Bug: 1587837

Changed in fuel:
status: In Progress → Fix Committed
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.