1 // https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Configuration:Initial
3 // FIXME: Update this section to provide correct Lithium related information
5 === Initial Configuration
6 The Initial configuration of the controller involves two methods.
9 * Using the etc/custom.properties property file to pass configuration properties to the OSGi bundles besides the config subsystem.
10 * Using the Configuration Persisters to push the initial configuration for modules managed by the config subsystem.
12 ==== Using the etc/custom.properties property file
14 The config.ini property file can be used to provide a set of properties for any OSGi bundle deployed to the controller. It is usually used to configure bundles that are not managed by the config subsystem. For details, see '_etc_custom_properties'.
16 ==== Using configuration persister
18 Configuration persister is a default service in the controller, and is started automatically using the OSGi Activator. Its purpose is to load the initial configuration for the config subsystem and store a snapshot for every new configuration state pushed to the config-subsystem from external clients.
19 For details, see '_configuration_persister'.
22 ==== etc/custom.properties
24 Various parts of the system that are not under the configuration subsystem use the file `etc/custom.properties`. Changes to this file apply after a server restart. The tabulation of several important configuration keys and values follows:
26 [cols="2*", width="75%"]
29 |Setting | Description
30 | yangstore.blacklist=.\*controller.model.* | This regular expression (can be OR-ed using pipe character) tells NETCONF to exclude the yang files found in the matching bundle symbolic name from the hello message. This is helpful when dealing with a NETCONF client that has parsing problems.
31 | netconf.config.persister.* settings | See '_opendaylight_controller_configuration_initial'.
32 | netconf.tcp.address=0.0.0.0 netconf.tcp.port=8383 +
34 netconf.ssh.address=0.0.0.0 netconf.ssh.port=1830 netconf.ssh.pk.path = ./configuration/RSA.pk +
36 netconf.tcp.client.address=127.0.0.1 netconf.tcp.client.port=8383 | These settings specify the netconf server bindings. IP address 0.0.0.0 is used when all available network interfaces must be used by the netconf server. When starting the ssh server, the user must provide a private key. The actual authentication is done in the user admin module. By default, users admin:admin and netconf:netconf can be used to connect by means of ssh. Since the ssh bridge acts as a proxy, one needs to specify the netconf plaintext TCP address and port. These settings must normally be identical to those specified by netconf.tcp.* .
39 === Configuration Persister
40 One way of configuring the controller is to use the configuration persister to push the initial configuration for modules managed by the config subsystem.
42 ==== Using configuration persister
44 The configuration persister is a default service in the controller, and is started automatically using the OSGi Activator.
47 * Load the initial configuration for the config subsystem.
48 * Store a snapshot for every new configuration state pushed to the config-subsystem from external clients. +
50 It retrieves the base configuration from the config.ini property file, and tries to load the configuration for the config subsystem.
51 The configuration for the config subsystem is pushed as a set of edit-config netconf rpcs followed by a commit rpc since the config persister acts as a netconf client.
53 *Configuration persister lifecycle:* +
55 . Start the config persister service at _config-persister-impl_ bundle startup.
56 . Retrieve the base configuration of the adapters from the config.ini property file.
57 . Initialize the backing storage adapters.
58 . Initialize the netconf client, and connect to the netconf endpoint of the config subsystem.
59 . Load the initial configuration snapshots from the latest storage adapter.
60 . Send the edit-config rpc with the initial configuration snapshots.
61 . Send the commit rpc.
62 . Listen for any of the following changes to the configuration and persist a snapshot.
64 *Configuration Persister interactions:* +
67 image::Persister.jpg[width=500]
69 ==== Current configuration for controller distribution
71 The _config.ini_ property file contains the following configuration for the configuration persister: +
73 netconf.config.persister.active=1,2
75 netconf.config.persister.1.storageAdapterClass=org.opendaylight.controller.config.persist.storage.directory.autodetect.AutodetectDirectoryStorageAdapter
77 netconf.config.persister.1.properties.directoryStorage=configuration/initial/
79 netconf.config.persister.1.readonly=true
82 netconf.config.persister.2.storageAdapterClass=org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter
84 netconf.config.persister.2.properties.fileStorage=configuration/current/controller.currentconfig.xml
86 netconf.config.persister.2.properties.numberOfBackups=1
89 With this configuration, the configuration persister initializes two adapters: +
91 * **AutodetectDirectoryStorageAdapter** to load the initial configuration files from the _configuration/initial/_ folder. These files will be pushed as the initial configuration for the config subsystem. Since this adapter is Read only, it will not store any configuration snapshot during the controller lifecycle.
92 * **XmlFileStorageAdapter** to store snapshots of the current configuration after any change in the file _configuration/current/controller.currentconfig.xml_ (Only 1 snapshot backup is kept; every new change overwrites the previous one). +
94 The initial configuration in the controller distribution consists of 2 files in the https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Configuration:Initial#Persisted_snapshot_format[xml format]. +
97 * configuration/initial/00-netty.xml: +
101 <required-capabilities>
102 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty?module=netty&revision=2013-11-19</capability>
103 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12</capability>
104 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup?module=threadgroup&revision=2013-11-07</capability>
105 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty:timer?module=netty-timer&revision=2013-11-19</capability>
106 </required-capabilities>
109 <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
110 <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
112 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup">netty:netty-threadgroup-fixed</type>
113 <name>global-boss-group</name>
116 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup">netty:netty-threadgroup-fixed</type>
117 <name>global-worker-group</name>
120 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:timer">netty:netty-hashed-wheel-timer</type>
121 <name>global-timer</name>
124 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor">netty:netty-global-event-executor</type>
125 <name>global-event-executor</name>
129 <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
131 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
133 <name>global-boss-group</name>
134 <provider>/modules/module[type='netty-threadgroup-fixed'][name='global-boss-group']</provider>
137 <name>global-worker-group</name>
138 <provider>/modules/module[type='netty-threadgroup-fixed'][name='global-worker-group']</provider>
142 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
144 <name>global-event-executor</name>
145 <provider>/modules/module[type='netty-global-event-executor'][name='global-event-executor']</provider>
149 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-timer</type>
151 <name>global-timer</name>
152 <provider>/modules/module[type='netty-hashed-wheel-timer'][name='global-timer']</provider>
161 This configuration snapshot instantiates netty utilities, which will be utilized by the controller components that use netty internally. +
163 *configuration/initial/01-md-sal.xml:* +
169 <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
170 <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
172 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:schema-service-singleton</type>
173 <name>yang-schema-service</name>
176 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:hash-map-data-store</type>
177 <name>hash-map-data-store</name>
180 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-broker-impl</type>
181 <name>dom-broker</name>
182 <data-store xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">
183 <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-data-store</type>
184 <!-- to switch to the clustered data store, comment out the hash-map-data-store <name> and uncomment the cluster-data-store one -->
185 <name>hash-map-data-store</name>
186 <!-- <name>cluster-data-store</name> -->
190 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-broker-impl</type>
191 <name>binding-broker-impl</name>
192 <notification-service xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
193 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
194 <name>binding-notification-broker</name>
195 </notification-service>
196 <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
197 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-data-broker</type>
198 <name>binding-data-broker</name>
202 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:runtime-generated-mapping</type>
203 <name>runtime-mapping-singleton</name>
206 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-notification-broker</type>
207 <name>binding-notification-broker</name>
210 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-data-broker</type>
211 <name>binding-data-broker</name>
212 <dom-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
213 <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
214 <name>dom-broker</name>
216 <mapping-service xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
217 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
218 <name>runtime-mapping-singleton</name>
224 <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
226 <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
228 <name>yang-schema-service</name>
229 <provider>/modules/module[type='schema-service-singleton'][name='yang-schema-service']</provider>
233 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
235 <name>binding-notification-broker</name>
236 <provider>/modules/module[type='binding-notification-broker'][name='binding-notification-broker']</provider>
240 <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-data-store</type>
242 <name>hash-map-data-store</name>
243 <provider>/modules/module[type='hash-map-data-store'][name='hash-map-data-store']</provider>
247 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
249 <name>binding-osgi-broker</name>
250 <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
254 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
256 <name>binding-rpc-broker</name>
257 <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
261 <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-dom-mapping-service</type>
263 <name>runtime-mapping-singleton</name>
264 <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
268 <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
270 <name>dom-broker</name>
271 <provider>/modules/module[type='dom-broker-impl'][name='dom-broker']</provider>
275 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-data-broker</type>
277 <name>binding-data-broker</name>
278 <provider>/modules/module[type='binding-data-broker'][name='binding-data-broker']</provider>
287 <required-capabilities>
288 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12</capability>
289 <capability>urn:opendaylight:params:xml:ns:yang:controller:threadpool?module=threadpool&revision=2013-04-09</capability>
290 <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
291 <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28</capability>
292 <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?module=opendaylight-sal-binding-broker-impl&revision=2013-10-28</capability>
293 <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&revision=2013-10-28</capability>
294 <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?module=opendaylight-md-sal-common&revision=2013-10-28</capability>
295 </required-capabilities>
299 This configuration snapshot instantiates md-sal modules.
301 After the controller is started, all these modules will be instantiated and configured. They can be further referenced from the new modules as dependencies, reconfigured, or even deleted.
302 These modules are considered to be the base configuration for the controller and the purpose of them being configured automatically is to simplify the process of controller configuration for users, since the base modules will already be ready for use.
304 === Adding custom initial configuration
306 There are multiple ways to add the custom initial confguration to the controller distribution:
308 . Manually create the config file, and put it in the initial configuration folder.
309 . Reconfigure the running controller using the yuma yangcli tool. The XmlFileStorageAdapter adapter will store the current snapshot, and on the next startup of the controller (assuming it was not rebuilt since), it will load the configuration containing the changes.
311 ==== Custom initial configuration in bgpcep distribution
313 The BGPCEP project will serve as an example for adding the custom initial configuration. The bgpcep project contains the custom initial configuration that is based on the initial configuration from the controller. It adds new modules, which depend on MD-SAL and netty modules created with the initial config files of the controller. There are multiple config files in the bgpcep project. Only the 30-programming.xml file located under the programming-parent/controller-config project will be described in this section. This file contains the configuration for an instance of the instruction-scheduler module:
316 <?xml version="1.0" encoding="UTF-8"?>
317 <!-- vi: set et smarttab sw=4 tabstop=4: -->
319 Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
321 This program and the accompanying materials are made available under the
322 terms of the Eclipse Public License v1.0 which accompanies this distribution,
323 and is available at http://www.eclipse.org/legal/epl-v10.html.
326 <required-capabilities>
327 <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
328 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty?module=netty&revision=2013-11-19</capability>
329 <capability>urn:opendaylight:params:xml:ns:yang:controller:programming:impl?module=config-programming-impl&revision=2013-11-15</capability>
330 <capability>urn:opendaylight:params:xml:ns:yang:controller:programming:spi?module=config-programming-spi&revision=2013-11-15</capability>
331 </required-capabilities>
334 <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
335 <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
337 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:programming:impl">prefix:instruction-scheduler-impl</type>
338 <name>global-instruction-scheduler</name>
340 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-data-broker</type>
341 <name>binding-data-broker</name>
343 <notification-service>
344 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
345 <name>binding-notification-broker</name>
346 </notification-service>
348 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
349 <name>binding-rpc-broker</name>
352 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-timer</type>
353 <name>global-timer</name>
358 <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
360 <type xmlns:pgmspi="urn:opendaylight:params:xml:ns:yang:controller:programming:spi">pgmspi:instruction-scheduler</type>
362 <name>global-instruction-scheduler</name>
363 <provider>/modules/module[type='instruction-scheduler-impl'][name='global-instruction-scheduler']</provider>
372 Instruction-scheduler is instantiated as a module of type _instruction-scheduler-impl_ with the name *global-instruction-scheduler:* +
375 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:programming:impl">prefix:instruction-scheduler-impl</type>
376 <name>global-instruction-scheduler</name>
379 There is also an alias created for this module instancfe, and the alias is *global-instruction-scheduler* of type _instruction-scheduler_: +
383 <type xmlns:pgmspi="urn:opendaylight:params:xml:ns:yang:controller:programming:spi">pgmspi:instruction-scheduler</type>
385 <name>global-instruction-scheduler</name>
386 <provider>/modules/module[type='instruction-scheduler-impl'][name='global-instruction-scheduler']</provider>
391 The type of the alias is instruction-scheduler. This type refers to a certain service that is implemented by the instruction-scheduler-impl module. With this service type, the global-instruction-scheduler instance can be injected into any other module that requires instruction-scheduler as a dependency.
392 One module can provide (implement) multiple services, and each of these services can be assigned an alias. This alias can be later used to reference the implementation it is pointing to.
393 If no alias is assigned by the user, a default alias will be assigned for each provided service.
394 The default alias is constructed from the name of the module instance with a prefix *ref_* and a possible suffix containing a number to resolve name clashes.
395 It is recommended that users provide aliases for each service of every module instance, and use these aliases for dependency injection. References to the alias global-instruction-scheduler can be found in subsequent config files in the bgpcep project for example, _32-pcep.xml_ located under the _pcep-parent/pcep-controller-config_ project.
397 The configuration contains four dependencies on the MD-SAL and the netty modules: +
401 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-data-broker</type>
402 <name>binding-data-broker</name>
404 <notification-service>
405 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
406 <name>binding-notification-broker</name>
407 </notification-service>
409 <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
410 <name>binding-rpc-broker</name>
413 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-timer</type>
414 <name>global-timer</name>
419 MD-SAL dependencies: +
421 * Data-provider dependency
422 * Notification-service dependency
423 * Rpc-registry dependency
425 All MD-SAL dependencies can be found in the https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Configuration:Initial#Current_configuration_for_controller_distribution[MD-SAL initial configuration file]. For example, rpc-registry dependency points to an alias binding-rpc-broker of the type binding-rpc-registry. This alias further points to an instance of the binding-broker-impl named binding-broker-impl.
426 The Yang module that defines the binding-broker-impl module : https://git.opendaylight.org/gerrit/gitweb?p=controller.git;f=opendaylight/md-sal/sal-binding-broker/src/main/yang/opendaylight-binding-broker-impl.yang;a=blob[opendaylight-binding-broker-impl.yang].
428 *Netty dependencies:* +
432 This configuration expects these dependencies to be already up and ready. It is the responsibility of the configuration subsystem to find the dependency and inject it.
433 If the configuration of a module points to a non-existing dependency, the configuration subsystem will produce an exception during the validation phase.
434 Every user-created configuration needs to point to existing dependencies. In the case of multiple initial configuration files that depend on one another, the resolution order can be ensured by the names of the files. Files are sorted by their names in ascending order. This means that every configuration file will have the visibility of modules from all previous configuration files by means of aliases.
436 NOTE: The configuration provided by initial config files can also be pushed to the controller at runtime using netconf client. The whole configuration located under the data tag needs to be inserted into the config tag in the edit-config rpc. For more information, see https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Main#Examples[Examples].
438 ==== Configuration Persister
440 As a part of the configuration subsystem, the purpose of the persister is to save and load a permanent copy of a configuration. The Persister interface represents basic operations over a storage - persist configuration and load last config, configuration snapshot is represented as string and set of it's capabilities. StorageAdapter represents an adapter interface to the ConfigProvider - subset of BundleContext, allowing access to the OSGi framework system properties.
442 ===== Persister implementation
444 Configuration persister implementation is part of the Controller NETCONF. PersisterAggregator class is the implementation of the Presister interface. The functionality is delegated to the storage adapters. Storage adapters are low level persisters that do the heavy lifting for this class. Instances of storage adapters can be injected directly by means of the constructor, or instantiated from a full name of its class provided in a properties file. There can be many persisters configured, and varying numbers of them can be used.
446 *Example of presisters configuration:* +
448 netconf.config.persister.active=2,3
449 # read startup configuration
450 netconf.config.persister.1.storageAdapterClass=org.opendaylight.controller.config.persist.storage.directory.xml.XmlDirectoryStorageAdapter
451 netconf.config.persister.1.properties.fileStorage=configuration/initial/
453 netconf.config.persister.2.storageAdapterClass=org.opendaylight.controller.config.persist.storage.file.FileStorageAdapter
454 netconf.config.persister.2.readonly=true
455 netconf.config.persister.2.properties.fileStorage=configuration/current/controller.config.1.txt
457 netconf.config.persister.3.storageAdapterClass=org.opendaylight.controller.config.persist.storage.file.FileStorageAdapter
458 netconf.config.persister.3.properties.fileStorage=configuration/current/controller.config.2.txt
459 netconf.config.persister.3.properties.numberOfBackups=3
462 During server startup, ConfigPersisterNotificationHandler requests the last snapshot from the underlying storages. Each storage can respond by giving a snapshot or an absent response. The PersisterAggregator#loadLastConfigs() will search for the first non-absent response from storages ordered backwards as user specified (first '3', then '2'). When a commit notification is received, '2' will be omitted because the read-only flag is set to true, so only '3' will have a chance to persist the new configuration.
463 If read-only was false, or not specified, both storage adapters would be called in the order specified by 'netconf.config.persister' property.
465 === Persister Notification Handler
467 ConfigPersisterNotificationHandler class is responsible for listening for netconf notifications containing the latest committed configuration.
468 The listener can handle incoming notifications, or delegates the configuration saving or loading to the persister.
470 ==== Storage Adapter implementations
474 The XmlFileStorageAdapter implementation stores configuration in an xml file.
476 *XML Directory Storage* +
478 XmlDirectoryStorageAdapter retrieves the initial configuration from a directory. If multiple xml files are present, files are ordered based on the file names and pushed in this order (for example, 00.xml, then 01.xml..) Each file defines its required capabilities, so it will be pushed when those capabilities are advertized by ODL. Writing to this persister is not supported.
480 *No-Operation Storage* +
482 NoOpStorageAdapter serves as a dummy implementation of the storage adapter.
484 *Obsolete storage adapters* +
488 * FileStorageAdapter implements StorageAdapter, and provides file based configuration persisting.
489 File path and name is stored as a property and a number of stored backups, expressing the count of the last configurations to be persisted too.
490 The implementation can handle persisting input configuration, and load the last configuration.
494 * DirectoryStorageAdapter retrieves initial configurations from a directory. If multiple files are present, snapshot and required capabilities will be merged together. See configuration later on this page for details. Writing to this persister is not supported.
496 * Autodetect Directory Storage
498 * AutodetectDirectoryStorageAdapter retrieves initial configuration from a directory (exactly as Xml Directory Storage) but supports xml as well as plaintext format for configuration files. Xml and plaintext files can be combined in one directory. Purpose of this persister is to keep backwards compatibility for plaintext configuration files.
500 IMPORTANT: This functionality will be removed in later releases since Plaintext File/Directory adapters are deprecated, and will be fully replaced by xml storage adapters.
502 ===== Persisted snapshot format
504 Configuration snapshots are persisted in xml files for both file and directory adapters. They share the same format: +
507 <required-capabilities>
508 <capability>urn:opendaylight:params:xml:ns:yang:controller:netty?module=netty&revision=2013-11-19</capability>
510 </required-capabilities>
513 <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
514 <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
518 <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
527 The whole snapshot is encapsulated in the snapshot tag that contains two children elements: +
529 * The required-capabilities tag contains the list of yang capabilities that are required to push configurations located under the configuration tag. The config persister will not push the configuration before the netconf endpoint for the config subsystem reports all needed capabilities. Every yang model that is referenced within this xml file (as namespace for xml tag) must be referenced as a capability in this list.
530 * The configuration tag contains the configurations to be pushed to the config subsystem. It is wrapped in a data tag with the base netconf namespace. The whole data tag, with all its child elements, will be inserted into an edit-config rpc as config tag. For more information about the structure of configuration data, see base yang model for the config subsystem and all the configuration yang files for the controller modules as well as those provided examples. Examples contain multiple explained edit-config rpcs that change the configuration.
532 NOTE: XML File adapter adds additional tags to the xml format since it supports multiple snapshots per file.
534 The xml format for xml file adapter: +
536 <persisted-snapshots>
539 <required-capabilities>
540 <capability>urn:opendaylight:params:xml:ns:yang:controller:shutdown:impl?module=shutdown-impl&revision=2013-12-18</capability>
541 </required-capabilities>
543 <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
544 <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
547 <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
554 <required-capabilities>
555 <capability>urn:opendaylight:params:xml:ns:yang:controller:shutdown:impl?module=shutdown-impl&revision=2013-12-18</capability>
556 </required-capabilities>
558 <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
559 <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
562 <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
569 </persisted-snapshots>