forked from xcat2/confluent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
API.txt
37 lines (28 loc) · 1.26 KB
/
API.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Each layer has API implications.
For now, I'll start with plugin api.
Arguments are always passed in keyword style
plugins should implement:
create(nodes, element, configmanager)
retrieve(nodes, element, configmanager)
update(nodes, element, configmanager)
delete(nodes, element, configmanager)
For the element '_console/session', the return should be an object
implementing:
connect(callback)
read()
write(data)
close()
For all other elements for now, the caller should get an iterable.
This means a plugin may elect to return a tuple, list,
class of their design implementing the iterator interface,
or elect to use 'yield' in their function for a generator
Northbound of confluent, the interface is straightforward.
API is presented as a tree of resources.
TLS socket resembles the SMASH CLP syntax, but does not actually implement
SMASH CLP. Notably, client should assume case sensitivity, strings can
exceed 255 characters, input can be more complex than spec allows,
and no relationship to CIM is defined. The SMASH CLP prompt -> is used and the
paradigm of navigating targets like a filesystem is used as well as the
verb names set, create, start, stop, show, etc.
HTTP presents a mostly RESTful interface (noderange, consoles,
and optional multi-request, comet behavior)