From 82f1a7eb5535b30a95b1e71ff18c315d40d1e6f0 Mon Sep 17 00:00:00 2001 From: Stuart Mackie Date: Fri, 29 Jan 2016 16:00:57 -0800 Subject: OpenContrail test suite Change-Id: I61168093a2a05d47377ef47c8638ae1554b1a999 Signed-off-by: Stuart Mackie --- Testcases/cfgm_common/uve/__init__.py | 0 Testcases/cfgm_common/uve/__init__.pyc | Bin 0 -> 147 bytes Testcases/cfgm_common/uve/acl/__init__.py | 1 + Testcases/cfgm_common/uve/acl/__init__.pyc | Bin 0 -> 200 bytes Testcases/cfgm_common/uve/acl/acl.html | 14 + Testcases/cfgm_common/uve/acl/acl.xml | 3 + Testcases/cfgm_common/uve/acl/constants.py | 12 + Testcases/cfgm_common/uve/acl/constants.pyc | Bin 0 -> 302 bytes Testcases/cfgm_common/uve/acl/http_request.py | 14 + Testcases/cfgm_common/uve/acl/http_request.pyc | Bin 0 -> 214 bytes Testcases/cfgm_common/uve/acl/index.html | 9 + Testcases/cfgm_common/uve/acl/request_skeleton.py | 13 + Testcases/cfgm_common/uve/acl/request_skeleton.pyc | Bin 0 -> 159 bytes Testcases/cfgm_common/uve/acl/style.css | 10 + Testcases/cfgm_common/uve/acl/ttypes.py | 837 +++++++++++++ Testcases/cfgm_common/uve/acl/ttypes.pyc | Bin 0 -> 27990 bytes Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.py | 0 .../cfgm_common/uve/cfgm_cpuinfo/__init__.pyc | Bin 0 -> 160 bytes .../cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.html | 14 + .../cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.xml | 3 + .../cfgm_common/uve/cfgm_cpuinfo/constants.py | 12 + .../cfgm_common/uve/cfgm_cpuinfo/constants.pyc | Bin 0 -> 311 bytes .../uve/cfgm_cpuinfo/cpuinfo/__init__.py | 1 + .../uve/cfgm_cpuinfo/cpuinfo/__init__.pyc | Bin 0 -> 217 bytes .../uve/cfgm_cpuinfo/cpuinfo/constants.py | 12 + .../uve/cfgm_cpuinfo/cpuinfo/constants.pyc | Bin 0 -> 319 bytes .../uve/cfgm_cpuinfo/cpuinfo/cpuinfo.html | 18 + .../uve/cfgm_cpuinfo/cpuinfo/cpuinfo.xml | 5 + .../uve/cfgm_cpuinfo/cpuinfo/http_request.py | 15 + .../uve/cfgm_cpuinfo/cpuinfo/http_request.pyc | Bin 0 -> 340 bytes .../uve/cfgm_cpuinfo/cpuinfo/index.html | 10 + .../uve/cfgm_cpuinfo/cpuinfo/request_skeleton.py | 25 + .../uve/cfgm_cpuinfo/cpuinfo/request_skeleton.pyc | Bin 0 -> 641 bytes .../cfgm_common/uve/cfgm_cpuinfo/cpuinfo/style.css | 10 + .../cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.py | 960 +++++++++++++++ .../uve/cfgm_cpuinfo/cpuinfo/ttypes.pyc | Bin 0 -> 32521 bytes .../cfgm_common/uve/cfgm_cpuinfo/http_request.py | 14 + .../cfgm_common/uve/cfgm_cpuinfo/http_request.pyc | Bin 0 -> 223 bytes Testcases/cfgm_common/uve/cfgm_cpuinfo/index.html | 14 + .../uve/cfgm_cpuinfo/process_info/__init__.py | 1 + .../uve/cfgm_cpuinfo/process_info/__init__.pyc | Bin 0 -> 222 bytes .../uve/cfgm_cpuinfo/process_info/constants.py | 33 + .../uve/cfgm_cpuinfo/process_info/constants.pyc | Bin 0 -> 787 bytes .../uve/cfgm_cpuinfo/process_info/http_request.py | 14 + .../uve/cfgm_cpuinfo/process_info/http_request.pyc | Bin 0 -> 236 bytes .../uve/cfgm_cpuinfo/process_info/index.html | 9 + .../cfgm_cpuinfo/process_info/process_info.html | 13 + .../uve/cfgm_cpuinfo/process_info/process_info.xml | 3 + .../cfgm_cpuinfo/process_info/request_skeleton.py | 13 + .../cfgm_cpuinfo/process_info/request_skeleton.pyc | Bin 0 -> 181 bytes .../uve/cfgm_cpuinfo/process_info/style.css | 10 + .../uve/cfgm_cpuinfo/process_info/ttypes.py | 854 +++++++++++++ .../uve/cfgm_cpuinfo/process_info/ttypes.pyc | Bin 0 -> 26064 bytes .../uve/cfgm_cpuinfo/request_skeleton.py | 13 + .../uve/cfgm_cpuinfo/request_skeleton.pyc | Bin 0 -> 168 bytes Testcases/cfgm_common/uve/cfgm_cpuinfo/style.css | 10 + Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.py | 1281 ++++++++++++++++++++ Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.pyc | Bin 0 -> 40928 bytes .../cfgm_common/uve/physical_router/__init__.py | 1 + .../cfgm_common/uve/physical_router/__init__.pyc | Bin 0 -> 212 bytes .../cfgm_common/uve/physical_router/constants.py | 12 + .../cfgm_common/uve/physical_router/constants.pyc | Bin 0 -> 314 bytes .../uve/physical_router/http_request.py | 14 + .../uve/physical_router/http_request.pyc | Bin 0 -> 226 bytes .../cfgm_common/uve/physical_router/index.html | 9 + .../uve/physical_router/physical_router.html | 14 + .../uve/physical_router/physical_router.xml | 3 + .../uve/physical_router/request_skeleton.py | 13 + .../uve/physical_router/request_skeleton.pyc | Bin 0 -> 171 bytes .../cfgm_common/uve/physical_router/style.css | 10 + .../cfgm_common/uve/physical_router/ttypes.py | 461 +++++++ .../cfgm_common/uve/physical_router/ttypes.pyc | Bin 0 -> 14361 bytes .../cfgm_common/uve/service_instance/__init__.py | 1 + .../cfgm_common/uve/service_instance/__init__.pyc | Bin 0 -> 213 bytes .../cfgm_common/uve/service_instance/constants.py | 12 + .../cfgm_common/uve/service_instance/constants.pyc | Bin 0 -> 315 bytes .../uve/service_instance/http_request.py | 14 + .../uve/service_instance/http_request.pyc | Bin 0 -> 227 bytes .../cfgm_common/uve/service_instance/index.html | 9 + .../uve/service_instance/request_skeleton.py | 13 + .../uve/service_instance/request_skeleton.pyc | Bin 0 -> 172 bytes .../uve/service_instance/service_instance.html | 14 + .../uve/service_instance/service_instance.xml | 3 + .../cfgm_common/uve/service_instance/style.css | 10 + .../cfgm_common/uve/service_instance/ttypes.py | 484 ++++++++ .../cfgm_common/uve/service_instance/ttypes.pyc | Bin 0 -> 16150 bytes .../cfgm_common/uve/virtual_machine/__init__.py | 1 + .../cfgm_common/uve/virtual_machine/__init__.pyc | Bin 0 -> 212 bytes .../cfgm_common/uve/virtual_machine/constants.py | 12 + .../cfgm_common/uve/virtual_machine/constants.pyc | Bin 0 -> 314 bytes .../uve/virtual_machine/http_request.py | 14 + .../uve/virtual_machine/http_request.pyc | Bin 0 -> 226 bytes .../cfgm_common/uve/virtual_machine/index.html | 9 + .../uve/virtual_machine/request_skeleton.py | 13 + .../uve/virtual_machine/request_skeleton.pyc | Bin 0 -> 171 bytes .../cfgm_common/uve/virtual_machine/style.css | 10 + .../cfgm_common/uve/virtual_machine/ttypes.py | 517 ++++++++ .../cfgm_common/uve/virtual_machine/ttypes.pyc | Bin 0 -> 17222 bytes .../uve/virtual_machine/virtual_machine.html | 14 + .../uve/virtual_machine/virtual_machine.xml | 3 + .../cfgm_common/uve/virtual_network/__init__.py | 1 + .../cfgm_common/uve/virtual_network/__init__.pyc | Bin 0 -> 212 bytes .../cfgm_common/uve/virtual_network/constants.py | 12 + .../cfgm_common/uve/virtual_network/constants.pyc | Bin 0 -> 314 bytes .../uve/virtual_network/http_request.py | 14 + .../uve/virtual_network/http_request.pyc | Bin 0 -> 226 bytes .../cfgm_common/uve/virtual_network/index.html | 9 + .../uve/virtual_network/request_skeleton.py | 13 + .../uve/virtual_network/request_skeleton.pyc | Bin 0 -> 171 bytes .../cfgm_common/uve/virtual_network/style.css | 10 + .../cfgm_common/uve/virtual_network/ttypes.py | 787 ++++++++++++ .../cfgm_common/uve/virtual_network/ttypes.pyc | Bin 0 -> 25128 bytes .../uve/virtual_network/virtual_network.html | 14 + .../uve/virtual_network/virtual_network.xml | 3 + Testcases/cfgm_common/uve/vnc_api/__init__.py | 1 + Testcases/cfgm_common/uve/vnc_api/__init__.pyc | Bin 0 -> 204 bytes Testcases/cfgm_common/uve/vnc_api/constants.py | 12 + Testcases/cfgm_common/uve/vnc_api/constants.pyc | Bin 0 -> 306 bytes Testcases/cfgm_common/uve/vnc_api/http_request.py | 14 + Testcases/cfgm_common/uve/vnc_api/http_request.pyc | Bin 0 -> 218 bytes Testcases/cfgm_common/uve/vnc_api/index.html | 9 + .../cfgm_common/uve/vnc_api/request_skeleton.py | 13 + .../cfgm_common/uve/vnc_api/request_skeleton.pyc | Bin 0 -> 163 bytes Testcases/cfgm_common/uve/vnc_api/style.css | 10 + Testcases/cfgm_common/uve/vnc_api/ttypes.py | 778 ++++++++++++ Testcases/cfgm_common/uve/vnc_api/ttypes.pyc | Bin 0 -> 23969 bytes Testcases/cfgm_common/uve/vnc_api/vnc_api.html | 14 + Testcases/cfgm_common/uve/vnc_api/vnc_api.xml | 3 + 128 files changed, 7687 insertions(+) create mode 100644 Testcases/cfgm_common/uve/__init__.py create mode 100644 Testcases/cfgm_common/uve/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/acl/__init__.py create mode 100644 Testcases/cfgm_common/uve/acl/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/acl/acl.html create mode 100644 Testcases/cfgm_common/uve/acl/acl.xml create mode 100644 Testcases/cfgm_common/uve/acl/constants.py create mode 100644 Testcases/cfgm_common/uve/acl/constants.pyc create mode 100644 Testcases/cfgm_common/uve/acl/http_request.py create mode 100644 Testcases/cfgm_common/uve/acl/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/acl/index.html create mode 100644 Testcases/cfgm_common/uve/acl/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/acl/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/acl/style.css create mode 100644 Testcases/cfgm_common/uve/acl/ttypes.py create mode 100644 Testcases/cfgm_common/uve/acl/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.html create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.xml create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.html create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.xml create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/index.html create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/style.css create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/index.html create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/index.html create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.html create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.xml create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/style.css create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/style.css create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.py create mode 100644 Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/physical_router/__init__.py create mode 100644 Testcases/cfgm_common/uve/physical_router/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/physical_router/constants.py create mode 100644 Testcases/cfgm_common/uve/physical_router/constants.pyc create mode 100644 Testcases/cfgm_common/uve/physical_router/http_request.py create mode 100644 Testcases/cfgm_common/uve/physical_router/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/physical_router/index.html create mode 100644 Testcases/cfgm_common/uve/physical_router/physical_router.html create mode 100644 Testcases/cfgm_common/uve/physical_router/physical_router.xml create mode 100644 Testcases/cfgm_common/uve/physical_router/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/physical_router/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/physical_router/style.css create mode 100644 Testcases/cfgm_common/uve/physical_router/ttypes.py create mode 100644 Testcases/cfgm_common/uve/physical_router/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/service_instance/__init__.py create mode 100644 Testcases/cfgm_common/uve/service_instance/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/service_instance/constants.py create mode 100644 Testcases/cfgm_common/uve/service_instance/constants.pyc create mode 100644 Testcases/cfgm_common/uve/service_instance/http_request.py create mode 100644 Testcases/cfgm_common/uve/service_instance/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/service_instance/index.html create mode 100644 Testcases/cfgm_common/uve/service_instance/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/service_instance/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/service_instance/service_instance.html create mode 100644 Testcases/cfgm_common/uve/service_instance/service_instance.xml create mode 100644 Testcases/cfgm_common/uve/service_instance/style.css create mode 100644 Testcases/cfgm_common/uve/service_instance/ttypes.py create mode 100644 Testcases/cfgm_common/uve/service_instance/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_machine/__init__.py create mode 100644 Testcases/cfgm_common/uve/virtual_machine/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_machine/constants.py create mode 100644 Testcases/cfgm_common/uve/virtual_machine/constants.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_machine/http_request.py create mode 100644 Testcases/cfgm_common/uve/virtual_machine/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_machine/index.html create mode 100644 Testcases/cfgm_common/uve/virtual_machine/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/virtual_machine/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_machine/style.css create mode 100644 Testcases/cfgm_common/uve/virtual_machine/ttypes.py create mode 100644 Testcases/cfgm_common/uve/virtual_machine/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_machine/virtual_machine.html create mode 100644 Testcases/cfgm_common/uve/virtual_machine/virtual_machine.xml create mode 100644 Testcases/cfgm_common/uve/virtual_network/__init__.py create mode 100644 Testcases/cfgm_common/uve/virtual_network/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_network/constants.py create mode 100644 Testcases/cfgm_common/uve/virtual_network/constants.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_network/http_request.py create mode 100644 Testcases/cfgm_common/uve/virtual_network/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_network/index.html create mode 100644 Testcases/cfgm_common/uve/virtual_network/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/virtual_network/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_network/style.css create mode 100644 Testcases/cfgm_common/uve/virtual_network/ttypes.py create mode 100644 Testcases/cfgm_common/uve/virtual_network/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/virtual_network/virtual_network.html create mode 100644 Testcases/cfgm_common/uve/virtual_network/virtual_network.xml create mode 100644 Testcases/cfgm_common/uve/vnc_api/__init__.py create mode 100644 Testcases/cfgm_common/uve/vnc_api/__init__.pyc create mode 100644 Testcases/cfgm_common/uve/vnc_api/constants.py create mode 100644 Testcases/cfgm_common/uve/vnc_api/constants.pyc create mode 100644 Testcases/cfgm_common/uve/vnc_api/http_request.py create mode 100644 Testcases/cfgm_common/uve/vnc_api/http_request.pyc create mode 100644 Testcases/cfgm_common/uve/vnc_api/index.html create mode 100644 Testcases/cfgm_common/uve/vnc_api/request_skeleton.py create mode 100644 Testcases/cfgm_common/uve/vnc_api/request_skeleton.pyc create mode 100644 Testcases/cfgm_common/uve/vnc_api/style.css create mode 100644 Testcases/cfgm_common/uve/vnc_api/ttypes.py create mode 100644 Testcases/cfgm_common/uve/vnc_api/ttypes.pyc create mode 100644 Testcases/cfgm_common/uve/vnc_api/vnc_api.html create mode 100644 Testcases/cfgm_common/uve/vnc_api/vnc_api.xml (limited to 'Testcases/cfgm_common/uve') diff --git a/Testcases/cfgm_common/uve/__init__.py b/Testcases/cfgm_common/uve/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Testcases/cfgm_common/uve/__init__.pyc b/Testcases/cfgm_common/uve/__init__.pyc new file mode 100644 index 0000000..1c66ce2 Binary files /dev/null and b/Testcases/cfgm_common/uve/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/acl/__init__.py b/Testcases/cfgm_common/uve/acl/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/acl/__init__.pyc b/Testcases/cfgm_common/uve/acl/__init__.pyc new file mode 100644 index 0000000..dedeeb1 Binary files /dev/null and b/Testcases/cfgm_common/uve/acl/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/acl/acl.html b/Testcases/cfgm_common/uve/acl/acl.html new file mode 100644 index 0000000..b942438 --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/acl.html @@ -0,0 +1,14 @@ + + + + + +Module: acl +

