datetime.datetime is not JSON serializable

Bug #1662144 reported by Sergey Skripnick
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-barbicanclient
Fix Released
Undecided
Jeremy Liu

Bug Description

Unable to retrieve secret in json format using cli. Steps to reproduce:

1. Create a secret:

barbican secret store --name cert-1 \
    --secret-type certificate \
    --payload "$(cat delme-1.pem | base64)"

2. Try to get it in json format:

barbican secret get -f json \
      http://SECRET-URL/....

{
  "Status": "ACTIVE",
  "Name": "cert-1",
  "Algorithm": "aes",
ERROR:barbican:datetime.datetime(2017, 2, 6, 11, 3, 49, tzinfo=<iso8601.Utc>) is not JSON serializable
datetime.datetime(2017, 2, 6, 11, 3, 49, tzinfo=<iso8601.Utc>) is not JSON serializable
  "Created":

Tags: client json
Revision history for this message
Jeremy Liu (liujiong) wrote :

This should be a barbicanclient bug and also occurs when retrieving json format of acl/ca/order/container

affects: barbican → python-barbicanclient
Changed in python-barbicanclient:
assignee: nobody → Jeremy Liu (liujiong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-barbicanclient (master)

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

Changed in python-barbicanclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-barbicanclient (master)

Reviewed: https://review.openstack.org/431405
Committed: https://git.openstack.org/cgit/openstack/python-barbicanclient/commit/?id=2d745ee892a80928373bd8a6ea844e8e212a4a15
Submitter: Jenkins
Branch: master

commit 2d745ee892a80928373bd8a6ea844e8e212a4a15
Author: Jeremy Liu <email address hidden>
Date: Thu Feb 9 17:29:57 2017 +0800

    Fix serializable issues when retrieving json format resources

    Change-Id: Icc56feab767e5154588f2e3e32e1ded3d8c62f09
    Closes-Bug: #1662144

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

This issue was fixed in the openstack/python-barbicanclient 4.3.0 release.

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.