Merge remote-tracking branch 'origin/master'
diff --git a/apps/calendar/pom.xml b/apps/calendar/pom.xml
new file mode 100644
index 0000000..e1c0553
--- /dev/null
+++ b/apps/calendar/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onlab.onos</groupId>
+        <artifactId>onos-apps</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-app-calendar</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>ONOS simple calendaring REST interface for intents</description>
+
+    <properties>
+        <web.context>/onos/calendar</web.context>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onlab.onos</groupId>
+            <artifactId>onlab-rest</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-servlet</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey.jersey-test-framework</groupId>
+            <artifactId>jersey-test-framework-core</artifactId>
+            <version>1.18.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey.jersey-test-framework</groupId>
+            <artifactId>jersey-test-framework-grizzly2</artifactId>
+            <version>1.18.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <_wab>src/main/webapp/</_wab>
+                        <Bundle-SymbolicName>
+                            ${project.groupId}.${project.artifactId}
+                        </Bundle-SymbolicName>
+                        <Import-Package>
+                            org.osgi.framework,
+                            javax.ws.rs,javax.ws.rs.core,
+                            com.sun.jersey.api.core,
+                            com.sun.jersey.spi.container.servlet,
+                            com.sun.jersey.server.impl.container.servlet,
+                            org.onlab.packet.*,
+                            org.onlab.rest.*,
+                            org.onlab.onos.*
+                        </Import-Package>
+                        <Web-ContextPath>${web.context}</Web-ContextPath>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/apps/calendar/src/main/java/org/onlab/onos/calendar/BandwidthCalendarResource.java b/apps/calendar/src/main/java/org/onlab/onos/calendar/BandwidthCalendarResource.java
new file mode 100644
index 0000000..b05c34e
--- /dev/null
+++ b/apps/calendar/src/main/java/org/onlab/onos/calendar/BandwidthCalendarResource.java
@@ -0,0 +1,43 @@
+package org.onlab.onos.calendar;
+
+import org.onlab.onos.net.ConnectPoint;
+import org.onlab.onos.net.DeviceId;
+import org.onlab.onos.net.intent.IntentService;
+import org.onlab.rest.BaseResource;
+
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+import java.net.URI;
+
+import static org.onlab.onos.net.PortNumber.portNumber;
+
+/**
+ * Web resource for triggering calendared intents.
+ */
+@Path("intent")
+public class BandwidthCalendarResource extends BaseResource {
+
+    @POST
+    @Path("{src}/{dst}/{srcPort}/{dstPort}/{bandwidth}")
+    public Response createIntent(@PathParam("src") String src,
+                                 @PathParam("dst") String dst,
+                                 @PathParam("srcPort") String srcPort,
+                                 @PathParam("dstPort") String dstPort,
+                                 @PathParam("bandwidth") String bandwidth) {
+        // TODO: implement calls to intent framework
+        IntentService service = get(IntentService.class);
+
+        ConnectPoint srcPoint = new ConnectPoint(deviceId(src), portNumber(srcPort));
+        ConnectPoint dstPoint = new ConnectPoint(deviceId(dst), portNumber(dstPort));
+
+        return Response.ok("Yo! We got src=" + srcPoint + "; dst=" + dstPoint +
+                                   "; bw=" + bandwidth + "; intent service " + service).build();
+    }
+
+    private DeviceId deviceId(String dpid) {
+        return DeviceId.deviceId(URI.create("of:" + dpid));
+    }
+
+}
diff --git a/apps/calendar/src/main/webapp/WEB-INF/web.xml b/apps/calendar/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7aa6418
--- /dev/null
+++ b/apps/calendar/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="ONOS" version="2.5">
+    <display-name>ONOS GUI</display-name>
+
+    <servlet>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+        <init-param>
+            <param-name>com.sun.jersey.config.property.packages</param-name>
+            <param-value>org.onlab.onos.calendar</param-value>
+        </init-param>
+        <load-on-startup>10</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <url-pattern>/rs/*</url-pattern>
+    </servlet-mapping>
+
+</web-app>
\ No newline at end of file
diff --git a/apps/pom.xml b/apps/pom.xml
index eeff7b4..e9870ea 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -25,6 +25,7 @@
         <module>proxyarp</module>
         <module>config</module>
         <module>sdnip</module>
+        <module>calendar</module>
     </modules>
 
     <properties>
diff --git a/features/features.xml b/features/features.xml
index f0430e4..899a0e2 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
           name="onos-1.0.0">
-    <repository>mvn:org.onlab.onos/onos-features/1.0.0-SNAPSHOT/xml/features</repository>
+    <repository>mvn:org.onlab.onos/onos-features/1.0.0-SNAPSHOT/xml/features
+    </repository>
 
     <feature name="onos-thirdparty-base" version="1.0.0"
              description="ONOS 3rd party dependencies">
@@ -28,21 +29,22 @@
 
         <bundle>mvn:org.onlab.onos/onlab-nio/1.0.0-SNAPSHOT</bundle>
 
-	<bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
-	<bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
-	<bundle>mvn:org.onlab.onos/onlab-thirdparty/1.0.0-SNAPSHOT</bundle>
+        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
+        <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
+        <bundle>mvn:org.onlab.onos/onlab-thirdparty/1.0.0-SNAPSHOT</bundle>
     </feature>
 
     <feature name="onos-thirdparty-web" version="1.0.0"
              description="ONOS 3rd party dependencies">
         <feature>war</feature>
         <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.2</bundle>
-        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.2</bundle>
+        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.2
+        </bundle>
         <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.2</bundle>
         <bundle>mvn:com.sun.jersey/jersey-core/1.18.1</bundle>
         <bundle>mvn:com.sun.jersey/jersey-server/1.18.1</bundle>
         <bundle>mvn:com.sun.jersey/jersey-servlet/1.18.1</bundle>
-        
+
     </feature>
 
     <feature name="onos-api" version="1.0.0"
@@ -96,16 +98,18 @@
     </feature>
 
     <feature name="onos-openflow" version="1.0.0"
-            description="ONOS OpenFlow API, Controller &amp; Providers">
+             description="ONOS OpenFlow API, Controller &amp; Providers">
         <feature>onos-api</feature>
         <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-api/1.0.0-SNAPSHOT</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-ctl/1.0.0-SNAPSHOT</bundle>
 
-        <bundle>mvn:org.onlab.onos/onos-of-provider-device/1.0.0-SNAPSHOT</bundle>
+        <bundle>mvn:org.onlab.onos/onos-of-provider-device/1.0.0-SNAPSHOT
+        </bundle>
         <bundle>mvn:org.onlab.onos/onos-of-provider-link/1.0.0-SNAPSHOT</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-provider-host/1.0.0-SNAPSHOT</bundle>
-        <bundle>mvn:org.onlab.onos/onos-of-provider-packet/1.0.0-SNAPSHOT</bundle>
+        <bundle>mvn:org.onlab.onos/onos-of-provider-packet/1.0.0-SNAPSHOT
+        </bundle>
         <bundle>mvn:org.onlab.onos/onos-of-provider-flow/1.0.0-SNAPSHOT</bundle>
 
     </feature>
@@ -160,4 +164,11 @@
         <bundle>mvn:org.onlab.onos/onos-app-sdnip/1.0.0-SNAPSHOT</bundle>
     </feature>
 
+    <feature name="onos-app-calendar" version="1.0.0"
+             description="REST interface for scheduling intents from an external calendar">
+        <feature>onos-api</feature>
+        <feature>onos-thirdparty-web</feature>
+        <bundle>mvn:org.onlab.onos/onos-app-calendar/1.0.0-SNAPSHOT</bundle>
+    </feature>
+
 </features>
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index c7f57a7..ea4438a 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -68,6 +68,7 @@
             echo "No such cell: $1" >&2 && return 1
         unset ONOS_CELL ONOS_NIC ONOS_FEATURES
         unset OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN OCI
+        export ONOS_CELL=$1
         . $ONOS_ROOT/tools/test/cells/$1
         cell
     else
diff --git a/tools/test/cells/local b/tools/test/cells/local
index 2edb074..f506c08 100644
--- a/tools/test/cells/local
+++ b/tools/test/cells/local
@@ -8,4 +8,4 @@
 export OCN="192.168.56.103"
 export OCI="${OC1}"
 
-export ONOS_FEATURES=""
+export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-tvue}"
diff --git a/tools/test/cells/single b/tools/test/cells/single
index 7c03ef4..6b13756 100644
--- a/tools/test/cells/single
+++ b/tools/test/cells/single
@@ -7,4 +7,4 @@
 export OCN="192.168.56.103"
 export OCI="${OC1}"
 
-export ONOS_FEATURES=""
+export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-tvue}"