Module: acl

+ + + +
ModuleSandeshs
acl
+

+ diff --git a/Testcases/cfgm_common/uve/acl/acl.xml b/Testcases/cfgm_common/uve/acl/acl.xml new file mode 100644 index 0000000..8fbac67 --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/acl.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/acl/constants.py b/Testcases/cfgm_common/uve/acl/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/acl/constants.pyc b/Testcases/cfgm_common/uve/acl/constants.pyc new file mode 100644 index 0000000..4ee591b Binary files /dev/null and b/Testcases/cfgm_common/uve/acl/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/acl/http_request.py b/Testcases/cfgm_common/uve/acl/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/acl/http_request.pyc b/Testcases/cfgm_common/uve/acl/http_request.pyc new file mode 100644 index 0000000..73a314c Binary files /dev/null and b/Testcases/cfgm_common/uve/acl/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/acl/index.html b/Testcases/cfgm_common/uve/acl/index.html new file mode 100644 index 0000000..0f31e1b --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
acl
+ diff --git a/Testcases/cfgm_common/uve/acl/request_skeleton.py b/Testcases/cfgm_common/uve/acl/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/acl/request_skeleton.pyc b/Testcases/cfgm_common/uve/acl/request_skeleton.pyc new file mode 100644 index 0000000..7fbba89 Binary files /dev/null and b/Testcases/cfgm_common/uve/acl/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/acl/style.css b/Testcases/cfgm_common/uve/acl/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/acl/ttypes.py b/Testcases/cfgm_common/uve/acl/ttypes.py new file mode 100644 index 0000000..6575253 --- /dev/null +++ b/Testcases/cfgm_common/uve/acl/ttypes.py @@ -0,0 +1,837 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class AclRuleToVnPolicyRule(object): + """ + Attributes: + - acl_major + - acl_minor + - policy_or_group_name + - policy_major + - policy_minor + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'acl_major', None, None, ), # 1 + (2, TType.I32, 'acl_minor', None, None, ), # 2 + (3, TType.STRING, 'policy_or_group_name', None, None, ), # 3 + (4, TType.I32, 'policy_major', None, None, ), # 4 + (5, TType.I32, 'policy_minor', None, None, ), # 5 + ) + + def __init__(self, acl_major=None, acl_minor=None, policy_or_group_name=None, policy_major=None, policy_minor=None,): + self.acl_major = acl_major + self.acl_minor = acl_minor + self.policy_or_group_name = policy_or_group_name + self.policy_major = policy_major + self.policy_minor = policy_minor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + (length, self.acl_major) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + (length, self.acl_minor) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.policy_or_group_name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + (length, self.policy_major) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + (length, self.policy_minor) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('AclRuleToVnPolicyRule') < 0: return -1 + if self.acl_major is not None: + annotations = {} + if oprot.writeFieldBegin('acl_major', TType.I32, 1, annotations) < 0: return -1 + if oprot.writeI32(self.acl_major) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.acl_minor is not None: + annotations = {} + if oprot.writeFieldBegin('acl_minor', TType.I32, 2, annotations) < 0: return -1 + if oprot.writeI32(self.acl_minor) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.policy_or_group_name is not None: + annotations = {} + if oprot.writeFieldBegin('policy_or_group_name', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.policy_or_group_name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.policy_major is not None: + annotations = {} + if oprot.writeFieldBegin('policy_major', TType.I32, 4, annotations) < 0: return -1 + if oprot.writeI32(self.policy_major) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.policy_minor is not None: + annotations = {} + if oprot.writeFieldBegin('policy_minor', TType.I32, 5, annotations) < 0: return -1 + if oprot.writeI32(self.policy_minor) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.acl_major is not None: + log_str.write('acl_major = ') + log_str.write(str(self.acl_major)) + log_str.write(' ') + if self.acl_minor is not None: + log_str.write('acl_minor = ') + log_str.write(str(self.acl_minor)) + log_str.write(' ') + if self.policy_or_group_name is not None: + log_str.write('policy_or_group_name = ') + log_str.write(self.policy_or_group_name) + log_str.write(' ') + if self.policy_major is not None: + log_str.write('policy_major = ') + log_str.write(str(self.policy_major)) + log_str.write(' ') + if self.policy_minor is not None: + log_str.write('policy_minor = ') + log_str.write(str(self.policy_minor)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveAclConfig(object): + """ + Attributes: + - virtual_network + - attached_policies + - acl_rule_to_policy + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'virtual_network', None, None, ), # 1 + (2, TType.LIST, 'attached_policies', (TType.STRING,None), None, ), # 2 + (3, TType.LIST, 'acl_rule_to_policy', (TType.STRUCT,(AclRuleToVnPolicyRule, AclRuleToVnPolicyRule.thrift_spec)), None, ), # 3 + ) + + def __init__(self, virtual_network=None, attached_policies=None, acl_rule_to_policy=None,): + self.virtual_network = virtual_network + self.attached_policies = attached_policies + self.acl_rule_to_policy = acl_rule_to_policy + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.virtual_network) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.attached_policies = [] + (length, _etype3, _size0) = iprot.readListBegin() + read_cnt += length + for _i4 in xrange(_size0): + read_cnt += iprot.readContainerElementBegin() + (length, _elem5) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.attached_policies.append(_elem5) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.acl_rule_to_policy = [] + (length, _etype9, _size6) = iprot.readListBegin() + read_cnt += length + for _i10 in xrange(_size6): + _elem11 = AclRuleToVnPolicyRule() + read_cnt += _elem11.read(iprot) + self.acl_rule_to_policy.append(_elem11) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveAclConfig') < 0: return -1 + if self.virtual_network is not None: + annotations = {} + if oprot.writeFieldBegin('virtual_network', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.virtual_network) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.attached_policies is not None: + annotations = {} + if oprot.writeFieldBegin('attached_policies', TType.LIST, 2, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.attached_policies)) < 0: return -1 + for iter12 in self.attached_policies: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter12) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.acl_rule_to_policy is not None: + annotations = {} + if oprot.writeFieldBegin('acl_rule_to_policy', TType.LIST, 3, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.acl_rule_to_policy)) < 0: return -1 + for iter13 in self.acl_rule_to_policy: + if iter13.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.virtual_network is not None: + log_str.write('virtual_network = ') + log_str.write(self.virtual_network) + log_str.write(' ') + if self.attached_policies is not None: + log_str.write('attached_policies = ') + log_str.write('[ ') + for iter14 in self.attached_policies: + log_str.write(iter14) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.acl_rule_to_policy is not None: + log_str.write('acl_rule_to_policy = ') + log_str.write('[ ') + for iter15 in self.acl_rule_to_policy: + log_str.write('<< ') + log_str.write(iter15.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveAclVirtualNetworkConfig(object): + """ + Attributes: + - name + - deleted + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.STRUCT, 'config', (UveAclConfig, UveAclConfig.thrift_spec), None, ), # 3 + ) + + def __init__(self, name=None, deleted=None, config=None,): + self.name = name + self.deleted = deleted + self.config = config + self._table = 'ObjectVNTable' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.config = UveAclConfig() + read_cnt += self.config.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveAclVirtualNetworkConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.config is not None: + annotations = {} + if oprot.writeFieldBegin('config', TType.STRUCT, 3, annotations) < 0: return -1 + if self.config.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.config is not None: + log_str.write('config = ') + log_str.write('<< ') + log_str.write(self.config.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveAclVirtualMachineConfig(object): + """ + Attributes: + - name + - deleted + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.STRUCT, 'config', (UveAclConfig, UveAclConfig.thrift_spec), None, ), # 3 + ) + + def __init__(self, name=None, deleted=None, config=None,): + self.name = name + self.deleted = deleted + self.config = config + self._table = 'ObjectVMTable' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.config = UveAclConfig() + read_cnt += self.config.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveAclVirtualMachineConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.config is not None: + annotations = {} + if oprot.writeFieldBegin('config', TType.STRUCT, 3, annotations) < 0: return -1 + if self.config.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.config is not None: + log_str.write('config = ') + log_str.write('<< ') + log_str.write(self.config.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveAclVirtualNetworkConfigTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UveAclVirtualNetworkConfig, UveAclVirtualNetworkConfig.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 1124326490 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.config is not None: + tdata.config = self.data.config + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UveAclVirtualNetworkConfigTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UveAclVirtualNetworkConfig() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UveAclVirtualNetworkConfigTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveAclVirtualMachineConfigTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UveAclVirtualMachineConfig, UveAclVirtualMachineConfig.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 1124326490 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.config is not None: + tdata.config = self.data.config + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UveAclVirtualMachineConfigTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UveAclVirtualMachineConfig() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UveAclVirtualMachineConfigTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +'UveAclVirtualNetworkConfigTrace', +'UveAclVirtualMachineConfigTrace', +] + + +_SANDESH_UVE_DATA_LIST = [ +'UveAclVirtualNetworkConfig', +'UveAclVirtualMachineConfig', +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/acl/ttypes.pyc b/Testcases/cfgm_common/uve/acl/ttypes.pyc new file mode 100644 index 0000000..eafdd71 Binary files /dev/null and b/Testcases/cfgm_common/uve/acl/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.pyc new file mode 100644 index 0000000..8d74650 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.html b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.html new file mode 100644 index 0000000..166887a --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.html @@ -0,0 +1,14 @@ + + + + + +Module: cfgm_cpuinfo +

Module: cfgm_cpuinfo

+ + + +
ModuleSandeshs
cfgm_cpuinfo
+

+ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.xml b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.xml new file mode 100644 index 0000000..da831a3 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cfgm_cpuinfo.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.pyc new file mode 100644 index 0000000..9d1a5e5 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.pyc new file mode 100644 index 0000000..1446e7d Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.pyc new file mode 100644 index 0000000..453ec8d Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.html b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.html new file mode 100644 index 0000000..f2fb672 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.html @@ -0,0 +1,18 @@ + + + + + +Module: cpuinfo +

Module: cpuinfo

+ + + +
ModuleSandeshs
cpuinfoCpuLoadInfoReq
+
+

+

CpuLoadInfoReq

+
+ +
KeyFieldTypeDescriptionRequirednessValue

diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.xml b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.xml new file mode 100644 index 0000000..d3a129b --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/cpuinfo.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.py new file mode 100644 index 0000000..e48bba8 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.py @@ -0,0 +1,15 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +{ 'uri':'/Snh_CpuLoadInfoReq', 'method':ttypes.CpuLoadInfoReq.handle_http_request }, +] + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.pyc new file mode 100644 index 0000000..c013398 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/index.html b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/index.html new file mode 100644 index 0000000..a338214 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/index.html @@ -0,0 +1,10 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
cpuinfoCpuLoadInfoReq
+
+ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.py new file mode 100644 index 0000000..22463de --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.py @@ -0,0 +1,25 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + + +# Create a derived class from "CpuLoadInfoReq" to handle +# the sandesh request. Add this derived class "CpuLoadInfoReq_derived" +# in module CpuLoadInfoReq_derived.py and add it in your package + +class CpuLoadInfoReq_derived(CpuLoadInfoReq): + + + def handle_request(self): + # Add your code to handle the "CpuLoadInfoReq" request + pass + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.pyc new file mode 100644 index 0000000..d8eb2c1 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/style.css b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.py new file mode 100644 index 0000000..fa6ed17 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.py @@ -0,0 +1,960 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class CpuLoadAvg(object): + """ + Attributes: + - one_min_avg + - five_min_avg + - fifteen_min_avg + """ + + thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'one_min_avg', None, None, ), # 1 + (2, TType.DOUBLE, 'five_min_avg', None, None, ), # 2 + (3, TType.DOUBLE, 'fifteen_min_avg', None, None, ), # 3 + ) + + def __init__(self, one_min_avg=None, five_min_avg=None, fifteen_min_avg=None,): + self.one_min_avg = one_min_avg + self.five_min_avg = five_min_avg + self.fifteen_min_avg = fifteen_min_avg + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.DOUBLE: + (length, self.one_min_avg) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + (length, self.five_min_avg) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.DOUBLE: + (length, self.fifteen_min_avg) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('CpuLoadAvg') < 0: return -1 + if self.one_min_avg is not None: + annotations = {} + if oprot.writeFieldBegin('one_min_avg', TType.DOUBLE, 1, annotations) < 0: return -1 + if oprot.writeDouble(self.one_min_avg) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.five_min_avg is not None: + annotations = {} + if oprot.writeFieldBegin('five_min_avg', TType.DOUBLE, 2, annotations) < 0: return -1 + if oprot.writeDouble(self.five_min_avg) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.fifteen_min_avg is not None: + annotations = {} + if oprot.writeFieldBegin('fifteen_min_avg', TType.DOUBLE, 3, annotations) < 0: return -1 + if oprot.writeDouble(self.fifteen_min_avg) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.one_min_avg is not None: + log_str.write('one_min_avg = ') + log_str.write(str(self.one_min_avg)) + log_str.write(' ') + if self.five_min_avg is not None: + log_str.write('five_min_avg = ') + log_str.write(str(self.five_min_avg)) + log_str.write(' ') + if self.fifteen_min_avg is not None: + log_str.write('fifteen_min_avg = ') + log_str.write(str(self.fifteen_min_avg)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class MemInfo(object): + """ + Attributes: + - virt + - peakvirt + - res + """ + + thrift_spec = ( + None, # 0 + (1, TType.U32, 'virt', None, None, ), # 1 + (2, TType.U32, 'peakvirt', None, None, ), # 2 + (3, TType.U32, 'res', None, None, ), # 3 + ) + + def __init__(self, virt=None, peakvirt=None, res=None,): + self.virt = virt + self.peakvirt = peakvirt + self.res = res + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.U32: + (length, self.virt) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.U32: + (length, self.peakvirt) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.U32: + (length, self.res) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('MemInfo') < 0: return -1 + if self.virt is not None: + annotations = {} + if oprot.writeFieldBegin('virt', TType.U32, 1, annotations) < 0: return -1 + if oprot.writeU32(self.virt) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.peakvirt is not None: + annotations = {} + if oprot.writeFieldBegin('peakvirt', TType.U32, 2, annotations) < 0: return -1 + if oprot.writeU32(self.peakvirt) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.res is not None: + annotations = {} + if oprot.writeFieldBegin('res', TType.U32, 3, annotations) < 0: return -1 + if oprot.writeU32(self.res) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.virt is not None: + log_str.write('virt = ') + log_str.write(str(self.virt)) + log_str.write(' ') + if self.peakvirt is not None: + log_str.write('peakvirt = ') + log_str.write(str(self.peakvirt)) + log_str.write(' ') + if self.res is not None: + log_str.write('res = ') + log_str.write(str(self.res)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SysMemInfo(object): + """ + Attributes: + - total + - used + - free + - buffers + """ + + thrift_spec = ( + None, # 0 + (1, TType.U32, 'total', None, None, ), # 1 + (2, TType.U32, 'used', None, None, ), # 2 + (3, TType.U32, 'free', None, None, ), # 3 + (4, TType.U32, 'buffers', None, None, ), # 4 + ) + + def __init__(self, total=None, used=None, free=None, buffers=None,): + self.total = total + self.used = used + self.free = free + self.buffers = buffers + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.U32: + (length, self.total) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.U32: + (length, self.used) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.U32: + (length, self.free) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.U32: + (length, self.buffers) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('SysMemInfo') < 0: return -1 + if self.total is not None: + annotations = {} + if oprot.writeFieldBegin('total', TType.U32, 1, annotations) < 0: return -1 + if oprot.writeU32(self.total) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.used is not None: + annotations = {} + if oprot.writeFieldBegin('used', TType.U32, 2, annotations) < 0: return -1 + if oprot.writeU32(self.used) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.free is not None: + annotations = {} + if oprot.writeFieldBegin('free', TType.U32, 3, annotations) < 0: return -1 + if oprot.writeU32(self.free) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.buffers is not None: + annotations = {} + if oprot.writeFieldBegin('buffers', TType.U32, 4, annotations) < 0: return -1 + if oprot.writeU32(self.buffers) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.total is not None: + log_str.write('total = ') + log_str.write(str(self.total)) + log_str.write(' ') + if self.used is not None: + log_str.write('used = ') + log_str.write(str(self.used)) + log_str.write(' ') + if self.free is not None: + log_str.write('free = ') + log_str.write(str(self.free)) + log_str.write(' ') + if self.buffers is not None: + log_str.write('buffers = ') + log_str.write(str(self.buffers)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CpuLoadInfo(object): + """ + Attributes: + - num_cpu + - sys_mem_info + - meminfo + - cpuload + - cpu_share + """ + + thrift_spec = ( + None, # 0 + (1, TType.U32, 'num_cpu', None, None, ), # 1 + (2, TType.STRUCT, 'meminfo', (MemInfo, MemInfo.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'cpuload', (CpuLoadAvg, CpuLoadAvg.thrift_spec), None, ), # 3 + (4, TType.DOUBLE, 'cpu_share', None, None, ), # 4 + (5, TType.STRUCT, 'sys_mem_info', (SysMemInfo, SysMemInfo.thrift_spec), None, ), # 5 + ) + + def __init__(self, num_cpu=None, sys_mem_info=None, meminfo=None, cpuload=None, cpu_share=None,): + self.num_cpu = num_cpu + self.sys_mem_info = sys_mem_info + self.meminfo = meminfo + self.cpuload = cpuload + self.cpu_share = cpu_share + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.U32: + (length, self.num_cpu) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.sys_mem_info = SysMemInfo() + read_cnt += self.sys_mem_info.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.meminfo = MemInfo() + read_cnt += self.meminfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.cpuload = CpuLoadAvg() + read_cnt += self.cpuload.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.DOUBLE: + (length, self.cpu_share) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('CpuLoadInfo') < 0: return -1 + if self.num_cpu is not None: + annotations = {} + if oprot.writeFieldBegin('num_cpu', TType.U32, 1, annotations) < 0: return -1 + if oprot.writeU32(self.num_cpu) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.meminfo is not None: + annotations = {} + if oprot.writeFieldBegin('meminfo', TType.STRUCT, 2, annotations) < 0: return -1 + if self.meminfo.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.cpuload is not None: + annotations = {} + if oprot.writeFieldBegin('cpuload', TType.STRUCT, 3, annotations) < 0: return -1 + if self.cpuload.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.cpu_share is not None: + annotations = {} + if oprot.writeFieldBegin('cpu_share', TType.DOUBLE, 4, annotations) < 0: return -1 + if oprot.writeDouble(self.cpu_share) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.sys_mem_info is not None: + annotations = {} + if oprot.writeFieldBegin('sys_mem_info', TType.STRUCT, 5, annotations) < 0: return -1 + if self.sys_mem_info.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.num_cpu is not None: + log_str.write('num_cpu = ') + log_str.write(str(self.num_cpu)) + log_str.write(' ') + if self.sys_mem_info is not None: + log_str.write('sys_mem_info = ') + log_str.write('<< ') + log_str.write(self.sys_mem_info.log()) + log_str.write('>>') + log_str.write(' ') + if self.meminfo is not None: + log_str.write('meminfo = ') + log_str.write('<< ') + log_str.write(self.meminfo.log()) + log_str.write('>>') + log_str.write(' ') + if self.cpuload is not None: + log_str.write('cpuload = ') + log_str.write('<< ') + log_str.write(self.cpuload.log()) + log_str.write('>>') + log_str.write(' ') + if self.cpu_share is not None: + log_str.write('cpu_share = ') + log_str.write(str(self.cpu_share)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ProcessCpuInfo(object): + """ + Attributes: + - module_id + - inst_id + - mem_virt + - cpu_share + - mem_res + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'module_id', None, None, ), # 1 + (2, TType.STRING, 'inst_id', None, None, ), # 2 + (3, TType.U32, 'mem_virt', None, None, ), # 3 + (4, TType.DOUBLE, 'cpu_share', None, None, ), # 4 + (5, TType.U32, 'mem_res', None, None, ), # 5 + ) + + def __init__(self, module_id=None, inst_id=None, mem_virt=None, cpu_share=None, mem_res=None,): + self.module_id = module_id + self.inst_id = inst_id + self.mem_virt = mem_virt + self.cpu_share = cpu_share + self.mem_res = mem_res + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.module_id) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.inst_id) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.U32: + (length, self.mem_virt) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.DOUBLE: + (length, self.cpu_share) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.U32: + (length, self.mem_res) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ProcessCpuInfo') < 0: return -1 + if self.module_id is not None: + annotations = {} + if oprot.writeFieldBegin('module_id', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.module_id) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.inst_id is not None: + annotations = {} + if oprot.writeFieldBegin('inst_id', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.inst_id) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.mem_virt is not None: + annotations = {} + if oprot.writeFieldBegin('mem_virt', TType.U32, 3, annotations) < 0: return -1 + if oprot.writeU32(self.mem_virt) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.cpu_share is not None: + annotations = {} + if oprot.writeFieldBegin('cpu_share', TType.DOUBLE, 4, annotations) < 0: return -1 + if oprot.writeDouble(self.cpu_share) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.mem_res is not None: + annotations = {} + if oprot.writeFieldBegin('mem_res', TType.U32, 5, annotations) < 0: return -1 + if oprot.writeU32(self.mem_res) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.module_id is not None: + log_str.write('module_id = ') + log_str.write(self.module_id) + log_str.write(' ') + if self.inst_id is not None: + log_str.write('inst_id = ') + log_str.write(self.inst_id) + log_str.write(' ') + if self.mem_virt is not None: + log_str.write('mem_virt = ') + log_str.write(str(self.mem_virt)) + log_str.write(' ') + if self.cpu_share is not None: + log_str.write('cpu_share = ') + log_str.write(str(self.cpu_share)) + log_str.write(' ') + if self.mem_res is not None: + log_str.write('mem_res = ') + log_str.write(str(self.mem_res)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CpuLoadInfoReq(sandesh_base.SandeshRequest): + + thrift_spec = ( + ) + + def __init__(self, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshRequest.__init__(self) + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 2471203225 + self._hints = 0 + + @staticmethod + def handle_http_request(sandesh=sandesh_base.sandesh_global): + sandesh_req = CpuLoadInfoReq() + if not sandesh_req: + return SandeshHttp.http_error('Sandesh Request "CpuLoadInfoReq" not implemented') + sandesh_req._context = bottle.request.url + handle_req_fn = getattr(sandesh_req, "handle_request", None) + if callable(handle_req_fn): + handle_req_fn(sandesh_req) + else: + return SandeshHttp.http_error('Sandesh Request "CpuLoadInfoReq" not implemented') + resp = SandeshHttp.get_http_response() + if resp: + return resp + else: + return SandeshHttp.http_error('No Response for Sandesh Request "CpuLoadInfoReq"') + + def log(self, trace=False): + log_str = cStringIO.StringIO() + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('CpuLoadInfoReq') < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CpuLoadInfoResp(sandesh_base.SandeshResponse): + + thrift_spec = ( + (0, TType.BOOL, 'more', None, None, ), # 0 + (1, TType.STRUCT, 'cpu_info', (CpuLoadInfo, CpuLoadInfo.thrift_spec), None, ), # 1 + ) + + def __init__(self, cpu_info=None, more=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshResponse.__init__(self) + self.cpu_info = cpu_info + self.more = more + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 4227955829 + self._hints = 0 + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('CpuLoadInfoResp: ') + if self.cpu_info is not None: + log_str.write('cpu_info = ') + log_str.write('<< ') + log_str.write(self.cpu_info.log()) + log_str.write('>>') + log_str.write(' ') + if self.more is not None: + log_str.write('more = ') + if self.more: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.cpu_info = CpuLoadInfo() + read_cnt += self.cpu_info.read(iprot) + else: + iprot.skip(ftype) + elif fid == 0: + if ftype == TType.BOOL: + (length, self.more) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('CpuLoadInfoResp') < 0: return -1 + if self.more is not None: + annotations = {} + if oprot.writeFieldBegin('more', TType.BOOL, 0, annotations) < 0: return -1 + if oprot.writeBool(self.more) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.cpu_info is not None: + annotations = {} + if oprot.writeFieldBegin('cpu_info', TType.STRUCT, 1, annotations) < 0: return -1 + if self.cpu_info.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.more != other.more: + return False + if self.cpu_info != other.cpu_info: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +'CpuLoadInfoReq', +] + + +_SANDESH_UVE_LIST = [ +] + + +_SANDESH_UVE_DATA_LIST = [ +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.pyc new file mode 100644 index 0000000..5cffc67 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/cpuinfo/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.pyc new file mode 100644 index 0000000..8dec371 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/index.html b/Testcases/cfgm_common/uve/cfgm_cpuinfo/index.html new file mode 100644 index 0000000..d9836a6 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/index.html @@ -0,0 +1,14 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + + + + + +
ModuleServicesSandeshsData typesConstants
cfgm_cpuinfo
cpuinfoCpuLoadInfoReq
+
process_info
+ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.pyc new file mode 100644 index 0000000..34a8d06 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.py new file mode 100644 index 0000000..561413e --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.py @@ -0,0 +1,33 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + +ConnectionTypeNames = { + 0 : "Test", + 1 : "IFMap", + 2 : "XMPP", + 3 : "Collector", + 4 : "Database", + 5 : "Redis", + 6 : "Zookeeper", + 7 : "Discovery", + 8 : "ApiServer", + 9 : "ToR", +} +ConnectionStatusNames = { + 0 : "Initializing", + 1 : "Down", + 2 : "Up", +} +ProcessStateNames = { + 0 : "Functional", + 1 : "Non-Functional", +} diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.pyc new file mode 100644 index 0000000..a13a91f Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.pyc new file mode 100644 index 0000000..4348a49 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/index.html b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/index.html new file mode 100644 index 0000000..9550828 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
process_info
+ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.html b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.html new file mode 100644 index 0000000..2a1230f --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.html @@ -0,0 +1,13 @@ + + + + + +Module: process_info +

Module: process_info

+ + + +
ModuleSandeshs
process_info
+ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.xml b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.xml new file mode 100644 index 0000000..ed715d3 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.pyc new file mode 100644 index 0000000..11f0c97 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/style.css b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.py new file mode 100644 index 0000000..5c12c29 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.py @@ -0,0 +1,854 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + +class ConnectionType(object): + TEST = 0 + IFMAP = 1 + XMPP = 2 + COLLECTOR = 3 + DATABASE = 4 + REDIS = 5 + ZOOKEEPER = 6 + DISCOVERY = 7 + APISERVER = 8 + TOR = 9 + + _VALUES_TO_NAMES = { + 0: "TEST", + 1: "IFMAP", + 2: "XMPP", + 3: "COLLECTOR", + 4: "DATABASE", + 5: "REDIS", + 6: "ZOOKEEPER", + 7: "DISCOVERY", + 8: "APISERVER", + 9: "TOR", + } + + _NAMES_TO_VALUES = { + "TEST": 0, + "IFMAP": 1, + "XMPP": 2, + "COLLECTOR": 3, + "DATABASE": 4, + "REDIS": 5, + "ZOOKEEPER": 6, + "DISCOVERY": 7, + "APISERVER": 8, + "TOR": 9, + } + +class ConnectionStatus(object): + INIT = 0 + DOWN = 1 + UP = 2 + + _VALUES_TO_NAMES = { + 0: "INIT", + 1: "DOWN", + 2: "UP", + } + + _NAMES_TO_VALUES = { + "INIT": 0, + "DOWN": 1, + "UP": 2, + } + +class ProcessState(object): + FUNCTIONAL = 0 + NON_FUNCTIONAL = 1 + + _VALUES_TO_NAMES = { + 0: "FUNCTIONAL", + 1: "NON_FUNCTIONAL", + } + + _NAMES_TO_VALUES = { + "FUNCTIONAL": 0, + "NON_FUNCTIONAL": 1, + } + + +class ConnectionInfo(object): + """ + Attributes: + - type + - name + - server_addrs + - status + - description + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'type', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.LIST, 'server_addrs', (TType.STRING,None), None, ), # 3 + (4, TType.STRING, 'status', None, None, ), # 4 + (5, TType.STRING, 'description', None, None, ), # 5 + ) + + def __init__(self, type=None, name=None, server_addrs=None, status=None, description=None,): + self.type = type + self.name = name + self.server_addrs = server_addrs + self.status = status + self.description = description + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.type) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.server_addrs = [] + (length, _etype3, _size0) = iprot.readListBegin() + read_cnt += length + for _i4 in xrange(_size0): + read_cnt += iprot.readContainerElementBegin() + (length, _elem5) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.server_addrs.append(_elem5) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + (length, self.status) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + (length, self.description) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ConnectionInfo') < 0: return -1 + if self.type is not None: + annotations = {} + if oprot.writeFieldBegin('type', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.type) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.name is not None: + annotations = {} + if oprot.writeFieldBegin('name', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.server_addrs is not None: + annotations = {} + if oprot.writeFieldBegin('server_addrs', TType.LIST, 3, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.server_addrs)) < 0: return -1 + for iter6 in self.server_addrs: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter6) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.status is not None: + annotations = {} + if oprot.writeFieldBegin('status', TType.STRING, 4, annotations) < 0: return -1 + if oprot.writeString(self.status) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.description is not None: + annotations = {} + if oprot.writeFieldBegin('description', TType.STRING, 5, annotations) < 0: return -1 + if oprot.writeString(self.description) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.type is not None: + log_str.write('type = ') + log_str.write(self.type) + log_str.write(' ') + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.server_addrs is not None: + log_str.write('server_addrs = ') + log_str.write('[ ') + for iter7 in self.server_addrs: + log_str.write(iter7) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.status is not None: + log_str.write('status = ') + log_str.write(self.status) + log_str.write(' ') + if self.description is not None: + log_str.write('description = ') + log_str.write(self.description) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ProcessStatus(object): + """ + Attributes: + - module_id + - instance_id + - state + - connection_infos + - description + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'module_id', None, None, ), # 1 + (2, TType.STRING, 'instance_id', None, None, ), # 2 + (3, TType.STRING, 'state', None, None, ), # 3 + (4, TType.LIST, 'connection_infos', (TType.STRUCT,(ConnectionInfo, ConnectionInfo.thrift_spec)), None, ), # 4 + (5, TType.STRING, 'description', None, None, ), # 5 + ) + + def __init__(self, module_id=None, instance_id=None, state=None, connection_infos=None, description=None,): + self.module_id = module_id + self.instance_id = instance_id + self.state = state + self.connection_infos = connection_infos + self.description = description + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.module_id) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.instance_id) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.state) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.connection_infos = [] + (length, _etype11, _size8) = iprot.readListBegin() + read_cnt += length + for _i12 in xrange(_size8): + _elem13 = ConnectionInfo() + read_cnt += _elem13.read(iprot) + self.connection_infos.append(_elem13) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + (length, self.description) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ProcessStatus') < 0: return -1 + if self.module_id is not None: + annotations = {} + if oprot.writeFieldBegin('module_id', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.module_id) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.instance_id is not None: + annotations = {} + if oprot.writeFieldBegin('instance_id', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.instance_id) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.state is not None: + annotations = {} + if oprot.writeFieldBegin('state', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.state) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.connection_infos is not None: + annotations = {} + if oprot.writeFieldBegin('connection_infos', TType.LIST, 4, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.connection_infos)) < 0: return -1 + for iter14 in self.connection_infos: + if iter14.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.description is not None: + annotations = {} + if oprot.writeFieldBegin('description', TType.STRING, 5, annotations) < 0: return -1 + if oprot.writeString(self.description) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.module_id is not None: + log_str.write('module_id = ') + log_str.write(self.module_id) + log_str.write(' ') + if self.instance_id is not None: + log_str.write('instance_id = ') + log_str.write(self.instance_id) + log_str.write(' ') + if self.state is not None: + log_str.write('state = ') + log_str.write(self.state) + log_str.write(' ') + if self.connection_infos is not None: + log_str.write('connection_infos = ') + log_str.write('[ ') + for iter15 in self.connection_infos: + log_str.write('<< ') + log_str.write(iter15.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.description is not None: + log_str.write('description = ') + log_str.write(self.description) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DiskPartitionUsageStats(object): + """ + Attributes: + - partition_type + - partition_name + - partition_space_used_1k + - partition_space_available_1k + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'partition_type', None, None, ), # 1 + (2, TType.STRING, 'partition_name', None, None, ), # 2 + (3, TType.U64, 'partition_space_used_1k', None, None, ), # 3 + (4, TType.U64, 'partition_space_available_1k', None, None, ), # 4 + ) + + def __init__(self, partition_type=None, partition_name=None, partition_space_used_1k=None, partition_space_available_1k=None,): + self.partition_type = partition_type + self.partition_name = partition_name + self.partition_space_used_1k = partition_space_used_1k + self.partition_space_available_1k = partition_space_available_1k + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.partition_type) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.partition_name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.U64: + (length, self.partition_space_used_1k) = iprot.readU64(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.U64: + (length, self.partition_space_available_1k) = iprot.readU64(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('DiskPartitionUsageStats') < 0: return -1 + if self.partition_type is not None: + annotations = {} + if oprot.writeFieldBegin('partition_type', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.partition_type) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.partition_name is not None: + annotations = {} + if oprot.writeFieldBegin('partition_name', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.partition_name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.partition_space_used_1k is not None: + annotations = {} + if oprot.writeFieldBegin('partition_space_used_1k', TType.U64, 3, annotations) < 0: return -1 + if oprot.writeU64(self.partition_space_used_1k) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.partition_space_available_1k is not None: + annotations = {} + if oprot.writeFieldBegin('partition_space_available_1k', TType.U64, 4, annotations) < 0: return -1 + if oprot.writeU64(self.partition_space_available_1k) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.partition_type is not None: + log_str.write('partition_type = ') + log_str.write(self.partition_type) + log_str.write(' ') + if self.partition_name is not None: + log_str.write('partition_name = ') + log_str.write(self.partition_name) + log_str.write(' ') + if self.partition_space_used_1k is not None: + log_str.write('partition_space_used_1k = ') + log_str.write(str(self.partition_space_used_1k)) + log_str.write(' ') + if self.partition_space_available_1k is not None: + log_str.write('partition_space_available_1k = ') + log_str.write(str(self.partition_space_available_1k)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ProcessInfo(object): + """ + Attributes: + - process_name + - process_state + - start_count + - stop_count + - exit_count + - last_start_time + - last_stop_time + - last_exit_time + - core_file_list + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'process_name', None, None, ), # 1 + (2, TType.STRING, 'process_state', None, None, ), # 2 + (3, TType.U32, 'start_count', None, None, ), # 3 + (4, TType.U32, 'stop_count', None, None, ), # 4 + (5, TType.U32, 'exit_count', None, None, ), # 5 + (6, TType.STRING, 'last_start_time', None, None, ), # 6 + (7, TType.STRING, 'last_stop_time', None, None, ), # 7 + (8, TType.STRING, 'last_exit_time', None, None, ), # 8 + (9, TType.LIST, 'core_file_list', (TType.STRING,None), None, ), # 9 + ) + + def __init__(self, process_name=None, process_state=None, start_count=None, stop_count=None, exit_count=None, last_start_time=None, last_stop_time=None, last_exit_time=None, core_file_list=None,): + self.process_name = process_name + self.process_state = process_state + self.start_count = start_count + self.stop_count = stop_count + self.exit_count = exit_count + self.last_start_time = last_start_time + self.last_stop_time = last_stop_time + self.last_exit_time = last_exit_time + self.core_file_list = core_file_list + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.process_name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.process_state) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.U32: + (length, self.start_count) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.U32: + (length, self.stop_count) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.U32: + (length, self.exit_count) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + (length, self.last_start_time) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + (length, self.last_stop_time) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + (length, self.last_exit_time) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.core_file_list = [] + (length, _etype19, _size16) = iprot.readListBegin() + read_cnt += length + for _i20 in xrange(_size16): + read_cnt += iprot.readContainerElementBegin() + (length, _elem21) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.core_file_list.append(_elem21) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ProcessInfo') < 0: return -1 + if self.process_name is not None: + annotations = {} + if oprot.writeFieldBegin('process_name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.process_name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.process_state is not None: + annotations = {} + if oprot.writeFieldBegin('process_state', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.process_state) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.start_count is not None: + annotations = {} + if oprot.writeFieldBegin('start_count', TType.U32, 3, annotations) < 0: return -1 + if oprot.writeU32(self.start_count) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.stop_count is not None: + annotations = {} + if oprot.writeFieldBegin('stop_count', TType.U32, 4, annotations) < 0: return -1 + if oprot.writeU32(self.stop_count) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.exit_count is not None: + annotations = {} + if oprot.writeFieldBegin('exit_count', TType.U32, 5, annotations) < 0: return -1 + if oprot.writeU32(self.exit_count) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.last_start_time is not None: + annotations = {} + if oprot.writeFieldBegin('last_start_time', TType.STRING, 6, annotations) < 0: return -1 + if oprot.writeString(self.last_start_time) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.last_stop_time is not None: + annotations = {} + if oprot.writeFieldBegin('last_stop_time', TType.STRING, 7, annotations) < 0: return -1 + if oprot.writeString(self.last_stop_time) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.last_exit_time is not None: + annotations = {} + if oprot.writeFieldBegin('last_exit_time', TType.STRING, 8, annotations) < 0: return -1 + if oprot.writeString(self.last_exit_time) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.core_file_list is not None: + annotations = {} + if oprot.writeFieldBegin('core_file_list', TType.LIST, 9, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.core_file_list)) < 0: return -1 + for iter22 in self.core_file_list: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter22) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.process_name is not None: + log_str.write('process_name = ') + log_str.write(self.process_name) + log_str.write(' ') + if self.process_state is not None: + log_str.write('process_state = ') + log_str.write(self.process_state) + log_str.write(' ') + if self.start_count is not None: + log_str.write('start_count = ') + log_str.write(str(self.start_count)) + log_str.write(' ') + if self.stop_count is not None: + log_str.write('stop_count = ') + log_str.write(str(self.stop_count)) + log_str.write(' ') + if self.exit_count is not None: + log_str.write('exit_count = ') + log_str.write(str(self.exit_count)) + log_str.write(' ') + if self.last_start_time is not None: + log_str.write('last_start_time = ') + log_str.write(self.last_start_time) + log_str.write(' ') + if self.last_stop_time is not None: + log_str.write('last_stop_time = ') + log_str.write(self.last_stop_time) + log_str.write(' ') + if self.last_exit_time is not None: + log_str.write('last_exit_time = ') + log_str.write(self.last_exit_time) + log_str.write(' ') + if self.core_file_list is not None: + log_str.write('core_file_list = ') + log_str.write('[ ') + for iter23 in self.core_file_list: + log_str.write(iter23) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +] + + +_SANDESH_UVE_DATA_LIST = [ +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.pyc new file mode 100644 index 0000000..a07afd4 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.pyc new file mode 100644 index 0000000..0ba81c0 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/style.css b/Testcases/cfgm_common/uve/cfgm_cpuinfo/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.py b/Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.py new file mode 100644 index 0000000..ce6e3ae --- /dev/null +++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.py @@ -0,0 +1,1281 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +import cpuinfo.ttypes +import process_info.ttypes + + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class ModuleCpuInfo(object): + """ + Attributes: + - module_id + - cpu_info + - instance_id + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'module_id', None, None, ), # 1 + (2, TType.STRUCT, 'cpu_info', (cpuinfo.ttypes.CpuLoadInfo, cpuinfo.ttypes.CpuLoadInfo.thrift_spec), None, ), # 2 + (3, TType.STRING, 'instance_id', None, None, ), # 3 + ) + + def __init__(self, module_id=None, cpu_info=None, instance_id=None,): + self.module_id = module_id + self.cpu_info = cpu_info + self.instance_id = instance_id + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.module_id) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.cpu_info = cpuinfo.ttypes.CpuLoadInfo() + read_cnt += self.cpu_info.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.instance_id) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ModuleCpuInfo') < 0: return -1 + if self.module_id is not None: + annotations = {} + if oprot.writeFieldBegin('module_id', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.module_id) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.cpu_info is not None: + annotations = {} + if oprot.writeFieldBegin('cpu_info', TType.STRUCT, 2, annotations) < 0: return -1 + if self.cpu_info.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.instance_id is not None: + annotations = {} + if oprot.writeFieldBegin('instance_id', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.instance_id) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.module_id is not None: + log_str.write('module_id = ') + log_str.write(self.module_id) + log_str.write(' ') + if self.cpu_info is not None: + log_str.write('cpu_info = ') + log_str.write('<< ') + log_str.write(self.cpu_info.log()) + log_str.write('>>') + log_str.write(' ') + if self.instance_id is not None: + log_str.write('instance_id = ') + log_str.write(self.instance_id) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ModuleCpuState(object): + """ + Attributes: + - name + - deleted + - module_cpu_info + - build_info + - config_node_ip + - api_server_cpu_share + - schema_xmer_cpu_share + - service_monitor_cpu_share + - api_server_mem_virt + - schema_xmer_mem_virt + - service_monitor_mem_virt + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.LIST, 'module_cpu_info', (TType.STRUCT,(ModuleCpuInfo, ModuleCpuInfo.thrift_spec)), None, ), # 3 + (4, TType.STRING, 'build_info', None, None, ), # 4 + (5, TType.LIST, 'config_node_ip', (TType.STRING,None), None, ), # 5 + (6, TType.DOUBLE, 'api_server_cpu_share', None, None, ), # 6 + (7, TType.DOUBLE, 'schema_xmer_cpu_share', None, None, ), # 7 + (8, TType.DOUBLE, 'service_monitor_cpu_share', None, None, ), # 8 + (9, TType.U32, 'api_server_mem_virt', None, None, ), # 9 + (10, TType.U32, 'schema_xmer_mem_virt', None, None, ), # 10 + (11, TType.U32, 'service_monitor_mem_virt', None, None, ), # 11 + ) + + def __init__(self, name=None, deleted=None, module_cpu_info=None, build_info=None, config_node_ip=None, api_server_cpu_share=None, schema_xmer_cpu_share=None, service_monitor_cpu_share=None, api_server_mem_virt=None, schema_xmer_mem_virt=None, service_monitor_mem_virt=None,): + self.name = name + self.deleted = deleted + self.module_cpu_info = module_cpu_info + self.build_info = build_info + self.config_node_ip = config_node_ip + self.api_server_cpu_share = api_server_cpu_share + self.schema_xmer_cpu_share = schema_xmer_cpu_share + self.service_monitor_cpu_share = service_monitor_cpu_share + self.api_server_mem_virt = api_server_mem_virt + self.schema_xmer_mem_virt = schema_xmer_mem_virt + self.service_monitor_mem_virt = service_monitor_mem_virt + self._table = 'ObjectConfigNode' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.module_cpu_info = [] + (length, _etype3, _size0) = iprot.readListBegin() + read_cnt += length + for _i4 in xrange(_size0): + _elem5 = ModuleCpuInfo() + read_cnt += _elem5.read(iprot) + self.module_cpu_info.append(_elem5) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + (length, self.build_info) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.config_node_ip = [] + (length, _etype9, _size6) = iprot.readListBegin() + read_cnt += length + for _i10 in xrange(_size6): + read_cnt += iprot.readContainerElementBegin() + (length, _elem11) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.config_node_ip.append(_elem11) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.DOUBLE: + (length, self.api_server_cpu_share) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.DOUBLE: + (length, self.schema_xmer_cpu_share) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.DOUBLE: + (length, self.service_monitor_cpu_share) = iprot.readDouble(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.U32: + (length, self.api_server_mem_virt) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.U32: + (length, self.schema_xmer_mem_virt) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.U32: + (length, self.service_monitor_mem_virt) = iprot.readU32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ModuleCpuState') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.module_cpu_info is not None: + annotations = {} + annotations['aggtype'] = 'union' + if oprot.writeFieldBegin('module_cpu_info', TType.LIST, 3, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.module_cpu_info)) < 0: return -1 + for iter12 in self.module_cpu_info: + if iter12.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.build_info is not None: + annotations = {} + if oprot.writeFieldBegin('build_info', TType.STRING, 4, annotations) < 0: return -1 + if oprot.writeString(self.build_info) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.config_node_ip is not None: + annotations = {} + if oprot.writeFieldBegin('config_node_ip', TType.LIST, 5, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.config_node_ip)) < 0: return -1 + for iter13 in self.config_node_ip: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter13) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.api_server_cpu_share is not None: + annotations = {} + annotations['aggtype'] = 'stats' + if oprot.writeFieldBegin('api_server_cpu_share', TType.DOUBLE, 6, annotations) < 0: return -1 + if oprot.writeDouble(self.api_server_cpu_share) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.schema_xmer_cpu_share is not None: + annotations = {} + annotations['aggtype'] = 'stats' + if oprot.writeFieldBegin('schema_xmer_cpu_share', TType.DOUBLE, 7, annotations) < 0: return -1 + if oprot.writeDouble(self.schema_xmer_cpu_share) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.service_monitor_cpu_share is not None: + annotations = {} + annotations['aggtype'] = 'stats' + if oprot.writeFieldBegin('service_monitor_cpu_share', TType.DOUBLE, 8, annotations) < 0: return -1 + if oprot.writeDouble(self.service_monitor_cpu_share) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.api_server_mem_virt is not None: + annotations = {} + annotations['aggtype'] = 'stats' + annotations['hbin'] = '100000' + if oprot.writeFieldBegin('api_server_mem_virt', TType.U32, 9, annotations) < 0: return -1 + if oprot.writeU32(self.api_server_mem_virt) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.schema_xmer_mem_virt is not None: + annotations = {} + annotations['aggtype'] = 'stats' + annotations['hbin'] = '100000' + if oprot.writeFieldBegin('schema_xmer_mem_virt', TType.U32, 10, annotations) < 0: return -1 + if oprot.writeU32(self.schema_xmer_mem_virt) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.service_monitor_mem_virt is not None: + annotations = {} + annotations['aggtype'] = 'stats' + annotations['hbin'] = '100000' + if oprot.writeFieldBegin('service_monitor_mem_virt', TType.U32, 11, annotations) < 0: return -1 + if oprot.writeU32(self.service_monitor_mem_virt) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.module_cpu_info is not None: + log_str.write('module_cpu_info = ') + log_str.write('[ ') + for iter14 in self.module_cpu_info: + log_str.write('<< ') + log_str.write(iter14.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.build_info is not None: + log_str.write('build_info = ') + log_str.write(self.build_info) + log_str.write(' ') + if self.config_node_ip is not None: + log_str.write('config_node_ip = ') + log_str.write('[ ') + for iter15 in self.config_node_ip: + log_str.write(iter15) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.api_server_cpu_share is not None: + log_str.write('api_server_cpu_share = ') + log_str.write(str(self.api_server_cpu_share)) + log_str.write(' ') + if self.schema_xmer_cpu_share is not None: + log_str.write('schema_xmer_cpu_share = ') + log_str.write(str(self.schema_xmer_cpu_share)) + log_str.write(' ') + if self.service_monitor_cpu_share is not None: + log_str.write('service_monitor_cpu_share = ') + log_str.write(str(self.service_monitor_cpu_share)) + log_str.write(' ') + if self.api_server_mem_virt is not None: + log_str.write('api_server_mem_virt = ') + log_str.write(str(self.api_server_mem_virt)) + log_str.write(' ') + if self.schema_xmer_mem_virt is not None: + log_str.write('schema_xmer_mem_virt = ') + log_str.write(str(self.schema_xmer_mem_virt)) + log_str.write(' ') + if self.service_monitor_mem_virt is not None: + log_str.write('service_monitor_mem_virt = ') + log_str.write(str(self.service_monitor_mem_virt)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ConfigCpuState(object): + """ + Attributes: + - name + - deleted + - cpu_info + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.LIST, 'cpu_info', (TType.STRUCT,(cpuinfo.ttypes.ProcessCpuInfo, cpuinfo.ttypes.ProcessCpuInfo.thrift_spec)), None, ), # 3 + ) + + def __init__(self, name=None, deleted=None, cpu_info=None,): + self.name = name + self.deleted = deleted + self.cpu_info = cpu_info + self._table = 'ObjectConfigNode' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.cpu_info = [] + (length, _etype19, _size16) = iprot.readListBegin() + read_cnt += length + for _i20 in xrange(_size16): + _elem21 = cpuinfo.ttypes.ProcessCpuInfo() + read_cnt += _elem21.read(iprot) + self.cpu_info.append(_elem21) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('ConfigCpuState') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.cpu_info is not None: + annotations = {} + annotations['aggtype'] = 'union' + annotations['tags'] = '.module_id,.mem_virt,.cpu_share,.mem_res' + if oprot.writeFieldBegin('cpu_info', TType.LIST, 3, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.cpu_info)) < 0: return -1 + for iter22 in self.cpu_info: + if iter22.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.cpu_info is not None: + log_str.write('cpu_info = ') + log_str.write('[ ') + for iter23 in self.cpu_info: + log_str.write('<< ') + log_str.write(iter23.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NodeStatus(object): + """ + Attributes: + - name + - deleted + - status + - process_status + - process_info + - disk_usage_info + - description + - all_core_file_list + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.STRING, 'status', None, None, ), # 3 + (4, TType.LIST, 'process_status', (TType.STRUCT,(process_info.ttypes.ProcessStatus, process_info.ttypes.ProcessStatus.thrift_spec)), None, ), # 4 + (5, TType.LIST, 'process_info', (TType.STRUCT,(process_info.ttypes.ProcessInfo, process_info.ttypes.ProcessInfo.thrift_spec)), None, ), # 5 + (6, TType.LIST, 'disk_usage_info', (TType.STRUCT,(process_info.ttypes.DiskPartitionUsageStats, process_info.ttypes.DiskPartitionUsageStats.thrift_spec)), None, ), # 6 + (7, TType.STRING, 'description', None, None, ), # 7 + (8, TType.LIST, 'all_core_file_list', (TType.STRING,None), None, ), # 8 + ) + + def __init__(self, name=None, deleted=None, status=None, process_status=None, process_info=None, disk_usage_info=None, description=None, all_core_file_list=None,): + self.name = name + self.deleted = deleted + self.status = status + self.process_status = process_status + self.process_info = process_info + self.disk_usage_info = disk_usage_info + self.description = description + self.all_core_file_list = all_core_file_list + self._table = 'ObjectConfigNode' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.status) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.process_status = [] + (length, _etype27, _size24) = iprot.readListBegin() + read_cnt += length + for _i28 in xrange(_size24): + _elem29 = process_info.ttypes.ProcessStatus() + read_cnt += _elem29.read(iprot) + self.process_status.append(_elem29) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.process_info = [] + (length, _etype33, _size30) = iprot.readListBegin() + read_cnt += length + for _i34 in xrange(_size30): + _elem35 = process_info.ttypes.ProcessInfo() + read_cnt += _elem35.read(iprot) + self.process_info.append(_elem35) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.disk_usage_info = [] + (length, _etype39, _size36) = iprot.readListBegin() + read_cnt += length + for _i40 in xrange(_size36): + _elem41 = process_info.ttypes.DiskPartitionUsageStats() + read_cnt += _elem41.read(iprot) + self.disk_usage_info.append(_elem41) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + (length, self.description) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.all_core_file_list = [] + (length, _etype45, _size42) = iprot.readListBegin() + read_cnt += length + for _i46 in xrange(_size42): + read_cnt += iprot.readContainerElementBegin() + (length, _elem47) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.all_core_file_list.append(_elem47) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('NodeStatus') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.status is not None: + annotations = {} + if oprot.writeFieldBegin('status', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.status) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.process_status is not None: + annotations = {} + annotations['aggtype'] = 'union' + if oprot.writeFieldBegin('process_status', TType.LIST, 4, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.process_status)) < 0: return -1 + for iter48 in self.process_status: + if iter48.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.process_info is not None: + annotations = {} + annotations['aggtype'] = 'union' + if oprot.writeFieldBegin('process_info', TType.LIST, 5, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.process_info)) < 0: return -1 + for iter49 in self.process_info: + if iter49.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.disk_usage_info is not None: + annotations = {} + annotations['tags'] = '' + if oprot.writeFieldBegin('disk_usage_info', TType.LIST, 6, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.disk_usage_info)) < 0: return -1 + for iter50 in self.disk_usage_info: + if iter50.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.description is not None: + annotations = {} + if oprot.writeFieldBegin('description', TType.STRING, 7, annotations) < 0: return -1 + if oprot.writeString(self.description) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.all_core_file_list is not None: + annotations = {} + if oprot.writeFieldBegin('all_core_file_list', TType.LIST, 8, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.all_core_file_list)) < 0: return -1 + for iter51 in self.all_core_file_list: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter51) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.status is not None: + log_str.write('status = ') + log_str.write(self.status) + log_str.write(' ') + if self.process_status is not None: + log_str.write('process_status = ') + log_str.write('[ ') + for iter52 in self.process_status: + log_str.write('<< ') + log_str.write(iter52.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.process_info is not None: + log_str.write('process_info = ') + log_str.write('[ ') + for iter53 in self.process_info: + log_str.write('<< ') + log_str.write(iter53.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.disk_usage_info is not None: + log_str.write('disk_usage_info = ') + log_str.write('[ ') + for iter54 in self.disk_usage_info: + log_str.write('<< ') + log_str.write(iter54.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.description is not None: + log_str.write('description = ') + log_str.write(self.description) + log_str.write(' ') + if self.all_core_file_list is not None: + log_str.write('all_core_file_list = ') + log_str.write('[ ') + for iter55 in self.all_core_file_list: + log_str.write(iter55) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ModuleCpuStateTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (ModuleCpuState, ModuleCpuState.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 3681498004 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.module_cpu_info is not None: + tdata.module_cpu_info = self.data.module_cpu_info + if self.data.build_info is not None: + tdata.build_info = self.data.build_info + if self.data.config_node_ip is not None: + tdata.config_node_ip = self.data.config_node_ip + if self.data.api_server_cpu_share is not None: + tdata.api_server_cpu_share = self.data.api_server_cpu_share + if self.data.schema_xmer_cpu_share is not None: + tdata.schema_xmer_cpu_share = self.data.schema_xmer_cpu_share + if self.data.service_monitor_cpu_share is not None: + tdata.service_monitor_cpu_share = self.data.service_monitor_cpu_share + if self.data.api_server_mem_virt is not None: + tdata.api_server_mem_virt = self.data.api_server_mem_virt + if self.data.schema_xmer_mem_virt is not None: + tdata.schema_xmer_mem_virt = self.data.schema_xmer_mem_virt + if self.data.service_monitor_mem_virt is not None: + tdata.service_monitor_mem_virt = self.data.service_monitor_mem_virt + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('ModuleCpuStateTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = ModuleCpuState() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('ModuleCpuStateTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ConfigCpuStateTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (ConfigCpuState, ConfigCpuState.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 3278957034 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.cpu_info is not None: + tdata.cpu_info = self.data.cpu_info + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('ConfigCpuStateTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = ConfigCpuState() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('ConfigCpuStateTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NodeStatusUVE(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (NodeStatus, NodeStatus.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 2778367443 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.status is not None: + tdata.status = self.data.status + if self.data.process_status is not None: + tdata.process_status = self.data.process_status + if self.data.process_info is not None: + tdata.process_info = self.data.process_info + if self.data.disk_usage_info is not None: + tdata.disk_usage_info = self.data.disk_usage_info + if self.data.description is not None: + tdata.description = self.data.description + if self.data.all_core_file_list is not None: + tdata.all_core_file_list = self.data.all_core_file_list + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('NodeStatusUVE: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = NodeStatus() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('NodeStatusUVE') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +'ModuleCpuStateTrace', +'ConfigCpuStateTrace', +'NodeStatusUVE', +] + + +_SANDESH_UVE_DATA_LIST = [ +'ModuleCpuState', +'ConfigCpuState', +'NodeStatus', +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.pyc b/Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.pyc new file mode 100644 index 0000000..4a16093 Binary files /dev/null and b/Testcases/cfgm_common/uve/cfgm_cpuinfo/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/physical_router/__init__.py b/Testcases/cfgm_common/uve/physical_router/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/physical_router/__init__.pyc b/Testcases/cfgm_common/uve/physical_router/__init__.pyc new file mode 100644 index 0000000..1b6bfe5 Binary files /dev/null and b/Testcases/cfgm_common/uve/physical_router/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/physical_router/constants.py b/Testcases/cfgm_common/uve/physical_router/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/physical_router/constants.pyc b/Testcases/cfgm_common/uve/physical_router/constants.pyc new file mode 100644 index 0000000..aee32ed Binary files /dev/null and b/Testcases/cfgm_common/uve/physical_router/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/physical_router/http_request.py b/Testcases/cfgm_common/uve/physical_router/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/physical_router/http_request.pyc b/Testcases/cfgm_common/uve/physical_router/http_request.pyc new file mode 100644 index 0000000..8f6d434 Binary files /dev/null and b/Testcases/cfgm_common/uve/physical_router/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/physical_router/index.html b/Testcases/cfgm_common/uve/physical_router/index.html new file mode 100644 index 0000000..8e90634 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
physical_router
+ diff --git a/Testcases/cfgm_common/uve/physical_router/physical_router.html b/Testcases/cfgm_common/uve/physical_router/physical_router.html new file mode 100644 index 0000000..9c65e61 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/physical_router.html @@ -0,0 +1,14 @@ + + + + + +Module: physical_router +

Module: physical_router

+ + + +
ModuleSandeshs
physical_router
+

+ diff --git a/Testcases/cfgm_common/uve/physical_router/physical_router.xml b/Testcases/cfgm_common/uve/physical_router/physical_router.xml new file mode 100644 index 0000000..e1befde --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/physical_router.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/physical_router/request_skeleton.py b/Testcases/cfgm_common/uve/physical_router/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/physical_router/request_skeleton.pyc b/Testcases/cfgm_common/uve/physical_router/request_skeleton.pyc new file mode 100644 index 0000000..70674a0 Binary files /dev/null and b/Testcases/cfgm_common/uve/physical_router/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/physical_router/style.css b/Testcases/cfgm_common/uve/physical_router/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/physical_router/ttypes.py b/Testcases/cfgm_common/uve/physical_router/ttypes.py new file mode 100644 index 0000000..2f487ce --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/ttypes.py @@ -0,0 +1,461 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class UvePhysicalRouterConfig(object): + """ + Attributes: + - name + - deleted + - ip_address + - connected_bgp_router + - product_info + - auto_conf_enabled + - netconf_enabled_status + - last_commit_time + - last_commit_duration + - commit_status_message + - total_commits_sent_since_up + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.STRING, 'ip_address', None, None, ), # 3 + (4, TType.STRING, 'connected_bgp_router', None, None, ), # 4 + (5, TType.STRING, 'product_info', None, None, ), # 5 + (6, TType.BOOL, 'auto_conf_enabled', None, None, ), # 6 + (7, TType.BOOL, 'netconf_enabled_status', None, None, ), # 7 + (8, TType.STRING, 'last_commit_time', None, None, ), # 8 + (9, TType.STRING, 'last_commit_duration', None, None, ), # 9 + (10, TType.STRING, 'commit_status_message', None, None, ), # 10 + (11, TType.I32, 'total_commits_sent_since_up', None, None, ), # 11 + ) + + def __init__(self, name=None, deleted=None, ip_address=None, connected_bgp_router=None, product_info=None, auto_conf_enabled=None, netconf_enabled_status=None, last_commit_time=None, last_commit_duration=None, commit_status_message=None, total_commits_sent_since_up=None,): + self.name = name + self.deleted = deleted + self.ip_address = ip_address + self.connected_bgp_router = connected_bgp_router + self.product_info = product_info + self.auto_conf_enabled = auto_conf_enabled + self.netconf_enabled_status = netconf_enabled_status + self.last_commit_time = last_commit_time + self.last_commit_duration = last_commit_duration + self.commit_status_message = commit_status_message + self.total_commits_sent_since_up = total_commits_sent_since_up + self._table = 'ObjectPRouter' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.ip_address) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + (length, self.connected_bgp_router) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + (length, self.product_info) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + (length, self.auto_conf_enabled) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + (length, self.netconf_enabled_status) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + (length, self.last_commit_time) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + (length, self.last_commit_duration) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + (length, self.commit_status_message) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I32: + (length, self.total_commits_sent_since_up) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UvePhysicalRouterConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.ip_address is not None: + annotations = {} + if oprot.writeFieldBegin('ip_address', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.ip_address) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.connected_bgp_router is not None: + annotations = {} + if oprot.writeFieldBegin('connected_bgp_router', TType.STRING, 4, annotations) < 0: return -1 + if oprot.writeString(self.connected_bgp_router) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.product_info is not None: + annotations = {} + if oprot.writeFieldBegin('product_info', TType.STRING, 5, annotations) < 0: return -1 + if oprot.writeString(self.product_info) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.auto_conf_enabled is not None: + annotations = {} + if oprot.writeFieldBegin('auto_conf_enabled', TType.BOOL, 6, annotations) < 0: return -1 + if oprot.writeBool(self.auto_conf_enabled) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.netconf_enabled_status is not None: + annotations = {} + if oprot.writeFieldBegin('netconf_enabled_status', TType.BOOL, 7, annotations) < 0: return -1 + if oprot.writeBool(self.netconf_enabled_status) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.last_commit_time is not None: + annotations = {} + if oprot.writeFieldBegin('last_commit_time', TType.STRING, 8, annotations) < 0: return -1 + if oprot.writeString(self.last_commit_time) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.last_commit_duration is not None: + annotations = {} + if oprot.writeFieldBegin('last_commit_duration', TType.STRING, 9, annotations) < 0: return -1 + if oprot.writeString(self.last_commit_duration) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.commit_status_message is not None: + annotations = {} + if oprot.writeFieldBegin('commit_status_message', TType.STRING, 10, annotations) < 0: return -1 + if oprot.writeString(self.commit_status_message) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.total_commits_sent_since_up is not None: + annotations = {} + if oprot.writeFieldBegin('total_commits_sent_since_up', TType.I32, 11, annotations) < 0: return -1 + if oprot.writeI32(self.total_commits_sent_since_up) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.ip_address is not None: + log_str.write('ip_address = ') + log_str.write(self.ip_address) + log_str.write(' ') + if self.connected_bgp_router is not None: + log_str.write('connected_bgp_router = ') + log_str.write(self.connected_bgp_router) + log_str.write(' ') + if self.product_info is not None: + log_str.write('product_info = ') + log_str.write(self.product_info) + log_str.write(' ') + if self.auto_conf_enabled is not None: + log_str.write('auto_conf_enabled = ') + if self.auto_conf_enabled: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.netconf_enabled_status is not None: + log_str.write('netconf_enabled_status = ') + if self.netconf_enabled_status: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.last_commit_time is not None: + log_str.write('last_commit_time = ') + log_str.write(self.last_commit_time) + log_str.write(' ') + if self.last_commit_duration is not None: + log_str.write('last_commit_duration = ') + log_str.write(self.last_commit_duration) + log_str.write(' ') + if self.commit_status_message is not None: + log_str.write('commit_status_message = ') + log_str.write(self.commit_status_message) + log_str.write(' ') + if self.total_commits_sent_since_up is not None: + log_str.write('total_commits_sent_since_up = ') + log_str.write(str(self.total_commits_sent_since_up)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UvePhysicalRouterConfigTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UvePhysicalRouterConfig, UvePhysicalRouterConfig.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 147236693 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.ip_address is not None: + tdata.ip_address = self.data.ip_address + if self.data.connected_bgp_router is not None: + tdata.connected_bgp_router = self.data.connected_bgp_router + if self.data.product_info is not None: + tdata.product_info = self.data.product_info + if self.data.auto_conf_enabled is not None: + tdata.auto_conf_enabled = self.data.auto_conf_enabled + if self.data.netconf_enabled_status is not None: + tdata.netconf_enabled_status = self.data.netconf_enabled_status + if self.data.last_commit_time is not None: + tdata.last_commit_time = self.data.last_commit_time + if self.data.last_commit_duration is not None: + tdata.last_commit_duration = self.data.last_commit_duration + if self.data.commit_status_message is not None: + tdata.commit_status_message = self.data.commit_status_message + if self.data.total_commits_sent_since_up is not None: + tdata.total_commits_sent_since_up = self.data.total_commits_sent_since_up + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UvePhysicalRouterConfigTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UvePhysicalRouterConfig() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UvePhysicalRouterConfigTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +'UvePhysicalRouterConfigTrace', +] + + +_SANDESH_UVE_DATA_LIST = [ +'UvePhysicalRouterConfig', +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/physical_router/ttypes.pyc b/Testcases/cfgm_common/uve/physical_router/ttypes.pyc new file mode 100644 index 0000000..3b39e02 Binary files /dev/null and b/Testcases/cfgm_common/uve/physical_router/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/service_instance/__init__.py b/Testcases/cfgm_common/uve/service_instance/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/service_instance/__init__.pyc b/Testcases/cfgm_common/uve/service_instance/__init__.pyc new file mode 100644 index 0000000..0841faa Binary files /dev/null and b/Testcases/cfgm_common/uve/service_instance/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/service_instance/constants.py b/Testcases/cfgm_common/uve/service_instance/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/service_instance/constants.pyc b/Testcases/cfgm_common/uve/service_instance/constants.pyc new file mode 100644 index 0000000..e8ee618 Binary files /dev/null and b/Testcases/cfgm_common/uve/service_instance/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/service_instance/http_request.py b/Testcases/cfgm_common/uve/service_instance/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/service_instance/http_request.pyc b/Testcases/cfgm_common/uve/service_instance/http_request.pyc new file mode 100644 index 0000000..c14433a Binary files /dev/null and b/Testcases/cfgm_common/uve/service_instance/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/service_instance/index.html b/Testcases/cfgm_common/uve/service_instance/index.html new file mode 100644 index 0000000..6f164e3 --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
service_instance
+ diff --git a/Testcases/cfgm_common/uve/service_instance/request_skeleton.py b/Testcases/cfgm_common/uve/service_instance/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/service_instance/request_skeleton.pyc b/Testcases/cfgm_common/uve/service_instance/request_skeleton.pyc new file mode 100644 index 0000000..96f839a Binary files /dev/null and b/Testcases/cfgm_common/uve/service_instance/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/service_instance/service_instance.html b/Testcases/cfgm_common/uve/service_instance/service_instance.html new file mode 100644 index 0000000..75ca67b --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/service_instance.html @@ -0,0 +1,14 @@ + + + + + +Module: service_instance +

Module: service_instance

+ + + +
ModuleSandeshs
service_instance
+

+ diff --git a/Testcases/cfgm_common/uve/service_instance/service_instance.xml b/Testcases/cfgm_common/uve/service_instance/service_instance.xml new file mode 100644 index 0000000..4ccfff9 --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/service_instance.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/service_instance/style.css b/Testcases/cfgm_common/uve/service_instance/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/service_instance/ttypes.py b/Testcases/cfgm_common/uve/service_instance/ttypes.py new file mode 100644 index 0000000..c8cb3a4 --- /dev/null +++ b/Testcases/cfgm_common/uve/service_instance/ttypes.py @@ -0,0 +1,484 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class UveSvcInstanceVMConfig(object): + """ + Attributes: + - uuid + - vr_name + - ha + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'uuid', None, None, ), # 1 + (2, TType.STRING, 'vr_name', None, None, ), # 2 + (3, TType.STRING, 'ha', None, None, ), # 3 + ) + + def __init__(self, uuid=None, vr_name=None, ha=None,): + self.uuid = uuid + self.vr_name = vr_name + self.ha = ha + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.uuid) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.vr_name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.ha) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveSvcInstanceVMConfig') < 0: return -1 + if self.uuid is not None: + annotations = {} + if oprot.writeFieldBegin('uuid', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.uuid) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.vr_name is not None: + annotations = {} + if oprot.writeFieldBegin('vr_name', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.vr_name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.ha is not None: + annotations = {} + if oprot.writeFieldBegin('ha', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.ha) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.uuid is not None: + log_str.write('uuid = ') + log_str.write(self.uuid) + log_str.write(' ') + if self.vr_name is not None: + log_str.write('vr_name = ') + log_str.write(self.vr_name) + log_str.write(' ') + if self.ha is not None: + log_str.write('ha = ') + log_str.write(self.ha) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveSvcInstanceConfig(object): + """ + Attributes: + - name + - deleted + - st_name + - status + - create_ts + - vm_list + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.STRING, 'st_name', None, None, ), # 3 + (4, TType.STRING, 'status', None, None, ), # 4 + (5, TType.I64, 'create_ts', None, None, ), # 5 + (6, TType.LIST, 'vm_list', (TType.STRUCT,(UveSvcInstanceVMConfig, UveSvcInstanceVMConfig.thrift_spec)), None, ), # 6 + ) + + def __init__(self, name=None, deleted=None, st_name=None, status=None, create_ts=None, vm_list=None,): + self.name = name + self.deleted = deleted + self.st_name = st_name + self.status = status + self.create_ts = create_ts + self.vm_list = vm_list + self._table = 'ObjectSITable' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.st_name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + (length, self.status) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + (length, self.create_ts) = iprot.readI64(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.vm_list = [] + (length, _etype3, _size0) = iprot.readListBegin() + read_cnt += length + for _i4 in xrange(_size0): + _elem5 = UveSvcInstanceVMConfig() + read_cnt += _elem5.read(iprot) + self.vm_list.append(_elem5) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveSvcInstanceConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.st_name is not None: + annotations = {} + if oprot.writeFieldBegin('st_name', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.st_name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.status is not None: + annotations = {} + if oprot.writeFieldBegin('status', TType.STRING, 4, annotations) < 0: return -1 + if oprot.writeString(self.status) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.create_ts is not None: + annotations = {} + if oprot.writeFieldBegin('create_ts', TType.I64, 5, annotations) < 0: return -1 + if oprot.writeI64(self.create_ts) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.vm_list is not None: + annotations = {} + if oprot.writeFieldBegin('vm_list', TType.LIST, 6, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.vm_list)) < 0: return -1 + for iter6 in self.vm_list: + if iter6.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.st_name is not None: + log_str.write('st_name = ') + log_str.write(self.st_name) + log_str.write(' ') + if self.status is not None: + log_str.write('status = ') + log_str.write(self.status) + log_str.write(' ') + if self.create_ts is not None: + log_str.write('create_ts = ') + log_str.write(str(self.create_ts)) + log_str.write(' ') + if self.vm_list is not None: + log_str.write('vm_list = ') + log_str.write('[ ') + for iter7 in self.vm_list: + log_str.write('<< ') + log_str.write(iter7.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveSvcInstanceConfigTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UveSvcInstanceConfig, UveSvcInstanceConfig.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 1572544528 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.st_name is not None: + tdata.st_name = self.data.st_name + if self.data.status is not None: + tdata.status = self.data.status + if self.data.create_ts is not None: + tdata.create_ts = self.data.create_ts + if self.data.vm_list is not None: + tdata.vm_list = self.data.vm_list + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UveSvcInstanceConfigTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UveSvcInstanceConfig() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UveSvcInstanceConfigTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +'UveSvcInstanceConfigTrace', +] + + +_SANDESH_UVE_DATA_LIST = [ +'UveSvcInstanceConfig', +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/service_instance/ttypes.pyc b/Testcases/cfgm_common/uve/service_instance/ttypes.pyc new file mode 100644 index 0000000..d0f3ce4 Binary files /dev/null and b/Testcases/cfgm_common/uve/service_instance/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_machine/__init__.py b/Testcases/cfgm_common/uve/virtual_machine/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/virtual_machine/__init__.pyc b/Testcases/cfgm_common/uve/virtual_machine/__init__.pyc new file mode 100644 index 0000000..9037b16 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_machine/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_machine/constants.py b/Testcases/cfgm_common/uve/virtual_machine/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/virtual_machine/constants.pyc b/Testcases/cfgm_common/uve/virtual_machine/constants.pyc new file mode 100644 index 0000000..5b0397a Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_machine/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_machine/http_request.py b/Testcases/cfgm_common/uve/virtual_machine/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/virtual_machine/http_request.pyc b/Testcases/cfgm_common/uve/virtual_machine/http_request.pyc new file mode 100644 index 0000000..ba5b9e6 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_machine/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_machine/index.html b/Testcases/cfgm_common/uve/virtual_machine/index.html new file mode 100644 index 0000000..656351f --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
virtual_machine
+ diff --git a/Testcases/cfgm_common/uve/virtual_machine/request_skeleton.py b/Testcases/cfgm_common/uve/virtual_machine/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/virtual_machine/request_skeleton.pyc b/Testcases/cfgm_common/uve/virtual_machine/request_skeleton.pyc new file mode 100644 index 0000000..7a0ffff Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_machine/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_machine/style.css b/Testcases/cfgm_common/uve/virtual_machine/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/virtual_machine/ttypes.py b/Testcases/cfgm_common/uve/virtual_machine/ttypes.py new file mode 100644 index 0000000..d2a95f0 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/ttypes.py @@ -0,0 +1,517 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class VmInterfaceConfig(object): + """ + Attributes: + - name + - ip_address + - virtual_network + - floating_ips + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'ip_address', None, None, ), # 2 + (3, TType.STRING, 'virtual_network', None, None, ), # 3 + (4, TType.LIST, 'floating_ips', (TType.STRING,None), None, ), # 4 + ) + + def __init__(self, name=None, ip_address=None, virtual_network=None, floating_ips=None,): + self.name = name + self.ip_address = ip_address + self.virtual_network = virtual_network + self.floating_ips = floating_ips + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.ip_address) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.virtual_network) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.floating_ips = [] + (length, _etype3, _size0) = iprot.readListBegin() + read_cnt += length + for _i4 in xrange(_size0): + read_cnt += iprot.readContainerElementBegin() + (length, _elem5) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.floating_ips.append(_elem5) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('VmInterfaceConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.ip_address is not None: + annotations = {} + if oprot.writeFieldBegin('ip_address', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.ip_address) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.virtual_network is not None: + annotations = {} + annotations['aggtype'] = 'listkey' + if oprot.writeFieldBegin('virtual_network', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.virtual_network) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.floating_ips is not None: + annotations = {} + if oprot.writeFieldBegin('floating_ips', TType.LIST, 4, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.floating_ips)) < 0: return -1 + for iter6 in self.floating_ips: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter6) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.ip_address is not None: + log_str.write('ip_address = ') + log_str.write(self.ip_address) + log_str.write(' ') + if self.virtual_network is not None: + log_str.write('virtual_network = ') + log_str.write(self.virtual_network) + log_str.write(' ') + if self.floating_ips is not None: + log_str.write('floating_ips = ') + log_str.write('[ ') + for iter7 in self.floating_ips: + log_str.write(iter7) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveVirtualMachineConfig(object): + """ + Attributes: + - name + - deleted + - attached_groups + - interface_list + - vrouter + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.LIST, 'attached_groups', (TType.STRING,None), None, ), # 3 + (4, TType.LIST, 'interface_list', (TType.STRUCT,(VmInterfaceConfig, VmInterfaceConfig.thrift_spec)), None, ), # 4 + (5, TType.STRING, 'vrouter', None, None, ), # 5 + ) + + def __init__(self, name=None, deleted=None, attached_groups=None, interface_list=None, vrouter=None,): + self.name = name + self.deleted = deleted + self.attached_groups = attached_groups + self.interface_list = interface_list + self.vrouter = vrouter + self._table = 'ObjectVMTable' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.attached_groups = [] + (length, _etype11, _size8) = iprot.readListBegin() + read_cnt += length + for _i12 in xrange(_size8): + read_cnt += iprot.readContainerElementBegin() + (length, _elem13) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.attached_groups.append(_elem13) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.interface_list = [] + (length, _etype17, _size14) = iprot.readListBegin() + read_cnt += length + for _i18 in xrange(_size14): + _elem19 = VmInterfaceConfig() + read_cnt += _elem19.read(iprot) + self.interface_list.append(_elem19) + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + (length, self.vrouter) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveVirtualMachineConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.attached_groups is not None: + annotations = {} + if oprot.writeFieldBegin('attached_groups', TType.LIST, 3, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.attached_groups)) < 0: return -1 + for iter20 in self.attached_groups: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter20) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.interface_list is not None: + annotations = {} + if oprot.writeFieldBegin('interface_list', TType.LIST, 4, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRUCT, len(self.interface_list)) < 0: return -1 + for iter21 in self.interface_list: + if iter21.write(oprot) < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.vrouter is not None: + annotations = {} + if oprot.writeFieldBegin('vrouter', TType.STRING, 5, annotations) < 0: return -1 + if oprot.writeString(self.vrouter) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.attached_groups is not None: + log_str.write('attached_groups = ') + log_str.write('[ ') + for iter22 in self.attached_groups: + log_str.write(iter22) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.interface_list is not None: + log_str.write('interface_list = ') + log_str.write('[ ') + for iter23 in self.interface_list: + log_str.write('<< ') + log_str.write(iter23.log()) + log_str.write('>>') + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.vrouter is not None: + log_str.write('vrouter = ') + log_str.write(self.vrouter) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveVirtualMachineConfigTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UveVirtualMachineConfig, UveVirtualMachineConfig.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 4221818251 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.attached_groups is not None: + tdata.attached_groups = self.data.attached_groups + if self.data.interface_list is not None: + tdata.interface_list = self.data.interface_list + if self.data.vrouter is not None: + tdata.vrouter = self.data.vrouter + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UveVirtualMachineConfigTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UveVirtualMachineConfig() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UveVirtualMachineConfigTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +'UveVirtualMachineConfigTrace', +] + + +_SANDESH_UVE_DATA_LIST = [ +'UveVirtualMachineConfig', +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/virtual_machine/ttypes.pyc b/Testcases/cfgm_common/uve/virtual_machine/ttypes.pyc new file mode 100644 index 0000000..44085c2 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_machine/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_machine/virtual_machine.html b/Testcases/cfgm_common/uve/virtual_machine/virtual_machine.html new file mode 100644 index 0000000..ab3f29d --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/virtual_machine.html @@ -0,0 +1,14 @@ + + + + + +Module: virtual_machine +

Module: virtual_machine

+ + + +
ModuleSandeshs
virtual_machine
+

+ diff --git a/Testcases/cfgm_common/uve/virtual_machine/virtual_machine.xml b/Testcases/cfgm_common/uve/virtual_machine/virtual_machine.xml new file mode 100644 index 0000000..72fb587 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_machine/virtual_machine.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/virtual_network/__init__.py b/Testcases/cfgm_common/uve/virtual_network/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/virtual_network/__init__.pyc b/Testcases/cfgm_common/uve/virtual_network/__init__.pyc new file mode 100644 index 0000000..5e20ef0 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_network/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_network/constants.py b/Testcases/cfgm_common/uve/virtual_network/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/virtual_network/constants.pyc b/Testcases/cfgm_common/uve/virtual_network/constants.pyc new file mode 100644 index 0000000..13aede5 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_network/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_network/http_request.py b/Testcases/cfgm_common/uve/virtual_network/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/virtual_network/http_request.pyc b/Testcases/cfgm_common/uve/virtual_network/http_request.pyc new file mode 100644 index 0000000..cebf344 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_network/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_network/index.html b/Testcases/cfgm_common/uve/virtual_network/index.html new file mode 100644 index 0000000..0884ed5 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
virtual_network
+ diff --git a/Testcases/cfgm_common/uve/virtual_network/request_skeleton.py b/Testcases/cfgm_common/uve/virtual_network/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/virtual_network/request_skeleton.pyc b/Testcases/cfgm_common/uve/virtual_network/request_skeleton.pyc new file mode 100644 index 0000000..438188b Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_network/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_network/style.css b/Testcases/cfgm_common/uve/virtual_network/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/virtual_network/ttypes.py b/Testcases/cfgm_common/uve/virtual_network/ttypes.py new file mode 100644 index 0000000..b58ac6e --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/ttypes.py @@ -0,0 +1,787 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class UveVirtualNetworkConfig(object): + """ + Attributes: + - name + - deleted + - connected_networks + - partially_connected_networks + - routing_instance_list + - total_acl_rules + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + None, # 3 + (4, TType.LIST, 'connected_networks', (TType.STRING,None), None, ), # 4 + (5, TType.LIST, 'partially_connected_networks', (TType.STRING,None), None, ), # 5 + (6, TType.LIST, 'routing_instance_list', (TType.STRING,None), None, ), # 6 + (7, TType.I32, 'total_acl_rules', None, None, ), # 7 + ) + + def __init__(self, name=None, deleted=None, connected_networks=None, partially_connected_networks=None, routing_instance_list=None, total_acl_rules=None,): + self.name = name + self.deleted = deleted + self.connected_networks = connected_networks + self.partially_connected_networks = partially_connected_networks + self.routing_instance_list = routing_instance_list + self.total_acl_rules = total_acl_rules + self._table = 'ObjectVNTable' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.connected_networks = [] + (length, _etype3, _size0) = iprot.readListBegin() + read_cnt += length + for _i4 in xrange(_size0): + read_cnt += iprot.readContainerElementBegin() + (length, _elem5) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.connected_networks.append(_elem5) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.partially_connected_networks = [] + (length, _etype9, _size6) = iprot.readListBegin() + read_cnt += length + for _i10 in xrange(_size6): + read_cnt += iprot.readContainerElementBegin() + (length, _elem11) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.partially_connected_networks.append(_elem11) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.routing_instance_list = [] + (length, _etype15, _size12) = iprot.readListBegin() + read_cnt += length + for _i16 in xrange(_size12): + read_cnt += iprot.readContainerElementBegin() + (length, _elem17) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.routing_instance_list.append(_elem17) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + (length, self.total_acl_rules) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveVirtualNetworkConfig') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.connected_networks is not None: + annotations = {} + annotations['aggtype'] = 'union' + if oprot.writeFieldBegin('connected_networks', TType.LIST, 4, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.connected_networks)) < 0: return -1 + for iter18 in self.connected_networks: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter18) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.partially_connected_networks is not None: + annotations = {} + annotations['aggtype'] = 'union' + if oprot.writeFieldBegin('partially_connected_networks', TType.LIST, 5, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.partially_connected_networks)) < 0: return -1 + for iter19 in self.partially_connected_networks: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter19) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.routing_instance_list is not None: + annotations = {} + annotations['aggtype'] = 'union' + if oprot.writeFieldBegin('routing_instance_list', TType.LIST, 6, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.routing_instance_list)) < 0: return -1 + for iter20 in self.routing_instance_list: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter20) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.total_acl_rules is not None: + annotations = {} + if oprot.writeFieldBegin('total_acl_rules', TType.I32, 7, annotations) < 0: return -1 + if oprot.writeI32(self.total_acl_rules) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.connected_networks is not None: + log_str.write('connected_networks = ') + log_str.write('[ ') + for iter21 in self.connected_networks: + log_str.write(iter21) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.partially_connected_networks is not None: + log_str.write('partially_connected_networks = ') + log_str.write('[ ') + for iter22 in self.partially_connected_networks: + log_str.write(iter22) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.routing_instance_list is not None: + log_str.write('routing_instance_list = ') + log_str.write('[ ') + for iter23 in self.routing_instance_list: + log_str.write(iter23) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + if self.total_acl_rules is not None: + log_str.write('total_acl_rules = ') + log_str.write(str(self.total_acl_rules)) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveServiceChainData(object): + """ + Attributes: + - name + - deleted + - source_virtual_network + - destination_virtual_network + - source_ports + - destination_ports + - protocol + - direction + - services + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleted', None, None, ), # 2 + (3, TType.STRING, 'source_virtual_network', None, None, ), # 3 + (4, TType.STRING, 'destination_virtual_network', None, None, ), # 4 + (5, TType.STRING, 'source_ports', None, None, ), # 5 + (6, TType.STRING, 'destination_ports', None, None, ), # 6 + (7, TType.STRING, 'protocol', None, None, ), # 7 + (8, TType.STRING, 'direction', None, None, ), # 8 + (9, TType.LIST, 'services', (TType.STRING,None), None, ), # 9 + ) + + def __init__(self, name=None, deleted=None, source_virtual_network=None, destination_virtual_network=None, source_ports=None, destination_ports=None, protocol=None, direction=None, services=None,): + self.name = name + self.deleted = deleted + self.source_virtual_network = source_virtual_network + self.destination_virtual_network = destination_virtual_network + self.source_ports = source_ports + self.destination_ports = destination_ports + self.protocol = protocol + self.direction = direction + self.services = services + self._table = 'ServiceChain' + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + (length, self.deleted) = iprot.readBool(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.source_virtual_network) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + (length, self.destination_virtual_network) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + (length, self.source_ports) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + (length, self.destination_ports) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + (length, self.protocol) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + (length, self.direction) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.services = [] + (length, _etype27, _size24) = iprot.readListBegin() + read_cnt += length + for _i28 in xrange(_size24): + read_cnt += iprot.readContainerElementBegin() + (length, _elem29) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + self.services.append(_elem29) + read_cnt += iprot.readContainerElementEnd() + read_cnt += iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('UveServiceChainData') < 0: return -1 + if self.name is not None: + annotations = {} + if self._table is None or self._table is '': return -1 + annotations['key'] = self._table + if oprot.writeFieldBegin('name', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.deleted is not None: + annotations = {} + if oprot.writeFieldBegin('deleted', TType.BOOL, 2, annotations) < 0: return -1 + if oprot.writeBool(self.deleted) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.source_virtual_network is not None: + annotations = {} + if oprot.writeFieldBegin('source_virtual_network', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.source_virtual_network) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.destination_virtual_network is not None: + annotations = {} + if oprot.writeFieldBegin('destination_virtual_network', TType.STRING, 4, annotations) < 0: return -1 + if oprot.writeString(self.destination_virtual_network) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.source_ports is not None: + annotations = {} + if oprot.writeFieldBegin('source_ports', TType.STRING, 5, annotations) < 0: return -1 + if oprot.writeString(self.source_ports) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.destination_ports is not None: + annotations = {} + if oprot.writeFieldBegin('destination_ports', TType.STRING, 6, annotations) < 0: return -1 + if oprot.writeString(self.destination_ports) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.protocol is not None: + annotations = {} + if oprot.writeFieldBegin('protocol', TType.STRING, 7, annotations) < 0: return -1 + if oprot.writeString(self.protocol) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.direction is not None: + annotations = {} + if oprot.writeFieldBegin('direction', TType.STRING, 8, annotations) < 0: return -1 + if oprot.writeString(self.direction) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.services is not None: + annotations = {} + if oprot.writeFieldBegin('services', TType.LIST, 9, annotations) < 0: return -1 + if oprot.writeListBegin(TType.STRING, len(self.services)) < 0: return -1 + for iter30 in self.services: + if oprot.writeContainerElementBegin() < 0: return -1 + if oprot.writeString(iter30) < 0: return -1 + if oprot.writeContainerElementEnd() < 0: return -1 + if oprot.writeListEnd() < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.name is not None: + log_str.write('name = ') + log_str.write(self.name) + log_str.write(' ') + if self.deleted is not None: + log_str.write('deleted = ') + if self.deleted: + log_str.write('True') + else: + log_str.write('False') + log_str.write(' ') + if self.source_virtual_network is not None: + log_str.write('source_virtual_network = ') + log_str.write(self.source_virtual_network) + log_str.write(' ') + if self.destination_virtual_network is not None: + log_str.write('destination_virtual_network = ') + log_str.write(self.destination_virtual_network) + log_str.write(' ') + if self.source_ports is not None: + log_str.write('source_ports = ') + log_str.write(self.source_ports) + log_str.write(' ') + if self.destination_ports is not None: + log_str.write('destination_ports = ') + log_str.write(self.destination_ports) + log_str.write(' ') + if self.protocol is not None: + log_str.write('protocol = ') + log_str.write(self.protocol) + log_str.write(' ') + if self.direction is not None: + log_str.write('direction = ') + log_str.write(self.direction) + log_str.write(' ') + if self.services is not None: + log_str.write('services = ') + log_str.write('[ ') + for iter31 in self.services: + log_str.write(iter31) + log_str.write(', ') + log_str.write(' ]') + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveVirtualNetworkConfigTrace(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UveVirtualNetworkConfig, UveVirtualNetworkConfig.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 74672981 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.connected_networks is not None: + tdata.connected_networks = self.data.connected_networks + if self.data.partially_connected_networks is not None: + tdata.partially_connected_networks = self.data.partially_connected_networks + if self.data.routing_instance_list is not None: + tdata.routing_instance_list = self.data.routing_instance_list + if self.data.total_acl_rules is not None: + tdata.total_acl_rules = self.data.total_acl_rules + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UveVirtualNetworkConfigTrace: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UveVirtualNetworkConfig() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UveVirtualNetworkConfigTrace') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UveServiceChain(sandesh_base.SandeshUVE): + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UveServiceChainData, UveServiceChainData.thrift_spec), None, ), # 1 + ) + + def __init__(self, data=None, table=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshUVE.__init__(self) + self.data = data + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 2360766836 + self._hints = 0 | SANDESH_KEY_HINT + if table is not None: + self.data._table = table + + def update_uve(self, tdata): + if self.data.name is not None: + tdata.name = self.data.name + if self.data.deleted is not None: + tdata.deleted = self.data.deleted + if self.data.source_virtual_network is not None: + tdata.source_virtual_network = self.data.source_virtual_network + if self.data.destination_virtual_network is not None: + tdata.destination_virtual_network = self.data.destination_virtual_network + if self.data.source_ports is not None: + tdata.source_ports = self.data.source_ports + if self.data.destination_ports is not None: + tdata.destination_ports = self.data.destination_ports + if self.data.protocol is not None: + tdata.protocol = self.data.protocol + if self.data.direction is not None: + tdata.direction = self.data.direction + if self.data.services is not None: + tdata.services = self.data.services + return tdata + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('UveServiceChain: ') + if self.data is not None: + log_str.write('data = ') + log_str.write('<< ') + log_str.write(self.data.log()) + log_str.write('>>') + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.data = UveServiceChainData() + read_cnt += self.data.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('UveServiceChain') < 0: return -1 + if self.data is not None: + annotations = {} + if oprot.writeFieldBegin('data', TType.STRUCT, 1, annotations) < 0: return -1 + if self.data.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.data != other.data: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +'UveVirtualNetworkConfigTrace', +'UveServiceChain', +] + + +_SANDESH_UVE_DATA_LIST = [ +'UveVirtualNetworkConfig', +'UveServiceChainData', +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/virtual_network/ttypes.pyc b/Testcases/cfgm_common/uve/virtual_network/ttypes.pyc new file mode 100644 index 0000000..2888df8 Binary files /dev/null and b/Testcases/cfgm_common/uve/virtual_network/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/virtual_network/virtual_network.html b/Testcases/cfgm_common/uve/virtual_network/virtual_network.html new file mode 100644 index 0000000..270901f --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/virtual_network.html @@ -0,0 +1,14 @@ + + + + + +Module: virtual_network +

