Remove CSS code JIRA: TSC-111 Change-Id: Ib74c1d3dfc029c2472b8834ae55ce05c8231d225 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Adjust to yangtools-2.0.0 changes Change-Id: Ib86747e5ed19c0c00bb46b8d7e4936f4d90c4364 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> Signed-off-by: Stephen Kitt <skitt@redhat.com>
config-util: use lambdas This series of patches uses lambdas instead of anonymous classes for functional interfaces when possible. Lambdas are replaced with method references when appropriate. Change-Id: Iac5970f81ff50b5b9358eecfc1529d8102f1b22e Signed-off-by: Stephen Kitt <skitt@redhat.com>
config-util: final parameters This automatically-generated patch flags all appropriate parameters as final (including caught exceptions). Change-Id: Ic60c96d83aa19cd7e5adeaf9a7422d26713b326f Signed-off-by: Stephen Kitt <skitt@redhat.com>
Bug 7180 - error-severity and error-type values should be lowercase Add String value fields to ErrorSeverity and ErrorType enums that contain lowercase names of enums. Enums' string value getter methods return these lowercase values. Change-Id: I1509a7bbae4811025a5bbba11e9b2f0c0cc75b50 Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Refactor DocumentedException class Deprecate ErrorType and ErrorSeverity getTagValue methods. Add new replacement getTypeValue and getSeverityValue methods respectively. Change-Id: If7915c65e72a26bfd6c676bb17c94c896cc0c5e2 Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Bug 6918: Edit ErrorSeverity and ErrorType from() method to accept lowercase strings Change-Id: Ifbf4e3447ccd65bf476df3477e63c95748d52493 Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Fix sonar warnings in config-util. Mostly renaming enum constants. Change-Id: I24a3afe1281a070550ef3c8424b35ed58d3691f6 Signed-off-by: Dana Kutenicsova <dana.kutenics@gmail.com>
Mechanical code cleanup (config) * Remove unnecessary type specifiers (use Java 7 <>) * Remove unnecessary "extends Object" declarations * Remove unnecessary semi-colons * Merge identical catch blocks * Remove redundant modifiers: - enum constructors are private by default - interface properties are public static final by default - interface methods are public abstract by default - interfaces are abstract by default - inner interfaces are static by default - inner classes in interfaces are public static by default Change-Id: Iefd8363a5eb120fdd43a4632b9e3db0e7e347dba Signed-off-by: Stephen Kitt <skitt@redhat.com>
Switch to StandardCharsets Guava's Charsets should not be used when StandardCharsets are available. Change-Id: I7c52bd3070bb48857cbba82e8d4bc5993d7aea9d Signed-off-by: Robert Varga <rovarga@cisco.com>
Add config system API to recreate a module instance For the blueprint work, I need to be able to restart/recreate a config module, ie close the previous instance and create a new instance, when the corresponding service instance is recreated/re-advertised via blueprint container restart. The ConfigSubsystemFacade has no API to restart a config module. One can push a new configuration but there has to be an actual change in order for a new instance to be created otherwise it reuses the prior instance. Therefore I added a new EditStrategyType enum, recreate, with a corresponding EditConfigStrategy class that forces re-creation of a config module instance. This strategy calls a new method, reCreateModule, on the ConfigTransactionController interface. The decision logic to reuse or create a new instance is in the AbstractModule class and generated derived classes. Therefore the reCreateModule method sets a canReuseInstance flag on the real AbstractModule instance. This is probably not the cleanest approach but I wanted to avoid changing the Module interface as that looked to be too invasive. The AbstractModule getInstance and canReuse methods check the canReuseInstance override flag to determine if the old module/instance can be reused. Change-Id: I8cfb8408bae0127331676dcf32519b176f0a8844 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
BUG-4367: Use SchemaSourceProvider to retrieve sources for yang - Not using schema context to provide the sources anymore. - Transform the modules into capabilities in YangStoreService instead of requiring the listeners to do so Change-Id: I39a144c7472f7944cca01eeff273058aa2fe7d7a Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Decouple config and netconf subsystems. Extract a common mapping for config pusher and config subsystem netconf Add a ConfigPersisterFacade for XML that allows reads/writes from/to config subsystem using XML format Push notifications from YangStoreService to NetconfNotificationManager instead of using custom listeners Migrate netconf features from controller features, untangle features Change-Id: I71e4ca6e0258e0b1f0d6c19119f93eb9d68b7bca Signed-off-by: Tomas Cere <tcere@cisco.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com> Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Fix license header violations in config-util Change-Id: I0c6868425ca51d9b815b4e961316e4a009502374 Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Fix race condition in get/get-config netconf rpcs for config subsystem The read and transformation of modules from config subsystem is performed in a couple of steps. Each step queried the config subsystem on its own so it was possible to cause inconsistencies among these steps if get/get-config was executed while another transaction was being committed. This race condition, if hit, caused the rpcs to fail with an exception of a missing MBean. After recent introduction of "optional reconnect after capability changed" feature into sal-netconf-connector, this race condition caused get rpc invoked by the connector to fail. Scenario: odl-netconf-connector-all is installed, after the loopback is connected any other feature with configuration is installed e.g. odl-restconf-all, loopback connector reconnects and as it comes back executes get rpc (to query ietf-netconf-monitoring) get rpc in config-netconf-connector fails to transform the modules into xml due to mentioned race condition as the initial config file for restconf has been pushed Now the get/get-config read the data from a dedicated transaction started just for the read. Note: get rpc reads the runtime beans that are part of no transaction, so there is still possibility for this race condition regarding runtime beans. Change-Id: I0822bc48745f9f680b116095693052dff752dee3 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Fix checkstyle warnings in config-util Change-Id: I5a8caa79f38081b65f2e25f9aaecc403584fa394 Signed-off-by: Marian Dubai <mdubai@cisco.com>
Fix warnings in config-util Fix use of deprecated junit classes and unused imports. Change-Id: I5262ac6e870edbd83d86cd56ecfc08c17eee1490 Signed-off-by: Robert Varga <rovarga@cisco.com>
Issue fix for config subsystem Change-Id: I73d02158accb65c92dabc76eb8b353b052ac2d05 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>