-
Notifications
You must be signed in to change notification settings - Fork 105
Fix #89: Neutron: add time fields [network/subnet/port] #90
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
Conversation
olivergondza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
| * | ||
| * @return created time | ||
| */ | ||
| String getCreatedTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not return time as String. Rest of the codebase is using Date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
| @@ -0,0 +1,26 @@ | |||
| package org.openstack4j.model.common; | |||
|
|
|||
| import com.fasterxml.jackson.annotation.JsonProperty; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is specifying the format really needed? A lot of date fields is not having those at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really a format that must be specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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