2 * Copyright (c) 2016 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package io.fd.honeycomb.translate.v3po.interfacesstate.pbb;
19 import io.fd.honeycomb.translate.read.ReadContext;
20 import io.fd.honeycomb.translate.read.ReadFailedException;
21 import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
22 import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
23 import io.fd.vpp.jvpp.core.future.FutureJVppCore;
24 import javax.annotation.Nonnull;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.pbb.rev161214.PbbRewriteStateInterfaceAugmentationBuilder;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.pbb.rev161214.interfaces.state._interface.PbbRewriteState;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.pbb.rev161214.interfaces.state._interface.PbbRewriteStateBuilder;
28 import org.opendaylight.yangtools.concepts.Builder;
29 import org.opendaylight.yangtools.yang.binding.DataObject;
30 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
32 public class PbbRewriteStateCustomizer extends FutureJVppCustomizer
33 implements ReaderCustomizer<PbbRewriteState, PbbRewriteStateBuilder> {
35 public PbbRewriteStateCustomizer(@Nonnull final FutureJVppCore futureJVppCore) {
36 super(futureJVppCore);
41 public PbbRewriteStateBuilder getBuilder(@Nonnull final InstanceIdentifier<PbbRewriteState> id) {
42 return new PbbRewriteStateBuilder();
46 public void readCurrentAttributes(@Nonnull final InstanceIdentifier<PbbRewriteState> id,
47 @Nonnull final PbbRewriteStateBuilder builder, @Nonnull final ReadContext ctx)
48 throws ReadFailedException {
49 //TODO implement read after https://jira.fd.io/browse/VPP-468 + init
53 public void merge(@Nonnull final Builder<? extends DataObject> parentBuilder,
54 @Nonnull final PbbRewriteState readValue) {
55 ((PbbRewriteStateInterfaceAugmentationBuilder) parentBuilder).setPbbRewriteState(readValue);