diff options
author | 2016-01-29 16:00:57 -0800 | |
---|---|---|
committer | 2016-01-29 16:00:57 -0800 | |
commit | 82f1a7eb5535b30a95b1e71ff18c315d40d1e6f0 (patch) | |
tree | f930c90f75846ec8d8e33cf27325ff8fafc85d5c /Testcases/cfgm_common/uve/physical_router | |
parent | 5c04f2e22eb6b5e7a671bc02ba53a438eb66e90d (diff) |
OpenContrail test suitestable/colorado
Change-Id: I61168093a2a05d47377ef47c8638ae1554b1a999
Signed-off-by: Stuart Mackie <wsmackie@juniper.net>
Diffstat (limited to 'Testcases/cfgm_common/uve/physical_router')
14 files changed, 537 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 0000000..1b6bfe5 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/__init__.pyc 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 Binary files differnew file mode 100644 index 0000000..aee32ed --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/constants.pyc 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 Binary files differnew file mode 100644 index 0000000..8f6d434 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/http_request.pyc 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 @@ +<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>physical_router</td><td></td></tr> +</table> +</body></html> 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 @@ +<!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: physical_router</title></head><body> +<h1>Module: physical_router</h1> +<table><tr><th>Module</th><th>Sandeshs</th></tr> +<tr> +<td>physical_router</td><td></td></tr> +</table> +<hr/><h2 id="Sandeshs"></h2> +</body></html>
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 @@ +<?xml-stylesheet type="text/xsl" href="/universal_parse.xsl"?> +<physical_router type="rlist"> +</physical_router> 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 Binary files differnew file mode 100644 index 0000000..70674a0 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/request_skeleton.pyc 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 Binary files differnew file mode 100644 index 0000000..3b39e02 --- /dev/null +++ b/Testcases/cfgm_common/uve/physical_router/ttypes.pyc |