ncdiff.ConfigDelta class¶
-
class
ncdiff.
ConfigDelta
(config_src, config_dst=None, delta=None, preferred_create='merge', preferred_replace='merge', preferred_delete='delete')[source]¶ Bases:
object
Abstraction of a delta of two Config instances. This delta could be considered as a config state transition, from a source state to a destination state.
-
config_src
¶ An instance of yang.ncdiff.Config, which is the source config state of a transition.
Type: Config
-
config_dst
¶ An instance of yang.ncdiff.Config, which is the destination config state of a transition.
Type: Config
-
nc
¶ A lxml Element which contains the delta. This attribute can be used by ncclient edit_config() directly. It is the Netconf presentation of a ConfigDelta instance.
Type: Element
-
ns
¶ A dictionary of namespaces used by the attribute ‘nc’. Keys are prefixes and values are URLs.
Type: dict
-
models
¶ A list of model names that self.roots belong to.
Type: list
-
roots
¶ A dictionary of roots of self.nc. Dictionary keys are tags of roots in
{url}tagname
notation, and values are corresponding model names.Type: dict
-
preferred_create
¶ Preferred operation of creating a new element. Choice of ‘merge’, ‘create’ or ‘replace’.
Type: str
-
preferred_replace
¶ Preferred operation of replacing an existing element. Choice of ‘merge’ or ‘replace’.
Type: str
-
preferred_delete
¶ Preferred operation of deleting an existing element. Choice of ‘delete’ or ‘remove’.
Type: str
__init__ instantiates a ConfigDelta instance.
-