You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/04/02 11:38:44 UTC

[02/16] libcloud git commit: add API directory

add API directory


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e36c9b9d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e36c9b9d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e36c9b9d

Branch: refs/heads/trunk
Commit: e36c9b9d7eb1a4c729b3b7748fe404511d555e9e
Parents: 9c0e0a0
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Jan 9 16:13:33 2017 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jan 9 16:13:33 2017 +1100

----------------------------------------------------------------------
 integration/api/__main__.py | 18 ++++++++++++++++++
 integration/api/routes.py   | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e36c9b9d/integration/api/__main__.py
----------------------------------------------------------------------
diff --git a/integration/api/__main__.py b/integration/api/__main__.py
new file mode 100644
index 0000000..7724165
--- /dev/null
+++ b/integration/api/__main__.py
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from bottle import route, run, template
+
+run(host='localhost', port=9898)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/e36c9b9d/integration/api/routes.py
----------------------------------------------------------------------
diff --git a/integration/api/routes.py b/integration/api/routes.py
new file mode 100644
index 0000000..6e92298
--- /dev/null
+++ b/integration/api/routes.py
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+@route('/hello/<name>')
+def index(name):
+    return template('<b>Hello {{name}}</b>!', name=name)