Module: virtual_network

+ + + +
ModuleSandeshs
virtual_network
+

+ diff --git a/Testcases/cfgm_common/uve/virtual_network/virtual_network.xml b/Testcases/cfgm_common/uve/virtual_network/virtual_network.xml new file mode 100644 index 0000000..7089d62 --- /dev/null +++ b/Testcases/cfgm_common/uve/virtual_network/virtual_network.xml @@ -0,0 +1,3 @@ + + + diff --git a/Testcases/cfgm_common/uve/vnc_api/__init__.py b/Testcases/cfgm_common/uve/vnc_api/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git a/Testcases/cfgm_common/uve/vnc_api/__init__.pyc b/Testcases/cfgm_common/uve/vnc_api/__init__.pyc new file mode 100644 index 0000000..0ac091c Binary files /dev/null and b/Testcases/cfgm_common/uve/vnc_api/__init__.pyc differ diff --git a/Testcases/cfgm_common/uve/vnc_api/constants.py b/Testcases/cfgm_common/uve/vnc_api/constants.py new file mode 100644 index 0000000..aadd78e --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/constants.py @@ -0,0 +1,12 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git a/Testcases/cfgm_common/uve/vnc_api/constants.pyc b/Testcases/cfgm_common/uve/vnc_api/constants.pyc new file mode 100644 index 0000000..efe1f9b Binary files /dev/null and b/Testcases/cfgm_common/uve/vnc_api/constants.pyc differ diff --git a/Testcases/cfgm_common/uve/vnc_api/http_request.py b/Testcases/cfgm_common/uve/vnc_api/http_request.py new file mode 100644 index 0000000..8baea4f --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/http_request.py @@ -0,0 +1,14 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +import ttypes + +_HTTP_REQUEST_LIST = [ +] + diff --git a/Testcases/cfgm_common/uve/vnc_api/http_request.pyc b/Testcases/cfgm_common/uve/vnc_api/http_request.pyc new file mode 100644 index 0000000..2f6880e Binary files /dev/null and b/Testcases/cfgm_common/uve/vnc_api/http_request.pyc differ diff --git a/Testcases/cfgm_common/uve/vnc_api/index.html b/Testcases/cfgm_common/uve/vnc_api/index.html new file mode 100644 index 0000000..bb522d0 --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/index.html @@ -0,0 +1,9 @@ + + +All Thrift declarations +

All Thrift declarations

