Thomas Vachuska

Adding intent operations batch abstraction.

Adding copyright to intent and flows.
Showing 62 changed files with 1051 additions and 65 deletions
1 -package org.onlab.onos.net.intent; 1 +/*
2 -//TODO is this the right package? 2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +package org.onlab.onos.net.flow;
3 20
4 import static com.google.common.base.Preconditions.checkNotNull; 21 import static com.google.common.base.Preconditions.checkNotNull;
5 22
...@@ -14,7 +31,6 @@ import java.util.List; ...@@ -14,7 +31,6 @@ import java.util.List;
14 * @param <T> the enum of operators <br> 31 * @param <T> the enum of operators <br>
15 * This enum must be defined in each sub-classes. 32 * This enum must be defined in each sub-classes.
16 */ 33 */
17 -@Deprecated
18 public abstract class BatchOperation<T extends BatchOperationEntry<?, ?>> { 34 public abstract class BatchOperation<T extends BatchOperationEntry<?, ?>> {
19 35
20 private final List<T> ops; 36 private final List<T> ops;
......
1 -package org.onlab.onos.net.intent; 1 +/*
2 -//TODO is this the right package? 2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +package org.onlab.onos.net.flow;
3 20
4 import java.util.Objects; 21 import java.util.Objects;
5 22
...@@ -11,7 +28,6 @@ import com.google.common.base.MoreObjects; ...@@ -11,7 +28,6 @@ import com.google.common.base.MoreObjects;
11 * This is the interface to classes which are maintained by BatchOperation as 28 * This is the interface to classes which are maintained by BatchOperation as
12 * its entries. 29 * its entries.
13 */ 30 */
14 -@Deprecated
15 public class BatchOperationEntry<T extends Enum<?>, U extends BatchOperationTarget> { 31 public class BatchOperationEntry<T extends Enum<?>, U extends BatchOperationTarget> {
16 private final T operator; 32 private final T operator;
17 private final U target; 33 private final U target;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.List; 21 import java.util.List;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +package org.onlab.onos.net.flow;
20 +
21 +/**
22 + * An interface of the class which is assigned to BatchOperation.
23 + */
24 +public interface BatchOperationTarget {
25 +
26 +}
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.List; 21 import java.util.List;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import static com.google.common.base.MoreObjects.toStringHelper; 21 import static com.google.common.base.MoreObjects.toStringHelper;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import static com.google.common.base.MoreObjects.toStringHelper; 21 import static com.google.common.base.MoreObjects.toStringHelper;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.HashMap; 21 import java.util.HashMap;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.LinkedList; 21 import java.util.LinkedList;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 21
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import com.google.common.base.Objects; 21 import com.google.common.base.Objects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.net.DeviceId; 21 import org.onlab.onos.net.DeviceId;
4 -import org.onlab.onos.net.intent.BatchOperationTarget;
5 22
6 /** 23 /**
7 * Represents a generalized match &amp; action pair to be applied to 24 * Represents a generalized match &amp; action pair to be applied to
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.net.flow.FlowRuleBatchEntry.FlowRuleOperation; 21 import org.onlab.onos.net.flow.FlowRuleBatchEntry.FlowRuleOperation;
4 -import org.onlab.onos.net.intent.BatchOperationEntry;
5 22
6 23
7 public class FlowRuleBatchEntry 24 public class FlowRuleBatchEntry
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.Collection; 21 import java.util.Collection;
4 22
5 -import org.onlab.onos.net.intent.BatchOperation;
6 -
7 public class FlowRuleBatchOperation 23 public class FlowRuleBatchOperation
8 extends BatchOperation<FlowRuleBatchEntry> { 24 extends BatchOperation<FlowRuleBatchEntry> {
9 25
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.event.AbstractEvent; 21 import org.onlab.onos.event.AbstractEvent;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.event.EventListener; 21 import org.onlab.onos.event.EventListener;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.concurrent.Future; 21 import java.util.concurrent.Future;
4 22
5 import org.onlab.onos.ApplicationId; 23 import org.onlab.onos.ApplicationId;
6 -import org.onlab.onos.net.intent.BatchOperation;
7 import org.onlab.onos.net.provider.Provider; 24 import org.onlab.onos.net.provider.Provider;
8 25
9 /** 26 /**
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.net.provider.ProviderRegistry; 21 import org.onlab.onos.net.provider.ProviderRegistry;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.net.DeviceId; 21 import org.onlab.onos.net.DeviceId;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.concurrent.Future; 21 import java.util.concurrent.Future;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.ApplicationId; 21 import org.onlab.onos.ApplicationId;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.store.StoreDelegate; 21 import org.onlab.onos.store.StoreDelegate;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 21
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.Set; 21 import java.util.Set;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import java.util.List; 21 import java.util.List;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow; 19 package org.onlab.onos.net.flow;
2 20
3 import org.onlab.onos.net.PortNumber; 21 import org.onlab.onos.net.PortNumber;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow.criteria; 19 package org.onlab.onos.net.flow.criteria;
2 20
3 import static com.google.common.base.MoreObjects.toStringHelper; 21 import static com.google.common.base.MoreObjects.toStringHelper;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow.criteria; 19 package org.onlab.onos.net.flow.criteria;
2 20
3 21
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +
1 /** 20 /**
2 * Traffic selection criteria model. 21 * Traffic selection criteria model.
3 */ 22 */
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow.instructions; 19 package org.onlab.onos.net.flow.instructions;
2 20
3 /** 21 /**
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow.instructions; 19 package org.onlab.onos.net.flow.instructions;
2 20
3 import static com.google.common.base.MoreObjects.toStringHelper; 21 import static com.google.common.base.MoreObjects.toStringHelper;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow.instructions; 19 package org.onlab.onos.net.flow.instructions;
2 20
3 import static com.google.common.base.MoreObjects.toStringHelper; 21 import static com.google.common.base.MoreObjects.toStringHelper;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.flow.instructions; 19 package org.onlab.onos.net.flow.instructions;
2 20
3 import static com.google.common.base.MoreObjects.toStringHelper; 21 import static com.google.common.base.MoreObjects.toStringHelper;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +
1 /** 20 /**
2 * Traffic treatment model. 21 * Traffic treatment model.
3 */ 22 */
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +
1 /** 20 /**
2 * Flow rule model &amp; related services API definitions. 21 * Flow rule model &amp; related services API definitions.
3 */ 22 */
......
1 -package org.onlab.onos.net.intent;
2 -//TODO is this the right package?
3 -
4 -/**
5 - * An interface of the class which is assigned to BatchOperation.
6 - */
7 -@Deprecated
8 -public interface BatchOperationTarget {
9 -
10 -}
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.collect.ImmutableSet; 21 import com.google.common.collect.ImmutableSet;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.base.MoreObjects; 21 import com.google.common.base.MoreObjects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import org.onlab.onos.ApplicationId; 21 import org.onlab.onos.ApplicationId;
4 import org.onlab.onos.net.NetworkResource; 22 import org.onlab.onos.net.NetworkResource;
23 +import org.onlab.onos.net.flow.BatchOperationTarget;
5 24
6 import java.util.Collection; 25 import java.util.Collection;
7 import java.util.Objects; 26 import java.util.Objects;
......
1 -package org.onlab.onos.net.intent;
2 -
3 -/**
4 - * A list of intent operations.
5 - */
6 -@Deprecated
7 -public class IntentBatchOperation extends
8 - BatchOperation<BatchOperationEntry<IntentBatchOperation.Operator, ?>> {
9 - /**
10 - * The intent operators.
11 - */
12 - public enum Operator {
13 - ADD,
14 - REMOVE,
15 - }
16 -
17 - /**
18 - * Adds an add-intent operation.
19 - *
20 - * @param intent the intent to be added
21 - * @return the IntentBatchOperation object if succeeded, null otherwise
22 - */
23 - public IntentBatchOperation addAddIntentOperation(Intent intent) {
24 - return (null == super.addOperation(
25 - new BatchOperationEntry<Operator, Intent>(Operator.ADD, intent)))
26 - ? null : this;
27 - }
28 -
29 - /**
30 - * Adds a remove-intent operation.
31 - *
32 - * @param id the ID of intent to be removed
33 - * @return the IntentBatchOperation object if succeeded, null otherwise
34 - */
35 - public IntentBatchOperation addRemoveIntentOperation(IntentId id) {
36 - return (null == super.addOperation(
37 - new BatchOperationEntry<Operator, IntentId>(Operator.REMOVE, id)))
38 - ? null : this;
39 - }
40 -}
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import java.util.List; 21 import java.util.List;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import org.onlab.onos.event.AbstractEvent; 21 import org.onlab.onos.event.AbstractEvent;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 /** 21 /**
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import java.util.Map; 21 import java.util.Map;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
21 +import org.onlab.onos.net.flow.BatchOperationTarget;
22 +
3 /** 23 /**
4 * Intent identifier suitable as an external key. 24 * Intent identifier suitable as an external key.
5 * <p/> 25 * <p/>
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import java.util.List; 21 import java.util.List;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import org.onlab.onos.event.EventListener; 21 import org.onlab.onos.event.EventListener;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.collect.ImmutableList; 21 import com.google.common.collect.ImmutableList;
4 22
5 import java.util.List; 23 import java.util.List;
6 24
25 +import static com.google.common.base.Preconditions.checkNotNull;
7 import static org.onlab.onos.net.intent.IntentOperation.Type.REPLACE; 26 import static org.onlab.onos.net.intent.IntentOperation.Type.REPLACE;
8 import static org.onlab.onos.net.intent.IntentOperation.Type.SUBMIT; 27 import static org.onlab.onos.net.intent.IntentOperation.Type.SUBMIT;
9 import static org.onlab.onos.net.intent.IntentOperation.Type.WITHDRAW; 28 import static org.onlab.onos.net.intent.IntentOperation.Type.WITHDRAW;
...@@ -47,7 +66,7 @@ public final class IntentOperations { ...@@ -47,7 +66,7 @@ public final class IntentOperations {
47 */ 66 */
48 public static final class Builder { 67 public static final class Builder {
49 68
50 - ImmutableList.Builder<IntentOperation> builder = ImmutableList.builder(); 69 + private final ImmutableList.Builder<IntentOperation> builder = ImmutableList.builder();
51 70
52 // Public construction is forbidden. 71 // Public construction is forbidden.
53 private Builder() { 72 private Builder() {
...@@ -60,6 +79,7 @@ public final class IntentOperations { ...@@ -60,6 +79,7 @@ public final class IntentOperations {
60 * @return self 79 * @return self
61 */ 80 */
62 public Builder addSubmitOperation(Intent intent) { 81 public Builder addSubmitOperation(Intent intent) {
82 + checkNotNull(intent, "Intent cannot be null");
63 builder.add(new IntentOperation(SUBMIT, intent.id(), intent)); 83 builder.add(new IntentOperation(SUBMIT, intent.id(), intent));
64 return this; 84 return this;
65 } 85 }
...@@ -72,6 +92,8 @@ public final class IntentOperations { ...@@ -72,6 +92,8 @@ public final class IntentOperations {
72 * @return self 92 * @return self
73 */ 93 */
74 public Builder addReplaceOperation(IntentId oldIntentId, Intent newIntent) { 94 public Builder addReplaceOperation(IntentId oldIntentId, Intent newIntent) {
95 + checkNotNull(oldIntentId, "Intent ID cannot be null");
96 + checkNotNull(newIntent, "Intent cannot be null");
75 builder.add(new IntentOperation(REPLACE, oldIntentId, newIntent)); 97 builder.add(new IntentOperation(REPLACE, oldIntentId, newIntent));
76 return this; 98 return this;
77 } 99 }
...@@ -83,6 +105,7 @@ public final class IntentOperations { ...@@ -83,6 +105,7 @@ public final class IntentOperations {
83 * @return self 105 * @return self
84 */ 106 */
85 public Builder addWithdrawOperation(IntentId intentId) { 107 public Builder addWithdrawOperation(IntentId intentId) {
108 + checkNotNull(intentId, "Intent ID cannot be null");
86 builder.add(new IntentOperation(WITHDRAW, intentId, null)); 109 builder.add(new IntentOperation(WITHDRAW, intentId, null));
87 return this; 110 return this;
88 } 111 }
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 21
...@@ -28,7 +46,13 @@ public interface IntentService { ...@@ -28,7 +46,13 @@ public interface IntentService {
28 */ 46 */
29 void withdraw(Intent intent); 47 void withdraw(Intent intent);
30 48
31 - // void replace(IntentId oldIntentId, Intent newIntent); 49 + /**
50 + * Replaces the specified intent with a new one.
51 + *
52 + * @param oldIntentId identifier of the old intent being replaced
53 + * @param newIntent new intent replacing the old one
54 + */
55 + void replace(IntentId oldIntentId, Intent newIntent);
32 56
33 /** 57 /**
34 * Submits a batch of submit &amp; withdraw operations. Such a batch is 58 * Submits a batch of submit &amp; withdraw operations. Such a batch is
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 /** 21 /**
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import org.onlab.onos.store.Store; 21 import org.onlab.onos.store.Store;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import org.onlab.onos.store.StoreDelegate; 21 import org.onlab.onos.store.StoreDelegate;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.base.MoreObjects; 21 import com.google.common.base.MoreObjects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.base.MoreObjects; 21 import com.google.common.base.MoreObjects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.base.MoreObjects; 21 import com.google.common.base.MoreObjects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.base.MoreObjects; 21 import com.google.common.base.MoreObjects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
1 package org.onlab.onos.net.intent; 19 package org.onlab.onos.net.intent;
2 20
3 import com.google.common.base.MoreObjects; 21 import com.google.common.base.MoreObjects;
......
1 +/*
2 + * Licensed to the Apache Software Foundation (ASF) under one
3 + * or more contributor license agreements. See the NOTICE file
4 + * distributed with this work for additional information
5 + * regarding copyright ownership. The ASF licenses this file
6 + * to you under the Apache License, Version 2.0 (the
7 + * "License"); you may not use this file except in compliance
8 + * with the License. You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing,
13 + * software distributed under the License is distributed on an
14 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 + * KIND, either express or implied. See the License for the
16 + * specific language governing permissions and limitations
17 + * under the License.
18 + */
19 +
1 /** 20 /**
2 * Set of abstractions for conveying high-level intents for treatment of 21 * Set of abstractions for conveying high-level intents for treatment of
3 * selected network traffic by allowing applications to express the 22 * selected network traffic by allowing applications to express the
......
...@@ -172,6 +172,11 @@ public class FakeIntentManager implements TestableIntentService { ...@@ -172,6 +172,11 @@ public class FakeIntentManager implements TestableIntentService {
172 } 172 }
173 173
174 @Override 174 @Override
175 + public void replace(IntentId oldIntentId, Intent newIntent) {
176 + // TODO: implement later
177 + }
178 +
179 + @Override
175 public Future<IntentOperations> execute(IntentOperations operations) { 180 public Future<IntentOperations> execute(IntentOperations operations) {
176 // TODO: implement later 181 // TODO: implement later
177 return null; 182 return null;
......
...@@ -126,6 +126,12 @@ public class IntentManager ...@@ -126,6 +126,12 @@ public class IntentManager
126 126
127 // FIXME: implement this method 127 // FIXME: implement this method
128 @Override 128 @Override
129 + public void replace(IntentId oldIntentId, Intent newIntent) {
130 + throw new UnsupportedOperationException("execute() is not implemented yet");
131 + }
132 +
133 + // FIXME: implement this method
134 + @Override
129 public Future<IntentOperations> execute(IntentOperations operations) { 135 public Future<IntentOperations> execute(IntentOperations operations) {
130 throw new UnsupportedOperationException("execute() is not implemented yet"); 136 throw new UnsupportedOperationException("execute() is not implemented yet");
131 } 137 }
......
...@@ -45,7 +45,7 @@ import org.onlab.onos.net.flow.TrafficSelector; ...@@ -45,7 +45,7 @@ import org.onlab.onos.net.flow.TrafficSelector;
45 import org.onlab.onos.net.flow.TrafficTreatment; 45 import org.onlab.onos.net.flow.TrafficTreatment;
46 import org.onlab.onos.net.flow.criteria.Criterion; 46 import org.onlab.onos.net.flow.criteria.Criterion;
47 import org.onlab.onos.net.flow.instructions.Instruction; 47 import org.onlab.onos.net.flow.instructions.Instruction;
48 -import org.onlab.onos.net.intent.BatchOperation; 48 +import org.onlab.onos.net.flow.BatchOperation;
49 import org.onlab.onos.net.provider.AbstractProvider; 49 import org.onlab.onos.net.provider.AbstractProvider;
50 import org.onlab.onos.net.provider.ProviderId; 50 import org.onlab.onos.net.provider.ProviderId;
51 import org.onlab.onos.store.trivial.impl.SimpleFlowRuleStore; 51 import org.onlab.onos.store.trivial.impl.SimpleFlowRuleStore;
......
...@@ -31,7 +31,7 @@ import org.onlab.onos.net.flow.FlowRuleBatchEntry.FlowRuleOperation; ...@@ -31,7 +31,7 @@ import org.onlab.onos.net.flow.FlowRuleBatchEntry.FlowRuleOperation;
31 import org.onlab.onos.net.flow.FlowRuleProvider; 31 import org.onlab.onos.net.flow.FlowRuleProvider;
32 import org.onlab.onos.net.flow.FlowRuleProviderRegistry; 32 import org.onlab.onos.net.flow.FlowRuleProviderRegistry;
33 import org.onlab.onos.net.flow.FlowRuleProviderService; 33 import org.onlab.onos.net.flow.FlowRuleProviderService;
34 -import org.onlab.onos.net.intent.BatchOperation; 34 +import org.onlab.onos.net.flow.BatchOperation;
35 import org.onlab.onos.net.provider.AbstractProvider; 35 import org.onlab.onos.net.provider.AbstractProvider;
36 import org.onlab.onos.net.provider.ProviderId; 36 import org.onlab.onos.net.provider.ProviderId;
37 import org.onlab.onos.net.topology.TopologyService; 37 import org.onlab.onos.net.topology.TopologyService;
......