summaryrefslogtreecommitdiffstats
path: root/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info
diff options
context:
space:
mode:
Diffstat (limited to 'Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info')
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.py1
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.pycbin0 -> 222 bytes
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.py33
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.pycbin0 -> 787 bytes
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.py14
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.pycbin0 -> 236 bytes
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/index.html9
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.html13
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/process_info.xml3
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.py13
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.pycbin0 -> 181 bytes
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/style.css10
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.py854
-rw-r--r--Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.pycbin0 -> 26064 bytes
14 files changed, 950 insertions, 0 deletions
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
--- /dev/null
+++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/__init__.pyc
Binary files 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
--- /dev/null
+++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/constants.pyc
Binary files 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
--- /dev/null
+++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/http_request.pyc
Binary files 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 @@
+<html><head>
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>All Thrift declarations</title></head><body>
+<h1>All Thrift declarations</h1>
+<table><tr><th>Module</th><th>Services</th><th>Sandeshs</th><th>Data types</th><th>Constants</th></tr>
+<tr>
+<td>process_info</td><td></td></tr>
+</table>
+</body></html>
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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>Module: process_info</title></head><body>
+<h1>Module: process_info</h1>
+<table><tr><th>Module</th><th>Sandeshs</th></tr>
+<tr>
+<td>process_info</td><td></td></tr>
+</table>
+</body></html>
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 @@
+<?xml-stylesheet type="text/xsl" href="/universal_parse.xsl"?>
+<process_info type="rlist">
+</process_info>
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
--- /dev/null
+++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/request_skeleton.pyc
Binary files 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
--- /dev/null
+++ b/Testcases/cfgm_common/uve/cfgm_cpuinfo/process_info/ttypes.pyc
Binary files differ