Class NeutronNetworkInterface
- java.lang.Object
-
- org.opendaylight.neutron.transcriber.AbstractTranscriberInterface<T,U,K,S,Neutron>
-
- org.opendaylight.neutron.transcriber.AbstractNeutronInterface<Network,Networks,NetworkKey,NeutronNetwork>
-
- org.opendaylight.neutron.transcriber.NeutronNetworkInterface
-
- All Implemented Interfaces:
AutoCloseable
,INeutronCRUD<NeutronNetwork>
,INeutronNetworkCRUD
@Singleton public final class NeutronNetworkInterface extends AbstractNeutronInterface<Network,Networks,NetworkKey,NeutronNetwork> implements INeutronNetworkCRUD
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.neutron.spi.INeutronCRUD
INeutronCRUD.Result
-
-
Constructor Summary
Constructors Constructor Description NeutronNetworkInterface(org.opendaylight.controller.md.sal.binding.api.DataBroker db, NeutronQosPolicyInterface qosPolicyInterface)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
areAllDependenciesAvailable(org.opendaylight.controller.md.sal.binding.api.ReadTransaction tx, NeutronNetwork network)
Check if this particular (subclass) transcriber's dependencies are met.protected NeutronNetwork
fromMd(Network network)
protected List<Network>
getDataObjectList(Networks networks)
protected Network
toMd(NeutronNetwork network)
-
Methods inherited from class org.opendaylight.neutron.transcriber.AbstractNeutronInterface
getMdParentClass
-
Methods inherited from class org.opendaylight.neutron.transcriber.AbstractTranscriberInterface
add, close, exists, fromMdAdminAttributes, fromMdBaseAttributes, fromMdIds, get, getAll, getDataBroker, ifNonNull, readMd, remove, toMd, toMdAdminAttributes, toMdBaseAttributes, toMdIds, toMdIds, toUuid, update
-
-
-
-
Constructor Detail
-
NeutronNetworkInterface
@Inject public NeutronNetworkInterface(org.opendaylight.controller.md.sal.binding.api.DataBroker db, NeutronQosPolicyInterface qosPolicyInterface)
-
-
Method Detail
-
getDataObjectList
protected List<Network> getDataObjectList(Networks networks)
- Specified by:
getDataObjectList
in classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
-
fromMd
protected NeutronNetwork fromMd(Network network)
- Specified by:
fromMd
in classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
-
toMd
protected Network toMd(NeutronNetwork network)
- Specified by:
toMd
in classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
-
areAllDependenciesAvailable
protected boolean areAllDependenciesAvailable(org.opendaylight.controller.md.sal.binding.api.ReadTransaction tx, NeutronNetwork network) throws org.opendaylight.controller.md.sal.common.api.data.ReadFailedException
Description copied from class:AbstractTranscriberInterface
Check if this particular (subclass) transcriber's dependencies are met. Default implementation just returns true. Some but not all transcribers will customize this.Implementations *MUST* use the passed in transaction. They will typically call the
AbstractTranscriberInterface.exists(String, ReadTransaction)
method on ANOTHER transcriber with it.Implementations should chain
AbstractTranscriberInterface.ifNonNull(Object, CheckedFunction)
, or perform null safe comparisons otherwise, for both optional non-mandatoryNeutronObject
as well as mandatory properties which may well be null. Both must mandatory and non-mandatory must be guarded, because modify (update) operation are allowed to contain partial neutron objects with missing fields.- Overrides:
areAllDependenciesAvailable
in classAbstractTranscriberInterface<Network,Networks,NetworkKey,NeutronNetwork,Neutron>
- Parameters:
tx
- the transaction within which to perform reads to check for dependenciesnetwork
- the incoming main neutron object in which there may be references to dependencies- Returns:
- true if all dependencies are available and the
AbstractTranscriberInterface.add(INeutronObject)
(orAbstractTranscriberInterface.update(String, INeutronObject)
operation can proceed; false if there are unmet dependencies, which will cause the add to abort, and a respective error code returned to the caller. - Throws:
org.opendaylight.controller.md.sal.common.api.data.ReadFailedException
- in case of a data store problem
-
-