blob: bc1acf0cd316a421b4079ffbdcd17af97db6be71 [file] [log] [blame]
pierventre30368ab2021-02-24 23:23:22 +01001/*
2 * Copyright 2021-present Open Networking Foundation
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 */
16package org.onosproject.segmentrouting.policy.api;
17
18/**
19 * Represents a policy in TOST.
20 */
21public interface Policy {
22 /**
23 * Represents the type of a policy.
24 */
25 enum PolicyType {
26 /**
27 * The policy drops the associated traffic.
28 */
29 DROP,
30
31 /**
32 * The policy redirects traffic using custom routing.
33 */
34 REDIRECT
35 }
36
37 /**
38 * Returns the policy id.
39 *
40 * @return the policy id
41 */
42 PolicyId policyId();
43
44 /**
45 * Returns the policy type.
46 *
47 * @return the type of a policy
48 */
49 PolicyType policyType();
50}