blob: 690248394b6811e96d13dac9e6fbdda3e9719c50 [file] [log] [blame]
Brian O'Connorb7baf712015-07-28 23:27:03 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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.incubator.net.domain;
17
18import com.google.common.annotations.Beta;
19
20/**
21 * The abstract base class for the resource that satisfies an intent primitive.
22 */
23@Beta
Brian O'Connor59a92852015-07-30 19:08:24 -070024public class IntentResource {
Brian O'Connorb7baf712015-07-28 23:27:03 -070025
26 private final IntentPrimitive primitive;
Brian O'Connor59a92852015-07-30 19:08:24 -070027 private final long tunnelId;
Brian O'Connorb7baf712015-07-28 23:27:03 -070028
29 // TODO add other common fields
30 //String ingressTag;
31 //String egressTag;
32 //etc.
33
Brian O'Connor59a92852015-07-30 19:08:24 -070034 public IntentResource(IntentPrimitive primitive, long tunnelId) {
Brian O'Connorb7baf712015-07-28 23:27:03 -070035 this.primitive = primitive;
Brian O'Connor59a92852015-07-30 19:08:24 -070036 this.tunnelId = tunnelId;
Brian O'Connorb7baf712015-07-28 23:27:03 -070037 }
38
39 public IntentPrimitive primitive() {
40 return primitive;
41 }
42
Brian O'Connor59a92852015-07-30 19:08:24 -070043 public long tunnelId() {
44 return tunnelId;
45 }
46
Brian O'Connorb7baf712015-07-28 23:27:03 -070047}