blob: 6669ac39ee3531e83d19bd195bc38b3bb8043827 [file] [log] [blame]
dfilppifd22d8e2017-08-03 20:07:26 +00001#
2# ============LICENSE_START===================================================
3# Copyright (c) 2017 Cloudify.co. All rights reserved.
4# ===================================================================
5# Licensed under the Apache License, Version 2.0 (the "License"); you may not
6# use this file except in compliance with the License. You may obtain a copy
7# of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14# License for the specific language governing permissions and limitations under
15# the License.
16# ============LICENSE_END====================================================
17#
18
19from flask import Flask, render_template
20from aria.exceptions import AriaException
21
22version_id = "0.1"
23route_base = "/api/" + version_id + "/"
24app = Flask("onap-aria-rest")
25
26@app.route("/")
27def index():
28 return render_template('index.html')
29
30
31@app.route(route_base + "templates/", methods = ['GET'])
32def list_templates():
33
34@app.route(route_base + "templates/<template_id>", methods = ['POST'])
35def install_template( template_id ):
36
37 # GET CSAR FROM SDC
38
39 # DEPLOY CSAR
40
41 # UPDATE A&AI?
42
43 return "template {} instantiated"
44
45@app.route(route_base + "templates/<template_id>", methods = ['DELETE'])
46def delete_template( template_id ):
47
48 # RUN UNINSTALL
49
50 # DELETE TEMPLATE
51
52 # UPDATE A&AI?
53
54 return "template {} deleted"
55
56if __name__ == "__main__":
57 app.run()