Initial checkin of new API implementation
[plcapi.git] / PLC / Slices.py
1 from types import StringTypes
2
3 from PLC.Faults import *
4 from PLC.Parameter import Parameter
5 from PLC.Debug import profile
6 from PLC.Table import Row, Table
7
8 class Slice(Row):
9     """
10     Representation of a row in the slices table. To use, instantiate
11     with a dict of values.
12     """
13
14     fields = {
15         'slice_id': Parameter(int, "Slice type"),
16         }
17
18     def __init__(self, api, fields):
19         self.api = api
20         dict.__init__(fields)
21
22     def commit(self):
23         # XXX
24         pass
25
26     def delete(self):
27         # XXX
28         pass
29
30 class Slices(Table):
31     """
32     Representation of row(s) from the slices table in the
33     database.
34     """
35
36     def __init__(self, api, slice_id_list = None):
37         # XXX
38         pass