B
- The type of the virtual bridge that contains the target
virtual interface.public abstract class UpdateVinterfaceTask<B extends VtnPortMappableBridge> extends UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B>> implements RpcOutputGenerator<VtnUpdateType,UpdateVinterfaceOutput>
UpdateVinterfaceTask
describes the MD-SAL datastore transaction task
that creates or updates the specified virtual interface.create(UpdateVinterfaceInput)
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addInterface(TxContext ctx,
VInterfaceIdentifier<B> ident,
Vinterface vintf)
Add a new virtual interface.
|
protected void |
checkParent(TxContext ctx)
Ensure that the parent virtual bridge is present.
|
protected void |
create(TxContext ctx,
VInterfaceIdentifier<B> ident,
VinterfaceConfig cfg)
Create a new virtual interface.
|
static UpdateVinterfaceTask<?> |
create(UpdateVinterfaceInput input)
Construct a new task that creates or updates the specified virtual
interface.
|
protected VinterfaceConfig |
createConfig()
Create a new virtual interface configuration as specified by the RPC.
|
UpdateVinterfaceOutput |
createOutput(VtnUpdateType result)
Generate the output of the RPC request.
|
protected boolean |
equalsConfig(VinterfaceConfig cur,
VinterfaceConfig cfg)
Determine whether the given two virtual interface configurations are
identical or not.
|
protected VinterfaceConfig |
getConfig(Vinterface vnode)
Return the virtual interface configuration in the given virtual
interface.
|
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VinterfaceConfig> |
getConfigPath(VInterfaceIdentifier<B> ident)
Return the instance identifier for the configuration container in the
target virtual interface.
|
Class<UpdateVinterfaceOutput> |
getOutputType()
Return a class which indicates the type of the RPC output.
|
protected B |
getParentBridge()
Return the parent virtual bridge fetched by the call of
checkParent(TxContext) . |
protected BridgeIdentifier<B> |
getParentIdentifier()
Return the identifier for the parent bridge.
|
protected VinterfaceConfig |
mergeConfig(VinterfaceConfig cur)
Merge the virtual interface configuration specified by the RPC with
the current configuration.
|
protected abstract VirtualBridge<B> |
newBridge(BridgeIdentifier<B> ident,
B parent)
Construct a new cache object for the parent virtual bridge.
|
protected void |
onUpdated(TxContext ctx)
Invoked when the configuration for the target virtual interface has been
changed.
|
execute, getIdentifier
needErrorLog
addBackgroundTask, execute, getBackgroundTasks, getMaxRetry, onFailure, onSuccess
public static UpdateVinterfaceTask<?> create(UpdateVinterfaceInput input) throws RpcException
input
- A UpdateVinterfaceInput
instance.UpdateVinterfaceTask
instance associated with the
task that creates or updates the specified virtual interface.RpcException
- The given input contains invalid value.protected final BridgeIdentifier<B> getParentIdentifier()
protected final B getParentBridge()
checkParent(TxContext)
.protected abstract void addInterface(TxContext ctx, VInterfaceIdentifier<B> ident, Vinterface vintf) throws VTNException
ctx
- A runtime context for transaction task.ident
- The identifier for the new virtual interface.vintf
- A new virtual interface to be added.VTNException
- An error occurred.protected abstract VirtualBridge<B> newBridge(BridgeIdentifier<B> ident, B parent)
ident
- The identifier for the parent virtual bridge.parent
- The parent virtual bridge.protected void onUpdated(TxContext ctx) throws VTNException
onUpdated
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
ctx
- A runtime context for transaction task.VTNException
- An error occurred.protected final void checkParent(TxContext ctx) throws VTNException
checkParent
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
ctx
- A runtime context for transaction task.VTNException
- An error occurred.protected final VinterfaceConfig createConfig()
createConfig
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
VinterfaceConfig
instance.protected final VinterfaceConfig mergeConfig(VinterfaceConfig cur) throws RpcException
mergeConfig
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
cur
- The current configuration of the target virtual interface.VinterfaceConfig
instance.RpcException
- The configuration specified by the RPC is invalid.protected final VinterfaceConfig getConfig(Vinterface vnode)
getConfig
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
vnode
- The virtual interface container.protected final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VinterfaceConfig> getConfigPath(VInterfaceIdentifier<B> ident)
getConfigPath
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
ident
- The identifier for the target virtual interface.protected final boolean equalsConfig(VinterfaceConfig cur, VinterfaceConfig cfg)
equalsConfig
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
cur
- The current configuration.cfg
- The configuration that is going to be applied.true
only if the given two configurations are
identical.protected final void create(TxContext ctx, VInterfaceIdentifier<B> ident, VinterfaceConfig cfg) throws VTNException
create
in class UpdateVirtualNodeTask<Vinterface,VinterfaceConfig,VInterfaceIdentifier<B extends VtnPortMappableBridge>>
ctx
- A runtime context for transaction task.ident
- The identifier for the new virtual interface.cfg
- The configuration for the new virtual interface.VTNException
- An error occurred.public final Class<UpdateVinterfaceOutput> getOutputType()
getOutputType
in interface RpcOutputGenerator<VtnUpdateType,UpdateVinterfaceOutput>
public final UpdateVinterfaceOutput createOutput(VtnUpdateType result)
createOutput
in interface RpcOutputGenerator<VtnUpdateType,UpdateVinterfaceOutput>
result
- The result of the RPC main procedure.Copyright © 2018 OpenDaylight. All rights reserved.