Adding add/remove LTP/NI support, some refactoring and other minor changes
- Adding methods to selectively add/remove LTPs/NIs
- Adding refCount to NIs to better manage removals
- Adding CLI commands to add/remove LTPs/NIs
- Refactored some LTP and NI management methods
- Some changes in response to previous review comments
- Adding CLI command to indicate if topology is packet-optical
- Renaming ‘service' to ‘evc' in CLI commands
- For OVS support: Giving higher priority to fwd/next than filtering objectives
Change-Id: Icdba6534637dd979bde60b34e257d0a29b8ef430
diff --git a/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index fe9e145..1643486 100644
--- a/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -1,5 +1,5 @@
<!--
- ~ Copyright 2016 Open Networking Laboratory
+ ~ Copyright 2016-present 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.
@@ -17,23 +17,105 @@
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetCreateServiceCommand"/>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetCreateEvcCommand"/>
<completers>
<ref component-id="placeholderCompleter"/>
- <ref component-id="carrierEthernetServiceTypeCompleter"/>
- <ref component-id="carrierEthernetUniCompleter"/>
- <ref component-id="carrierEthernetUniCompleter"/>
+ <ref component-id="carrierEthernetEvcTypeCompleter"/>
+ <ref component-id="carrierEthernetPotentialUniCompleter"/>
+ <ref component-id="carrierEthernetPotentialUniCompleter"/>
</completers>
</command>
</command-bundle>
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetCreateFcCommand"/>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetCreateFcCommand"/>
<completers>
<ref component-id="placeholderCompleter"/>
- <ref component-id="carrierEthernetServiceTypeCompleter"/>
- <ref component-id="carrierEthernetLtpCompleter"/>
+ <ref component-id="carrierEthernetEvcTypeCompleter"/>
+ <ref component-id="carrierEthernetPotentialLtpCompleter"/>
+ <ref component-id="carrierEthernetPotentialLtpCompleter"/>
+ </completers>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetRemoveEvcCommand"/>
+ <completers>
+ <ref component-id="carrierEthernetEvcCompleter"/>
+ </completers>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetRemoveAllEvcsCommand"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetListEvcsCommand"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetListLtpsCommand"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetListUnisCommand"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetListFcsCommand"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetRemoveFcCommand"/>
+ <completers>
+ <ref component-id="carrierEthernetFcCompleter"/>
+ </completers>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetRemoveAllFcsCommand"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetCreateLtpCommand"/>
+ <completers>
+ <ref component-id="carrierEthernetLtpTypeCompleter"/>
+ <ref component-id="carrierEthernetConnectPointCompleter"/>
+ </completers>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetCreateUniCommand"/>
+ <completers>
+ <ref component-id="carrierEthernetConnectPointCompleter"/>
+ </completers>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetRemoveLtpCommand"/>
+ <completers>
<ref component-id="carrierEthernetLtpCompleter"/>
</completers>
</command>
@@ -41,63 +123,34 @@
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveServiceCommand"/>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetRemoveUniCommand"/>
<completers>
- <ref component-id="carrierEthernetServiceIdCompleter"/>
+ <ref component-id="carrierEthernetUniCompleter"/>
</completers>
</command>
</command-bundle>
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveAllServicesCommand"/>
- </command>
- </command-bundle>
-
- <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
- <command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetListServicesCommand"/>
- </command>
- </command-bundle>
-
- <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
- <command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetListLtpsCommand"/>
- </command>
- </command-bundle>
-
- <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
- <command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetListUnisCommand"/>
- </command>
- </command-bundle>
-
- <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
- <command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetListFcsCommand"/>
- </command>
- </command-bundle>
-
- <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
- <command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveFcCommand"/>
+ <action class="org.onosproject.ecord.carrierethernet.cli.commands.CarrierEthernetPktOpticalTopoCommand"/>
<completers>
- <ref component-id="carrierEthernetServiceIdCompleter"/>
+ <ref component-id="carrierEthernetBooleanCompleter"/>
</completers>
</command>
</command-bundle>
- <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
- <command>
- <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveAllFcsCommand"/>
- </command>
- </command-bundle>
<bean id="placeholderCompleter" class="org.onosproject.cli.PlaceholderCompleter"/>
- <bean id="carrierEthernetServiceTypeCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetServiceTypeCompleter"/>
- <bean id="carrierEthernetServiceIdCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetServiceIdCompleter"/>
- <bean id="carrierEthernetUniCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetUniCompleter"/>
- <bean id="carrierEthernetLtpCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetLtpCompleter"/>
- <bean id="connectPointCompleter" class="org.onosproject.cli.net.ConnectPointCompleter"/>
+ <bean id="carrierEthernetEvcTypeCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetEvcTypeCompleter"/>
+ <bean id="carrierEthernetEvcCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetEvcCompleter"/>
+ <bean id="carrierEthernetFcCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetFcCompleter"/>
+ <bean id="carrierEthernetPotentialUniCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetPotentialUniCompleter"/>
+ <bean id="carrierEthernetPotentialLtpCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetPotentialLtpCompleter"/>
+ <bean id="carrierEthernetConnectPointCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetConnectPointCompleter"/>
+ <bean id="carrierEthernetLtpTypeCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetLtpTypeCompleter"/>
+ <bean id="carrierEthernetUniCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetUniCompleter"/>
+ <bean id="carrierEthernetLtpCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetLtpCompleter"/>
+ <bean id="carrierEthernetBooleanCompleter" class="org.onosproject.ecord.carrierethernet.cli.completers.CarrierEthernetBooleanCompleter"/>
+
</blueprint>