<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:unchecked</arg>
+ <arg>-Xlint:deprecation</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
</plugins>
</build>
<scm>
<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:unchecked</arg>
+ <arg>-Xlint:deprecation</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
</plugins>
</build>
<scm>
private static final Logger LOG = LoggerFactory.getLogger(NeutronLogger.class);
private DataBroker db;
- private ClusteredDataTreeChangeListener configurationDataTreeChangeListener;
- private ListenerRegistration<? extends ClusteredDataTreeChangeListener> configurationRegisteredListener;
- private ClusteredDataTreeChangeListener operationalDataTreeChangeListener;
- private ListenerRegistration<? extends ClusteredDataTreeChangeListener> operationalRegisteredListener;
+ private ClusteredDataTreeChangeListener<Neutron> configurationDataTreeChangeListener;
+ private ListenerRegistration<? extends ClusteredDataTreeChangeListener<Neutron>> configurationRegisteredListener;
+ private ClusteredDataTreeChangeListener<Neutron> operationalDataTreeChangeListener;
+ private ListenerRegistration<? extends ClusteredDataTreeChangeListener<Neutron>> operationalRegisteredListener;
public NeutronLogger(@Nonnull DataBroker db) {
LOG.info("Creating NeutronLogger {}", db);
private <T extends DataObject>
void formatChanges(@Nonnull final StringBuilder messageBuilder,
@Nonnull final Collection<DataTreeModification<T>> changes) {
- for (DataTreeModification modification : changes) {
+ for (DataTreeModification<T> modification : changes) {
final DataTreeIdentifier<T> identifier = modification.getRootPath();
final LogicalDatastoreType datastoreType = identifier.getDatastoreType();
if (datastoreType == LogicalDatastoreType.OPERATIONAL) {
<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:unchecked</arg>
+ <arg>-Xlint:deprecation</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
</plugins>
</build>
<scm>
List<NeutronSubnetIPAllocationPool> allocationPools;
@XmlElement (name = "host_routes")
- List<NeutronSubnet_HostRoute> hostRoutes;
+ List<NeutronRoute> hostRoutes;
@XmlElement (defaultValue = "true", name = "enable_dhcp")
Boolean enableDHCP;
this.allocationPools = allocationPools;
}
- public List<NeutronSubnet_HostRoute> getHostRoutes() {
+ public List<NeutronRoute> getHostRoutes() {
return hostRoutes;
}
- public void setHostRoutes(List<NeutronSubnet_HostRoute> hostRoutes) {
+ public void setHostRoutes(List<NeutronRoute> hostRoutes) {
this.hostRoutes = hostRoutes;
}
ans.setAllocationPools(aPools);
}
if (s.equals("host_routes")) {
- List<NeutronSubnet_HostRoute> hRoutes = new ArrayList<NeutronSubnet_HostRoute>();
+ List<NeutronRoute> hRoutes = new ArrayList<NeutronRoute>();
hRoutes.addAll(this.getHostRoutes());
ans.setHostRoutes(hRoutes);
}
dnsNameservers = new ArrayList<String>();
}
if (hostRoutes == null) {
- hostRoutes = new ArrayList<NeutronSubnet_HostRoute>();
+ hostRoutes = new ArrayList<NeutronRoute>();
}
if (allocationPools == null) {
allocationPools = new ArrayList<NeutronSubnetIPAllocationPool>();
+++ /dev/null
-/*
- * Copyright (c) 2013, 2015 IBM Corporation and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.neutron.spi;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-@Deprecated
-public class NeutronSubnet_HostRoute implements Serializable {
- private static final long serialVersionUID = 1L;
-
- // See OpenStack Network API v2.0 Reference for description of
- // annotated attributes
-
- @XmlElement(name = "destination")
- String destination;
-
- @XmlElement(name = "nexthop")
- String nextHop;
-
- /**
- * HostRoute constructor
- */
- public NeutronSubnet_HostRoute() { }
-
- public String getDestination() {
- return destination;
- }
-
- public void setDestination(String destination) {
- this.destination = destination;
- }
-
- public String getNextHop() {
- return nextHop;
- }
-
- public void setNextHop(String nextHop) {
- this.nextHop = nextHop;
- }
-
- @Override
- public String toString() {
- return "NeutronSubnetHostRoute [" +
- "destination=" + destination +
- ", nextHop=" + nextHop + "]";
- }
-
-}
<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:unchecked</arg>
+ <arg>-Xlint:deprecation</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
</plugins>
</build>
<scm>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:unchecked</arg>
+ <arg>-Xlint:deprecation</arg>
+ </compilerArgs>
+ </configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<manifestLocation>${project.build.directory}/META-INF</manifestLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <compilerArgs>
+ <arg>-Xlint:unchecked</arg>
+ <arg>-Xlint:deprecation</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
</plugins>
</build>
<dependencies>
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
+import org.opendaylight.neutron.spi.NeutronRoute;
import org.opendaylight.neutron.spi.NeutronSubnet;
-import org.opendaylight.neutron.spi.NeutronSubnet_HostRoute;
import org.opendaylight.neutron.spi.NeutronSubnetIPAllocationPool;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
result.setDnsNameservers(dnsNameServers);
}
if(subnet.getHostRoutes() != null){
- final List<NeutronSubnet_HostRoute> hostRoutes = new ArrayList<NeutronSubnet_HostRoute>();
+ final List<NeutronRoute> hostRoutes = new ArrayList<NeutronRoute>();
for(final HostRoutes hostRoute : subnet.getHostRoutes()) {
- final NeutronSubnet_HostRoute nsHostRoute = new NeutronSubnet_HostRoute();
+ final NeutronRoute nsHostRoute = new NeutronRoute();
nsHostRoute.setDestination(String.valueOf(hostRoute.getDestination().getValue()));
nsHostRoute.setNextHop(String.valueOf(hostRoute.getNexthop().getValue()));
hostRoutes.add(nsHostRoute);
}
if(subnet.getHostRoutes() != null) {
final List<HostRoutes> hostRoutes = new ArrayList<HostRoutes>();
- for(final NeutronSubnet_HostRoute hostRoute: subnet.getHostRoutes()) {
+ for(final NeutronRoute hostRoute: subnet.getHostRoutes()) {
final HostRoutesBuilder hrBuilder = new HostRoutesBuilder();
hrBuilder.setDestination(new IpPrefix(hostRoute.getDestination().toCharArray()));
hrBuilder.setNexthop(new IpAddress(hostRoute.getNextHop().toCharArray()));
private <S extends INeutronCRUD<?>, T extends AutoCloseable /* & S */>
void registerCRUDInterface(java.lang.Class<S> clazz, T crudInterface) {
neutronInterfaces.add(crudInterface);
+ @SuppressWarnings("unchecked")
+ S sCrudInterface = (S)crudInterface;
final ServiceRegistration<S> crudInterfaceRegistration =
- context.registerService(clazz, (S)crudInterface, null);
+ context.registerService(clazz, sCrudInterface, null);
registrations.add(crudInterfaceRegistration);
}