HONEYCOMB-58 - Routing Api
[honeycomb.git] / v3po / v3po2vpp / src / main / java / io / fd / honeycomb / translate / v3po / interfaces / acl / common / IetfAclWriter.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.translate.v3po.interfaces.acl.common;
18
19 import io.fd.honeycomb.translate.MappingContext;
20 import io.fd.honeycomb.translate.write.WriteContext;
21 import io.fd.honeycomb.translate.write.WriteFailedException;
22 import java.util.List;
23 import javax.annotation.Nonnegative;
24 import javax.annotation.Nonnull;
25 import javax.annotation.Nullable;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.acl.rev161214.InterfaceMode;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.acl.rev161214.ietf.acl.base.attributes.AccessLists;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.acl.rev161214.ietf.acl.base.attributes.access.lists.Acl;
29 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
30
31 public interface IetfAclWriter {
32     default void write(@Nonnull final InstanceIdentifier<?> id, final int ifIndex, @Nonnull final List<Acl> acls,
33                        final AccessLists.DefaultAction defaultAction, @Nullable final InterfaceMode mode,
34                        @Nonnull final WriteContext writeContext, @Nonnull final MappingContext mappingContext)
35         throws WriteFailedException {
36         write(id, ifIndex, acls, defaultAction, mode, writeContext, 0, mappingContext);
37     }
38
39     void write(@Nonnull final InstanceIdentifier<?> id, int ifIndex, @Nonnull final List<Acl> acls,
40                final AccessLists.DefaultAction defaultAction, @Nullable InterfaceMode mode,
41                @Nonnull final WriteContext writeContext, @Nonnegative final int numberOfTags,
42                @Nonnull final MappingContext mappingContext)
43         throws WriteFailedException;
44
45     void deleteAcl(@Nonnull final InstanceIdentifier<?> id, int ifIndex, @Nonnull final MappingContext mappingContext)
46         throws WriteFailedException;
47 }