Build API: Added method discovery service.

Added simple method discovery service.
Fixed contrib/gen_call_scripts.

BUG=chromium:978441
TEST=manual, run_tests

Change-Id: I8ce2b2f8fcdf03265210a509087d3af06567c910
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1675738
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Alex Klein <saklein@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
Auto-Submit: Alex Klein <saklein@chromium.org>
diff --git a/api/controller/api.py b/api/controller/api.py
new file mode 100644
index 0000000..d1171d0
--- /dev/null
+++ b/api/controller/api.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""API information controller."""
+
+from __future__ import print_function
+
+from chromite.api import router as router_lib
+
+
+def GetMethods(_input_proto, output_proto):
+  """List all of the registered methods."""
+  router = router_lib.GetRouter()
+  for method in router.ListMethods():
+    output_proto.methods.add().method = method