From 77fa76b4b15ec6d74920349f9a066ec4597b2585 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Tue, 16 Aug 2016 11:04:00 +0200 Subject: HONEYCOMB-22: Remove karaf based distribution and wiring Change-Id: I48aafb726de53b6ad3fb9b97c202f712dfa4a540 Signed-off-by: Maros Marsalek --- infra/impl/pom.xml | 48 -- .../src/main/config/context-datatree-config.xml | 144 ------ infra/impl/src/main/config/default-config.xml | 253 ----------- infra/impl/src/main/config/initializer-config.xml | 188 -------- .../impl/src/main/config/netconf-north-config.xml | 494 --------------------- .../impl/src/main/config/restconf-north-config.xml | 37 -- .../fd/honeycomb/impl/FakeBindingAwareBroker.java | 114 +++++ .../impl/NetconfMonitoringReaderFactory.java | 44 ++ .../impl/rev141210/ContextDataBrokerModule.java | 26 -- .../rev141210/ContextDataBrokerModuleFactory.java | 13 - .../honeycomb/impl/rev141210/DataBrokerModule.java | 34 -- .../impl/rev141210/DataBrokerModuleFactory.java | 13 - .../honeycomb/impl/rev141210/HoneycombModule.java | 59 --- .../impl/rev141210/HoneycombModuleFactory.java | 28 -- .../impl/rev141210/NetconfBindingBrokerModule.java | 117 ----- .../NetconfBindingBrokerModuleFactory.java | 13 - .../rev141210/NetconfMonitoringReaderModule.java | 45 -- .../NetconfMonitoringReaderModuleFactory.java | 13 - infra/impl/src/main/yang/honeycomb-impl.yang | 155 ------- 19 files changed, 158 insertions(+), 1680 deletions(-) delete mode 100644 infra/impl/src/main/config/context-datatree-config.xml delete mode 100644 infra/impl/src/main/config/default-config.xml delete mode 100644 infra/impl/src/main/config/initializer-config.xml delete mode 100644 infra/impl/src/main/config/netconf-north-config.xml delete mode 100644 infra/impl/src/main/config/restconf-north-config.xml create mode 100644 infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java create mode 100644 infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java delete mode 100644 infra/impl/src/main/yang/honeycomb-impl.yang (limited to 'infra/impl') diff --git a/infra/impl/pom.xml b/infra/impl/pom.xml index 4a316ceaf..34187bf5d 100644 --- a/infra/impl/pom.xml +++ b/infra/impl/pom.xml @@ -79,52 +79,4 @@ test - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${config.file} - xml - config - - - src/main/config/netconf-north-config.xml - xml - netconf - - - src/main/config/initializer-config.xml - xml - init - - - src/main/config/context-datatree-config.xml - xml - context - - - src/main/config/restconf-north-config.xml - xml - restconf - - - - - - - - diff --git a/infra/impl/src/main/config/context-datatree-config.xml b/infra/impl/src/main/config/context-datatree-config.xml deleted file mode 100644 index d3d694dc2..000000000 --- a/infra/impl/src/main/config/context-datatree-config.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&revision=2014-12-10 - urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06 - urn:honeycomb:params:xml:ns:yang:data:init?module=cfg-init&revision=2016-04-07 - urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11 - urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - - - - - - - - - - prefix:inmemory-data-tree - inmemory-context-data-tree - - dom:schema-service - yang-schema-service - - oper - - - - - prefix:persisting-data-tree-adapter - inmemory-persisted-context-data-tree - - prefix:data-tree - inmemory-context-data-tree - - - dom:schema-service - yang-schema-service - - data/persistence/honeycomb/context.json - - - - - prefix:honeycomb-context-dom-data-broker - honeycomb-context-data-broker - - - prefix:data-tree - inmemory-persisted-context-data-tree - - - - - - prefix:binding-forwarded-data-broker - honeycomb-context-binding-data-broker - - - dom:dom-async-data-broker - honeycomb-context-data-broker - - - dom:schema-service - yang-schema-service - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - - - - - prefix:realtime-mapping-context - realtime-mapping-context - - binding:binding-async-data-broker - honeycomb-context-binding-data-broker - - - - - - - prefix:data-tree - - inmemory-context-data-tree - /modules/module[type='inmemory-data-tree'][name='inmemory-context-data-tree'] - - - - inmemory-persisted-context-data-tree - /modules/module[type='persisting-data-tree-adapter'][name='inmemory-persisted-context-data-tree'] - - - - - - dom:dom-async-data-broker - - honeycomb-context-data-broker - /modules/module[type='honeycomb-context-dom-data-broker'][name='honeycomb-context-data-broker'] - - - - - binding:binding-async-data-broker - - honeycomb-context-binding-data-broker - /modules/module[type='binding-forwarded-data-broker'][name='honeycomb-context-binding-data-broker'] - - - - - prefix:honeycomb-mapping-context - - realtime-mapping-context - /modules/module[type='realtime-mapping-context'][name='realtime-mapping-context'] - - - - - - diff --git a/infra/impl/src/main/config/default-config.xml b/infra/impl/src/main/config/default-config.xml deleted file mode 100644 index 14ff4ae87..000000000 --- a/infra/impl/src/main/config/default-config.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&revision=2014-12-10 - urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06 - urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11 - urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - - - - - - - - prefix:delegating-reader-registry - read-registry - - - prefix:delegating-writer-registry - write-registry - - - - - prefix:inmemory-data-tree - inmemory-config-data-tree - - dom:schema-service - yang-schema-service - - config - - - - - prefix:persisting-data-tree-adapter - inmemory-persisted-config-data-tree - - prefix:data-tree - inmemory-config-data-tree - - - dom:schema-service - yang-schema-service - - data/persistence/honeycomb/config.json - - - - - - prefix:honeycomb-config-data-tree - config-data-tree - - - - - - - - prefix:data-tree - inmemory-persisted-config-data-tree - - - - prefix:binding-dom-mapping-service - runtime-mapping-singleton - - - prefix:honeycomb-writer-registry-builder - write-registry-builder - - - binding:binding-async-data-broker - honeycomb-context-binding-data-broker - - - - - - prefix:honeycomb-operational-data-tree - operational-data-tree - - dom:schema-service - yang-schema-service - - - prefix:binding-dom-mapping-service - runtime-mapping-singleton - - - prefix:honeycomb-reader-registry - read-registry - - - binding:binding-async-data-broker - honeycomb-context-binding-data-broker - - - - - - prefix:honeycomb-dom-data-broker - honeycomb-dom-data-broker - - prefix:honeycomb-modifiable-data-tree - config-data-tree - - - prefix:honeycomb-readable-data-tree - operational-data-tree - - - - - - prefix:binding-forwarded-data-broker - honeycomb-binding-data-broker - - - - dom:dom-async-data-broker - honeycomb-dom-data-broker - - - dom:schema-service - yang-schema-service - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - - - - prefix:honeycomb - honeycomb-default - - prefix:dom-broker-osgi-registry - dom-broker - - - prefix:dom-async-data-broker - honeycomb-dom-data-broker - - - prefix:dom-notification-service - honeycomb-dom-notification-service - - - - - - - - dom:dom-async-data-broker - - honeycomb-dom-data-broker - /modules/module[type='honeycomb-dom-data-broker'][name='honeycomb-dom-data-broker'] - - - - - binding:binding-async-data-broker - - honeycomb-binding-data-broker - /modules/module[type='binding-forwarded-data-broker'][name='honeycomb-binding-data-broker'] - - - - - prefix:honeycomb-reader-registry - - read-registry - /modules/module[type='delegating-reader-registry'][name='read-registry'] - - - - prefix:honeycomb-writer-registry - - write-registry - /modules/module[type='delegating-writer-registry'][name='write-registry'] - - - - prefix:honeycomb-writer-registry-builder - - write-registry-builder - /modules/module[type='delegating-writer-registry'][name='write-registry'] - - - - - prefix:data-tree - - inmemory-config-data-tree - /modules/module[type='inmemory-data-tree'][name='inmemory-config-data-tree'] - - - - inmemory-persisted-config-data-tree - /modules/module[type='persisting-data-tree-adapter'][name='inmemory-persisted-config-data-tree'] - - - - - - prefix:honeycomb-modifiable-data-tree - - config-data-tree - /modules/module[type='honeycomb-config-data-tree'][name='config-data-tree'] - - - - - prefix:honeycomb-readable-data-tree - - operational-data-tree - /modules/module[type='honeycomb-operational-data-tree'][name='operational-data-tree'] - - - - - - dom:dom-broker-osgi-registry - - - honeycomb-dom-broker - /modules/module[type='honeycomb'][name='honeycomb-default'] - - - - - - - diff --git a/infra/impl/src/main/config/initializer-config.xml b/infra/impl/src/main/config/initializer-config.xml deleted file mode 100644 index 5265ed0d2..000000000 --- a/infra/impl/src/main/config/initializer-config.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&revision=2014-12-10 - urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06 - urn:honeycomb:params:xml:ns:yang:data:init?module=cfg-init&revision=2016-04-07 - urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11 - urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - - - - - - - - - prefix:noop-writer-registry-builder - noop-writer-registry-builder - - - - prefix:honeycomb-config-data-tree - cfg-init-config-data-tree - - - prefix:data-tree - inmemory-config-data-tree - - - prefix:binding-dom-mapping-service - runtime-mapping-singleton - - - prefix:honeycomb-writer-registry-builder - noop-writer-registry-builder - - - binding:binding-async-data-broker - honeycomb-context-binding-data-broker - - - - - prefix:honeycomb-dom-data-broker - cfg-init-dom-data-broker - - prefix:honeycomb-modifiable-data-tree - cfg-init-config-data-tree - - - prefix:honeycomb-readable-data-tree - operational-data-tree - - - - - prefix:binding-forwarded-data-broker - cfg-init-binding-data-broker - - - dom:dom-async-data-broker - cfg-init-dom-data-broker - - - dom:schema-service - yang-schema-service - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - - - - prefix:persisted-file-initializer - persisted-context-initializer - - dom:dom-async-data-broker - honeycomb-context-data-broker - - - dom:schema-service - yang-schema-service - - data/persistence/honeycomb/context.json - merge - oper - - - prefix:persisted-file-initializer - persisted-config-initializer - - prefix:dom-async-data-broker - honeycomb-dom-data-broker - - - dom:schema-service - yang-schema-service - - data/persistence/honeycomb/config.json - merge - config - - - - prefix:cfg-initializer-registry - initializer-registry - - prefix:cfg-initializer - persisted-context-initializer - - - prefix:cfg-initializer - persisted-config-initializer - - - - - - - - - prefix:honeycomb-writer-registry-builder - - noop-writer-registry-builder - /modules/module[type='noop-writer-registry-builder'][name='noop-writer-registry-builder'] - - - - prefix:honeycomb-modifiable-data-tree - - cfg-init-config-data-tree - /modules/module[type='honeycomb-config-data-tree'][name='cfg-init-config-data-tree'] - - - - - dom:dom-async-data-broker - - cfg-init-dom-data-broker - /modules/module[type='honeycomb-dom-data-broker'][name='cfg-init-dom-data-broker'] - - - - binding:binding-async-data-broker - - cfg-init-binding-data-broker - /modules/module[type='binding-forwarded-data-broker'][name='cfg-init-binding-data-broker'] - - - - - prefix:cfg-initializer - - persisted-context-initializer - /modules/module[type='persisted-file-initializer'][name='persisted-context-initializer'] - - - - persisted-config-initializer - /modules/module[type='persisted-file-initializer'][name='persisted-config-initializer'] - - - - - - - diff --git a/infra/impl/src/main/config/netconf-north-config.xml b/infra/impl/src/main/config/netconf-north-config.xml deleted file mode 100644 index 1a3e6a7ca..000000000 --- a/infra/impl/src/main/config/netconf-north-config.xml +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - prefix:inmemory-config-datastore-provider - netconf-config-store-service - - - dom:schema-service - yang-schema-service - - - - - prefix:inmemory-operational-datastore-provider - netconf-operational-store-service - - - dom:schema-service - yang-schema-service - - - - - prefix:dom-inmemory-data-broker - netconf-inmemory-data-broker - - - dom:schema-service - yang-schema-service - - - - config-dom-store-spi:config-dom-datastore - netconf-config-store-service - - - - operational-dom-store-spi:operational-dom-datastore - netconf-operational-store-service - - - - - prefix:binding-forwarded-data-broker - netconf-binding-data-broker - - - dom:dom-async-data-broker - netconf-inmemory-data-broker - - - dom:schema-service - yang-schema-service - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - - - - prefix:binding-broker-netconf - binding-broker-netconf - - binding:binding-async-data-broker - netconf-binding-data-broker - - - - - - - prefix:netconf-mdsal-mapper - - netconf-honeycomb-mapper - - dom:schema-service - - yang-schema-service - - - - dom:yang-text-source-provider - - yang-text-source-provider - - - - dom:dom-broker-osgi-registry - - honeycomb-dom-broker - - - - prefix:netconf-mapper-registry - - honeycomb-mapper-aggregator-registry - - - - - - prefix:netconf-server-dispatcher-impl - - netconf-honeycomb-server-dispatcher - - - dom:netconf-northbound-mapper - - honeycomb-mapper-aggregator - - - - prefix:netconf-server-monitoring - - honeycomb-server-monitor - - - - prefix:netty-threadgroup - - global-boss-group - - - - prefix:netty-threadgroup - - global-worker-group - - - prefix:netty-timer - - global-timer - - - - - - prefix:netconf-mdsal-monitoring-mapper - - netconf-honeycomb-monitoring-mapper - - - prefix:netconf-server-monitoring - - honeycomb-server-monitor - - - - prefix:binding-broker-osgi-registry - - binding-broker-netconf - - - - prefix:netconf-mapper-registry - - honeycomb-mapper-aggregator-registry - - - - - - prefix:netconf-mapper-aggregator - - honeycomb-mapper-aggregator - - - - - prefix:netconf-server-monitoring-impl - - honeycomb-server-monitor - - - dom:netconf-northbound-mapper - - honeycomb-mapper-aggregator - - - - - prefix:netconf-northbound-ssh - netconf-mdsal-ssh-server - - - - - prefix:netconf-northbound-ssh - - netconf-honeycomb-ssh-server - - 2831 - - - prefix:netty-event-executor - - global-event-executor - - - - prefix:netty-threadgroup - - global-worker-group - - - - prefix:threadpool - - global-netconf-ssh-scheduled-executor - - - - prefix:netconf-server-dispatcher - - netconf-honeycomb-server-dispatcher - - - - prefix:netconf-auth-provider - - default-auth-provider - - - - - - prefix:netconf-notification-manager - - honeycomb-netconf-notification-manager - - - - - prefix:netconf-mdsal-notification-mapper - - netconf-honeycomb-notification-mapper - - - - binding:binding-async-data-broker - - netconf-binding-data-broker - - - - - prefix:binding-broker-osgi-registry - - binding-broker-netconf - - - - prefix:netconf-mapper-registry - - honeycomb-mapper-aggregator-registry - - - - prefix:netconf-notification-registry - - honeycomb-netconf-notification-manager - - - - prefix:netconf-notification-collector - - honeycomb-netconf-notification-manager - - - - - - - - prefix:netconf-northbound-tcp - - netconf-honeycomb-tcp-server - - - prefix:netconf-server-dispatcher - - netconf-honeycomb-server-dispatcher - - 7777 - - - - - prefix:netconf-monitoring-reader - netconf-monitoring-reader - - binding:binding-async-data-broker - netconf-binding-data-broker - - - - prefix:delegating-reader-registry - read-registry - - prefix:honeycomb-reader-factory - netconf-monitoring-reader - - - - - - - - - config-dom-store-spi:config-dom-datastore - - netconf-config-store-service - /modules/module[type='inmemory-config-datastore-provider'][name='netconf-config-store-service'] - - - - operational-dom-store-spi:operational-dom-datastore - - netconf-operational-store-service - /modules/module[type='inmemory-operational-datastore-provider'][name='netconf-operational-store-service'] - - - - dom:dom-async-data-broker - - netconf-inmemory-data-broker - /modules/module[type='dom-inmemory-data-broker'][name='netconf-inmemory-data-broker'] - - - - - prefix:honeycomb-reader-factory - - netconf-monitoring-reader - /modules/module[type='netconf-monitoring-reader'][name='netconf-monitoring-reader'] - - - - - - - binding:binding-async-data-broker - - netconf-binding-data-broker - /modules/module[type='binding-forwarded-data-broker'][name='netconf-binding-data-broker'] - - - - binding:binding-broker-osgi-registry - - binding-broker-netconf - /modules/module[type='binding-broker-netconf'][name='binding-broker-netconf'] - - - - - - - prefix:netconf-server-monitoring - - - honeycomb-server-monitor - /modules/module[type='netconf-server-monitoring-impl'][name='honeycomb-server-monitor'] - - - - - - prefix:netconf-northbound-mapper - - - netconf-honeycomb-mapper - /modules/module[type='netconf-mdsal-mapper'][name='netconf-honeycomb-mapper'] - - - - - prefix:netconf-northbound-mapper - - - honeycomb-mapper-aggregator - /modules/module[type='netconf-mapper-aggregator'][name='honeycomb-mapper-aggregator'] - - - - - prefix:netconf-mapper-registry - - - honeycomb-mapper-aggregator-registry - /modules/module[type='netconf-mapper-aggregator'][name='honeycomb-mapper-aggregator'] - - - - - prefix:netconf-server-dispatcher - - - netconf-honeycomb-server-dispatcher - - /modules/module[type='netconf-server-dispatcher-impl'][name='netconf-honeycomb-server-dispatcher'] - - - - - - prefix:netconf-northbound-mapper - - - netconf-honeycomb-notification-mapper - - /modules/module[type='netconf-mdsal-notification-mapper'][name='netconf-honeycomb-notification-mapper'] - - - - - - prefix:netconf-notification-collector - - - honeycomb-netconf-notification-manager - - /modules/module[type='netconf-notification-manager'][name='honeycomb-netconf-notification-manager'] - - - - - - prefix:netconf-notification-registry - - - honeycomb-netconf-notification-manager - - /modules/module[type='netconf-notification-manager'][name='honeycomb-netconf-notification-manager'] - - - - - - - - - urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&revision=2014-12-10 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper?module=netconf-mdsal-mapper&revision=2015-01-14 - - urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring?module=netconf-mdsal-monitoring&revision=2015-02-18 - - urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh?module=netconf-northbound-ssh&revision=2015-01-14 - urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp?module=netconf-northbound-tcp&revision=2015-04-23 - - urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl?module=netconf-northbound-impl&revision=2015-01-12 - - - urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:scheduled?module=threadpool-impl-scheduled&revision=2013-12-01 - - - urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification?module=netconf-mdsal-notification&revision=2015-08-03 - - - diff --git a/infra/impl/src/main/config/restconf-north-config.xml b/infra/impl/src/main/config/restconf-north-config.xml deleted file mode 100644 index 00599b62c..000000000 --- a/infra/impl/src/main/config/restconf-north-config.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - rest:rest-connector-impl - rest-connector-default-impl - - - dom:dom-broker-osgi-registry - honeycomb-dom-broker - - - - - - - urn:opendaylight:params:xml:ns:yang:controller:sal:restconf:service?module=sal-restconf-service&revision=2015-07-08 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector?module=opendaylight-rest-connector&revision=2014-07-24 - - diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java new file mode 100644 index 000000000..f11848ac7 --- /dev/null +++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2016 Cisco and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fd.honeycomb.impl; + +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; +import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer; +import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; +import org.opendaylight.controller.sal.binding.api.BindingAwareService; +import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier; +import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.yang.binding.RpcService; +import org.osgi.framework.BundleContext; + +/** + * Binding aware broker wrapping just a DataBroker + */ +public final class FakeBindingAwareBroker implements BindingAwareBroker, AutoCloseable { + + private DataBroker netconfBindingBrokerDependency; + + public FakeBindingAwareBroker(final DataBroker netconfBindingBrokerDependency) { + + this.netconfBindingBrokerDependency = netconfBindingBrokerDependency; + } + + @Deprecated + @Override + public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer, + final BundleContext bundleContext) { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer) { + final ConsumerContext consumerContext = new ConsumerContext() { + @Override + public T getSALService(final Class aClass) { + return aClass.equals(DataBroker.class) + ? (T) netconfBindingBrokerDependency + : null; + } + + @Override + public T getRpcService(final Class aClass) { + return null; + } + }; + bindingAwareConsumer.onSessionInitialized(consumerContext); + return consumerContext; + } + + @Override + public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider, + final BundleContext bundleContext) { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider) { + final ProviderContext context = new ProviderContext() { + @Override + public >> ListenerRegistration registerRouteChangeListener( + final L l) { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public T getRpcService(final Class aClass) { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public RpcRegistration addRpcImplementation(final Class aClass, final T t) + throws IllegalStateException { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public RoutedRpcRegistration addRoutedRpcImplementation( + final Class aClass, final T t) throws IllegalStateException { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public T getSALService(final Class aClass) { + return aClass.equals(DataBroker.class) + ? (T) netconfBindingBrokerDependency + : null; } + }; + bindingAwareProvider.onSessionInitiated(context); + return context; + } + + @Override + public void close() throws Exception { + netconfBindingBrokerDependency = null; + } +} diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java new file mode 100644 index 000000000..a299dbe3f --- /dev/null +++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2016 Cisco and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fd.honeycomb.impl; + +import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; +import io.fd.honeycomb.translate.util.read.BindingBrokerReader; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; + +/** + * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader into NETCONF's dedicated data store. + * Making NETCONF operational data available over NETCONF/RESTCONF + */ +public final class NetconfMonitoringReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory { + + private final DataBroker netconfMonitoringBindingBrokerDependency; + + public NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) { + this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency; + } + + @Override + public void init(final ModifiableReaderRegistryBuilder registry) { + registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class), + netconfMonitoringBindingBrokerDependency, + LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class)); + } +} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java deleted file mode 100644 index c2f7d688a..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; - -import io.fd.honeycomb.data.impl.DataBroker; -import io.fd.honeycomb.data.impl.ModifiableDataTreeManager; - -public class ContextDataBrokerModule extends AbstractContextDataBrokerModule { - - public ContextDataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public ContextDataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, ContextDataBrokerModule oldModule, java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - return DataBroker.create(new ModifiableDataTreeManager(getContextDataTreeDependency())); - } - -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java deleted file mode 100644 index e07214b2e..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po-impl yang module local name: honeycomb-context-dom-data-broker -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Mon May 16 15:27:12 CEST 2016 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; -public class ContextDataBrokerModuleFactory extends AbstractContextDataBrokerModuleFactory { - -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java deleted file mode 100644 index d97573e12..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; - -import io.fd.honeycomb.data.impl.DataBroker; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DataBrokerModule extends - AbstractDataBrokerModule { - - private static final Logger LOG = LoggerFactory.getLogger(DataBrokerModule.class); - - public DataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - DataBrokerModule oldModule, - java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - LOG.debug("DataBrokerModule.createInstance()"); - return DataBroker.create(getConfigDataTreeDependency(), getOperationalDataTreeDependency()); - } -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java deleted file mode 100644 index 388f26c67..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po-impl yang module local name: honeycomb-dom-data-broker -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Mon Apr 11 07:53:38 CEST 2016 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; -public class DataBrokerModuleFactory extends AbstractDataBrokerModuleFactory { - -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java deleted file mode 100644 index 333219518..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2015 Cisco and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; - -import io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker; -import org.opendaylight.controller.sal.core.api.AbstractProvider; -import org.opendaylight.controller.sal.core.api.Broker; -import org.opendaylight.controller.sal.core.api.model.SchemaService; - -public class HoneycombModule extends AbstractHoneycombModule { - - public HoneycombModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public HoneycombModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - HoneycombModule oldModule, - java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here - } - - @Override - public java.lang.AutoCloseable createInstance() { - - final Broker.ProviderSession providerSession = - getDomBrokerDependency().registerProvider(new AbstractProvider() { - @Override - public void onSessionInitiated(final Broker.ProviderSession providerSession) { - // NOOP - } - }); - final SchemaService schemaBiService = providerSession.getService(SchemaService.class); - - return new NorthboundFacadeHoneycombDOMBroker(getHoneycombDomDataBrokerDependency(), schemaBiService, - getHoneycombDomNotificationServiceDependency()); - } - -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java deleted file mode 100644 index 2e7b0956f..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2015 Cisco and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* -* Generated file -* -* Generated from: yang module name: v3po yang module local name: v3po -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Fri Jan 02 13:49:24 CST 2015 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; -public class HoneycombModuleFactory extends AbstractHoneycombModuleFactory { - -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java deleted file mode 100644 index 4666e1166..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; - -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; -import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer; -import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; -import org.opendaylight.controller.sal.binding.api.BindingAwareService; -import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.RpcService; -import org.osgi.framework.BundleContext; - -public class NetconfBindingBrokerModule extends AbstractNetconfBindingBrokerModule { - public NetconfBindingBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public NetconfBindingBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, NetconfBindingBrokerModule oldModule, java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - return new FakeBindingAwareBroker(getNetconfBindingBrokerDependency()); - } - - public static final class FakeBindingAwareBroker implements BindingAwareBroker, AutoCloseable { - - private DataBroker netconfBindingBrokerDependency; - - public FakeBindingAwareBroker(final DataBroker netconfBindingBrokerDependency) { - - this.netconfBindingBrokerDependency = netconfBindingBrokerDependency; - } - - @Deprecated - @Override - public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer, - final BundleContext bundleContext) { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer) { - final ConsumerContext consumerContext = new ConsumerContext() { - @Override - public T getSALService(final Class aClass) { - return aClass.equals(DataBroker.class) - ? (T) netconfBindingBrokerDependency - : null; - } - - @Override - public T getRpcService(final Class aClass) { - return null; - } - }; - bindingAwareConsumer.onSessionInitialized(consumerContext); - return consumerContext; - } - - @Override - public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider, - final BundleContext bundleContext) { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider) { - final ProviderContext context = new ProviderContext() { - @Override - public >> ListenerRegistration registerRouteChangeListener( - final L l) { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public T getRpcService(final Class aClass) { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public RpcRegistration addRpcImplementation(final Class aClass, final T t) - throws IllegalStateException { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public RoutedRpcRegistration addRoutedRpcImplementation( - final Class aClass, final T t) throws IllegalStateException { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public T getSALService(final Class aClass) { - return aClass.equals(DataBroker.class) - ? (T) netconfBindingBrokerDependency - : null; } - }; - bindingAwareProvider.onSessionInitiated(context); - return context; - } - - @Override - public void close() throws Exception { - netconfBindingBrokerDependency = null; - } - } -} - diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java deleted file mode 100644 index fe9bdcf48..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po-impl yang module local name: binding-broker-netconf -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Mar 23 10:45:48 CET 2016 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; -public class NetconfBindingBrokerModuleFactory extends AbstractNetconfBindingBrokerModuleFactory { - -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java deleted file mode 100644 index 2ea59de65..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; - -import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; -import io.fd.honeycomb.translate.util.read.BindingBrokerReader; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -public class NetconfMonitoringReaderModule extends AbstractNetconfMonitoringReaderModule { - public NetconfMonitoringReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public NetconfMonitoringReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, NetconfMonitoringReaderModule oldModule, java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - return new NetconfMonitoringReaderFactory(getNetconfMonitoringBindingBrokerDependency()); - } - - public static final class NetconfMonitoringReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory { - - private final DataBroker netconfMonitoringBindingBrokerDependency; - - public NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) { - this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency; - } - - @Override - public void init(final ModifiableReaderRegistryBuilder registry) { - registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class), - netconfMonitoringBindingBrokerDependency, - LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class)); - } - } -} diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java deleted file mode 100644 index d5130fd53..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po-impl yang module local name: netconf-monitoring-reader -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Tue Apr 12 13:03:40 CEST 2016 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210; -public class NetconfMonitoringReaderModuleFactory extends AbstractNetconfMonitoringReaderModuleFactory { - -} diff --git a/infra/impl/src/main/yang/honeycomb-impl.yang b/infra/impl/src/main/yang/honeycomb-impl.yang deleted file mode 100644 index 46f1af862..000000000 --- a/infra/impl/src/main/yang/honeycomb-impl.yang +++ /dev/null @@ -1,155 +0,0 @@ -module honeycomb-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:honeycomb:impl"; - prefix "hc-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;} - import opendaylight-md-sal-dom {prefix dom;} - import translate-api { prefix tapi; revision-date 2016-04-06; } - import data-api { prefix dapi; revision-date 2016-04-11; } - import notification-api { prefix hc-notif-a; revision-date 2016-06-01; } - - description - "Service definition for honeycomb project"; - - revision "2014-12-10" { - description - "Initial revision"; - } - - identity honeycomb { - base config:module-type; - config:provided-service dom:dom-broker-osgi-registry; - config:java-name-prefix Honeycomb; - } - - augment "/config:modules/config:module/config:configuration" { - case honeycomb { - when "/config:modules/config:module/config:type = 'honeycomb'"; - container dom-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dom:dom-broker-osgi-registry; - } - } - } - - container honeycomb-dom-data-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dom:dom-async-data-broker; - } - } - } - - container honeycomb-dom-notification-service { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity hc-notif-a:dom-notification-service; - } - } - } - - } - } - - identity binding-broker-netconf { - base config:module-type; - config:provided-service md-sal-binding:binding-broker-osgi-registry; - config:java-name-prefix NetconfBindingBroker; - } - - augment "/config:modules/config:module/config:configuration" { - case binding-broker-netconf { - when "/config:modules/config:module/config:type = 'binding-broker-netconf'"; - - container netconf-binding-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity md-sal-binding:binding-async-data-broker; - } - } - } - - } - } - - identity honeycomb-dom-data-broker { - base config:module-type; - config:provided-service dom:dom-async-data-broker; - config:java-name-prefix DataBroker; - } - - augment "/config:modules/config:module/config:configuration" { - case honeycomb-dom-data-broker { - when "/config:modules/config:module/config:type = 'honeycomb-dom-data-broker'"; - - container config-data-tree { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dapi:honeycomb-modifiable-data-tree; - } - } - } - - container operational-data-tree { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dapi:honeycomb-readable-data-tree; - } - } - } - - } - } - - identity honeycomb-context-dom-data-broker { - base config:module-type; - config:provided-service dom:dom-async-data-broker; - config:java-name-prefix ContextDataBroker; - description "DomBroker on top of context data-tree"; - } - - augment "/config:modules/config:module/config:configuration" { - case honeycomb-context-dom-data-broker { - when "/config:modules/config:module/config:type = 'honeycomb-context-dom-data-broker'"; - - container context-data-tree { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dapi:data-tree; - } - } - } - } - } - - identity netconf-monitoring-reader { - base config:module-type; - config:provided-service tapi:honeycomb-reader-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case netconf-monitoring-reader { - when "/config:modules/config:module/config:type = 'netconf-monitoring-reader'"; - - container netconf-monitoring-binding-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity md-sal-binding:binding-async-data-broker; - } - } - } - - } - } -} -- cgit 1.2.3-korg