bootstrap

This commit is contained in:
Henning Jacobs
2016-12-12 21:12:06 +01:00
commit b082e74524
4 changed files with 57 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
__pycache__
*.swp
*.pyc

24
app.py Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env python3
import gevent.monkey
gevent.monkey.patch_all()
import connexion
import flask
from gevent.wsgi import WSGIServer
app = connexion.App(__name__)
@app.app.route('/')
def index():
return flask.render_template('index.html')
def get_clusters():
pass
app.add_api('swagger.yaml')
if __name__ == '__main__':
app.run(port=8080, server='gevent')

22
swagger.yaml Normal file
View File

@@ -0,0 +1,22 @@
swagger: "2.0"
info:
title: Kubernetes Operational View
version: "1.0"
produces:
- application/json
paths:
/kubernetes-clusters:
get:
summary: Get Kubernetes clusters
operationId: app.get_clusters
responses:
"200":
description: List of Kubernetes clusters
schema:
type: object
properties:
kubernetes_clusters:
type: object
properties:
api_server_url:
type: string

8
templates/index.html Normal file
View File

@@ -0,0 +1,8 @@
<html>
<head>
<title>Kubernetes Operational View</title>
</head>
<body>
</body>
</html>