openstack help congress datasource table schema show is not correct

Bug #1501561 reported by Su Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-congressclient
New
Undecided
Su Zhang

Bug Description

You will need to use "openstack congress datasource table schema show DS_ID TABLE_NAME" to show table schema.
However, the help page shows

 openstack help congress datasource table schema show
usage: openstack congress datasource table schema show [-h]
                                                       [-f {csv,html,json,table,value,yaml}]
                                                       [-c COLUMN]
                                                       [--max-width <integer>]
                                                       [--quote {all,minimal,none,nonnumeric}]
                                                       <datasource-name>
                                                       <table-name>

Show schema for datasource table.

positional arguments:
  <datasource-name> Name of the datasource
  <table-name> Name of the table

optional arguments:

We should either accept datasource name or change the help info to <datasource-ID> ID of the datasource

Su Zhang (su-zhang)
Changed in python-congressclient:
assignee: nobody → Su Zhang (su-zhang)
Revision history for this message
Anusha (anusha-iiitm) wrote :

Su Zhang, it works for me with data-source name also, i'm not sure why it is not working for you

anusha@ubuntu-anusha:/s$ openstack congress datasource table schema show nova flavors
+-------------+-------------+
| name | description |
+-------------+-------------+
| id | None |
| name | None |
| vcpus | None |
| ram | None |
| disk | None |
| ephemeral | None |
| rxtx_factor | None |
+-------------+-------------+

Revision history for this message
Su Zhang (su-zhang) wrote :

this is weird, see my running script:

SymMacToolkit-C02NW080G3QD:~ su_zhang$ openstack congress datasource list
+--------------------------------------+-----------+---------+------+-------------------------------------------------------------------------------------------------------------------------------------+
| id | name | enabled | type | config |
+--------------------------------------+-----------+---------+------+-------------------------------------------------------------------------------------------------------------------------------------+
| 44fb1ae3-17f8-481a-ba12-678bbc735079 | nova | True | None | {u'username': u'su_zhang', u'tenant_name': u'admin', u'password': u'<hidden>', u'auth_url': u'https://keystone.dvt2.symcpe.net/v3'} |
| e4d145f2-b28b-451a-802c-be44dcc2b6dd | neutronv2 | True | None | {u'username': u'su_zhang', u'tenant_name': u'admin', u'password': u'<hidden>', u'auth_url': u'https://keystone.dvt2.symcpe.net/v3'} |
+--------------------------------------+-----------+---------+------+-------------------------------------------------------------------------------------------------------------------------------------+
SymMacToolkit-C02NW080G3QD:~ su_zhang$ openstack congress datasource table schema show neutronv2 external_fixed_ips
ERROR: openstack Datasource not found neutronv2 (HTTP 404) (Request-ID: req-7fcda8ec-1f81-4e44-910d-639c02b88fe8)
SymMacToolkit-C02NW080G3QD:~ su_zhang$ openstack congress datasource table schema show e4d145f2-b28b-451a-802c-be44dcc2b6dd external_fixed_ips
+------------+-------------+
| name | description |
+------------+-------------+
| router_id | None |
| subnet_id | None |
| ip_address | None |
+------------+-------------+
SymMacToolkit-C02NW080G3QD:~ su_zhang$

Revision history for this message
Anusha (anusha-iiitm) wrote :

ya, weird . Ideally, according to code here https://github.com/openstack/python-congressclient/blob/master/congressclient/osc/v1/datasource.py#L191 , querying both with 'id' and 'name' should be taken care of.
May be the problem is something else, im not sure. I think the error is coming from server rather than client itself. may be some debugging should help, does logs show any detail info on error?

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.