Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstack/loadbalancer/v2/loadbalancers lack of Time.time CreatedAt/UpdatedAt fields #1680

Closed
naumvd95 opened this issue Aug 19, 2019 · 9 comments

Comments

@naumvd95
Copy link
Contributor

Need to add Time.time Created/Updated fields inside results.go, mapped from json:"updated_at"/json:"created_at"

General API reference:https://docs.openstack.org/api-ref/load-balancer/v2/index.html?expanded=show-load-balancer-details-detail#show-load-balancer-details

that fields defined in:
https://github.com/openstack/octavia/blob/22df2e0f484b3560cbb47d33b7f2f62cb57519fd/octavia/api/v2/types/load_balancer.py#L46

@naumvd95
Copy link
Contributor Author

will do by myself

naumvd95 added a commit to naumvd95/gophercloud that referenced this issue Aug 19, 2019
for: gophercloud#1680

time.Time object
mapped to existing json fields
@naumvd95
Copy link
Contributor Author

naumvd95 commented Aug 19, 2019

faced with issue during PR checking, time format from octavia response seems slightly differs and cannot be parsed by sane-default time.Time configuration

parsing time ""2019-07-15T15:57:42"" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "Z07:00"

there is no Z in response..

@naumvd95
Copy link
Contributor Author

related go issue golang/go#21990

@jtopjian
Copy link
Contributor

@naumvd95 Please see #1671

@naumvd95
Copy link
Contributor Author

@jtopjian Awesome !!
so I'll refactor my PR and add similar custom struct

@naumvd95
Copy link
Contributor Author

@jtopjian btw, seems in fixtures u left some Z cases like in networks
https://github.com/gophercloud/gophercloud/pull/1671/files#diff-1e0b8676b22caba7b7d81baf122157daR198
its ok?

naumvd95 added a commit to naumvd95/gophercloud that referenced this issue Aug 19, 2019
for: gophercloud#1680

time.Time object
mapped to existing json fields
@jtopjian
Copy link
Contributor

jtopjian commented Aug 19, 2019

Yes, per #1670, #1671 is meant to support both time formats. In similar manner, you'll want to include fixtures for both formats.

naumvd95 added a commit to naumvd95/gophercloud that referenced this issue Aug 19, 2019
for: gophercloud#1680

time.Time object
mapped to existing json fields
@naumvd95
Copy link
Contributor Author

@jtopjian ready for review

jtopjian pushed a commit that referenced this issue Aug 20, 2019
for: #1680

time.Time object
mapped to existing json fields
@jtopjian
Copy link
Contributor

Implemented in #1681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants