Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ notifications:
install: /bin/true

# When run on JDK7, modules that require JDK8 needs to be skipped
script: mvn clean verify -B $SKIP_JDK8_MODULES
#script: mvn clean verify -B $SKIP_JDK8_MODULES

after_success:
- "[[ $DEPLOY == 1 && $TRAVIS_BRANCH == \"master\" ]] && { mvn deploy --settings distribution/settings.xml -DskipTests=true -B; };"
Expand All @@ -36,3 +36,4 @@ after_success:
# infrastructure. This should prevent the buffer overflow from
# https://github.com/travis-ci/travis-ci/issues/5227
sudo: false
dist: trusty
4 changes: 3 additions & 1 deletion core-test/src/main/resources/network/network.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
],
"shared": false,
"port_security_enabled": true,
"id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
"id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c",
"updated_at": "2020-10-19T10:30:34Z",
"created_at": "2020-10-19T10:30:34Z"
}
}
24 changes: 24 additions & 0 deletions core/src/main/java/org/openstack4j/model/TimeEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.openstack4j.model;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* created_at/updated_at time field
*
* @author bboyHan
*/
public class TimeEntity {

@JsonProperty("created_at")
protected String createdTime;
@JsonProperty("updated_at")
protected String updatedTime;

public String getUpdatedTime() {
return updatedTime;
}

public String getCreatedTime() {
return createdTime;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.List;

import org.openstack4j.api.Apis;
import org.openstack4j.model.TimeEntity;
import org.openstack4j.model.network.Network;
import org.openstack4j.model.network.NetworkType;
import org.openstack4j.model.network.State;
Expand All @@ -24,7 +25,7 @@
* @author Jeremy Unruh
*/
@JsonRootName("network")
public class NeutronNetwork implements Network {
public class NeutronNetwork extends TimeEntity implements Network {

private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -118,7 +119,7 @@ public List<String> getSubnets() {
public List<? extends Subnet> getNeutronSubnets() {
if ( neutronSubnets == null && (subnets != null && subnets.size() > 0))
{
neutronSubnets = new ArrayList<NeutronSubnet>();
neutronSubnets = new ArrayList<>();
for ( String subnetId : subnets) {
NeutronSubnet sub = (NeutronSubnet)Apis.getNetworkingServices().subnet().get(subnetId);
neutronSubnets.add(sub);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ private Invocation<Networks> buildInvocation(Map<String, String> filteringParams
public List<? extends Network> list(Map<String, String> filteringParams){
Invocation<Networks> invocation = buildInvocation(filteringParams);
return invocation.execute().getList();

}

/**
Expand Down