Revision 47d421ae

b/astakosclient/astakosclient/services.py
41 41
        'endpoints': [
42 42
            {'versionId': 'v1.0',
43 43
             'publicURL': None},
44
        ]},
44
        ],
45
        'resources': {
46
            'pending_app': {
47
                'desc': "Number of pending project applications",
48
                'name': "astakos.pending_app",
49
                'service_type': "account",
50
                'service_origin': "astakos_account",
51
                'allow_in_projects': False},
52
            },
53
        },
45 54

  
46 55
    'astakos_keystone': {
47 56
        'type': 'identity',
......
51 60
        'endpoints': [
52 61
            {'versionId': 'v2.0',
53 62
             'publicURL': None},
54
        ]},
63
        ],
64
        'resources': {},
65
    },
55 66

  
56 67
    'astakos_ui': {
57 68
        'type': 'astakos_ui',
......
61 72
        'endpoints': [
62 73
            {'versionId': '',
63 74
             'publicURL': None},
64
        ]},
75
        ],
76
    },
65 77
}
b/snf-astakos-app/astakos/im/astakos_resources.py
31 31
# interpreted as representing official policies, either expressed
32 32
# or implied, of GRNET S.A.
33 33

  
34
resources = [
35
    {"desc": "Number of pending project applications",
36
     "name": "astakos.pending_app",
37
     "allow_in_projects": False,
38
     "service_type": "account",
39
     }
40
]
34
from astakos.im.settings import astakos_services
35
from synnefo.util.keypath import get_path
36

  
37
resources = get_path(astakos_services, 'astakos_account.resources').values()
b/snf-cyclades-app/synnefo/api/services.py
43 43
        'endpoints': [
44 44
            {'versionId': 'v2.0',
45 45
             'publicURL': None},
46
        ]},
46
        ],
47
        'resources': {
48
            'vm': {
49
                "name": "cyclades.vm",
50
                "desc": "Number of virtual machines",
51
                "service_type": "compute",
52
                "service_origin": "cyclades_compute",
53
            },
54
            'cpu': {
55
                "name": "cyclades.cpu",
56
                "desc": "Number of virtual machine processors",
57
                "service_type": "compute",
58
                "service_origin": "cyclades_compute",
59
            },
60
            'ram': {
61
                "name": "cyclades.ram",
62
                "desc": "Virtual machine memory size",
63
                "unit": "bytes",
64
                "service_type": "compute",
65
                "service_origin": "cyclades_compute",
66
            },
67
            'disk': {
68
                "name": "cyclades.disk",
69
                "desc": "Virtual machine disk size",
70
                "unit": "bytes",
71
                "service_type": "compute",
72
                "service_origin": "cyclades_compute",
73
            },
74
            'network-private': {
75
                "name": "cyclades.network.private",
76
                "desc": "Number of private networks",
77
                "service_type": "compute",
78
                "service_origin": "cyclades_compute",
79
            },
80
        },
47 81

  
48 82
    'cyclades_plankton': {
49 83
        'type': 'image',
......
52 86
        'public': True,
53 87
        'endpoints': [
54 88
            {'versionId': 'v1.0',
55
             'publicURL': None}
56
        ]},
89
             'publicURL': None},
90
        ],
91
        'resources': {},
92
    },
57 93

  
58 94
    'cyclades_vmapi': {
59 95
        'type': 'cyclades_vmapi',
......
63 99
        'endpoints': [
64 100
            {'versionId': 'v1.0',
65 101
             'publicURL': None},
66
        ]},
102
        ],
103
        'resources': {},
104
    },
67 105

  
68 106
    'cyclades_helpdesk': {
69 107
        'type': 'cyclades_helpdesk',
......
73 111
        'endpoints': [
74 112
            {'versionId': '',
75 113
             'publicURL': None},
76
        ]},
114
        ],
115
    },
