import org.opendaylight.neutron.spi.INeutronPortAware;
import org.opendaylight.neutron.spi.NeutronPort;
-import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.lib.notation.UUID;
import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
import org.opendaylight.ovsdb.openstack.netvirt.api.Constants;
import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter;
-import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConfigurationService;
-import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConnectionService;
-import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbInventoryListener;
+import org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService;
+import org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService;
+import org.opendaylight.ovsdb.plugin.api.OvsdbInventoryListener;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
import org.opendaylight.ovsdb.schema.openvswitch.Port;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// The implementation for each of these services is resolved by the OSGi Service Manager
private volatile OvsdbConfigurationService ovsdbConfigurationService;
private volatile OvsdbConnectionService connectionService;
- private volatile OvsdbInventoryListener ovsdbInventoryListener;
private volatile NeutronL3Adapter neutronL3Adapter;
/**
*/
@Override
public int canCreatePort(NeutronPort port) {
- return HttpURLConnection.HTTP_CREATED;
+ return HttpURLConnection.HTTP_OK;
}
/**
* Invoked to take action after a port has been created.
*
- * @param port An instance of new Neutron Port object.
+ * @param neutronPort An instance of new Neutron Port object.
*/
@Override
public void neutronPortCreated(NeutronPort neutronPort) {
- int result = canCreatePort(neutronPort);
- if (result != HttpURLConnection.HTTP_CREATED) {
- logger.error(" Port create validation failed result - {} ", result);
- return;
- }
-
enqueueEvent(new NorthboundEvent(neutronPort, Action.ADD));
}
private void doNeutronPortCreated(NeutronPort neutronPort) {
@Override
public int canUpdatePort(NeutronPort delta,
NeutronPort original) {
- int result = HttpURLConnection.HTTP_OK;
- /**
- * To basic validation of the request
- */
-
- if ((original == null) || (delta == null)) {
- logger.error("port object not specified");
- return HttpURLConnection.HTTP_BAD_REQUEST;
- }
- return result;
+ return HttpURLConnection.HTTP_OK;
}
/**
* Invoked to take action after a port has been updated.
*
- * @param port An instance of modified Neutron Port object.
+ * @param neutronPort An instance of modified Neutron Port object.
*/
@Override
public void neutronPortUpdated(NeutronPort neutronPort) {
*/
@Override
public void neutronPortDeleted(NeutronPort neutronPort) {
-
- int result = canDeletePort(neutronPort);
- if (result != HttpURLConnection.HTTP_OK) {
- logger.error(" deletePort validation failed - result {} ", result);
- return;
- }
-
enqueueEvent(new NorthboundEvent(neutronPort, Action.DELETE));
}
private void doNeutronPortDeleted(NeutronPort neutronPort) {
* Process the event.
*
* @param abstractEvent the {@link org.opendaylight.ovsdb.openstack.netvirt.AbstractEvent} event to be handled.
- * @see EventDispatcher
+ * @see org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher
*/
@Override
public void processEvent(AbstractEvent abstractEvent) {