X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2FNeutronRouter.java;h=ae5aa0f7fbb0c4ccb55d8d389ae4709afe1df4a5;hb=534f6d67330a84cd3296014d9e4c13e2c94c95fc;hp=1ef48bd95bfe2f4a378f497371f38db11b307e91;hpb=0b3fe7299bbeccc10f2c1b859f95de07c168ac9f;p=controller.git diff --git a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronRouter.java b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronRouter.java index 1ef48bd95b..ae5aa0f7fb 100644 --- a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronRouter.java +++ b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronRouter.java @@ -8,18 +8,24 @@ package org.opendaylight.controller.networkconfig.neutron; +import java.io.Serializable; import java.util.HashMap; import java.util.Iterator; import java.util.List; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; +import org.opendaylight.controller.configuration.ConfigurationObject; + @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public class NeutronRouter { +public class NeutronRouter extends ConfigurationObject implements Serializable, INeutronObject { + private static final long serialVersionUID = 1L; + // See OpenStack Network API v2.0 Reference for description of // annotated attributes @XmlElement (name="id") @@ -37,9 +43,18 @@ public class NeutronRouter { @XmlElement (name="tenant_id") String tenantID; - @XmlElement (name="external_gateway_info") + @XmlElement (name="external_gateway_info", nillable=true) NeutronRouter_NetworkReference externalGatewayInfo; + @XmlElement (name="distributed") + Boolean distributed; + + @XmlElement (name="gw_port_id", nillable=true) + String gatewayPortId; + + @XmlElement (name="routes") + List routes; + /* Holds a map of OpenStackRouterInterfaces by subnet UUID * used for internal mapping to DOVE */ @@ -51,6 +66,8 @@ public class NeutronRouter { public String getID() { return routerUUID; } + public void setID(String id) { this.routerUUID = id; } + public String getRouterUUID() { return routerUUID; } @@ -104,6 +121,30 @@ public class NeutronRouter { this.externalGatewayInfo = externalGatewayInfo; } + public Boolean getDistributed() { + return distributed; + } + + public void setDistributed(Boolean distributed) { + this.distributed = distributed; + } + + public String getGatewayPortId() { + return gatewayPortId; + } + + public void setGatewayPortId(String gatewayPortId) { + this.gatewayPortId = gatewayPortId; + } + + public List getRoutes() { + return routes; + } + + public void setRoutes(List routes) { + this.routes = routes; + } + /** * This method copies selected fields from the object and returns them * as a new object, suitable for marshaling. @@ -113,7 +154,6 @@ public class NeutronRouter { * @return an OpenStackRouters object with only the selected fields * populated */ - public NeutronRouter extractFields(List fields) { NeutronRouter ans = new NeutronRouter(); Iterator i = fields.iterator(); @@ -137,6 +177,15 @@ public class NeutronRouter { if (s.equals("external_gateway_info")) { ans.setExternalGatewayInfo(this.getExternalGatewayInfo()); } + if (s.equals("distributed")) { + ans.setDistributed(this.getDistributed()); + } + if (s.equals("gw_port_id")) { + ans.setGatewayPortId(this.getGatewayPortId()); + } + if (s.equals("routes")){ + ans.setRoutes(this.getRoutes()); + } } return ans; }