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=9d5ee38b50ed2550fa6f271e08e874016e42c01d;hb=ab3be1c3e568b4daa9a98e026dc3fc7649a5b25c;hp=fa35f71fd6ae425aac90f7d31524198413ade2f2;hpb=94d0d20b41d64bb6696c2a573ec367fcfddc44e9;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 fa35f71fd6..9d5ee38b50 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 @@ -18,12 +18,10 @@ 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 extends ConfigurationObject implements Serializable { +public class NeutronRouter implements Serializable, INeutronObject { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of @@ -43,9 +41,18 @@ public class NeutronRouter extends ConfigurationObject implements Serializable { @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 */ @@ -57,6 +64,8 @@ public class NeutronRouter extends ConfigurationObject implements Serializable { public String getID() { return routerUUID; } + public void setID(String id) { this.routerUUID = id; } + public String getRouterUUID() { return routerUUID; } @@ -110,6 +119,30 @@ public class NeutronRouter extends ConfigurationObject implements Serializable { 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. @@ -119,7 +152,6 @@ public class NeutronRouter extends ConfigurationObject implements Serializable { * @return an OpenStackRouters object with only the selected fields * populated */ - public NeutronRouter extractFields(List fields) { NeutronRouter ans = new NeutronRouter(); Iterator i = fields.iterator(); @@ -143,6 +175,15 @@ public class NeutronRouter extends ConfigurationObject implements Serializable { 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; }