port-show subcommand can not list created_at/updated_at

Bug #1244107 reported by Haomeng,Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Haomeng,Wang
python-ironicclient
Fix Released
Undecided
Haomeng,Wang

Bug Description

(venv)root@ubuntu1:~/ironic# ironic port-show 1
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| extra | {} |
| uuid | 0ad5d609-3072-4499-97fc-ab2d666313b8 |
| address | aa:bb:cc:dd:ee:ff |
+----------+--------------------------------------+
(venv)root@ubuntu1:~/ironic#

mysql> desc ports;
+------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| address | varchar(18) | YES | UNI | NULL | |
| node_id | int(11) | YES | MUL | NULL | |
| extra | text | YES | | NULL | |
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| uuid | varchar(36) | YES | UNI | NULL | |
+------------+-------------+------+-----+---------+----------------+
7 rows in set (0.01 sec)

I think we should display node_id, created_at and updated_at .

Haomeng,Wang (whaom)
Changed in ironic:
assignee: nobody → Haomeng,Wang (whaom)
status: New → In Progress
Changed in ironic:
importance: Undecided → Medium
affects: ironic → python-ironicclient
Revision history for this message
Haomeng,Wang (whaom) wrote :

The API call does not return created_at and updated_at:

http://9.123.136.76:6385/v1/ports/1

{
    "node_id": "be83a857-aa23-493b-b13a-f01ebfcef68c",
    "extra": {},
    "uuid": "0ad5d609-3072-4499-97fc-ab2d666313b8",
    "links": [
        {
            "href": "http://9.123.136.76:6385/v1/ports/0ad5d609-3072-4499-97fc-ab2d666313b8",
            "rel": "self"
        },
        {
            "href": "http://9.123.136.76:6385/ports/0ad5d609-3072-4499-97fc-ab2d666313b8",
            "rel": "bookmark"
        }
    ],
    "address": "aa:bb:cc:dd:ee:ff"
}

affects: python-ironicclient → ironic
Revision history for this message
Haomeng,Wang (whaom) wrote :

Will check API code to enable these created_at and updated_at to display , they are meaningful to user to audit these object creating time and latest updating time.

Revision history for this message
Haomeng,Wang (whaom) wrote :

I add created_at and updated_at two fields support on API side with this fix - https://review.openstack.org/#/c/53627/3, will commit another python-ironicclient change to enable created_at and updated_at on client side for 'port-show' and 'chassis-show' commands

Haomeng,Wang (whaom)
Changed in python-ironicclient:
assignee: nobody → Haomeng,Wang (whaom)
status: New → In Progress
summary: - port-show subcommand can not list all port properties
+ port-show subcommand can not list created_at/updated_at
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Revision history for this message
Haomeng,Wang (whaom) wrote :

This cli created_at and updated_at enablement dependents on the change https://review.openstack.org/#/c/53627/3, once it merged, this cli change will work.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/53991
Committed: http://github.com/openstack/python-ironicclient/commit/95aba63695146f0eb2ca239d839825ff9c745c70
Submitter: Jenkins
Branch: master

commit 95aba63695146f0eb2ca239d839825ff9c745c70
Author: Haomeng, Wang <email address hidden>
Date: Fri Nov 22 07:29:04 2013 +0800

    Enable created_at/updated_at for port-show/chassis-show

    Our node-show support created_at/updated_at two fields now,
    but port-show and chassis-show dont support, enable them
    for debugging/auditing

    Change-Id: Id1bb970d852c2c971d45426d23a61ab7c6698a6c
    Partial-Bug: #1244107

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/57829
Committed: http://github.com/openstack/python-ironicclient/commit/8d40327e6ba8274c9eb3c1a5e52ec0b3a4732bed
Submitter: Jenkins
Branch: master

commit 8d40327e6ba8274c9eb3c1a5e52ec0b3a4732bed
Author: Haomeng, Wang <email address hidden>
Date: Fri Nov 22 11:45:24 2013 +0800

    Enable created_at/updated_at for port-show/chassis-show

    Add new shell unitttest files in this patch to cover these new fields

    Change-Id: I1af25ac8ba1263aafd6c842f26dedb303321bbb9
    Partial-Bug: #1244107

Haomeng,Wang (whaom)
Changed in ironic:
status: In Progress → Fix Committed
Changed in python-ironicclient:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-2 → 2014.1
Changed in python-ironicclient:
milestone: none → 0.7.0
status: Fix Committed → 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.