HONEYCOMB-58 - Routing Api
[honeycomb.git] / nat / nat2vpp / src / main / java / io / fd / honeycomb / nat / write / NatInstaceCustomizer.java
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  *
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:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 package io.fd.honeycomb.nat.write;
18
19 import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer;
20 import io.fd.honeycomb.translate.write.WriteContext;
21 import io.fd.honeycomb.translate.write.WriteFailedException;
22 import javax.annotation.Nonnull;
23 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.nat.instances.NatInstance;
24 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.nat.instances.NatInstanceKey;
25 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
28
29 final class NatInstaceCustomizer implements ListWriterCustomizer<NatInstance, NatInstanceKey> {
30
31     private static final Logger LOG = LoggerFactory.getLogger(NatInstaceCustomizer.class);
32
33     @Override
34     public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<NatInstance> id,
35                                        @Nonnull final NatInstance dataAfter, @Nonnull final WriteContext writeContext)
36             throws WriteFailedException {
37         LOG.trace("Writing nat-instance: {}", id);
38     }
39
40     @Override
41     public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<NatInstance> id,
42                                         @Nonnull final NatInstance dataBefore, @Nonnull final NatInstance dataAfter,
43                                         @Nonnull final WriteContext writeContext) throws WriteFailedException {
44         LOG.trace("Updating nat-instance: {}", id);
45     }
46
47     @Override
48     public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<NatInstance> id,
49                                         @Nonnull final NatInstance dataBefore, @Nonnull final WriteContext writeContext)
50             throws WriteFailedException {
51         LOG.trace("Deleting nat-instance: {}", id);
52     }
53 }