Fix #89: Neutron: add time fields [network/subnet/port]#90
Fix #89: Neutron: add time fields [network/subnet/port]#90olivergondza merged 4 commits intoopenstack4j:masterfrom
Conversation
olivergondza
left a comment
There was a problem hiding this comment.
Please add unittests verifying this in https://github.com/openstack4j/openstack4j/blob/master/core-test/src/main/java/org/openstack4j/api/network/NetworkTests.java
| @@ -0,0 +1,26 @@ | |||
| package org.openstack4j.model.common; | |||
|
|
|||
| import com.fasterxml.jackson.annotation.JsonProperty; | |||
| * | ||
| * @return created time | ||
| */ | ||
| String getCreatedTime(); |
There was a problem hiding this comment.
Do not return time as String. Rest of the codebase is using Date.
| @@ -0,0 +1,26 @@ | |||
| package org.openstack4j.model.common; | |||
|
|
|||
| import com.fasterxml.jackson.annotation.JsonProperty; | |||
| protected static final String JSON_ACCESS = "/identity/v2/access.json"; | ||
| protected static final String JSON_TOKEN = "/identity/v3/authv3_project.json"; | ||
| protected static final String TOKEN_ID = "123456789"; | ||
| protected static final Date DATE = new Date(1604096161000L); |
There was a problem hiding this comment.
Do not pull this into AbstractTest. It is irrelevant for most of the implementations.
| private List<String> availabilityZones; | ||
| @JsonProperty("created_at") | ||
| private String createdTime; | ||
| @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss") |
There was a problem hiding this comment.
Is specifying the format really needed? A lot of date fields is not having those at all.
There was a problem hiding this comment.
This is not really a format that must be specified.
There was a problem hiding this comment.
Thank you for your suggestion. I haven't considered it comprehensively.
|
Thanks for your contribution, @bboyHan. I am merging this towards next release. |
#89 fixed the issue