some optical intent changes
Change-Id: Ie9b02e2d199aa72f9828e91b248bd052f7b38fa2
Showing
4 changed files
with
12 additions
and
10 deletions
| ... | @@ -93,9 +93,9 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro | ... | @@ -93,9 +93,9 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro |
| 93 | log.info("Starting optical network configuration process..."); | 93 | log.info("Starting optical network configuration process..."); |
| 94 | log.info("Optical config file set to {}", configFileName); | 94 | log.info("Optical config file set to {}", configFileName); |
| 95 | 95 | ||
| 96 | -// loadOpticalConfig(); | 96 | + loadOpticalConfig(); |
| 97 | -// parseOpticalConfig(); | 97 | + parseOpticalConfig(); |
| 98 | -// publishOpticalConfig(); | 98 | + publishOpticalConfig(); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | @Deactivate | 101 | @Deactivate | ... | ... |
| ... | @@ -29,7 +29,7 @@ import org.slf4j.Logger; | ... | @@ -29,7 +29,7 @@ import org.slf4j.Logger; |
| 29 | /** | 29 | /** |
| 30 | * Sample reactive forwarding application. | 30 | * Sample reactive forwarding application. |
| 31 | */ | 31 | */ |
| 32 | -//:@Component(immediate = true) | 32 | +//@Component(immediate = true) |
| 33 | public class LambdaForwarding { | 33 | public class LambdaForwarding { |
| 34 | 34 | ||
| 35 | private final Logger log = getLogger(getClass()); | 35 | private final Logger log = getLogger(getClass()); | ... | ... |
| ... | @@ -84,8 +84,8 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical | ... | @@ -84,8 +84,8 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical |
| 84 | 84 | ||
| 85 | // create a new opticalPathIntent | 85 | // create a new opticalPathIntent |
| 86 | Intent newIntent = new OpticalPathIntent(intent.appId(), | 86 | Intent newIntent = new OpticalPathIntent(intent.appId(), |
| 87 | - path.src(), | 87 | + intent.getSrcConnectPoint(), |
| 88 | - path.dst(), | 88 | + intent.getDst(), |
| 89 | path); | 89 | path); |
| 90 | 90 | ||
| 91 | retList.add(newIntent); | 91 | retList.add(newIntent); |
| ... | @@ -100,8 +100,11 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical | ... | @@ -100,8 +100,11 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical |
| 100 | @Override | 100 | @Override |
| 101 | public double weight(TopologyEdge edge) { | 101 | public double weight(TopologyEdge edge) { |
| 102 | boolean isOptical = false; | 102 | boolean isOptical = false; |
| 103 | - String t = edge.link().annotations().value("linkType"); | 103 | + |
| 104 | - if (t.equals("WDM")) { | 104 | + Link.Type lt = edge.link().type(); |
| 105 | + | ||
| 106 | + //String t = edge.link().annotations().value("linkType"); | ||
| 107 | + if (lt == Link.Type.OPTICAL) { | ||
| 105 | isOptical = true; | 108 | isOptical = true; |
| 106 | } | 109 | } |
| 107 | if (isOptical) { | 110 | if (isOptical) { | ... | ... |
| ... | @@ -87,8 +87,6 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn | ... | @@ -87,8 +87,6 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn |
| 87 | TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder(); | 87 | TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder(); |
| 88 | selectorBuilder.matchInport(intent.src().port()); | 88 | selectorBuilder.matchInport(intent.src().port()); |
| 89 | 89 | ||
| 90 | - TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder(); | ||
| 91 | - | ||
| 92 | List<FlowRuleBatchEntry> rules = Lists.newLinkedList(); | 90 | List<FlowRuleBatchEntry> rules = Lists.newLinkedList(); |
| 93 | ConnectPoint prev = intent.src(); | 91 | ConnectPoint prev = intent.src(); |
| 94 | 92 | ||
| ... | @@ -107,6 +105,7 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn | ... | @@ -107,6 +105,7 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn |
| 107 | return null; | 105 | return null; |
| 108 | } | 106 | } |
| 109 | 107 | ||
| 108 | + TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder(); | ||
| 110 | treatmentBuilder.setOutput(link.src().port()); | 109 | treatmentBuilder.setOutput(link.src().port()); |
| 111 | treatmentBuilder.setLambda((short) la.toInt()); | 110 | treatmentBuilder.setLambda((short) la.toInt()); |
| 112 | 111 | ... | ... |
-
Please register or login to post a comment