# Path: ceagle/api_fake_data/base.py
# CONF = config.CONF
# def route(reg):
#     def decorator(method):
#     def __init__(self, name, endpoint):
#     def _setup_routing(self):
#     def _find_route(self, path):
#     def default(self, path, *args, **kwargs):
#     def get(self, path, **kwargs):
# def api_handler(fake):
#     def real_function_handler(real):
#         def choice_maker(*args, **kwargs):
# def randnum(from_num, to_num, round_by=2):
# class FakeClient(object):


import itertools
import flask
from ceagle.api_fake_data import base
#    under the License.





REGIONS_NUM = 4


def regions(detailed=False):
    """Generate fake regions."""
    tpl = itertools.cycle(["west-%i.hooli.net", "north-%i.piedpiper.net",
                           "east-%i.hooli.net", "south-%i.piedpiper.net"])
    idx = itertools.count(1)
    srv = itertools.cycle([
        ["health", "performance", "cis"],
        ["health", "availability", "performance", "cis", "security"],
        ["health"]])

    result = {} if detailed else []

    for i in range(REGIONS_NUM):
        region = next(tpl) % next(idx)
        if detailed:
            result[region] = {"services": next(srv)}
        else:
            result.append(region)
    return result



# Path: ceagle/api_fake_data/base.py
# CONF = config.CONF
# def route(reg):
#     def decorator(method):
#     def __init__(self, name, endpoint):
#     def _setup_routing(self):
#     def _find_route(self, path):
#     def default(self, path, *args, **kwargs):
#     def get(self, path, **kwargs):
# def api_handler(fake):
#     def real_function_handler(real):
#         def choice_maker(*args, **kwargs):
# def randnum(from_num, to_num, round_by=2):
# class FakeClient(object):


# Path: ceagle/api_fake_data/fake_regions.py
import itertools
import flask
from ceagle.api_fake_data import base

#    under the License.





REGIONS_NUM = 4


def regions(detailed=False):
    """Generate fake regions."""
    tpl = itertools.cycle(["west-%i.hooli.net", "north-%i.piedpiper.net",
                           "east-%i.hooli.net", "south-%i.piedpiper.net"])
    idx = itertools.count(1)
    srv = itertools.cycle([
        ["health", "performance", "cis"],
        ["health", "availability", "performance", "cis", "security"],
        ["health"]])

    result = {} if detailed else []

    for i in range(REGIONS_NUM):
        region = next(tpl) % next(idx)
        if detailed:
            result[region] = {"services": next(srv)}
        else:
            result.append(region)
    return result



@base.api_handler