public final class UpdateVbridgeTask extends UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier> implements RpcOutputGenerator<VtnUpdateType,UpdateVbridgeOutput>
UpdateVbridgeTask
describes the MD-SAL datastore transaction task
that creates or updates the specified vBridge.create(UpdateVbridgeInput)
Modifier and Type | Method and Description |
---|---|
protected void |
checkParent(TxContext ctx)
Ensure that the parent VTN is present.
|
protected void |
create(TxContext ctx,
VBridgeIdentifier ident,
VbridgeConfig cfg)
Create a new vBridge.
|
static UpdateVbridgeTask |
create(UpdateVbridgeInput input)
Construct a new task that creates or updates the specified vBridge.
|
protected VbridgeConfig |
createConfig()
Create a new vBridge configuration as specified by the RPC.
|
UpdateVbridgeOutput |
createOutput(VtnUpdateType result)
Generate the output of the RPC request.
|
protected boolean |
equalsConfig(VbridgeConfig cur,
VbridgeConfig cfg)
Determine whether the given two vBridge configurations are identical
or not.
|
protected VbridgeConfig |
getConfig(Vbridge vnode)
Return the vBridge configuration in the given vBridge.
|
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VbridgeConfig> |
getConfigPath(VBridgeIdentifier ident)
Return the instance identifier for the configuration container in the
target vBridge.
|
Class<UpdateVbridgeOutput> |
getOutputType()
Return a class which indicates the type of the RPC output.
|
protected VbridgeConfig |
mergeConfig(VbridgeConfig cur)
Merge the vBridge configuration specified by the RPC with the current
configuration.
|
execute, getIdentifier, onUpdated
needErrorLog
addBackgroundTask, execute, getBackgroundTasks, getMaxRetry, onFailure, onSuccess
public static UpdateVbridgeTask create(UpdateVbridgeInput input) throws RpcException
input
- A UpdateVbridgeInput
instance.UpdateVbridgeTask
instance associated with the task
that creates or updates the specified vBridge.RpcException
- The given input contains invalid value.protected void checkParent(TxContext ctx) throws VTNException
checkParent
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
ctx
- A runtime context for transaction task.VTNException
- An error occurred.protected VbridgeConfig createConfig() throws RpcException
createConfig
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
VbridgeConfig
instance.RpcException
- The configuration specified by the RPC is invalid.protected VbridgeConfig mergeConfig(VbridgeConfig cur) throws RpcException
mergeConfig
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
cur
- The current configuration of the target vBridge.VbridgeConfig
instance.RpcException
- The configuration specified by the RPC is invalid.protected VbridgeConfig getConfig(Vbridge vnode)
getConfig
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
vnode
- The vBridge container.protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VbridgeConfig> getConfigPath(VBridgeIdentifier ident)
getConfigPath
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
ident
- The identifier for the target vBridge.protected boolean equalsConfig(VbridgeConfig cur, VbridgeConfig cfg)
equalsConfig
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
cur
- The current configuration.cfg
- The configuration that is going to be applied.true
only if the given two configurations are
identical.protected void create(TxContext ctx, VBridgeIdentifier ident, VbridgeConfig cfg) throws VTNException
create
in class UpdateVirtualNodeTask<Vbridge,VbridgeConfig,VBridgeIdentifier>
ctx
- A runtime context for transaction task.ident
- The identifier for the new vBridge.cfg
- The configuration for the new vBridge.VTNException
- An error occurred.public Class<UpdateVbridgeOutput> getOutputType()
getOutputType
in interface RpcOutputGenerator<VtnUpdateType,UpdateVbridgeOutput>
public UpdateVbridgeOutput createOutput(VtnUpdateType result)
createOutput
in interface RpcOutputGenerator<VtnUpdateType,UpdateVbridgeOutput>
result
- The result of the RPC main procedure.Copyright © 2018 OpenDaylight. All rights reserved.