626338b70ceca1c4d0d75f734eaefe76466ccd6e
[hc2vpp.git] /
1 /*
2  * Copyright (c) 2019 PANTHEON.tech.
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.hc2vpp.l3.write.ipv4.subinterface;
18
19 import static com.google.common.base.Preconditions.checkNotNull;
20
21 import io.fd.hc2vpp.common.translate.util.NamingContext;
22 import io.fd.honeycomb.translate.write.DataValidationFailedException;
23 import io.fd.honeycomb.translate.write.Validator;
24 import io.fd.honeycomb.translate.write.WriteContext;
25 import javax.annotation.Nonnull;
26 import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.sub._interface.ip4.attributes.ipv4.Neighbor;
27 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
28
29 public class SubInterfaceIpv4NeighbourValidator implements Validator<Neighbor> {
30     public SubInterfaceIpv4NeighbourValidator(final NamingContext ifcNamingContext) {
31         checkNotNull(ifcNamingContext, "interface context should not be null");
32     }
33
34     @Override
35     public void validateWrite(@Nonnull final InstanceIdentifier<Neighbor> id, @Nonnull final Neighbor dataAfter,
36                               @Nonnull final WriteContext writeContext)
37             throws DataValidationFailedException.CreateValidationFailedException {
38         // there is nothing to validate yet
39     }
40
41     @Override
42     public void validateDelete(@Nonnull final InstanceIdentifier<Neighbor> id, @Nonnull final Neighbor dataBefore,
43                                @Nonnull final WriteContext writeContext)
44             throws DataValidationFailedException.DeleteValidationFailedException {
45         // there is nothing to validate yet
46     }
47 }