Adding skeletal onos-topo integration app

Change-Id: I80f39193ef25fb5d46b0053d76409165d07ec4ea
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index 93fc83a..d83a8a7 100644
--- a/tools/build/bazel/generate_workspace.bzl
+++ b/tools/build/bazel/generate_workspace.bzl
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Fri, 15 Nov 2019 18:42:10 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Wed, 4 Dec 2019 01:44:21 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
diff --git a/tools/build/bazel/modules.bzl b/tools/build/bazel/modules.bzl
index 3a37146..92b8076 100644
--- a/tools/build/bazel/modules.bzl
+++ b/tools/build/bazel/modules.bzl
@@ -255,6 +255,7 @@
     "//apps/workflow:onos-apps-workflow-oar",
     "//apps/workflow/ofoverlay:onos-apps-workflow-ofoverlay-oar",
     "//apps/packet-throttle:onos-apps-packet-throttle-oar",
+    "//apps/onos-topo:onos-apps-onos-topo-oar",
 ]
 
 PROTOCOL_APPS = [
diff --git a/tools/build/bazel/topo_BUILD b/tools/build/bazel/topo_BUILD
new file mode 100644
index 0000000..9a42836
--- /dev/null
+++ b/tools/build/bazel/topo_BUILD
@@ -0,0 +1,21 @@
+# Prefix string to remove from proto import statements
+IMPORT_PREFIX = "github.com/onosproject/onos-topo/api/"
+
+proto_library(
+    name = "topo_device_proto",
+    srcs = [":topo_device_proto_sed"],
+    deps = [
+        "@com_google_protobuf//:descriptor_proto",
+        "@com_google_protobuf//:duration_proto",
+        "@com_google_protobuf//:any_proto",
+    ],
+    visibility = ["//visibility:public"],
+)
+
+genrule(
+    name = "topo_device_proto_sed",
+    srcs = [":device/device.proto"],
+    outs = ["new/device/device.proto"],
+    cmd = "sed -e 's:import \"gogoproto.*;::g;s: ..gogoproto\..*:;:g;s:import \"%s:import \":g;s:^syntax = \"proto3\";:&\\\n  option java_package = \"org.onosproject.uonos\";:g' $(location :device/device.proto) >> \"$@\""
+        % IMPORT_PREFIX,
+)
diff --git a/tools/build/bazel/topo_workspace.bzl b/tools/build/bazel/topo_workspace.bzl
new file mode 100644
index 0000000..24aa004
--- /dev/null
+++ b/tools/build/bazel/topo_workspace.bzl
@@ -0,0 +1,13 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+TOPO_COMMIT = "8866b0a658247683bd4b852839ce91c6ba60f6ac"
+TOPO_SHA = "dc63356c3d34de18b0afdf04cce01f6de83e2b7264de177e55c0595b05dbcd07"
+
+def generate_topo_device():
+    http_archive(
+        name = "com_github_onosproject_onos_topo",
+        urls = ["https://github.com/onosproject/onos-topo/archive/%s.zip" % TOPO_COMMIT],
+        sha256 = TOPO_SHA,
+        strip_prefix = "onos-topo-%s/api" % TOPO_COMMIT,
+        build_file = "//tools/build/bazel:topo_BUILD",
+    )