public final class UpdateVtnTask extends UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier> implements RpcOutputGenerator<VtnUpdateType,UpdateVtnOutput>
UpdateVtnTask
describes the MD-SAL datastore transaction task
that creates or updates the specified VTN.create(UpdateVtnInput)
Modifier and Type | Method and Description |
---|---|
protected void |
checkParent(TxContext ctx)
This method does nothing because the VTN has no parent node.
|
protected void |
create(TxContext ctx,
VTenantIdentifier ident,
VtenantConfig cfg)
Create a new VTN.
|
static UpdateVtnTask |
create(UpdateVtnInput input)
Construct a new task that creates or updates the specified VTN.
|
protected VtenantConfig |
createConfig()
Create a new VTN configuration as specified by the RPC.
|
UpdateVtnOutput |
createOutput(VtnUpdateType result)
Generate the output of the RPC request.
|
protected boolean |
equalsConfig(VtenantConfig cur,
VtenantConfig cfg)
Determine whether the given two VTN configurations are identical or not.
|
protected VtenantConfig |
getConfig(Vtn vnode)
Return the VTN configuration in the given VTN.
|
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtenantConfig> |
getConfigPath(VTenantIdentifier ident)
Return the instance identifier for the configuration container in the
target VTN.
|
Class<UpdateVtnOutput> |
getOutputType()
Return a class which indicates the type of the RPC output.
|
protected VtenantConfig |
mergeConfig(VtenantConfig cur)
Merge the VTN configuration specified by the RPC with the current
configuration.
|
execute, getIdentifier, onUpdated
needErrorLog
addBackgroundTask, execute, getBackgroundTasks, getMaxRetry, onFailure, onSuccess
public static UpdateVtnTask create(UpdateVtnInput input) throws RpcException
input
- A UpdateVtnInput
instance.UpdateVtnTask
instance associated with the task
that creates or updates the specified VTN.RpcException
- The given input contains invalid value.protected void checkParent(TxContext ctx)
checkParent
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
ctx
- A runtime context for transaction task.protected VtenantConfig createConfig() throws RpcException
createConfig
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
VtenantConfig
instance.RpcException
- The configuration specified by the RPC is invalid.protected VtenantConfig mergeConfig(VtenantConfig cur) throws RpcException
mergeConfig
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
cur
- The current configuration of the target VTN.VtenantConfig
instance.RpcException
- The configuration specified by the RPC is invalid.protected VtenantConfig getConfig(Vtn vnode)
getConfig
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
vnode
- The VTN container.protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtenantConfig> getConfigPath(VTenantIdentifier ident)
getConfigPath
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
ident
- The identifier for the target VTN.protected boolean equalsConfig(VtenantConfig cur, VtenantConfig cfg)
equalsConfig
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
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, VTenantIdentifier ident, VtenantConfig cfg) throws VTNException
create
in class UpdateVirtualNodeTask<Vtn,VtenantConfig,VTenantIdentifier>
ctx
- A runtime context for transaction task.ident
- The identifier for the new VTN.cfg
- The configuration for the new VTN.VTNException
- An error occurred.public Class<UpdateVtnOutput> getOutputType()
getOutputType
in interface RpcOutputGenerator<VtnUpdateType,UpdateVtnOutput>
public UpdateVtnOutput createOutput(VtnUpdateType result)
createOutput
in interface RpcOutputGenerator<VtnUpdateType,UpdateVtnOutput>
result
- The result of the RPC main procedure.Copyright © 2018 OpenDaylight. All rights reserved.