Prepare the YANG models for RESTCONF
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / interfaces / lisp / IGeneralMapServer.java
1 /*
2  * Copyright (c) 2014 Contextream, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.lispflowmapping.interfaces.lisp;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.LispAddressContainer;
11
12 /**
13  * The general methods of the map server
14  */
15 public interface IGeneralMapServer {
16
17     /**
18      * @return Should the map server use authentication.
19      */
20     boolean shouldAuthenticate();
21
22     /**
23      * @return Should the map server use masking.
24      */
25     boolean shouldIterateMask();
26
27     /**
28      * @return Should the map server use overwrite.
29      */
30     boolean shouldOverwrite();
31
32     /**
33      * This method returns the authentication key of the address.
34      *
35      * @param address
36      * @param maskLen
37      * @return The correct key.
38      */
39     String getAuthenticationKey(LispAddressContainer address, int maskLen);
40
41     void setShouldIterateMask(boolean shouldIterateMask);
42
43     void setShouldAuthenticate(boolean shouldAuthenticate);
44
45     void setOverwrite(boolean overwrite);
46
47     /**
48      * This method removes the given authentication key from the map server.
49      *
50      * @param address
51      * @param maskLen
52      * @return
53      */
54     void removeAuthenticationKey(LispAddressContainer address, int maskLen);
55
56     /**
57      * This method adds an authentication key to the address.
58      *
59      * @param address
60      * @param maskLen
61      * @param key
62      * @return
63      */
64     void addAuthenticationKey(LispAddressContainer address, int maskLen, String key);
65 }