diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-03-22 13:23:07 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-03-28 11:00:43 +0900 |
commit | 6dfda4a227c493c1aed6c468d763650d21d5acce (patch) | |
tree | 6156a1c82bb00d0944f75dee20c53de08ea34917 /doc | |
parent | d0f25d639b8f6d22ffcbb356ba0c7f902b0193c3 (diff) |
ofctl_rest: Add get role API
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/app/ofctl_rest.rst | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/source/app/ofctl_rest.rst b/doc/source/app/ofctl_rest.rst index 03f4b29f..ffe31321 100644 --- a/doc/source/app/ofctl_rest.rst +++ b/doc/source/app/ofctl_rest.rst @@ -1794,6 +1794,72 @@ Get meter features stats } +Get role +-------- + + Get the current role of the controller from the switch. + + Usage: + + ======= ========================= + Method GET + URI /stats/role/<dpid> + ======= ========================= + + Response message body(Openflow1.4 or earlier): + + ============= ============================= ========= + Attribute Description Example + ============= ============================= ========= + dpid Datapath ID 1 + role One of OFPCR_ROLE_* "EQUAL" + generation_id Master Election Generation Id 0 + ============= ============================= ========= + + Response message body(Openflow1.5 or later): + + ============= ============================= ========= + Attribute Description Example + ============= ============================= ========= + dpid Datapath ID 1 + role One of OFPCR_ROLE_* "EQUAL" + short_id ID number for the controller 0 + generation_id Master Election Generation Id 0 + ============= ============================= ========= + + Example of use:: + + $ curl -X GET http://localhost:8080/stats/role/1 + + Response (Openflow1.4 or earlier): + + .. code-block:: javascript + + { + "1": [ + { + "generation_id": 0, + "role": "EQUAL" + } + ] + } + + + Response (Openflow1.5 or later): + + .. code-block:: javascript + + { + "1": [ + { + "generation_id": 0, + "role": "EQUAL", + "short_id": 0 + } + ] + } + + Update the switch stats ======================= |