Statistics
| Branch: | Revision:

root / snfOCCI / __init__.py @ master

History | View | Annotate | Download (2.1 kB)

1 f25a4623 nasia
# Copyright 2012-2013 GRNET S.A. All rights reserved.
2 f25a4623 nasia
#
3 f25a4623 nasia
# Redistribution and use in source and binary forms, with or
4 f25a4623 nasia
# without modification, are permitted provided that the following
5 f25a4623 nasia
# conditions are met:
6 f25a4623 nasia
#
7 f25a4623 nasia
#   1. Redistributions of source code must retain the above
8 f25a4623 nasia
#     copyright notice, this list of conditions and the following
9 f25a4623 nasia
#     disclaimer.
10 f25a4623 nasia
#
11 f25a4623 nasia
#   2. Redistributions in binary form must reproduce the above
12 f25a4623 nasia
#     copyright notice, this list of conditions and the following
13 f25a4623 nasia
#     disclaimer in the documentation and/or other materials
14 f25a4623 nasia
#     provided with the distribution.
15 f25a4623 nasia
#
16 f25a4623 nasia
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
17 f25a4623 nasia
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 f25a4623 nasia
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 f25a4623 nasia
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
20 f25a4623 nasia
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 f25a4623 nasia
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 f25a4623 nasia
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 f25a4623 nasia
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 f25a4623 nasia
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 f25a4623 nasia
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26 f25a4623 nasia
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 f25a4623 nasia
# POSSIBILITY OF SUCH DAMAGE.
28 f25a4623 nasia
#
29 f25a4623 nasia
# The views and conclusions contained in the software and
30 f25a4623 nasia
# documentation are those of the authors and should not be
31 f25a4623 nasia
# interpreted as representing official policies, either expressed
32 f25a4623 nasia
# or implied, of GRNET S.A.
33 f25a4623 nasia
34 fe35958e nasia
35 fe35958e nasia
"""
36 fe35958e nasia
This it the entry point for paste deploy .
37 fe35958e nasia

38 fe35958e nasia
Paste config file needs to point to egg:<package name>:<entrypoint name>:
39 fe35958e nasia

40 fe35958e nasia
use = egg:snfOCCI#sample_app
41 fe35958e nasia

42 fe35958e nasia
sample_app entry point is defined in setup.py:
43 fe35958e nasia

44 fe35958e nasia
entry_points='''
45 fe35958e nasia
[paste.app_factory]
46 fe35958e nasia
sample_app = snf_voms:main
47 fe35958e nasia
''',
48 fe35958e nasia

49 fe35958e nasia
which point to this function call (<module name>:function).
50 fe35958e nasia
"""
51 fe35958e nasia
52 fe35958e nasia
# W0613:unused args
53 fe35958e nasia
# pylint: disable=W0613
54 fe35958e nasia
55 fe35958e nasia
from snfOCCI import APIserver
56 fe35958e nasia
57 fe35958e nasia
58 fe35958e nasia
#noinspection PyUnusedLocal
59 fe35958e nasia
def main(global_config, **settings):
60 fe35958e nasia
    """
61 fe35958e nasia
This is the entry point for paste into the OCCI OS world.
62 fe35958e nasia
"""
63 fe35958e nasia
    return APIserver.MyAPP()