*/
@Path("/bgpvpns")
-public class NeutronBgpvpnsNorthbound extends AbstractNeutronNorthbound {
+public class NeutronBgpvpnsNorthbound {
@Context
UriInfo uriInfo;
private NeutronCRUDInterfaces getNeutronInterfaces() {
NeutronCRUDInterfaces answer = new NeutronCRUDInterfaces().fetchINeutronBgpvpnCRUD(this);
if (answer.getBgpvpnInterface() == null) {
- throw new ServiceUnavailableException(serviceUnavailable(RESOURCE_NAME));
+ throw new ServiceUnavailableException("Service is unavailable");
}
return answer;
}
) {
INeutronBgpvpnCRUD bgpvpnInterface = getNeutronInterfaces().getBgpvpnInterface();
if (!bgpvpnInterface.bgpvpnExists(bgpvpnUUID)) {
- throw new ResourceNotFoundException(uuidNoExist(RESOURCE_NAME));
+ throw new ResourceNotFoundException("UUID does not exist");
}
if (fields.size() > 0) {
NeutronBgpvpn ans = bgpvpnInterface.getBgpvpn(bgpvpnUUID);
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.bgpvpns.rev150903.bgpvpns.attributes.Bgpvpns;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.bgpvpns.rev150903.bgpvpns.attributes.bgpvpns.Bgpvpn;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.bgpvpns.rev150903.bgpvpns.attributes.bgpvpns.BgpvpnBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev141002.NetworkTypeBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150325.Neutron;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.NetworkTypeBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150712.Neutron;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class NeutronBgpvpnInterface extends AbstractNeutronInterface<Bgpvpn,NeutronBgpvpn> implements INeutronBgpvpnCRUD {
+public class NeutronBgpvpnInterface extends AbstractNeutronInterface<Bgpvpn, Bgpvpns, NeutronBgpvpn> implements INeutronBgpvpnCRUD {
private static final Logger LOGGER = LoggerFactory.getLogger(NeutronBgpvpnInterface.class);
private static final ImmutableBiMap<Class<? extends BgpvpnTypeBase>,String> BGPVPN_TYPE_MAP
}
@Override
- public List<NeutronBgpvpn> getAll() {
- Set<NeutronBgpvpn> allBgpvpns = new HashSet<NeutronBgpvpn>();
- Bgpvpns bgpvpns = readMd(createInstanceIdentifier());
- if (bgpvpns != null) {
- for (Bgpvpn bgpvpn: bgpvpns.getBgpvpn()) {
- allBgpvpns.add(fromMd(bgpvpn));
- }
- }
- LOGGER.debug("Exiting getAllBgpvpns, Found {} OpenStackBgpvpns", allBgpvpns.size());
- List<NeutronBgpvpn> ans = new ArrayList<NeutronBgpvpn>();
- ans.addAll(allBgpvpns);
- return ans;
+ protected List<Bgpvpn> getDataObjectList(Bgpvpns bgpvpns) {
+ return bgpvpns.getBgpvpn();
}
@Override