# Path: ceagle/api/client.py
# CONF = config.CONF
# FAKE_CLIENT_MAP = {
#     "security": security.Client,
# }
# class UnknownService(Exception):
# class Client(base.Client):
#     def get(self, uri="/", **kwargs):
# def get_client(service_name):
# 
# Path: ceagle/api/v1/capacity.py
# def index():
# def get_blueprints():
# 
# Path: ceagle/api/v1/infrastructure.py
# CONF = config.CONF
# def get_region_infra(region):
# def get_regions_infra():
# def get_blueprints():
# 
# Path: ceagle/api/v1/intelligence.py
# def get_intelligence():
# def get_blueprints():
# 
# Path: ceagle/api/v1/optimization.py
# def get_optimization():
# def get_blueprints():
# 
# Path: ceagle/api/v1/regions.py
# CONF = config.CONF
# def get_regions(detailed):
# def get_blueprints():
# 
# Path: ceagle/api/v1/runbooks.py
# def handle_runbooks(region=None):
# def handle_single_runbook(region, book_id):
# def run_runbook(region, book_id):
# def runbook_runs(region=None):
# def single_runbook_run(region, run_id):
# def get_blueprints():
# 
# Path: ceagle/api/v1/security.py
# def get_issues(region, period):
# def get_issues_all_regions(period):
# def get_blueprints():
# 
# Path: ceagle/api/v1/status.py
# CONF = config.CONF
# def get_status_helper(period, region=None):
# def get_status(period):
# def get_status_health(period):
# def get_status_performance(period):
# def get_status_availability(period):
# def get_region_status(region, period):
# def get_region_status_health(region, period):
# def get_region_status_performance(region, period):
# def get_region_status_availability(region, period):
# def get_blueprints():


import flask
from oss_lib import routing
from ceagle.api import client
from ceagle.api.v1 import capacity
from ceagle.api.v1 import infrastructure
from ceagle.api.v1 import intelligence
from ceagle.api.v1 import optimization
from ceagle.api.v1 import regions
from ceagle.api.v1 import runbooks
from ceagle.api.v1 import security
from ceagle.api.v1 import status
#
#    Licensed 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.



app = flask.Flask("ceagle", static_folder=None)


@app.route("/api/")
def versions():
    return flask.jsonify({"versions": ["1.0"]})


@app.errorhandler(404)
def not_found(error):
    return flask.jsonify({"error": "Not Found"}), 404


@app.errorhandler(client.UnknownService)
def handle_unknown_service(ex):

# Path: ceagle/api/client.py
# CONF = config.CONF
# FAKE_CLIENT_MAP = {
#     "security": security.Client,
# }
# class UnknownService(Exception):
# class Client(base.Client):
#     def get(self, uri="/", **kwargs):
# def get_client(service_name):
# 
# Path: ceagle/api/v1/capacity.py
# def index():
# def get_blueprints():
# 
# Path: ceagle/api/v1/infrastructure.py
# CONF = config.CONF
# def get_region_infra(region):
# def get_regions_infra():
# def get_blueprints():
# 
# Path: ceagle/api/v1/intelligence.py
# def get_intelligence():
# def get_blueprints():
# 
# Path: ceagle/api/v1/optimization.py
# def get_optimization():
# def get_blueprints():
# 
# Path: ceagle/api/v1/regions.py
# CONF = config.CONF
# def get_regions(detailed):
# def get_blueprints():
# 
# Path: ceagle/api/v1/runbooks.py
# def handle_runbooks(region=None):
# def handle_single_runbook(region, book_id):
# def run_runbook(region, book_id):
# def runbook_runs(region=None):
# def single_runbook_run(region, run_id):
# def get_blueprints():
# 
# Path: ceagle/api/v1/security.py
# def get_issues(region, period):
# def get_issues_all_regions(period):
# def get_blueprints():
# 
# Path: ceagle/api/v1/status.py
# CONF = config.CONF
# def get_status_helper(period, region=None):
# def get_status(period):
# def get_status_health(period):
# def get_status_performance(period):
# def get_status_availability(period):
# def get_region_status(region, period):
# def get_region_status_health(region, period):
# def get_region_status_performance(region, period):
# def get_region_status_availability(region, period):
# def get_blueprints():


# Path: ceagle/app.py
import flask
from oss_lib import routing
from ceagle.api import client
from ceagle.api.v1 import capacity
from ceagle.api.v1 import infrastructure
from ceagle.api.v1 import intelligence
from ceagle.api.v1 import optimization
from ceagle.api.v1 import regions
from ceagle.api.v1 import runbooks
from ceagle.api.v1 import security
from ceagle.api.v1 import status

#
#    Licensed 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.



app = flask.Flask("ceagle", static_folder=None)


@app.route("/api/")
def versions():
    return flask.jsonify({"versions": ["1.0"]})


@app.errorhandler(404)
def not_found(error):
    return flask.jsonify({"error": "Not Found"}), 404


@app.errorhandler(client.UnknownService)
def handle_unknown_service(ex):

    return flask.jsonify({"error": str(ex)}), 404