root / lib / pyzinn / zone / abstract / vsite.py @ 92161d985777e77f04cfdd7bf9efc0a78ff292d8

View | Annotate | Download (2.7 KB)

1
# Copyright (c) 2009 Lost Oasis, IELO <info@ielo.net>
2
#
3
# This file is part of ZINN.
4
# 
5
# ZINN is free software: you can redistribute it and/or modify it under
6
# the terms of the GNU General Public License as published by the Free
7
# Software Foundation, either version 3 of the License, or (at your
8
# option) any later version.
9
# 
10
# ZINN is distributed in the hope that it will be useful, but WITHOUT
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13
# for more details.
14
# 
15
# You should have received a copy of the GNU General Public License
16
# along with ZINN.  If not, see <http://www.gnu.org/licenses/>.
17
18
import copy
19
from pysinn.site.abstract import service
20
21
class AVSite(service.AService):
22
23
    def xmlrpc_create(self, label, attributes=None):
24
        raise NotImplementedError
25
    xmlrpc_create.help = """
26
        Create a vsite.
27
28
        @param label: string label of the vsite.
29
        @param attributes: struct (optionnal) attributes.
30
31
        @return: none
32
    """
33
    xmlrpc_create.signature = copy.deepcopy(
34
            service.ACrudService.xmlrpc_create.signature
35
            )
36
37
    def xmlrpc_list(self, label=None):
38
        raise NotImplementedError
39
    xmlrpc_list.help = """
40
        List vsite(s).
41
42
        @param label: none|string|array (optionnal) vsite label.
43
44
        @return: array
45
    """
46
    xmlrpc_list.signature = copy.deepcopy(
47
            service.ACrudService.xmlrpc_list.signature
48
            )
49
50
    def xmlrpc_accounting(self, label):
51
        raise NotImplementedError
52
    xmlrpc_list.help = """
53
        List accounting informations about a vsite.
54
55
        @param label: string vsite label.
56
57
        @return: array
58
    """
59
    xmlrpc_accounting.signature = copy.deepcopy(
60
            service.ACrudService.xmlrpc_accounting.signature
61
            )
62
63
    def xmlrpc_delete(self, label):
64
        raise NotImplementedError
65
    xmlrpc_delete.help = """
66
        Destroy a vsite.
67
68
        @param label: string vsite label.
69
70
        @return: none
71
    """
72
    xmlrpc_delete.signature = copy.deepcopy(
73
            service.ACrudService.xmlrpc_delete.signature
74
            )
75
76
    def xmlrpc_attributes(self, onlyMutables=False):
77
        raise NotImplementedError
78
    xmlrpc_attributes.help = """
79
        List of attributes of a vsite.
80
81
        @param onlyMutables: boolean (optionnal) filters unmutable attributes.
82
83
        possible attributes are :
84
        - label : unmutable, string name of the vsite
85
86
        @return: array
87
        """
88
    xmlrpc_attributes.signature = copy.deepcopy(
89
            service.ACrudService.xmlrpc_attributes.signature
90
            )
91
92
# vim: tabstop=4 expandtab shiftwidth=4 textwidth=79