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.v3po.translate.v3po.interfaces.ip;
19 import com.google.common.base.Optional;
20 import io.fd.honeycomb.v3po.translate.Context;
21 import io.fd.honeycomb.v3po.translate.spi.write.ChildWriterCustomizer;
22 import io.fd.honeycomb.v3po.translate.v3po.util.VppApiCustomizer;
23 import javax.annotation.Nonnull;
24 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
25 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
26 import org.opendaylight.yangtools.yang.binding.DataObject;
27 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
29 public class Interface1Customizer extends VppApiCustomizer implements ChildWriterCustomizer<Interface1> {
31 public Interface1Customizer(final org.openvpp.vppjapi.vppApi vppApi) {
37 public Optional<Interface1> extract(@Nonnull final InstanceIdentifier<Interface1> currentId,
38 @Nonnull final DataObject parentData) {
39 return Optional.fromNullable(((Interface) parentData).getAugmentation(Interface1.class));
43 public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Interface1> id,
44 @Nonnull final Interface1 dataAfter, @Nonnull final Context writeContext) {
49 public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Interface1> id,
50 @Nonnull final Interface1 dataBefore, @Nonnull final Interface1 dataAfter,
51 @Nonnull final Context writeContext) {
56 public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Interface1> id,
57 @Nonnull final Interface1 dataBefore, @Nonnull final Context writeContext) {