77 116

  
78 117
    'cyclades_userdata': {
79 118
        'type': 'cyclades_userdata',
......
83 122
        'endpoints': [
84 123
            {'versionId': '',
85 124
             'publicURL': None},
86
        ]},
125
        ],
126
        'resources': {},
127
    },
87 128

  
88 129
    'cyclades_ui': {
89 130
        'type': 'cyclades_ui',
......
93 134
        'endpoints': [
94 135
            {'versionId': '',
95 136
             'publicURL': None},
96
        ]},
137
        ],
138
        'resources': {},
139
    },
97 140
}
b/snf-cyclades-app/synnefo/quotas/resources.py
1
# Copyright 2013 GRNET S.A. All rights reserved.
2
#
3
# Redistribution and use in source and binary forms, with or
4
# without modification, are permitted provided that the following
5
# conditions are met:
6
#
7
#   1. Redistributions of source code must retain the above
8
#      copyright notice, this list of conditions and the following
9
#      disclaimer.
10
#
11
#   2. Redistributions in binary form must reproduce the above
12
#      copyright notice, this list of conditions and the following
13
#      disclaimer in the documentation and/or other materials
14
#      provided with the distribution.
15
#
16
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
17
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
20
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
# POSSIBILITY OF SUCH DAMAGE.
28
#
29
# The views and conclusions contained in the software and
30
# documentation are those of the authors and should not be
31
# interpreted as representing official policies, either expressed
32
# or implied, of GRNET S.A.
1 33

  
2
resources =\
3
    [{"name": "cyclades.vm",
4
      "desc": "Number of virtual machines",
5
      "service_type": "compute",
6
      },
7
     {"name": "cyclades.cpu",
8
      "desc": "Number of virtual machine processors",
9
      "service_type": "compute",
10
      },
11
     {"name": "cyclades.ram",
12
      "desc": "Virtual machine memory size",
13
      "unit": "bytes",
14
      "service_type": "compute",
15
      },
16
     {"name": "cyclades.disk",
17
      "desc": "Virtual machine disk size",
18
      "unit": "bytes",
19
      "service_type": "compute",
20
      },
21
     {"name": "cyclades.network.private",
22
      "desc": "Number of private networks",
23
      "service_type": "compute",
24
      }]
34
from synnefo.util.keypath import get_path
35
from synnefo.api import cyclades_services
36

  
37
resources = get_path('cyclades_compute.resources').values()
b/snf-pithos-app/pithos/api/resources.py
31 31
# interpreted as representing official policies, either expressed
32 32
# or implied, of GRNET S.A.
33 33

  
34
from synnefo.util.keypath import get_path
35
from pithos.api.settings import pithos_services
34 36

  
35
resources = [
36
    {"desc": "Pithos account diskspace",
37
     "name": "pithos.diskspace",
38
     "unit": "bytes",
39
     "service_type": "object-store",
40
     }
41
]
37
resources = get_path(pithos_services, 'pithos_object-store.resources').values()
b/snf-pithos-app/pithos/api/services.py
41 41
        'endpoints': [
42 42
            {'versionId': 'v1',
43 43
             'publicURL': None},
44
        ]},
44
        ],
45
        'resources': {
46
            'diskspace': {
47
                "desc": "Pithos account diskspace",
48
                "name": "pithos.diskspace",
49
                "unit": "bytes",
50
                "service_type": "object-store",
51
                "service_origin": "pithos_object-store",
52
            },
53
        },
54
    },
45 55

  
46 56
    'pithos_public': {
47 57
        'type': 'public',
......
51 61
        'endpoints': [
52 62
            {'versionId': 'v2.0',
53 63
             'publicURL': None},
54
        ]},
64
        ],
65
        'resources': {},
66
    },
55 67

  
56 68
    'pithos_ui': {
57 69
        'type': 'pithos_ui',
......
61 73
        'endpoints': [
62 74
            {'versionId': '',
63 75
             'publicURL': None},
64
        ]},
76
        ],
77
        'resources': {},
78
    },
65 79
}

Also available in: Unified diff