blob: eb4e0f9c41623a8f079fef6d0199544d22d1287b [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 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 */
Brian O'Connorf3d06162014-10-02 15:54:12 -070016package org.onlab.onos.net.intent;
Brian O'Connorf3d06162014-10-02 15:54:12 -070017
Thomas Vachuskac96058a2014-10-20 23:00:16 -070018import org.onlab.onos.TestApplicationId;
tom95329eb2014-10-06 08:40:06 -070019
Brian O'Connorf3d06162014-10-02 15:54:12 -070020/**
21 * An installable intent used in the unit test.
Brian O'Connorf3d06162014-10-02 15:54:12 -070022 */
Thomas Vachuskac96058a2014-10-20 23:00:16 -070023public class TestInstallableIntent extends Intent {
Brian O'Connor520c0522014-11-23 23:50:47 -080024
25 private final int value;
26
Brian O'Connorf3d06162014-10-02 15:54:12 -070027 /**
28 * Constructs an instance with the specified intent ID.
29 *
Brian O'Connor520c0522014-11-23 23:50:47 -080030 * @param value intent ID
Brian O'Connorf3d06162014-10-02 15:54:12 -070031 */
Brian O'Connor520c0522014-11-23 23:50:47 -080032 public TestInstallableIntent(int value) { // FIXME
33 super(new TestApplicationId("foo"), null);
34 this.value = value;
Brian O'Connorf3d06162014-10-02 15:54:12 -070035 }
36
37 /**
38 * Constructor for serializer.
39 */
40 protected TestInstallableIntent() {
41 super();
Brian O'Connor520c0522014-11-23 23:50:47 -080042 value = -1;
Brian O'Connorf3d06162014-10-02 15:54:12 -070043 }
44
tom95329eb2014-10-06 08:40:06 -070045 @Override
Thomas Vachuskac96058a2014-10-20 23:00:16 -070046 public boolean isInstallable() {
47 return true;
tom95329eb2014-10-06 08:40:06 -070048 }
Thomas Vachuskac96058a2014-10-20 23:00:16 -070049
Brian O'Connorf3d06162014-10-02 15:54:12 -070050}