Skip to content

Commit

Permalink
Merge pull request #1119 from Radware/master
Browse files Browse the repository at this point in the history
Adding device_owner and device_id support for Port
  • Loading branch information
auhlig authored Nov 21, 2017
2 parents 551fc0a + d3a5ace commit 9edd979
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;

import org.openstack4j.model.ModelEntity;
import org.openstack4j.model.network.Port;
import org.openstack4j.openstack.common.ListEntity;
Expand Down Expand Up @@ -41,6 +42,12 @@ public class NeutronPortCreate implements ModelEntity {
@JsonProperty("tenant_id")
private String tenantId;

@JsonProperty("device_id")
private String deviceId;

@JsonProperty("device_owner")
private String deviceOwner;

@JsonProperty("security_groups")
private List<String> securityGroups;

Expand Down Expand Up @@ -80,6 +87,8 @@ public static NeutronPortCreate fromPort(Port port) {
c.adminStateUp = port.isAdminStateUp();
c.macAddress = port.getMacAddress();
c.tenantId = port.getTenantId();
c.deviceId = port.getDeviceId();
c.deviceOwner = port.getDeviceOwner();
c.securityGroups = port.getSecurityGroups();
c.fixedIps = (Set<NeutronIP>) port.getFixedIps();
c.portSecurityEnabled=port.isPortSecurityEnabled();
Expand Down

0 comments on commit 9edd979

Please sign in to comment.