Merge remote-tracking branch 'origin/master'
diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java
index f8cdb6b..6cf91a6 100644
--- a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java
+++ b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java
@@ -1,6 +1,7 @@
package org.onlab.onos.net.provider;
import com.google.common.collect.ImmutableSet;
+import org.onlab.onos.net.DeviceId;
import java.util.HashMap;
import java.util.Map;
@@ -20,6 +21,7 @@
private final Map<ProviderId, P> providers = new HashMap<>();
private final Map<ProviderId, S> services = new HashMap<>();
+ private final Map<String, P> providersByScheme = new HashMap<>();
/**
* Creates a new provider service bound to the specified provider.
@@ -65,4 +67,14 @@
return providers.get(providerId);
}
+ /**
+ * Returns the provider for the specified device ID based on URI scheme.
+ *
+ * @param deviceId device identifier
+ * @return provider bound to the URI scheme
+ */
+ protected synchronized P getProvider(DeviceId deviceId) {
+ return providersByScheme.get(deviceId.uri().getScheme());
+ }
+
}
diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java
index a945354..e9af0eb 100644
--- a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java
+++ b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java
@@ -9,6 +9,7 @@
*/
public class ProviderId {
+ private final String scheme;
private final String id;
/**
@@ -16,15 +17,26 @@
* The providers are expected to follow the reverse DNS convention, e.g.
* {@code org.onlab.onos.provider.of.device}
*
- * @param id string identifier
+ * @param scheme device URI scheme to which this provider is bound, e.g. "of", "snmp"
+ * @param id string identifier
*/
- public ProviderId(String id) {
+ public ProviderId(String scheme, String id) {
+ this.scheme = scheme;
this.id = id;
}
+ /**
+ * Returns the device URI scheme to which this provider is bound.
+ *
+ * @return device URI scheme
+ */
+ public String scheme() {
+ return scheme;
+ }
+
@Override
public int hashCode() {
- return Objects.hash(id);
+ return Objects.hash(scheme, id);
}
@Override
@@ -36,12 +48,13 @@
return false;
}
final ProviderId other = (ProviderId) obj;
- return Objects.equals(this.id, other.id);
+ return Objects.equals(this.scheme, other.scheme) &&
+ Objects.equals(this.id, other.id);
}
@Override
public String toString() {
- return toStringHelper(this).add("id", id).toString();
+ return toStringHelper(this).add("scheme", scheme).add("id", id).toString();
}
}
diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java
index c37a15c..ea1c8fd 100644
--- a/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java
@@ -13,7 +13,7 @@
*/
public class DefaultDeviceTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final DeviceId DID1 = deviceId("of:foo");
private static final DeviceId DID2 = deviceId("of:bar");
private static final String MFR = "whitebox";
diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java
index a19f969..b3891f1 100644
--- a/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java
@@ -15,7 +15,7 @@
*/
public class DefaultEdgeLinkTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final DeviceId DID1 = deviceId("of:foo");
private static final HostId HID1 = hostId("nic:foobar");
private static final HostId HID2 = hostId("nic:barfoo");
diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java
index ec8511e..a62c822 100644
--- a/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java
@@ -15,7 +15,7 @@
*/
public class DefaultLinkTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final DeviceId DID1 = deviceId("of:foo");
private static final DeviceId DID2 = deviceId("of:bar");
private static final PortNumber P1 = portNumber(1);
diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java
index e9d3da6..1069fd1 100644
--- a/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java
@@ -14,7 +14,7 @@
*/
public class DefaultPortTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final DeviceId DID1 = deviceId("of:foo");
private static final DeviceId DID2 = deviceId("of:bar");
private static final PortNumber P1 = portNumber(1);
diff --git a/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java b/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java
index afaf23e..7471a2d 100644
--- a/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java
+++ b/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java
@@ -17,7 +17,7 @@
*/
public abstract class TestDeviceParams {
- protected static final ProviderId PID = new ProviderId("foo");
+ protected static final ProviderId PID = new ProviderId("of", "foo");
protected static final DeviceId DID1 = deviceId("of:foo");
protected static final DeviceId DID2 = deviceId("of:bar");
protected static final MacAddress MAC1 = MacAddress.valueOf("00:11:00:00:00:01");
diff --git a/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java b/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java
index 7175308..df19365 100644
--- a/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java
@@ -18,7 +18,7 @@
public class DeviceEventTest extends AbstractEventTest {
private Device createDevice() {
- return new DefaultDevice(new ProviderId("foo"), deviceId("of:foo"),
+ return new DefaultDevice(new ProviderId("of", "foo"), deviceId("of:foo"),
Device.Type.SWITCH, "box", "hw", "sw", "sn");
}
diff --git a/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java b/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java
index a0d6848..561b041 100644
--- a/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java
@@ -34,7 +34,7 @@
HostId hid = HostId.hostId(mac, vlan);
return new DefaultHost(
- new ProviderId("foo"), hid, mac, vlan, loc, ipset);
+ new ProviderId("of", "foo"), hid, mac, vlan, loc, ipset);
}
@Override
diff --git a/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java b/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java
index dae9f85..aa95a42 100644
--- a/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java
@@ -16,7 +16,7 @@
public class LinkEventTest extends AbstractEventTest {
private Link createLink() {
- return new DefaultLink(new ProviderId("foo"),
+ return new DefaultLink(new ProviderId("of", "foo"),
new ConnectPoint(deviceId("of:foo"), portNumber(1)),
new ConnectPoint(deviceId("of:bar"), portNumber(2)),
Link.Type.INDIRECT);
diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java
index abbe5be..37bee71 100644
--- a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java
@@ -28,14 +28,14 @@
TestProviderRegistry registry = new TestProviderRegistry();
assertEquals("incorrect provider count", 0, registry.getProviders().size());
- ProviderId fooId = new ProviderId("foo");
+ ProviderId fooId = new ProviderId("of", "foo");
TestProvider pFoo = new TestProvider(fooId);
TestProviderService psFoo = registry.register(pFoo);
assertEquals("incorrect provider count", 1, registry.getProviders().size());
assertThat("provider not found", registry.getProviders().contains(fooId));
assertEquals("incorrect provider", psFoo.provider(), pFoo);
- ProviderId barId = new ProviderId("bar");
+ ProviderId barId = new ProviderId("of", "bar");
TestProvider pBar = new TestProvider(barId);
TestProviderService psBar = registry.register(pBar);
assertEquals("incorrect provider count", 2, registry.getProviders().size());
@@ -52,7 +52,7 @@
@Test(expected = IllegalStateException.class)
public void duplicateRegistration() {
TestProviderRegistry registry = new TestProviderRegistry();
- TestProvider pFoo = new TestProvider(new ProviderId("foo"));
+ TestProvider pFoo = new TestProvider(new ProviderId("of", "foo"));
registry.register(pFoo);
registry.register(pFoo);
}
@@ -60,13 +60,13 @@
@Test
public void voidUnregistration() {
TestProviderRegistry registry = new TestProviderRegistry();
- registry.unregister(new TestProvider(new ProviderId("foo")));
+ registry.unregister(new TestProvider(new ProviderId("of", "foo")));
}
@Test(expected = IllegalStateException.class)
public void unregistration() {
TestProviderRegistry registry = new TestProviderRegistry();
- TestProvider pFoo = new TestProvider(new ProviderId("foo"));
+ TestProvider pFoo = new TestProvider(new ProviderId("of", "foo"));
TestProviderService psFoo = registry.register(pFoo);
registry.unregister(pFoo);
psFoo.checkValidity();
diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java
index 745aebc..c2e5cfc 100644
--- a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java
@@ -11,7 +11,7 @@
@Test
public void basics() {
- ProviderId id = new ProviderId("foo.bar");
+ ProviderId id = new ProviderId("of", "foo.bar");
TestProvider provider = new TestProvider(id);
assertEquals("incorrect id", id, provider.id());
}
diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java b/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java
index 1c05507..1501eb9 100644
--- a/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java
@@ -11,8 +11,9 @@
@Test
public void basics() {
new EqualsTester()
- .addEqualityGroup(new ProviderId("foo"), new ProviderId("foo"))
- .addEqualityGroup(new ProviderId("bar"))
+ .addEqualityGroup(new ProviderId("of", "foo"), new ProviderId("of", "foo"))
+ .addEqualityGroup(new ProviderId("snmp", "foo"), new ProviderId("snmp", "foo"))
+ .addEqualityGroup(new ProviderId("of", "bar"))
.testEquals();
}
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopology.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopology.java
index 7213497..efbe6af 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopology.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopology.java
@@ -45,7 +45,7 @@
private static final TarjanGraphSearch<TopologyVertex, TopologyEdge> TARJAN =
new TarjanGraphSearch<>();
- private static final ProviderId PID = new ProviderId("org.onlab.onos.net");
+ private static final ProviderId PID = new ProviderId("core", "org.onlab.onos.net");
private final long time;
private final TopologyGraph graph;
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyProvider.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyProvider.java
index b6efba9..6e6a917 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyProvider.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyProvider.java
@@ -74,7 +74,7 @@
* Creates a provider with the supplier identifier.
*/
public DefaultTopologyProvider() {
- super(new ProviderId("org.onlab.onos.provider.topology"));
+ super(new ProviderId("core", "org.onlab.onos.provider.topology"));
}
@Activate
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/SimplePathManager.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/SimplePathManager.java
index f495057..5fe7793 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/SimplePathManager.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/topology/impl/SimplePathManager.java
@@ -45,7 +45,7 @@
private static final String ELEMENT_ID_NULL = "Element ID cannot be null";
- private static final ProviderId PID = new ProviderId("org.onlab.onos.core");
+ private static final ProviderId PID = new ProviderId("core", "org.onlab.onos.core");
private static final PortNumber P0 = PortNumber.portNumber(0);
private static final EdgeLink NOT_HOST = new NotHost();
diff --git a/core/trivial/src/test/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceManagerTest.java b/core/trivial/src/test/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceManagerTest.java
index 4c1aff4..4d531d3 100644
--- a/core/trivial/src/test/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceManagerTest.java
+++ b/core/trivial/src/test/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceManagerTest.java
@@ -38,7 +38,7 @@
*/
public class SimpleDeviceManagerTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final DeviceId DID1 = deviceId("of:foo");
private static final DeviceId DID2 = deviceId("of:bar");
private static final String MFR = "whitebox";
diff --git a/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java b/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java
index b1b825e..67c14b0 100644
--- a/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java
+++ b/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java
@@ -42,7 +42,7 @@
*/
public class SimpleHostManagerTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final VlanId VLAN1 = VlanId.vlanId((short) 1);
private static final VlanId VLAN2 = VlanId.vlanId((short) 2);
diff --git a/core/trivial/src/test/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkManagerTest.java b/core/trivial/src/test/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkManagerTest.java
index 3702b0a..93610b5 100644
--- a/core/trivial/src/test/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkManagerTest.java
+++ b/core/trivial/src/test/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkManagerTest.java
@@ -40,7 +40,7 @@
*/
public class SimpleLinkManagerTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private static final DeviceId DID1 = deviceId("of:foo");
private static final DeviceId DID2 = deviceId("of:bar");
private static final DeviceId DID3 = deviceId("of:goo");
diff --git a/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyTest.java b/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyTest.java
index 2520602..1fe33f6 100644
--- a/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyTest.java
+++ b/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/DefaultTopologyTest.java
@@ -29,7 +29,7 @@
*/
public class DefaultTopologyTest {
- public static final ProviderId PID = new ProviderId("foo.bar");
+ public static final ProviderId PID = new ProviderId("of", "foo.bar");
public static final DeviceId D1 = deviceId("of:1");
public static final DeviceId D2 = deviceId("of:2");
diff --git a/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/SimpleTopologyManagerTest.java b/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/SimpleTopologyManagerTest.java
index 1480cec..b0b1eed 100644
--- a/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/SimpleTopologyManagerTest.java
+++ b/core/trivial/src/test/java/org/onlab/onos/net/trivial/topology/impl/SimpleTopologyManagerTest.java
@@ -43,7 +43,7 @@
*/
public class SimpleTopologyManagerTest {
- private static final ProviderId PID = new ProviderId("foo");
+ private static final ProviderId PID = new ProviderId("of", "foo");
private SimpleTopologyManager mgr;
diff --git a/providers/openflow/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/openflow/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
index 7fdf8cb..1271bc8 100644
--- a/providers/openflow/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
+++ b/providers/openflow/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
@@ -60,7 +60,7 @@
* Creates an OpenFlow device provider.
*/
public OpenFlowDeviceProvider() {
- super(new ProviderId("org.onlab.onos.provider.openflow"));
+ super(new ProviderId("of", "org.onlab.onos.provider.openflow"));
}
@Activate
diff --git a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
index 9a5a9dd..da85563 100644
--- a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
+++ b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
@@ -57,7 +57,7 @@
* Creates an OpenFlow host provider.
*/
public OpenFlowRuleProvider() {
- super(new ProviderId("org.onlab.onos.provider.openflow"));
+ super(new ProviderId("of", "org.onlab.onos.provider.openflow"));
}
@Activate
diff --git a/providers/openflow/host/src/main/java/org/onlab/onos/provider/of/host/impl/OpenFlowHostProvider.java b/providers/openflow/host/src/main/java/org/onlab/onos/provider/of/host/impl/OpenFlowHostProvider.java
index 28408ab..3fab4c7 100644
--- a/providers/openflow/host/src/main/java/org/onlab/onos/provider/of/host/impl/OpenFlowHostProvider.java
+++ b/providers/openflow/host/src/main/java/org/onlab/onos/provider/of/host/impl/OpenFlowHostProvider.java
@@ -61,7 +61,7 @@
* Creates an OpenFlow host provider.
*/
public OpenFlowHostProvider() {
- super(new ProviderId("org.onlab.onos.provider.openflow"));
+ super(new ProviderId("of", "org.onlab.onos.provider.openflow"));
}
@Activate
diff --git a/providers/openflow/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java b/providers/openflow/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
index 1727d1d..0571922 100644
--- a/providers/openflow/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
+++ b/providers/openflow/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
@@ -55,7 +55,7 @@
* Creates an OpenFlow link provider.
*/
public OpenFlowLinkProvider() {
- super(new ProviderId("org.onlab.onos.provider.openflow"));
+ super(new ProviderId("of", "org.onlab.onos.provider.openflow"));
}
@Activate
diff --git a/providers/openflow/packet/src/main/java/org/onlab/onos/provider/of/packet/impl/OpenFlowPacketProvider.java b/providers/openflow/packet/src/main/java/org/onlab/onos/provider/of/packet/impl/OpenFlowPacketProvider.java
index 77fb689..bc5b892 100644
--- a/providers/openflow/packet/src/main/java/org/onlab/onos/provider/of/packet/impl/OpenFlowPacketProvider.java
+++ b/providers/openflow/packet/src/main/java/org/onlab/onos/provider/of/packet/impl/OpenFlowPacketProvider.java
@@ -48,7 +48,7 @@
* Creates an OpenFlow link provider.
*/
public OpenFlowPacketProvider() {
- super(new ProviderId("org.onlab.onos.provider.openflow"));
+ super(new ProviderId("of", "org.onlab.onos.provider.openflow"));
}
@Activate
diff --git a/tools/build/onos-package b/tools/build/onos-package
index 5918306..cb1b7e7 100755
--- a/tools/build/onos-package
+++ b/tools/build/onos-package
@@ -32,18 +32,31 @@
mkdir -p $KARAF_DIST/system/org/onlab
cp -r $M2_REPO/org/onlab $KARAF_DIST/system/org/
+# Wrapper & Cellar Patching ----------------------------------------------------
+
+# Patch the Apache Karaf distribution file to add Cellar features repository
+perl -pi.old -e "s|^(featuresRepositories=.*)|\1,mvn:org.apache.karaf.cellar/apache-karaf-cellar/3.0.0/xml/features|" \
+ $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
+
+# Patch the Apache Karaf distribution file to load ONOS features
+perl -pi.old -e 's|^(featuresBoot=.*)|\1,wrapper,cellar|' \
+ $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
+
+# ONOS Patching ----------------------------------------------------------------
+
# Patch the Apache Karaf distribution file to add ONOS features repository
perl -pi.old -e "s|^(featuresRepositories=.*)|\1,mvn:org.onlab.onos/onos-features/$ONOS_VERSION/xml/features|" \
$ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
# Patch the Apache Karaf distribution file to load ONOS features
-perl -pi.old -e 's|^(featuresBoot=.*)|\1,wrapper,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-tvue|' \
+perl -pi.old -e 's|^(featuresBoot=.*)|\1,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-tvue|' \
$ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
# Patch the Apache Karaf distribution with ONOS branding bundle
cp $M2_REPO/org/onlab/onos/onos-branding/$ONOS_VERSION/onos-branding-*.jar \
$ONOS_STAGE/$KARAF_DIST/lib
+
# Now package up the ONOS tar file
cd $ONOS_STAGE_ROOT
COPYFILE_DISABLE=1 tar zcf $ONOS_TAR $ONOS_BITS