Sho SHIMIZU
Committed by Brian O'Connor

Remove CompilingFailed because it does nothing

Change-Id: Ibeb244d0a9ebfbf019bc72e1efeacb73c3140cb2
/*
* 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;
import org.onosproject.net.intent.Intent;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A processing phase after compilation failure.
*/
class CompilingFailed implements CompletedIntentUpdate {
private final Intent intent;
/**
* Create an instance from the submitted intent.
*
* @param intent submitted intent.
*/
CompilingFailed(Intent intent) {
this.intent = checkNotNull(intent);
}
}
......@@ -479,10 +479,12 @@ public class IntentManager
return Optional.of(new Installing(intent, compileIntent(intent, null)));
} catch (PathNotFoundException e) {
log.debug("Path not found for intent {}", intent);
return Optional.of(new CompilingFailed(intent));
// TODO: revisit to implement failure handling
return Optional.of(new DoNothing());
} catch (IntentException e) {
log.warn("Unable to compile intent {} due to:", intent.id(), e);
return Optional.of(new CompilingFailed(intent));
// TODO: revisit to implement failure handling
return Optional.of(new DoNothing());
}
}
}
......