+ + + +
ModuleServicesSandeshsData typesConstants
vnc_api
+ diff --git a/Testcases/cfgm_common/uve/vnc_api/request_skeleton.py b/Testcases/cfgm_common/uve/vnc_api/request_skeleton.py new file mode 100644 index 0000000..99c1196 --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/request_skeleton.py @@ -0,0 +1,13 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + + +# This autogenerated skeleton file illustrates the implementation of +# derived class to handle the sandesh request. + diff --git a/Testcases/cfgm_common/uve/vnc_api/request_skeleton.pyc b/Testcases/cfgm_common/uve/vnc_api/request_skeleton.pyc new file mode 100644 index 0000000..0e855d5 Binary files /dev/null and b/Testcases/cfgm_common/uve/vnc_api/request_skeleton.pyc differ diff --git a/Testcases/cfgm_common/uve/vnc_api/style.css b/Testcases/cfgm_common/uve/vnc_api/style.css new file mode 100644 index 0000000..6dc2f22 --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/style.css @@ -0,0 +1,10 @@ +/* Auto-generated CSS for generated Thrift docs */ +body { font-family: Tahoma, sans-serif; } +pre { background-color: #dddddd; padding: 6px; } +h3,h4 { padding-top: 0px; margin-top: 0px; } +div.definition { border: 1px solid gray; margin: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +table { border: 1px solid grey; border-collapse: collapse; } +td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; } +th { border: 1px solid black; background-color: #bbbbbb; + text-align: left; padding: 1px 6px; } diff --git a/Testcases/cfgm_common/uve/vnc_api/ttypes.py b/Testcases/cfgm_common/uve/vnc_api/ttypes.py new file mode 100644 index 0000000..4a38dd2 --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/ttypes.py @@ -0,0 +1,778 @@ +# +# Autogenerated by Sandesh Compiler (1.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py:new_style +# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. +# + +from pysandesh.Thrift import TType, TMessageType, TException + +from pysandesh.transport import TTransport +from pysandesh.protocol import TBinaryProtocol, TProtocol +try: + from pysandesh.protocol import fastbinary +except: + fastbinary = None + +import cStringIO +import uuid +import bottle +from pysandesh import sandesh_base +from pysandesh.sandesh_http import SandeshHttp +from pysandesh.sandesh_uve import SandeshUVETypeMaps +from pysandesh.util import UTCTimestampUsec, UTCTimestampUsecToString +from pysandesh.gen_py.sandesh.constants import * + + + +class VncApiCommon(object): + """ + Attributes: + - identifier_uuid + - object_type + - identifier_name + - url + - operation + - useragent + - remote_ip + - params + - body + - domain + - project + - user + - error + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'identifier_uuid', None, None, ), # 1 + (2, TType.STRING, 'object_type', None, None, ), # 2 + (3, TType.STRING, 'identifier_name', None, None, ), # 3 + (4, TType.STRING, 'url', None, None, ), # 4 + (5, TType.STRING, 'operation', None, None, ), # 5 + (6, TType.STRING, 'useragent', None, None, ), # 6 + (7, TType.STRING, 'remote_ip', None, None, ), # 7 + (8, TType.STRING, 'params', None, None, ), # 8 + (9, TType.STRING, 'body', None, None, ), # 9 + (10, TType.STRING, 'domain', None, None, ), # 10 + (11, TType.STRING, 'project', None, None, ), # 11 + (12, TType.STRING, 'user', None, None, ), # 12 + (13, TType.STRING, 'error', None, None, ), # 13 + ) + + def __init__(self, identifier_uuid=None, object_type=None, identifier_name=None, url=None, operation=None, useragent=None, remote_ip=None, params=None, body=None, domain=None, project=None, user=None, error=None,): + self.identifier_uuid = identifier_uuid + self.object_type = object_type + self.identifier_name = identifier_name + self.url = url + self.operation = operation + self.useragent = useragent + self.remote_ip = remote_ip + self.params = params + self.body = body + self.domain = domain + self.project = project + self.user = user + self.error = error + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return 0 + read_cnt = 0 + length = iprot.readStructBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.identifier_uuid) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + (length, self.object_type) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + (length, self.identifier_name) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + (length, self.url) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + (length, self.operation) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + (length, self.useragent) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + (length, self.remote_ip) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + (length, self.params) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + (length, self.body) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + (length, self.domain) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + (length, self.project) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + (length, self.user) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + (length, self.error) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readStructEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeStructBegin('VncApiCommon') < 0: return -1 + if self.identifier_uuid is not None: + annotations = {} + if oprot.writeFieldBegin('identifier_uuid', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.identifier_uuid) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.object_type is not None: + annotations = {} + annotations['key'] = 'ConfigObjectTable' + if oprot.writeFieldBegin('object_type', TType.STRING, 2, annotations) < 0: return -1 + if oprot.writeString(self.object_type) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.identifier_name is not None: + annotations = {} + annotations['key'] = 'ConfigObjectTable' + if oprot.writeFieldBegin('identifier_name', TType.STRING, 3, annotations) < 0: return -1 + if oprot.writeString(self.identifier_name) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.url is not None: + annotations = {} + if oprot.writeFieldBegin('url', TType.STRING, 4, annotations) < 0: return -1 + if oprot.writeString(self.url) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.operation is not None: + annotations = {} + if oprot.writeFieldBegin('operation', TType.STRING, 5, annotations) < 0: return -1 + if oprot.writeString(self.operation) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.useragent is not None: + annotations = {} + if oprot.writeFieldBegin('useragent', TType.STRING, 6, annotations) < 0: return -1 + if oprot.writeString(self.useragent) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.remote_ip is not None: + annotations = {} + if oprot.writeFieldBegin('remote_ip', TType.STRING, 7, annotations) < 0: return -1 + if oprot.writeString(self.remote_ip) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.params is not None: + annotations = {} + if oprot.writeFieldBegin('params', TType.STRING, 8, annotations) < 0: return -1 + if oprot.writeString(self.params) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.body is not None: + annotations = {} + if oprot.writeFieldBegin('body', TType.STRING, 9, annotations) < 0: return -1 + if oprot.writeString(self.body) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.domain is not None: + annotations = {} + annotations['key'] = 'ConfigObjectTableByUser' + if oprot.writeFieldBegin('domain', TType.STRING, 10, annotations) < 0: return -1 + if oprot.writeString(self.domain) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.project is not None: + annotations = {} + annotations['key'] = 'ConfigObjectTableByUser' + if oprot.writeFieldBegin('project', TType.STRING, 11, annotations) < 0: return -1 + if oprot.writeString(self.project) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.user is not None: + annotations = {} + annotations['key'] = 'ConfigObjectTableByUser' + if oprot.writeFieldBegin('user', TType.STRING, 12, annotations) < 0: return -1 + if oprot.writeString(self.user) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.error is not None: + annotations = {} + if oprot.writeFieldBegin('error', TType.STRING, 13, annotations) < 0: return -1 + if oprot.writeString(self.error) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeStructEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def log(self): + log_str = cStringIO.StringIO() + if self.identifier_uuid is not None: + log_str.write('identifier_uuid = ') + log_str.write(self.identifier_uuid) + log_str.write(' ') + if self.object_type is not None: + log_str.write('object_type = ') + log_str.write(self.object_type) + log_str.write(' ') + if self.identifier_name is not None: + log_str.write('identifier_name = ') + log_str.write(self.identifier_name) + log_str.write(' ') + if self.url is not None: + log_str.write('url = ') + log_str.write(self.url) + log_str.write(' ') + if self.operation is not None: + log_str.write('operation = ') + log_str.write(self.operation) + log_str.write(' ') + if self.useragent is not None: + log_str.write('useragent = ') + log_str.write(self.useragent) + log_str.write(' ') + if self.remote_ip is not None: + log_str.write('remote_ip = ') + log_str.write(self.remote_ip) + log_str.write(' ') + if self.params is not None: + log_str.write('params = ') + log_str.write(self.params) + log_str.write(' ') + if self.body is not None: + log_str.write('body = ') + log_str.write(self.body) + log_str.write(' ') + if self.domain is not None: + log_str.write('domain = ') + log_str.write(self.domain) + log_str.write(' ') + if self.project is not None: + log_str.write('project = ') + log_str.write(self.project) + log_str.write(' ') + if self.user is not None: + log_str.write('user = ') + log_str.write(self.user) + log_str.write(' ') + if self.error is not None: + log_str.write('error = ') + log_str.write(self.error) + log_str.write(' ') + return log_str.getvalue() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class VncApiReadLog(sandesh_base.SandeshTrace): + + thrift_spec = None + + def __init__(self, api_log=None, file=None, line=None, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshTrace.__init__(self, type=SandeshType.TRACE_OBJECT) + self.api_log = api_log + self.file = file + self.line = line + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 103727244 + self._hints = 0 | SANDESH_KEY_HINT + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + log_str.write('VncApiReadLog: ') + if self.api_log is not None: + log_str.write('api_log = ') + log_str.write('<< ') + log_str.write(self.api_log.log()) + log_str.write('>>') + log_str.write(' ') + if self.file is not None: + log_str.write('file = ') + log_str.write(self.file) + log_str.write(' ') + if self.line is not None: + log_str.write('line = ') + log_str.write(str(self.line)) + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.api_log = VncApiCommon() + read_cnt += self.api_log.read(iprot) + else: + iprot.skip(ftype) + elif fid == -32768: + if ftype == TType.STRING: + (length, self.file) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == -32767: + if ftype == TType.I32: + (length, self.line) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('VncApiReadLog') < 0: return -1 + if self.file is not None: + annotations = {} + if oprot.writeFieldBegin('file', TType.STRING, -32768, annotations) < 0: return -1 + if oprot.writeString(self.file) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.line is not None: + annotations = {} + if oprot.writeFieldBegin('line', TType.I32, -32767, annotations) < 0: return -1 + if oprot.writeI32(self.line) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.api_log is not None: + annotations = {} + if oprot.writeFieldBegin('api_log', TType.STRUCT, 1, annotations) < 0: return -1 + if self.api_log.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.file != other.file: + return False + if self.line != other.line: + return False + if self.api_log != other.api_log: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class VncApiConfigLog(sandesh_base.SandeshObject): + + thrift_spec = None + + def __init__(self, api_log=None, file=None, line=None, category='__default__', level=SandeshLevel.SYS_INFO, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshObject.__init__(self) + self.api_log = api_log + self.file = file + self.line = line + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 103727244 + self._hints = 0 | SANDESH_KEY_HINT + self._category = category + self._level = level + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + if self._category is not None: + log_str.write(self._category) + log_str.write(' [') + log_str.write(SandeshLevel._VALUES_TO_NAMES[self._level]) + log_str.write(']: ') + log_str.write('VncApiConfigLog: ') + if self.api_log is not None: + log_str.write('api_log = ') + log_str.write('<< ') + log_str.write(self.api_log.log()) + log_str.write('>>') + log_str.write(' ') + if self.file is not None: + log_str.write('file = ') + log_str.write(self.file) + log_str.write(' ') + if self.line is not None: + log_str.write('line = ') + log_str.write(str(self.line)) + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.api_log = VncApiCommon() + read_cnt += self.api_log.read(iprot) + else: + iprot.skip(ftype) + elif fid == -32768: + if ftype == TType.STRING: + (length, self.file) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == -32767: + if ftype == TType.I32: + (length, self.line) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('VncApiConfigLog') < 0: return -1 + if self.file is not None: + annotations = {} + if oprot.writeFieldBegin('file', TType.STRING, -32768, annotations) < 0: return -1 + if oprot.writeString(self.file) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.line is not None: + annotations = {} + if oprot.writeFieldBegin('line', TType.I32, -32767, annotations) < 0: return -1 + if oprot.writeI32(self.line) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.api_log is not None: + annotations = {} + if oprot.writeFieldBegin('api_log', TType.STRUCT, 1, annotations) < 0: return -1 + if self.api_log.write(oprot) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.file != other.file: + return False + if self.line != other.line: + return False + if self.api_log != other.api_log: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class VncApiError(sandesh_base.SandeshSystem): + + thrift_spec = None + + def __init__(self, api_error_msg=None, file=None, line=None, category='__default__', level=SandeshLevel.SYS_INFO, sandesh=sandesh_base.sandesh_global): + sandesh_base.SandeshSystem.__init__(self) + self.api_error_msg = api_error_msg + self.file = file + self.line = line + self._scope = sandesh.scope() + self._module = sandesh.module() + self._source = sandesh.source_id() + self._node_type = sandesh.node_type() + self._instance_id = sandesh.instance_id() + self._seqnum = 0 + self._timestamp = UTCTimestampUsec() + self._versionsig = 2183673535 + self._hints = 0 + self._category = category + self._level = level + + def log(self, trace=False): + log_str = cStringIO.StringIO() + if trace: + log_str.write(str(self._timestamp)) + log_str.write(' ') + if self._category is not None: + log_str.write(self._category) + log_str.write(' [') + log_str.write(SandeshLevel._VALUES_TO_NAMES[self._level]) + log_str.write(']: ') + log_str.write('VncApiError: ') + if self.api_error_msg is not None: + log_str.write(self.api_error_msg) + log_str.write(' ') + if self.file is not None: + log_str.write(self.file) + log_str.write(' ') + if self.line is not None: + log_str.write(str(self.line)) + log_str.write(' ') + return log_str.getvalue() + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return -1 + read_cnt = 0 + (length, sandesh_name) = iprot.readSandeshBegin() + if length < 0: return -1 + read_cnt += length + while True: + (length, fname, ftype, fid) = iprot.readFieldBegin() + if length < 0: return -1 + read_cnt += length + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + (length, self.api_error_msg) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == -32768: + if ftype == TType.STRING: + (length, self.file) = iprot.readString(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + elif fid == -32767: + if ftype == TType.I32: + (length, self.line) = iprot.readI32(); + if length < 0: return -1 + read_cnt += length + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + length = iprot.readFieldEnd() + if length < 0: return -1 + read_cnt += length + length = iprot.readSandeshEnd() + if length < 0: return -1 + read_cnt += length + return read_cnt + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return 0 + if oprot.writeSandeshBegin('VncApiError') < 0: return -1 + if self.file is not None: + annotations = {} + if oprot.writeFieldBegin('file', TType.STRING, -32768, annotations) < 0: return -1 + if oprot.writeString(self.file) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.line is not None: + annotations = {} + if oprot.writeFieldBegin('line', TType.I32, -32767, annotations) < 0: return -1 + if oprot.writeI32(self.line) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if self.api_error_msg is not None: + annotations = {} + if oprot.writeFieldBegin('api_error_msg', TType.STRING, 1, annotations) < 0: return -1 + if oprot.writeString(self.api_error_msg) < 0: return -1 + if oprot.writeFieldEnd() < 0: return -1 + if oprot.writeFieldStop() < 0: return -1 + if oprot.writeSandeshEnd() < 0: return -1 + return 0 + + def validate(self): + return + + + def compare(self, other): + if not isinstance(other, self.__class__): + return False + if self.file != other.file: + return False + if self.line != other.line: + return False + if self.api_error_msg != other.api_error_msg: + return False + return True + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +_SANDESH_REQUEST_LIST = [ +] + + +_SANDESH_UVE_LIST = [ +] + + +_SANDESH_UVE_DATA_LIST = [ +] + + +_SANDESH_ALARM_LIST = [ +] + + +_SANDESH_ALARM_DATA_LIST = [ +] diff --git a/Testcases/cfgm_common/uve/vnc_api/ttypes.pyc b/Testcases/cfgm_common/uve/vnc_api/ttypes.pyc new file mode 100644 index 0000000..1d0400a Binary files /dev/null and b/Testcases/cfgm_common/uve/vnc_api/ttypes.pyc differ diff --git a/Testcases/cfgm_common/uve/vnc_api/vnc_api.html b/Testcases/cfgm_common/uve/vnc_api/vnc_api.html new file mode 100644 index 0000000..b467b7c --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/vnc_api.html @@ -0,0 +1,14 @@ + + + + + +Module: vnc_api +

Module: vnc_api

+ + + +
ModuleSandeshs
vnc_api
+

+ diff --git a/Testcases/cfgm_common/uve/vnc_api/vnc_api.xml b/Testcases/cfgm_common/uve/vnc_api/vnc_api.xml new file mode 100644 index 0000000..4cf212d --- /dev/null +++ b/Testcases/cfgm_common/uve/vnc_api/vnc_api.xml @@ -0,0 +1,3 @@ + + + -- cgit 1.2.3-korg