diff options
Diffstat (limited to 'framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase')
13 files changed, 0 insertions, 702 deletions
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java deleted file mode 100644 index 5078b5dc..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.Intent; -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.IntentException; -import org.onosproject.net.intent.impl.IntentProcessor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Optional; - -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Represents a phase where an intent is being compiled or recompiled. - */ -class Compiling implements IntentProcessPhase { - - private static final Logger log = LoggerFactory.getLogger(Compiling.class); - - private final IntentProcessor processor; - private final IntentData data; - private final Optional<IntentData> stored; - - /** - * Creates a intent recompiling phase. - * - * @param processor intent processor that does work for recompiling - * @param data intent data containing an intent to be recompiled - * @param stored intent data stored in the store - */ - Compiling(IntentProcessor processor, IntentData data, Optional<IntentData> stored) { - this.processor = checkNotNull(processor); - this.data = checkNotNull(data); - this.stored = checkNotNull(stored); - } - - @Override - public Optional<IntentProcessPhase> execute() { - try { - List<Intent> compiled = processor.compile(data.intent(), - //TODO consider passing an optional here in the future - stored.isPresent() ? stored.get().installables() : null); - data.setInstallables(compiled); - return Optional.of(new Installing(processor, data, stored)); - } catch (IntentException e) { - log.debug("Unable to compile intent {} due to: {}", data.intent(), e); - if (stored.isPresent() && !stored.get().installables().isEmpty()) { - // removing orphaned flows and deallocating resources - data.setInstallables(stored.get().installables()); - return Optional.of(new Withdrawing(processor, data)); - } else { - return Optional.of(new Failed(data)); - } - } - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Corrupt.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Corrupt.java deleted file mode 100644 index 2fbe1641..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Corrupt.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.IntentState.CORRUPT; - -/** - * A class representing errors removing or installing intents. - */ -public class Corrupt extends FinalIntentProcessPhase { - - private final IntentData intentData; - - /** - * Create an instance with the specified data. - * - * @param intentData intentData - */ - Corrupt(IntentData intentData) { - this.intentData = checkNotNull(intentData); - this.intentData.setState(CORRUPT); - } - - @Override - public IntentData data() { - return intentData; - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Failed.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Failed.java deleted file mode 100644 index 7f628e3c..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Failed.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.IntentState.FAILED; - -/** - * Represents a phase where the compile has failed. - */ -public class Failed extends FinalIntentProcessPhase { - - private final IntentData intentData; - - /** - * Create an instance with the specified data. - * - * @param intentData intentData - */ - Failed(IntentData intentData) { - this.intentData = checkNotNull(intentData); - this.intentData.setState(FAILED); - } - - @Override - public IntentData data() { - return intentData; - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/FinalIntentProcessPhase.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/FinalIntentProcessPhase.java deleted file mode 100644 index c67b93b5..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/FinalIntentProcessPhase.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; - -import java.util.Optional; - -/** - * Represents a final phase of processing an intent. - */ -public abstract class FinalIntentProcessPhase implements IntentProcessPhase { - - @Override - public final Optional<IntentProcessPhase> execute() { - preExecute(); - return Optional.empty(); - } - - /** - * Executes operations that must take place before the phase starts. - */ - protected void preExecute() {} - - /** - * Returns the IntentData object being acted on by this phase. - * - * @return intent data object for the phase - */ - public abstract IntentData data(); -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java deleted file mode 100644 index a75d7cc8..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/InstallRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.impl.IntentProcessor; - -import java.util.Optional; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.impl.phase.IntentProcessPhase.transferErrorCount; - -/** - * Represents a phase where intent installation has been requested. - */ -final class InstallRequest implements IntentProcessPhase { - - private final IntentProcessor processor; - private final IntentData data; - private final Optional<IntentData> stored; - - /** - * Creates an install request phase. - * - * @param processor intent processor to be passed to intent process phases - * generated after this phase - * @param intentData intent data to be processed - * @param stored intent data stored in the store - */ - InstallRequest(IntentProcessor processor, IntentData intentData, Optional<IntentData> stored) { - this.processor = checkNotNull(processor); - this.data = checkNotNull(intentData); - this.stored = checkNotNull(stored); - } - - @Override - public Optional<IntentProcessPhase> execute() { - transferErrorCount(data, stored); - - return Optional.of(new Compiling(processor, data, stored)); - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Installing.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Installing.java deleted file mode 100644 index 2ff7ca8b..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Installing.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.impl.IntentProcessor; - -import java.util.Optional; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.IntentState.INSTALLING; - -/** - * Represents a phase where an intent is being installed. - */ -class Installing extends FinalIntentProcessPhase { - - private final IntentProcessor processor; - private final IntentData data; - private final Optional<IntentData> stored; - - /** - * Create an installing phase. - * - * @param processor intent processor that does work for installing - * @param data intent data containing an intent to be installed - * @param stored intent data already stored - */ - Installing(IntentProcessor processor, IntentData data, Optional<IntentData> stored) { - this.processor = checkNotNull(processor); - this.data = checkNotNull(data); - this.stored = checkNotNull(stored); - this.data.setState(INSTALLING); - } - - @Override - public void preExecute() { - processor.apply(stored, Optional.of(data)); - } - - @Override - public IntentData data() { - return data; - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java deleted file mode 100644 index bce572c6..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.impl.IntentProcessor; - -import java.util.Objects; -import java.util.Optional; - -/** - * Represents a phase of processing an intent. - */ -public interface IntentProcessPhase { - - /** - * Execute the procedure represented by the instance - * and generates the next update instance. - * - * @return next update - */ - Optional<IntentProcessPhase> execute(); - - /** - * Create a starting intent process phase according to intent data this class holds. - * - * @param processor intent processor to be passed to intent process phases - * generated while this instance is working - * @param data intent data to be processed - * @param current intent date that is stored in the store - * @return starting intent process phase - */ - static IntentProcessPhase newInitialPhase(IntentProcessor processor, - IntentData data, IntentData current) { - switch (data.request()) { - case INSTALL_REQ: - return new InstallRequest(processor, data, Optional.ofNullable(current)); - case WITHDRAW_REQ: - return new WithdrawRequest(processor, data, Optional.ofNullable(current)); - case PURGE_REQ: - return new PurgeRequest(data, Optional.ofNullable(current)); - default: - // illegal state - return new Failed(data); - } - } - - static void transferErrorCount(IntentData data, Optional<IntentData> stored) { - if (stored.isPresent()) { - IntentData storedData = stored.get(); - if (Objects.equals(data.intent(), storedData.intent()) && - Objects.equals(data.request(), storedData.request())) { - data.setErrorCount(storedData.errorCount()); - } else { - data.setErrorCount(0); - } - } - } - -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentWorker.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentWorker.java deleted file mode 100644 index 9ddcf40e..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentWorker.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - - -import java.util.Optional; -import java.util.concurrent.Callable; - -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Worker to process a submitted intent. {@link #call()} method generates - */ -public final class IntentWorker implements Callable<FinalIntentProcessPhase> { - - private final IntentProcessPhase initial; - - /** - * Create an instance with the specified arguments. - * - * @param initial initial intent process phase - */ - public IntentWorker(IntentProcessPhase initial) { - this.initial = checkNotNull(initial); - } - - @Override - public FinalIntentProcessPhase call() throws Exception { - IntentProcessPhase update = initial; - Optional<IntentProcessPhase> currentPhase = Optional.of(update); - IntentProcessPhase previousPhase = update; - - while (currentPhase.isPresent()) { - previousPhase = currentPhase.get(); - currentPhase = previousPhase.execute(); - } - return (FinalIntentProcessPhase) previousPhase; - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/PurgeRequest.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/PurgeRequest.java deleted file mode 100644 index 69126dfb..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/PurgeRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.IntentState; -import org.slf4j.Logger; - -import java.util.Optional; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.slf4j.LoggerFactory.getLogger; - -/** - * Represents a phase of requesting a purge of an intent. - * <p> - * Note: The purge will only succeed if the intent is FAILED or WITHDRAWN. - * </p> - */ -final class PurgeRequest extends FinalIntentProcessPhase { - - private static final Logger log = getLogger(PurgeRequest.class); - - private final IntentData data; - private final Optional<IntentData> stored; - - PurgeRequest(IntentData intentData, Optional<IntentData> stored) { - this.data = checkNotNull(intentData); - this.stored = checkNotNull(stored); - } - - private boolean shouldAcceptPurge() { - if (!stored.isPresent()) { - log.info("Purge for intent {}, but intent is not present", - data.key()); - return true; - } - - IntentData storedData = stored.get(); - if (storedData.state() == IntentState.WITHDRAWN - || storedData.state() == IntentState.FAILED) { - return true; - } - log.info("Purge for intent {} is rejected because intent state is {}", - data.key(), storedData.state()); - return false; - } - - @Override - public IntentData data() { - if (shouldAcceptPurge()) { - return data; - } else { - return stored.get(); - } - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/WithdrawRequest.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/WithdrawRequest.java deleted file mode 100644 index 8a0709e6..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/WithdrawRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.impl.IntentProcessor; - -import java.util.Optional; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.impl.phase.IntentProcessPhase.transferErrorCount; - -/** - * Represents a phase of requesting a withdraw of an intent. - */ -final class WithdrawRequest implements IntentProcessPhase { - - private final IntentProcessor processor; - private final IntentData data; - private final Optional<IntentData> stored; - - /** - * Creates a withdraw request phase. - * - * @param processor intent processor to be passed to intent process phases - * generated after this phase - * @param intentData intent data to be processed - * @param stored intent data stored in the store - */ - WithdrawRequest(IntentProcessor processor, IntentData intentData, Optional<IntentData> stored) { - this.processor = checkNotNull(processor); - this.data = checkNotNull(intentData); - this.stored = checkNotNull(stored); - } - - @Override - public Optional<IntentProcessPhase> execute() { - //TODO perhaps we want to validate that the pending and current are the - // same version i.e. they are the same - // Note: this call is not just the symmetric version of submit - - transferErrorCount(data, stored); - - if (!stored.isPresent() || stored.get().installables().isEmpty()) { - switch (data.request()) { - case INSTALL_REQ: - return Optional.of(new Failed(data)); - case WITHDRAW_REQ: - default: //TODO "default" case should not happen - return Optional.of(new Withdrawn(data)); - } - } - - data.setInstallables(stored.get().installables()); - return Optional.of(new Withdrawing(processor, data)); - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Withdrawing.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Withdrawing.java deleted file mode 100644 index 29bc4711..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Withdrawing.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; -import org.onosproject.net.intent.impl.IntentProcessor; - -import java.util.Optional; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.IntentState.WITHDRAWING; - -/** - * Represents a phase where an intent is withdrawing. - */ -class Withdrawing extends FinalIntentProcessPhase { - - private final IntentProcessor processor; - private final IntentData data; - - /** - * Creates a withdrawing phase. - * - * @param processor intent processor that does work for withdrawing - * @param data intent data containing an intent to be withdrawn - */ - Withdrawing(IntentProcessor processor, IntentData data) { - this.processor = checkNotNull(processor); - this.data = checkNotNull(data); - this.data.setState(WITHDRAWING); - } - - @Override - protected void preExecute() { - processor.apply(Optional.of(data), Optional.empty()); - } - - @Override - public IntentData data() { - return data; - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Withdrawn.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Withdrawn.java deleted file mode 100644 index 264f74c6..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Withdrawn.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.net.intent.impl.phase; - -import org.onosproject.net.intent.IntentData; - -import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.intent.IntentState.WITHDRAWN; - -/** - * Represents a phase where an intent has been withdrawn. - */ -final class Withdrawn extends FinalIntentProcessPhase { - - private final IntentData data; - - /** - * Create a withdrawn phase. - * - * @param data intent data containing an intent to be withdrawn - */ - Withdrawn(IntentData data) { - this.data = checkNotNull(data); - this.data.setState(WITHDRAWN); - } - - @Override - public IntentData data() { - return data; - } -} diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/package-info.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/package-info.java deleted file mode 100644 index 56e54308..00000000 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/phase/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Implementations of various intent processing phases. - */ -package org.onosproject.net.intent.impl.phase;
\ No newline at end of file |