root / kamaki / clients / quotaholder / __init__.py @ c8b178ee
History | View | Annotate | Download (2 kB)
1 | 54069d1b | Stavros Sachtouris | # Copyright 2012 GRNET S.A. All rights reserved.
|
---|---|---|---|
2 | 54069d1b | Stavros Sachtouris | #
|
3 | 54069d1b | Stavros Sachtouris | # Redistribution and use in source and binary forms, with or
|
4 | 54069d1b | Stavros Sachtouris | # without modification, are permitted provided that the following
|
5 | 54069d1b | Stavros Sachtouris | # conditions are met:
|
6 | 54069d1b | Stavros Sachtouris | #
|
7 | 54069d1b | Stavros Sachtouris | # 1. Redistributions of source code must retain the above
|
8 | 54069d1b | Stavros Sachtouris | # copyright notice, this list of conditions and the following
|
9 | 54069d1b | Stavros Sachtouris | # disclaimer.
|
10 | 54069d1b | Stavros Sachtouris | #
|
11 | 54069d1b | Stavros Sachtouris | # 2. Redistributions in binary form must reproduce the above
|
12 | 54069d1b | Stavros Sachtouris | # copyright notice, this list of conditions and the following
|
13 | 54069d1b | Stavros Sachtouris | # disclaimer in the documentation and/or other materials
|
14 | 54069d1b | Stavros Sachtouris | # provided with the distribution.
|
15 | 54069d1b | Stavros Sachtouris | #
|
16 | 54069d1b | Stavros Sachtouris | # THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
17 | 54069d1b | Stavros Sachtouris | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18 | 54069d1b | Stavros Sachtouris | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
19 | 54069d1b | Stavros Sachtouris | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
20 | 54069d1b | Stavros Sachtouris | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21 | 54069d1b | Stavros Sachtouris | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22 | 54069d1b | Stavros Sachtouris | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
23 | 54069d1b | Stavros Sachtouris | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
24 | 54069d1b | Stavros Sachtouris | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
25 | 54069d1b | Stavros Sachtouris | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
26 | 54069d1b | Stavros Sachtouris | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27 | 54069d1b | Stavros Sachtouris | # POSSIBILITY OF SUCH DAMAGE.
|
28 | 54069d1b | Stavros Sachtouris | #
|
29 | 54069d1b | Stavros Sachtouris | # The views and conclusions contained in the software and
|
30 | 54069d1b | Stavros Sachtouris | # documentation are those of the authors and should not be
|
31 | 54069d1b | Stavros Sachtouris | # interpreted as representing official policies, either expressed
|
32 | 54069d1b | Stavros Sachtouris | # or implied, of GRNET S.A.
|
33 | 54069d1b | Stavros Sachtouris | |
34 | b31051d6 | Stavros Sachtouris | from kamaki.clients.quotaholder.api import ( |
35 | b31051d6 | Stavros Sachtouris | QuotaholderAPI, |
36 | b31051d6 | Stavros Sachtouris | QH_PRACTICALLY_INFINITE) |
37 | b31051d6 | Stavros Sachtouris | from kamaki.clients.commissioning_client import CommissioningClient |
38 | 54069d1b | Stavros Sachtouris | |
39 | 54069d1b | Stavros Sachtouris | |
40 | b31051d6 | Stavros Sachtouris | class QuotaholderClient(CommissioningClient): |
41 | 54069d1b | Stavros Sachtouris | |
42 | b31051d6 | Stavros Sachtouris | api_spec = QuotaholderAPI() |
43 | b31051d6 | Stavros Sachtouris | appname = 'quotaholder'
|
44 | 54069d1b | Stavros Sachtouris | |
45 | c8b178ee | Stavros Sachtouris | def __init__(self, base_url=None, token=None, poolsize=1000): |
46 | b31051d6 | Stavros Sachtouris | default_url = 'http://127.0.0.1:8008/quotaholder/v'
|
47 | b31051d6 | Stavros Sachtouris | base_url = base_url if base_url else default_url |
48 | c8b178ee | Stavros Sachtouris | super(self.__class__, self).__init__(base_url, token, poolsize=1000) |