BUG-421: Define multipart-transaction-aware
[controller.git] / opendaylight / md-sal / model / model-flow-service / src / main / yang / flow-capable-transaction.yang
1 module flow-capable-transaction {
2     namespace "urn:opendaylight:flow:transaction";
3     prefix type;
4
5     import opendaylight-inventory {prefix inv; revision-date "2013-08-19";}
6     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
7     import yang-ext {prefix ext; revision-date "2013-07-09";}
8
9     revision "2013-11-03" {
10         description "Initial revision";
11     }
12
13     typedef transaction-id {
14         type uint64;
15     }
16     // This refers to MD-SAL transaction reference.
17     grouping transaction-metadata {
18         leaf transaction-uri {
19             type inet:uri;
20         }
21     }
22
23     grouping transaction-aware {
24         leaf transaction-id {
25             type transaction-id;
26         }
27     }
28
29     grouping multipart-transaction-aware {
30         uses transaction-aware;
31
32         leaf moreReplies {
33             type boolean;
34             default false;
35         }
36     }
37
38     rpc get-next-transaction-id {
39         input {
40             leaf node {
41                 ext:context-reference "inv:node-context";
42                 type inv:node-ref;
43             }
44         }
45         output {
46             uses transaction-aware;
47         }
48     }
49
50     // Barier request?
51     rpc finish-transaction {
52         input {
53             leaf node {
54                 ext:context-reference "inv:node-context";
55                 type inv:node-ref;
56             }
57             leaf transaction-id {
58                 type transaction-id;
59             }
60         }
61     }
62 }