X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Fhoneynode%2F1.2.1%2Fhoneynode-plugin-impl%2Fsrc%2Fmain%2Fjava%2Fio%2Ffd%2Fhoneycomb%2Ftransportpce%2Fdevice%2Fwrite%2FOcTerminalDeviceWriterFactory.java;fp=tests%2Fhoneynode%2F1.2.1%2Fhoneynode-plugin-impl%2Fsrc%2Fmain%2Fjava%2Fio%2Ffd%2Fhoneycomb%2Ftransportpce%2Fdevice%2Fwrite%2FOcTerminalDeviceWriterFactory.java;h=0000000000000000000000000000000000000000;hb=96d112bd194f0f39f3d79cc8d76af7594b42f37d;hp=ac52f3ba31a762d2613e987dc3ec8502da3e3d9f;hpb=2d2281ada60005afe37419edfa331438d9faddda;p=transportpce.git diff --git a/tests/honeynode/1.2.1/honeynode-plugin-impl/src/main/java/io/fd/honeycomb/transportpce/device/write/OcTerminalDeviceWriterFactory.java b/tests/honeynode/1.2.1/honeynode-plugin-impl/src/main/java/io/fd/honeycomb/transportpce/device/write/OcTerminalDeviceWriterFactory.java deleted file mode 100644 index ac52f3ba3..000000000 --- a/tests/honeynode/1.2.1/honeynode-plugin-impl/src/main/java/io/fd/honeycomb/transportpce/device/write/OcTerminalDeviceWriterFactory.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2018 Orange 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.transportpce.device.write; - -import javax.annotation.Nonnull; - -import org.opendaylight.mdsal.binding.api.DataBroker; -import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; -import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.terminal.device.rev170708.terminal.device.top.TerminalDevice; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -import com.google.inject.Inject; -import com.google.inject.name.Named; - -import io.fd.honeycomb.translate.util.write.BindingBrokerWriter; -import io.fd.honeycomb.translate.write.WriterFactory; -import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; - -public class OcTerminalDeviceWriterFactory implements WriterFactory { - private static final InstanceIdentifier TERMINAL_DEVICE_CONTAINER_ID = InstanceIdentifier - .create(TerminalDevice.class); - - - @Inject - @Named("device-databroker") - private DataBroker deviceDataBroker; - - @Override - public void init(@Nonnull final ModifiableWriterRegistryBuilder registry) { - registry.wildcardedSubtreeAdd(new BindingBrokerWriter<>(TERMINAL_DEVICE_CONTAINER_ID, deviceDataBroker)); - deviceDataBroker.registerDataTreeChangeListener(DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, - TERMINAL_DEVICE_CONTAINER_ID), new TerminalDeviceChangeListener(deviceDataBroker)); - } -}