diff --git a/example/GraphClientSimpleExample.py b/example/GraphClientSimpleExample.py index c50e1dbe..988b67e9 100644 --- a/example/GraphClientSimpleExample.py +++ b/example/GraphClientSimpleExample.py @@ -11,7 +11,6 @@ from nebula2.gclient.net import ConnectionPool from nebula2.Config import Config -from nebula2.common import * from FormatResp import print_resp if __name__ == '__main__': @@ -53,28 +52,10 @@ assert resp.is_succeeded(), resp.error_msg() print_resp(resp) - bval = ttypes.Value() - bval.set_bVal(True) - ival = ttypes.Value() - ival.set_iVal(3) - sval = ttypes.Value() - sval.set_sVal("Cypher Parameter") - params={"p1":ival,"p2":bval,"p3":sval} - - # test parameter interface - resp = client.execute_parameter('RETURN abs($p1)+3, toBoolean($p2) and false, toLower($p3)+1',params) - assert resp.is_succeeded(), resp.error_msg() - print_resp(resp) - # test compatibility - resp = client.execute('RETURN 3') + resp = client.execute('FETCH PROP ON like "Bob"->"Lily"') assert resp.is_succeeded(), resp.error_msg() print_resp(resp) - # get the result in json format - resp_json = client.execute_json_with_parameter("yield 1", params) - json_obj = json.loads(resp_json) - print(json.dumps(json_obj, indent=2, sort_keys=True)) - # drop space resp = client.execute('DROP SPACE test') assert resp.is_succeeded(), resp.error_msg() diff --git a/nebula2/Exception.py b/nebula2/Exception.py index 499168b6..55266038 100644 --- a/nebula2/Exception.py +++ b/nebula2/Exception.py @@ -79,3 +79,6 @@ def __init__(self, code=E_UNKNOWN, message=None): self.type = code self.message = message +class ClientServerIncompatibleException(Exception): + def __init__(self, message): + Exception.__init__(self, f'Current client is not compatible with the remote server, please check the version: {message}') diff --git a/nebula2/common/constants.py b/nebula2/common/constants.py index 4bc90db0..dbb00124 100644 --- a/nebula2/common/constants.py +++ b/nebula2/common/constants.py @@ -14,5 +14,7 @@ -from .ttypes import UTF8STRINGS, NullType, ErrorCode, SchemaID, Date, Time, DateTime, Value, NList, NMap, NSet, Row, DataSet, Tag, Vertex, Edge, Step, Path, HostAddr, KeyValue, LogInfo, DirInfo, NodeInfo, PartitionBackupInfo, CheckpointInfo, GraphSpaceID, PartitionID, TagID, EdgeType, EdgeRanking, LogID, TermID, Timestamp, IndexID, Port, SessionID, ExecutionPlanID +from .ttypes import UTF8STRINGS, NullType, ErrorCode, SchemaID, Date, Time, DateTime, Value, NList, NMap, NSet, Row, DataSet, Geography, Tag, Vertex, Edge, Step, Path, HostAddr, KeyValue, LogInfo, DirInfo, NodeInfo, PartitionBackupInfo, CheckpointInfo, GraphSpaceID, PartitionID, TagID, EdgeType, EdgeRanking, LogID, TermID, Timestamp, IndexID, Port, SessionID, ExecutionPlanID + +version = "2.6.0" diff --git a/nebula2/common/ttypes.py b/nebula2/common/ttypes.py index 0af0f0f8..4c5616a1 100644 --- a/nebula2/common/ttypes.py +++ b/nebula2/common/ttypes.py @@ -29,7 +29,7 @@ all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -__all__ = ['UTF8STRINGS', 'NullType', 'ErrorCode', 'SchemaID', 'Date', 'Time', 'DateTime', 'Value', 'NList', 'NMap', 'NSet', 'Row', 'DataSet', 'Tag', 'Vertex', 'Edge', 'Step', 'Path', 'HostAddr', 'KeyValue', 'LogInfo', 'DirInfo', 'NodeInfo', 'PartitionBackupInfo', 'CheckpointInfo', 'GraphSpaceID', 'PartitionID', 'TagID', 'EdgeType', 'EdgeRanking', 'LogID', 'TermID', 'Timestamp', 'IndexID', 'Port', 'SessionID', 'ExecutionPlanID'] +__all__ = ['UTF8STRINGS', 'NullType', 'ErrorCode', 'SchemaID', 'Date', 'Time', 'DateTime', 'Value', 'NList', 'NMap', 'NSet', 'Row', 'DataSet', 'Geography', 'Tag', 'Vertex', 'Edge', 'Step', 'Path', 'HostAddr', 'KeyValue', 'LogInfo', 'DirInfo', 'NodeInfo', 'PartitionBackupInfo', 'CheckpointInfo', 'GraphSpaceID', 'PartitionID', 'TagID', 'EdgeType', 'EdgeRanking', 'LogID', 'TermID', 'Timestamp', 'IndexID', 'Port', 'SessionID', 'ExecutionPlanID'] class NullType: __NULL__ = 0 @@ -183,6 +183,7 @@ class ErrorCode: E_OUTDATED_TERM = -3071 E_OUTDATED_EDGE = -3072 E_WRITE_WRITE_CONFLICT = -3073 + E_CLIENT_SERVER_INCOMPATIBLE = -3061 E_UNKNOWN = -8000 _VALUES_TO_NAMES = { @@ -305,6 +306,7 @@ class ErrorCode: -3071: "E_OUTDATED_TERM", -3072: "E_OUTDATED_EDGE", -3073: "E_WRITE_WRITE_CONFLICT", + -3061: "E_CLIENT_SERVER_INCOMPATIBLE", -8000: "E_UNKNOWN", } @@ -428,6 +430,7 @@ class ErrorCode: "E_OUTDATED_TERM": -3071, "E_OUTDATED_EDGE": -3072, "E_WRITE_WRITE_CONFLICT": -3073, + "E_CLIENT_SERVER_INCOMPATIBLE": -3061, "E_UNKNOWN": -8000, } @@ -444,7 +447,7 @@ class SchemaID(object): __EMPTY__ = 0 TAG_ID = 1 EDGE_TYPE = 2 - + @staticmethod def isUnion(): return True @@ -535,7 +538,7 @@ def write(self, oprot): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeUnionEnd() - + def __eq__(self, other): if not isinstance(other, self.__class__): return False @@ -637,7 +640,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -752,7 +755,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -909,7 +912,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -936,6 +939,7 @@ class Value(object): - mVal - uVal - gVal + - ggVal """ thrift_spec = None @@ -957,7 +961,8 @@ class Value(object): MVAL = 13 UVAL = 14 GVAL = 15 - + GGVAL = 16 + @staticmethod def isUnion(): return True @@ -1022,6 +1027,10 @@ def get_gVal(self): assert self.field == 15 return self.value + def get_ggVal(self): + assert self.field == 16 + return self.value + def set_nVal(self, value): self.field = 1 self.value = value @@ -1082,6 +1091,10 @@ def set_gVal(self, value): self.field = 15 self.value = value + def set_ggVal(self, value): + self.field = 16 + self.value = value + def getType(self): return self.field @@ -1148,6 +1161,10 @@ def __repr__(self): padding = ' ' * 5 value = padding.join(value.splitlines(True)) member = '\n %s=%s' % ('gVal', value) + if self.field == 16: + padding = ' ' * 6 + value = padding.join(value.splitlines(True)) + member = '\n %s=%s' % ('ggVal', value) return "%s(%s)" % (self.__class__.__name__, member) def read(self, iprot): @@ -1280,6 +1297,14 @@ def read(self, iprot): self.set_gVal(gVal) else: iprot.skip(ftype) + elif fid == 16: + if ftype == TType.STRUCT: + ggVal = Geography() + ggVal.read(iprot) + assert self.field == 0 and self.value is None + self.set_ggVal(ggVal) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -1368,9 +1393,14 @@ def write(self, oprot): gVal = self.value gVal.write(oprot) oprot.writeFieldEnd() + if self.field == 16: + oprot.writeFieldBegin('ggVal', TType.STRUCT, 16) + ggVal = self.value + ggVal.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeUnionEnd() - + def __eq__(self, other): if not isinstance(other, self.__class__): return False @@ -1415,7 +1445,7 @@ def read(self, iprot): _elem5 = Value() _elem5.read(iprot) self.values.append(_elem5) - else: + else: while iprot.peekList(): _elem6 = Value() _elem6.read(iprot) @@ -1459,7 +1489,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1497,14 +1527,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.MAP: self.kvs = {} - (_ktype9, _vtype10, _size8 ) = iprot.readMapBegin() + (_ktype9, _vtype10, _size8 ) = iprot.readMapBegin() if _size8 >= 0: for _i12 in six.moves.range(_size8): _key13 = iprot.readString() _val14 = Value() _val14.read(iprot) self.kvs[_key13] = _val14 - else: + else: while iprot.peekMap(): _key15 = iprot.readString() _val16 = Value() @@ -1550,7 +1580,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1594,7 +1624,7 @@ def read(self, iprot): _elem24 = Value() _elem24.read(iprot) self.values.add(_elem24) - else: + else: while iprot.peekSet(): _elem25 = Value() _elem25.read(iprot) @@ -1638,7 +1668,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1682,7 +1712,7 @@ def read(self, iprot): _elem32 = Value() _elem32.read(iprot) self.values.append(_elem32) - else: + else: while iprot.peekList(): _elem33 = Value() _elem33.read(iprot) @@ -1726,7 +1756,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1770,7 +1800,7 @@ def read(self, iprot): for _i39 in six.moves.range(_size35): _elem40 = iprot.readString() self.column_names.append(_elem40) - else: + else: while iprot.peekList(): _elem41 = iprot.readString() self.column_names.append(_elem41) @@ -1786,7 +1816,7 @@ def read(self, iprot): _elem47 = Row() _elem47.read(iprot) self.rows.append(_elem47) - else: + else: while iprot.peekList(): _elem48 = Row() _elem48.read(iprot) @@ -1841,7 +1871,80 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +class Geography: + """ + Attributes: + - wkb + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.wkb = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('Geography') + if self.wkb != None: + oprot.writeFieldBegin('wkb', TType.STRING, 1) + oprot.writeString(self.wkb.encode('utf-8')) if UTF8STRINGS and not isinstance(self.wkb, bytes) else oprot.writeString(self.wkb) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.wkb is not None: + value = pprint.pformat(self.wkb, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' wkb=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1885,14 +1988,14 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.props = {} - (_ktype52, _vtype53, _size51 ) = iprot.readMapBegin() + (_ktype52, _vtype53, _size51 ) = iprot.readMapBegin() if _size51 >= 0: for _i55 in six.moves.range(_size51): _key56 = iprot.readString() _val57 = Value() _val57.read(iprot) self.props[_key56] = _val57 - else: + else: while iprot.peekMap(): _key58 = iprot.readString() _val59 = Value() @@ -1946,7 +2049,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1997,7 +2100,7 @@ def read(self, iprot): _elem67 = Tag() _elem67.read(iprot) self.tags.append(_elem67) - else: + else: while iprot.peekList(): _elem68 = Tag() _elem68.read(iprot) @@ -2049,7 +2152,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2119,14 +2222,14 @@ def read(self, iprot): elif fid == 6: if ftype == TType.MAP: self.props = {} - (_ktype71, _vtype72, _size70 ) = iprot.readMapBegin() + (_ktype71, _vtype72, _size70 ) = iprot.readMapBegin() if _size70 >= 0: for _i74 in six.moves.range(_size70): _key75 = iprot.readString() _val76 = Value() _val76.read(iprot) self.props[_key75] = _val76 - else: + else: while iprot.peekMap(): _key77 = iprot.readString() _val78 = Value() @@ -2212,7 +2315,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2275,14 +2378,14 @@ def read(self, iprot): elif fid == 5: if ftype == TType.MAP: self.props = {} - (_ktype82, _vtype83, _size81 ) = iprot.readMapBegin() + (_ktype82, _vtype83, _size81 ) = iprot.readMapBegin() if _size81 >= 0: for _i85 in six.moves.range(_size81): _key86 = iprot.readString() _val87 = Value() _val87.read(iprot) self.props[_key86] = _val87 - else: + else: while iprot.peekMap(): _key88 = iprot.readString() _val89 = Value() @@ -2360,7 +2463,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2411,7 +2514,7 @@ def read(self, iprot): _elem97 = Step() _elem97.read(iprot) self.steps.append(_elem97) - else: + else: while iprot.peekList(): _elem98 = Step() _elem98.read(iprot) @@ -2463,7 +2566,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2550,7 +2653,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2637,7 +2740,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2724,7 +2827,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2773,7 +2876,7 @@ def read(self, iprot): for _i104 in six.moves.range(_size100): _elem105 = iprot.readString() self.data.append(_elem105) - else: + else: while iprot.peekList(): _elem106 = iprot.readString() self.data.append(_elem106) @@ -2824,7 +2927,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2913,7 +3016,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2951,14 +3054,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.MAP: self.info = {} - (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin() + (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin() if _size108 >= 0: for _i112 in six.moves.range(_size108): _key113 = iprot.readI32() _val114 = LogInfo() _val114.read(iprot) self.info[_key113] = _val114 - else: + else: while iprot.peekMap(): _key115 = iprot.readI32() _val116 = LogInfo() @@ -3004,7 +3107,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3092,7 +3195,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3262,6 +3365,7 @@ def DateTime__setstate__(self, state): (13, TType.STRUCT, 'mVal', [NMap, NMap.thrift_spec, False], None, 2, ), # 13 (14, TType.STRUCT, 'uVal', [NSet, NSet.thrift_spec, False], None, 2, ), # 14 (15, TType.STRUCT, 'gVal', [DataSet, DataSet.thrift_spec, False], None, 2, ), # 15 + (16, TType.STRUCT, 'ggVal', [Geography, Geography.thrift_spec, False], None, 2, ), # 16 ) Value.thrift_struct_annotations = { @@ -3289,9 +3393,12 @@ def DateTime__setstate__(self, state): 15: { "cpp.ref_type": "unique", }, + 16: { + "cpp.ref_type": "unique", + }, } -def Value__init__(self, nVal=None, bVal=None, iVal=None, fVal=None, sVal=None, dVal=None, tVal=None, dtVal=None, vVal=None, eVal=None, pVal=None, lVal=None, mVal=None, uVal=None, gVal=None,): +def Value__init__(self, nVal=None, bVal=None, iVal=None, fVal=None, sVal=None, dVal=None, tVal=None, dtVal=None, vVal=None, eVal=None, pVal=None, lVal=None, mVal=None, uVal=None, gVal=None, ggVal=None,): self.field = 0 self.value = None if nVal is not None: @@ -3354,6 +3461,10 @@ def Value__init__(self, nVal=None, bVal=None, iVal=None, fVal=None, sVal=None, d assert self.field == 0 and self.value is None self.field = 15 self.value = gVal + if ggVal is not None: + assert self.field == 0 and self.value is None + self.field = 16 + self.value = ggVal Value.__init__ = Value__init__ @@ -3480,6 +3591,30 @@ def DataSet__setstate__(self, state): DataSet.__getstate__ = lambda self: self.__dict__.copy() DataSet.__setstate__ = DataSet__setstate__ +all_structs.append(Geography) +Geography.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'wkb', True, None, 2, ), # 1 +) + +Geography.thrift_struct_annotations = { + "cpp.type": "nebula::Geography", +} +Geography.thrift_field_annotations = { +} + +def Geography__init__(self, wkb=None,): + self.wkb = wkb + +Geography.__init__ = Geography__init__ + +def Geography__setstate__(self, state): + state.setdefault('wkb', None) + self.__dict__ = state + +Geography.__getstate__ = lambda self: self.__dict__.copy() +Geography.__setstate__ = Geography__setstate__ + all_structs.append(Tag) Tag.thrift_spec = ( None, # 0 diff --git a/nebula2/gclient/net/Connection.py b/nebula2/gclient/net/Connection.py index 218c187d..7ef204ae 100644 --- a/nebula2/gclient/net/Connection.py +++ b/nebula2/gclient/net/Connection.py @@ -14,10 +14,12 @@ from nebula2.common.ttypes import ErrorCode from nebula2.graph import GraphService +from nebula2.graph.ttypes import VerifyClientVersionReq from nebula2.Exception import ( AuthFailedException, IOErrorException, + ClientServerIncompatibleException, ) from nebula2.gclient.net.AuthResult import AuthResult @@ -44,16 +46,17 @@ def open(self, ip, port, timeout): self._ip = ip self._port = port self._timeout = timeout - try: - s = TSocket.TSocket(self._ip, self._port) - if timeout > 0: - s.setTimeout(timeout) - transport = TTransport.TBufferedTransport(s) - protocol = TBinaryProtocol.TBinaryProtocol(transport) - transport.open() - self._connection = GraphService.Client(protocol) - except Exception: - raise + s = TSocket.TSocket(self._ip, self._port) + if timeout > 0: + s.setTimeout(timeout) + transport = TTransport.TBufferedTransport(s) + protocol = TBinaryProtocol.TBinaryProtocol(transport) + transport.open() + self._connection = GraphService.Client(protocol) + resp = self._connection.verifyClientVersion(VerifyClientVersionReq()) + if resp.error_code != ErrorCode.SUCCEEDED: + self._connection._iprot.trans.close() + raise ClientVersionRejectedException(resp.error_msg) def _reopen(self): """reopen the connection @@ -105,32 +108,8 @@ def execute(self, session_id, stmt): raise IOErrorException(IOErrorException.E_UNKNOWN, te.message); raise - def execute_parameter(self, session_id, stmt, params): - """execute interface with session_id and ngql - :param session_id: the session id get from result of authenticate interface - :param stmt: the ngql - :param params: parameter map - :return: ExecutionResponse - """ - try: - resp = self._connection.executeWithParameter(session_id, stmt, params) - return resp - except Exception as te: - if isinstance(te, TTransportException): - if te.message.find("timed out") > 0: - self._reopen() - raise IOErrorException(IOErrorException.E_TIMEOUT, te.message) - elif te.type == TTransportException.END_OF_FILE: - raise IOErrorException(IOErrorException.E_CONNECT_BROKEN, te.message) - elif te.type == TTransportException.NOT_OPEN: - raise IOErrorException(IOErrorException.E_NOT_OPEN, te.message) - else: - raise IOErrorException(IOErrorException.E_UNKNOWN, te.message); - raise - def execute_json(self, session_id, stmt): """execute_json interface with session_id and ngql - :param session_id: the session id get from result of authenticate interface :param stmt: the ngql :return: string json representing the execution result @@ -151,29 +130,6 @@ def execute_json(self, session_id, stmt): raise IOErrorException(IOErrorException.E_UNKNOWN, te.message); raise - def execute_json_with_parameter(self, session_id, stmt, params): - """execute_json interface with session_id and ngql - - :param session_id: the session id get from result of authenticate interface - :param stmt: the ngql - :return: string json representing the execution result - """ - try: - resp = self._connection.executeJsonWithParameter(session_id, stmt) - return resp - except Exception as te: - if isinstance(te, TTransportException): - if te.message.find("timed out") > 0: - self._reopen() - raise IOErrorException(IOErrorException.E_TIMEOUT, te.message) - elif te.type == TTransportException.END_OF_FILE: - raise IOErrorException(IOErrorException.E_CONNECT_BROKEN, te.message) - elif te.type == TTransportException.NOT_OPEN: - raise IOErrorException(IOErrorException.E_NOT_OPEN, te.message) - else: - raise IOErrorException(IOErrorException.E_UNKNOWN, te.message); - raise - def signout(self, session_id): """tells the graphd can release the session info diff --git a/nebula2/gclient/net/Session.py b/nebula2/gclient/net/Session.py index 7244ea61..0fee0032 100644 --- a/nebula2/gclient/net/Session.py +++ b/nebula2/gclient/net/Session.py @@ -38,41 +38,6 @@ def execute(self, stmt): start_time = time.time() resp = self._connection.execute(self._session_id, stmt) end_time = time.time() - return ResultSet(resp, - all_latency=int( - (end_time - start_time) * 1000000), - timezone_offset=self._timezone_offset) - except IOErrorException as ie: - if ie.type == IOErrorException.E_CONNECT_BROKEN: - self._pool.update_servers_status() - if self._retry_connect: - if not self._reconnect(): - logging.warning('Retry connect failed') - raise IOErrorException( - IOErrorException.E_ALL_BROKEN, ie.message) - resp = self._connection.execute(self._session_id, stmt) - end_time = time.time() - return ResultSet(resp, - all_latency=int( - (end_time - start_time) * 1000000), - timezone_offset=self._timezone_offset) - raise - except Exception: - raise - - def execute_parameter(self, stmt, params): - """execute statement - - :param stmt: the ngql - :param params: parameter map - :return: ResultSet - """ - if self._connection is None: - raise RuntimeError('The session has released') - try: - start_time = time.time() - resp = self._connection.execute_parameter(self._session_id, stmt, params) - end_time = time.time() return ResultSet(resp, all_latency=int((end_time - start_time) * 1000000), timezone_offset=self._timezone_offset) @@ -83,7 +48,7 @@ def execute_parameter(self, stmt, params): if not self._reconnect(): logging.warning('Retry connect failed') raise IOErrorException(IOErrorException.E_ALL_BROKEN, ie.message) - resp = self._connection.executeWithParameter(self._session_id, stmt, params) + resp = self._connection.execute(self._session_id, stmt) end_time = time.time() return ResultSet(resp, all_latency=int((end_time - start_time) * 1000000), @@ -150,7 +115,6 @@ def execute_json(self, stmt): } ] } - :param stmt: the ngql :return: JSON string """ @@ -174,90 +138,6 @@ def execute_json(self, stmt): except Exception: raise - - def execute_json_with_parameter(self, stmt, params): - """execute statement and return the result as a JSON string - Date and Datetime will be returned in UTC - JSON struct: - { - "results": [ - { - "columns": [], - "data": [ - { - "row": [ - "row-data" - ], - "meta": [ - "metadata" - ] - } - ], - "latencyInUs": 0, - "spaceName": "", - "planDesc ": { - "planNodeDescs": [ - { - "name": "", - "id": 0, - "outputVar": "", - "description": { - "key": "" - }, - "profiles": [ - { - "rows": 1, - "execDurationInUs": 0, - "totalDurationInUs": 0, - "otherStats": {} - } - ], - "branchInfo": { - "isDoBranch": false, - "conditionNodeId": -1 - }, - "dependencies": [] - } - ], - "nodeIndexMap": {}, - "format": "", - "optimize_time_in_us": 0 - }, - "comment ": "" - } - ], - "errors": [ - { - "code": 0, - "message": "" - } - ] - } - - :param stmt: the ngql - :param params: parameter map - :return: JSON string - """ - if self._connection is None: - raise RuntimeError('The session has released') - try: - resp_json = self._connection.execute_json_with_parameter(self._session_id, stmt, params) - return resp_json - except IOErrorException as ie: - if ie.type == IOErrorException.E_CONNECT_BROKEN: - self._pool.update_servers_status() - if self._retry_connect: - if not self._reconnect(): - logging.warning('Retry connect failed') - raise IOErrorException( - IOErrorException.E_ALL_BROKEN, ie.message) - resp_json = self._connection.execute_json_with_parameter( - self._session_id, stmt, params) - return resp_json - raise - except Exception: - raise - def release(self): """release the connection to pool, and the session couldn't been use again diff --git a/nebula2/gclient/net/__init__.py b/nebula2/gclient/net/__init__.py index 8b9667d3..790d8113 100644 --- a/nebula2/gclient/net/__init__.py +++ b/nebula2/gclient/net/__init__.py @@ -24,4 +24,4 @@ from nebula2.gclient.net.Connection import Connection from nebula2.gclient.net.ConnectionPool import ConnectionPool -logging.basicConfig(level=logging.INFO, format='[%(asctime)s]:%(message)s') +logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(levelname)-8s [%(filename)s:%(lineno)d]:%(message)s') diff --git a/nebula2/graph/GraphService-remote b/nebula2/graph/GraphService-remote index e34b504d..3b88e261 100755 --- a/nebula2/graph/GraphService-remote +++ b/nebula2/graph/GraphService-remote @@ -45,9 +45,8 @@ FUNCTIONS = { 'authenticate': Function('authenticate', 'GraphService', 'AuthResponse', [('binary', 'username', 'binary'), ('binary', 'password', 'binary')]), 'signout': Function('signout', 'GraphService', None, [('i64', 'sessionId', 'i64')]), 'execute': Function('execute', 'GraphService', 'ExecutionResponse', [('i64', 'sessionId', 'i64'), ('binary', 'stmt', 'binary')]), - 'executeWithParameter': Function('executeWithParameter', 'GraphService', 'ExecutionResponse', [('i64', 'sessionId', 'i64'), ('binary', 'stmt', 'binary'), ('map', 'parameterMap', 'map')]), 'executeJson': Function('executeJson', 'GraphService', 'binary', [('i64', 'sessionId', 'i64'), ('binary', 'stmt', 'binary')]), - 'executeJsonWithParameter': Function('executeJsonWithParameter', 'GraphService', 'binary', [('i64', 'sessionId', 'i64'), ('binary', 'stmt', 'binary'), ('map', 'parameterMap', 'map')]), + 'verifyClientVersion': Function('verifyClientVersion', 'GraphService', 'VerifyClientVersionResp', [('VerifyClientVersionReq', 'req', 'VerifyClientVersionReq')]), } SERVICE_NAMES = ['GraphService', ] diff --git a/nebula2/graph/GraphService.py b/nebula2/graph/GraphService.py index eac116ab..b5ef6188 100644 --- a/nebula2/graph/GraphService.py +++ b/nebula2/graph/GraphService.py @@ -13,7 +13,7 @@ from nebula2.fbthrift.protocol.TProtocol import TProtocolException -from .ttypes import UTF8STRINGS, ProfilingStats, PlanNodeBranchInfo, Pair, PlanNodeDescription, PlanDescription, ExecutionResponse, AuthResponse +from .ttypes import UTF8STRINGS, ProfilingStats, PlanNodeBranchInfo, Pair, PlanNodeDescription, PlanDescription, ExecutionResponse, AuthResponse, VerifyClientVersionResp, VerifyClientVersionReq import nebula2.common.ttypes from nebula2.fbthrift.Thrift import TProcessor @@ -66,15 +66,6 @@ def execute(self, sessionId=None, stmt=None): """ pass - def executeWithParameter(self, sessionId=None, stmt=None, parameterMap=None): - """ - Parameters: - - sessionId - - stmt - - parameterMap - """ - pass - def executeJson(self, sessionId=None, stmt=None): """ Parameters: @@ -83,12 +74,10 @@ def executeJson(self, sessionId=None, stmt=None): """ pass - def executeJsonWithParameter(self, sessionId=None, stmt=None, parameterMap=None): + def verifyClientVersion(self, req=None): """ Parameters: - - sessionId - - stmt - - parameterMap + - req """ pass @@ -117,15 +106,6 @@ def execute(self, handler_ctx, sessionId=None, stmt=None): """ pass - def executeWithParameter(self, handler_ctx, sessionId=None, stmt=None, parameterMap=None): - """ - Parameters: - - sessionId - - stmt - - parameterMap - """ - pass - def executeJson(self, handler_ctx, sessionId=None, stmt=None): """ Parameters: @@ -134,12 +114,10 @@ def executeJson(self, handler_ctx, sessionId=None, stmt=None): """ pass - def executeJsonWithParameter(self, handler_ctx, sessionId=None, stmt=None, parameterMap=None): + def verifyClientVersion(self, handler_ctx, req=None): """ Parameters: - - sessionId - - stmt - - parameterMap + - req """ pass @@ -224,7 +202,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -324,7 +302,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -419,7 +397,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -529,7 +507,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -629,7 +607,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -660,250 +638,6 @@ def execute_result__setstate__(self, state): execute_result.__getstate__ = lambda self: self.__dict__.copy() execute_result.__setstate__ = execute_result__setstate__ -class executeWithParameter_args: - """ - Attributes: - - sessionId - - stmt - - parameterMap - """ - - thrift_spec = None - thrift_field_annotations = None - thrift_struct_annotations = None - __init__ = None - @staticmethod - def isUnion(): - return False - - def read(self, iprot): - if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: - fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) - return - if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: - fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.sessionId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.stmt = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.parameterMap = {} - (_ktype55, _vtype56, _size54 ) = iprot.readMapBegin() - if _size54 >= 0: - for _i58 in six.moves.range(_size54): - _key59 = iprot.readString() - _val60 = nebula2.common.ttypes.Value() - _val60.read(iprot) - self.parameterMap[_key59] = _val60 - else: - while iprot.peekMap(): - _key61 = iprot.readString() - _val62 = nebula2.common.ttypes.Value() - _val62.read(iprot) - self.parameterMap[_key61] = _val62 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: - oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) - return - if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: - oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) - return - oprot.writeStructBegin('executeWithParameter_args') - if self.sessionId != None: - oprot.writeFieldBegin('sessionId', TType.I64, 1) - oprot.writeI64(self.sessionId) - oprot.writeFieldEnd() - if self.stmt != None: - oprot.writeFieldBegin('stmt', TType.STRING, 2) - oprot.writeString(self.stmt) - oprot.writeFieldEnd() - if self.parameterMap != None: - oprot.writeFieldBegin('parameterMap', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.parameterMap)) - for kiter63,viter64 in self.parameterMap.items(): - oprot.writeString(kiter63) - viter64.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = [] - padding = ' ' * 4 - if self.sessionId is not None: - value = pprint.pformat(self.sessionId, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' sessionId=%s' % (value)) - if self.stmt is not None: - value = pprint.pformat(self.stmt, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' stmt=%s' % (value)) - if self.parameterMap is not None: - value = pprint.pformat(self.parameterMap, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' parameterMap=%s' % (value)) - return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - # Override the __hash__ function for Python3 - t10434117 - if not six.PY2: - __hash__ = object.__hash__ - -all_structs.append(executeWithParameter_args) -executeWithParameter_args.thrift_spec = ( - None, # 0 - (1, TType.I64, 'sessionId', None, None, 2, ), # 1 - (2, TType.STRING, 'stmt', False, None, 2, ), # 2 - (3, TType.MAP, 'parameterMap', (TType.STRING,False,TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 3 -) - -executeWithParameter_args.thrift_struct_annotations = { -} -executeWithParameter_args.thrift_field_annotations = { -} - -def executeWithParameter_args__init__(self, sessionId=None, stmt=None, parameterMap=None,): - self.sessionId = sessionId - self.stmt = stmt - self.parameterMap = parameterMap - -executeWithParameter_args.__init__ = executeWithParameter_args__init__ - -def executeWithParameter_args__setstate__(self, state): - state.setdefault('sessionId', None) - state.setdefault('stmt', None) - state.setdefault('parameterMap', None) - self.__dict__ = state - -executeWithParameter_args.__getstate__ = lambda self: self.__dict__.copy() -executeWithParameter_args.__setstate__ = executeWithParameter_args__setstate__ - -class executeWithParameter_result: - """ - Attributes: - - success - """ - - thrift_spec = None - thrift_field_annotations = None - thrift_struct_annotations = None - __init__ = None - @staticmethod - def isUnion(): - return False - - def read(self, iprot): - if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: - fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) - return - if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: - fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ExecutionResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: - oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) - return - if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: - oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) - return - oprot.writeStructBegin('executeWithParameter_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = [] - padding = ' ' * 4 - if self.success is not None: - value = pprint.pformat(self.success, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' success=%s' % (value)) - return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - # Override the __hash__ function for Python3 - t10434117 - if not six.PY2: - __hash__ = object.__hash__ - -all_structs.append(executeWithParameter_result) -executeWithParameter_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [ExecutionResponse, ExecutionResponse.thrift_spec, False], None, 2, ), # 0 -) - -executeWithParameter_result.thrift_struct_annotations = { -} -executeWithParameter_result.thrift_field_annotations = { -} - -def executeWithParameter_result__init__(self, success=None,): - self.success = success - -executeWithParameter_result.__init__ = executeWithParameter_result__init__ - -def executeWithParameter_result__setstate__(self, state): - state.setdefault('success', None) - self.__dict__ = state - -executeWithParameter_result.__getstate__ = lambda self: self.__dict__.copy() -executeWithParameter_result.__setstate__ = executeWithParameter_result__setstate__ - class executeJson_args: """ Attributes: @@ -982,7 +716,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1081,7 +815,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1112,12 +846,10 @@ def executeJson_result__setstate__(self, state): executeJson_result.__getstate__ = lambda self: self.__dict__.copy() executeJson_result.__setstate__ = executeJson_result__setstate__ -class executeJsonWithParameter_args: +class verifyClientVersion_args: """ Attributes: - - sessionId - - stmt - - parameterMap + - req """ thrift_spec = None @@ -1141,32 +873,9 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.I64: - self.sessionId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.stmt = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.parameterMap = {} - (_ktype66, _vtype67, _size65 ) = iprot.readMapBegin() - if _size65 >= 0: - for _i69 in six.moves.range(_size65): - _key70 = iprot.readString() - _val71 = nebula2.common.ttypes.Value() - _val71.read(iprot) - self.parameterMap[_key70] = _val71 - else: - while iprot.peekMap(): - _key72 = iprot.readString() - _val73 = nebula2.common.ttypes.Value() - _val73.read(iprot) - self.parameterMap[_key72] = _val73 - iprot.readMapEnd() + if ftype == TType.STRUCT: + self.req = VerifyClientVersionReq() + self.req.read(iprot) else: iprot.skip(ftype) else: @@ -1181,22 +890,10 @@ def write(self, oprot): if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return - oprot.writeStructBegin('executeJsonWithParameter_args') - if self.sessionId != None: - oprot.writeFieldBegin('sessionId', TType.I64, 1) - oprot.writeI64(self.sessionId) - oprot.writeFieldEnd() - if self.stmt != None: - oprot.writeFieldBegin('stmt', TType.STRING, 2) - oprot.writeString(self.stmt) - oprot.writeFieldEnd() - if self.parameterMap != None: - oprot.writeFieldBegin('parameterMap', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.parameterMap)) - for kiter74,viter75 in self.parameterMap.items(): - oprot.writeString(kiter74) - viter75.write(oprot) - oprot.writeMapEnd() + oprot.writeStructBegin('verifyClientVersion_args') + if self.req != None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1204,25 +901,17 @@ def write(self, oprot): def __repr__(self): L = [] padding = ' ' * 4 - if self.sessionId is not None: - value = pprint.pformat(self.sessionId, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' sessionId=%s' % (value)) - if self.stmt is not None: - value = pprint.pformat(self.stmt, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' stmt=%s' % (value)) - if self.parameterMap is not None: - value = pprint.pformat(self.parameterMap, indent=0) + if self.req is not None: + value = pprint.pformat(self.req, indent=0) value = padding.join(value.splitlines(True)) - L.append(' parameterMap=%s' % (value)) + L.append(' req=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1231,36 +920,30 @@ def __ne__(self, other): if not six.PY2: __hash__ = object.__hash__ -all_structs.append(executeJsonWithParameter_args) -executeJsonWithParameter_args.thrift_spec = ( +all_structs.append(verifyClientVersion_args) +verifyClientVersion_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'sessionId', None, None, 2, ), # 1 - (2, TType.STRING, 'stmt', False, None, 2, ), # 2 - (3, TType.MAP, 'parameterMap', (TType.STRING,False,TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 3 + (1, TType.STRUCT, 'req', [VerifyClientVersionReq, VerifyClientVersionReq.thrift_spec, False], None, 2, ), # 1 ) -executeJsonWithParameter_args.thrift_struct_annotations = { +verifyClientVersion_args.thrift_struct_annotations = { } -executeJsonWithParameter_args.thrift_field_annotations = { +verifyClientVersion_args.thrift_field_annotations = { } -def executeJsonWithParameter_args__init__(self, sessionId=None, stmt=None, parameterMap=None,): - self.sessionId = sessionId - self.stmt = stmt - self.parameterMap = parameterMap +def verifyClientVersion_args__init__(self, req=None,): + self.req = req -executeJsonWithParameter_args.__init__ = executeJsonWithParameter_args__init__ +verifyClientVersion_args.__init__ = verifyClientVersion_args__init__ -def executeJsonWithParameter_args__setstate__(self, state): - state.setdefault('sessionId', None) - state.setdefault('stmt', None) - state.setdefault('parameterMap', None) +def verifyClientVersion_args__setstate__(self, state): + state.setdefault('req', None) self.__dict__ = state -executeJsonWithParameter_args.__getstate__ = lambda self: self.__dict__.copy() -executeJsonWithParameter_args.__setstate__ = executeJsonWithParameter_args__setstate__ +verifyClientVersion_args.__getstate__ = lambda self: self.__dict__.copy() +verifyClientVersion_args.__setstate__ = verifyClientVersion_args__setstate__ -class executeJsonWithParameter_result: +class verifyClientVersion_result: """ Attributes: - success @@ -1287,8 +970,9 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString() + if ftype == TType.STRUCT: + self.success = VerifyClientVersionResp() + self.success.read(iprot) else: iprot.skip(ftype) else: @@ -1303,10 +987,10 @@ def write(self, oprot): if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return - oprot.writeStructBegin('executeJsonWithParameter_result') + oprot.writeStructBegin('verifyClientVersion_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1324,7 +1008,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1333,27 +1017,27 @@ def __ne__(self, other): if not six.PY2: __hash__ = object.__hash__ -all_structs.append(executeJsonWithParameter_result) -executeJsonWithParameter_result.thrift_spec = ( - (0, TType.STRING, 'success', False, None, 2, ), # 0 +all_structs.append(verifyClientVersion_result) +verifyClientVersion_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [VerifyClientVersionResp, VerifyClientVersionResp.thrift_spec, False], None, 2, ), # 0 ) -executeJsonWithParameter_result.thrift_struct_annotations = { +verifyClientVersion_result.thrift_struct_annotations = { } -executeJsonWithParameter_result.thrift_field_annotations = { +verifyClientVersion_result.thrift_field_annotations = { } -def executeJsonWithParameter_result__init__(self, success=None,): +def verifyClientVersion_result__init__(self, success=None,): self.success = success -executeJsonWithParameter_result.__init__ = executeJsonWithParameter_result__init__ +verifyClientVersion_result.__init__ = verifyClientVersion_result__init__ -def executeJsonWithParameter_result__setstate__(self, state): +def verifyClientVersion_result__setstate__(self, state): state.setdefault('success', None) self.__dict__ = state -executeJsonWithParameter_result.__getstate__ = lambda self: self.__dict__.copy() -executeJsonWithParameter_result.__setstate__ = executeJsonWithParameter_result__setstate__ +verifyClientVersion_result.__getstate__ = lambda self: self.__dict__.copy() +verifyClientVersion_result.__setstate__ = verifyClientVersion_result__setstate__ class Client(Iface): def __enter__(self): @@ -1448,40 +1132,6 @@ def recv_execute(self, ): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "execute failed: unknown result"); - def executeWithParameter(self, sessionId=None, stmt=None, parameterMap=None): - """ - Parameters: - - sessionId - - stmt - - parameterMap - """ - self.send_executeWithParameter(sessionId, stmt, parameterMap) - return self.recv_executeWithParameter() - - def send_executeWithParameter(self, sessionId=None, stmt=None, parameterMap=None): - self._oprot.writeMessageBegin('executeWithParameter', TMessageType.CALL, self._seqid) - args = executeWithParameter_args() - args.sessionId = sessionId - args.stmt = stmt - args.parameterMap = parameterMap - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_executeWithParameter(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = executeWithParameter_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "executeWithParameter failed: unknown result"); - def executeJson(self, sessionId=None, stmt=None): """ Parameters: @@ -1514,39 +1164,35 @@ def recv_executeJson(self, ): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "executeJson failed: unknown result"); - def executeJsonWithParameter(self, sessionId=None, stmt=None, parameterMap=None): + def verifyClientVersion(self, req=None): """ Parameters: - - sessionId - - stmt - - parameterMap + - req """ - self.send_executeJsonWithParameter(sessionId, stmt, parameterMap) - return self.recv_executeJsonWithParameter() + self.send_verifyClientVersion(req) + return self.recv_verifyClientVersion() - def send_executeJsonWithParameter(self, sessionId=None, stmt=None, parameterMap=None): - self._oprot.writeMessageBegin('executeJsonWithParameter', TMessageType.CALL, self._seqid) - args = executeJsonWithParameter_args() - args.sessionId = sessionId - args.stmt = stmt - args.parameterMap = parameterMap + def send_verifyClientVersion(self, req=None): + self._oprot.writeMessageBegin('verifyClientVersion', TMessageType.CALL, self._seqid) + args = verifyClientVersion_args() + args.req = req args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_executeJsonWithParameter(self, ): + def recv_verifyClientVersion(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = executeJsonWithParameter_result() + result = verifyClientVersion_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success != None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "executeJsonWithParameter failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyClientVersion failed: unknown result"); class Processor(Iface, TProcessor): @@ -1563,12 +1209,10 @@ def __init__(self, handler): self._priorityMap["signout"] = TPriority.NORMAL self._processMap["execute"] = Processor.process_execute self._priorityMap["execute"] = TPriority.NORMAL - self._processMap["executeWithParameter"] = Processor.process_executeWithParameter - self._priorityMap["executeWithParameter"] = TPriority.NORMAL self._processMap["executeJson"] = Processor.process_executeJson self._priorityMap["executeJson"] = TPriority.NORMAL - self._processMap["executeJsonWithParameter"] = Processor.process_executeJsonWithParameter - self._priorityMap["executeJsonWithParameter"] = TPriority.NORMAL + self._processMap["verifyClientVersion"] = Processor.process_verifyClientVersion + self._priorityMap["verifyClientVersion"] = TPriority.NORMAL def onewayMethods(self): l = [] @@ -1609,17 +1253,6 @@ def process_execute(self, args, handler_ctx): result = Thrift.TApplicationException(message=repr(ex)) return result - @thrift_process_method(executeWithParameter_args, oneway=False) - def process_executeWithParameter(self, args, handler_ctx): - result = executeWithParameter_result() - try: - result.success = self._handler.executeWithParameter(args.sessionId, args.stmt, args.parameterMap) - except: - ex = sys.exc_info()[1] - self._event_handler.handlerError(handler_ctx, 'executeWithParameter', ex) - result = Thrift.TApplicationException(message=repr(ex)) - return result - @thrift_process_method(executeJson_args, oneway=False) def process_executeJson(self, args, handler_ctx): result = executeJson_result() @@ -1631,14 +1264,14 @@ def process_executeJson(self, args, handler_ctx): result = Thrift.TApplicationException(message=repr(ex)) return result - @thrift_process_method(executeJsonWithParameter_args, oneway=False) - def process_executeJsonWithParameter(self, args, handler_ctx): - result = executeJsonWithParameter_result() + @thrift_process_method(verifyClientVersion_args, oneway=False) + def process_verifyClientVersion(self, args, handler_ctx): + result = verifyClientVersion_result() try: - result.success = self._handler.executeJsonWithParameter(args.sessionId, args.stmt, args.parameterMap) + result.success = self._handler.verifyClientVersion(args.req) except: ex = sys.exc_info()[1] - self._event_handler.handlerError(handler_ctx, 'executeJsonWithParameter', ex) + self._event_handler.handlerError(handler_ctx, 'verifyClientVersion', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @@ -1658,12 +1291,10 @@ def __init__(self, handler): self._priorityMap["signout"] = TPriority.NORMAL self._processMap["execute"] = ContextProcessor.process_execute self._priorityMap["execute"] = TPriority.NORMAL - self._processMap["executeWithParameter"] = ContextProcessor.process_executeWithParameter - self._priorityMap["executeWithParameter"] = TPriority.NORMAL self._processMap["executeJson"] = ContextProcessor.process_executeJson self._priorityMap["executeJson"] = TPriority.NORMAL - self._processMap["executeJsonWithParameter"] = ContextProcessor.process_executeJsonWithParameter - self._priorityMap["executeJsonWithParameter"] = TPriority.NORMAL + self._processMap["verifyClientVersion"] = ContextProcessor.process_verifyClientVersion + self._priorityMap["verifyClientVersion"] = TPriority.NORMAL def onewayMethods(self): l = [] @@ -1704,17 +1335,6 @@ def process_execute(self, args, handler_ctx): result = Thrift.TApplicationException(message=repr(ex)) return result - @thrift_process_method(executeWithParameter_args, oneway=False) - def process_executeWithParameter(self, args, handler_ctx): - result = executeWithParameter_result() - try: - result.success = self._handler.executeWithParameter(handler_ctx, args.sessionId, args.stmt, args.parameterMap) - except: - ex = sys.exc_info()[1] - self._event_handler.handlerError(handler_ctx, 'executeWithParameter', ex) - result = Thrift.TApplicationException(message=repr(ex)) - return result - @thrift_process_method(executeJson_args, oneway=False) def process_executeJson(self, args, handler_ctx): result = executeJson_result() @@ -1726,14 +1346,14 @@ def process_executeJson(self, args, handler_ctx): result = Thrift.TApplicationException(message=repr(ex)) return result - @thrift_process_method(executeJsonWithParameter_args, oneway=False) - def process_executeJsonWithParameter(self, args, handler_ctx): - result = executeJsonWithParameter_result() + @thrift_process_method(verifyClientVersion_args, oneway=False) + def process_verifyClientVersion(self, args, handler_ctx): + result = verifyClientVersion_result() try: - result.success = self._handler.executeJsonWithParameter(handler_ctx, args.sessionId, args.stmt, args.parameterMap) + result.success = self._handler.verifyClientVersion(handler_ctx, args.req) except: ex = sys.exc_info()[1] - self._event_handler.handlerError(handler_ctx, 'executeJsonWithParameter', ex) + self._event_handler.handlerError(handler_ctx, 'verifyClientVersion', ex) result = Thrift.TApplicationException(message=repr(ex)) return result diff --git a/nebula2/graph/constants.py b/nebula2/graph/constants.py index fa06a708..9055e7c4 100644 --- a/nebula2/graph/constants.py +++ b/nebula2/graph/constants.py @@ -16,5 +16,5 @@ import nebula2.common.ttypes -from .ttypes import UTF8STRINGS, ProfilingStats, PlanNodeBranchInfo, Pair, PlanNodeDescription, PlanDescription, ExecutionResponse, AuthResponse +from .ttypes import UTF8STRINGS, ProfilingStats, PlanNodeBranchInfo, Pair, PlanNodeDescription, PlanDescription, ExecutionResponse, AuthResponse, VerifyClientVersionResp, VerifyClientVersionReq diff --git a/nebula2/graph/ttypes.py b/nebula2/graph/ttypes.py index 416e0d60..d07b271a 100644 --- a/nebula2/graph/ttypes.py +++ b/nebula2/graph/ttypes.py @@ -31,7 +31,7 @@ all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -__all__ = ['UTF8STRINGS', 'ProfilingStats', 'PlanNodeBranchInfo', 'Pair', 'PlanNodeDescription', 'PlanDescription', 'ExecutionResponse', 'AuthResponse'] +__all__ = ['UTF8STRINGS', 'ProfilingStats', 'PlanNodeBranchInfo', 'Pair', 'PlanNodeDescription', 'PlanDescription', 'ExecutionResponse', 'AuthResponse', 'VerifyClientVersionResp', 'VerifyClientVersionReq'] class ProfilingStats: """ @@ -80,13 +80,13 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.other_stats = {} - (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() + (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() if _size0 >= 0: for _i4 in six.moves.range(_size0): _key5 = iprot.readString() _val6 = iprot.readString() self.other_stats[_key5] = _val6 - else: + else: while iprot.peekMap(): _key7 = iprot.readString() _val8 = iprot.readString() @@ -155,7 +155,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -242,7 +242,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -329,7 +329,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -394,7 +394,7 @@ def read(self, iprot): _elem16 = Pair() _elem16.read(iprot) self.description.append(_elem16) - else: + else: while iprot.peekList(): _elem17 = Pair() _elem17.read(iprot) @@ -411,7 +411,7 @@ def read(self, iprot): _elem23 = ProfilingStats() _elem23.read(iprot) self.profiles.append(_elem23) - else: + else: while iprot.peekList(): _elem24 = ProfilingStats() _elem24.read(iprot) @@ -433,7 +433,7 @@ def read(self, iprot): for _i29 in six.moves.range(_size25): _elem30 = iprot.readI64() self.dependencies.append(_elem30) - else: + else: while iprot.peekList(): _elem31 = iprot.readI64() self.dependencies.append(_elem31) @@ -530,7 +530,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -577,7 +577,7 @@ def read(self, iprot): _elem40 = PlanNodeDescription() _elem40.read(iprot) self.plan_node_descs.append(_elem40) - else: + else: while iprot.peekList(): _elem41 = PlanNodeDescription() _elem41.read(iprot) @@ -588,13 +588,13 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.node_index_map = {} - (_ktype43, _vtype44, _size42 ) = iprot.readMapBegin() + (_ktype43, _vtype44, _size42 ) = iprot.readMapBegin() if _size42 >= 0: for _i46 in six.moves.range(_size42): _key47 = iprot.readI64() _val48 = iprot.readI64() self.node_index_map[_key47] = _val48 - else: + else: while iprot.peekMap(): _key49 = iprot.readI64() _val50 = iprot.readI64() @@ -676,7 +676,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -835,7 +835,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -964,7 +964,167 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +class VerifyClientVersionResp: + """ + Attributes: + - error_code + - error_msg + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.error_code = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.error_msg = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('VerifyClientVersionResp') + if self.error_code != None: + oprot.writeFieldBegin('error_code', TType.I32, 1) + oprot.writeI32(self.error_code) + oprot.writeFieldEnd() + if self.error_msg != None: + oprot.writeFieldBegin('error_msg', TType.STRING, 2) + oprot.writeString(self.error_msg) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.error_code is not None: + value = pprint.pformat(self.error_code, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' error_code=%s' % (value)) + if self.error_msg is not None: + value = pprint.pformat(self.error_msg, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' error_msg=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +class VerifyClientVersionReq: + """ + Attributes: + - version + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.version = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('VerifyClientVersionReq') + if self.version != None: + oprot.writeFieldBegin('version', TType.STRING, 1) + oprot.writeString(self.version) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.version is not None: + value = pprint.pformat(self.version, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' version=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1213,5 +1373,54 @@ def AuthResponse__setstate__(self, state): AuthResponse.__getstate__ = lambda self: self.__dict__.copy() AuthResponse.__setstate__ = AuthResponse__setstate__ +all_structs.append(VerifyClientVersionResp) +VerifyClientVersionResp.thrift_spec = ( + None, # 0 + (1, TType.I32, 'error_code', nebula2.common.ttypes.ErrorCode, None, 0, ), # 1 + (2, TType.STRING, 'error_msg', False, None, 1, ), # 2 +) + +VerifyClientVersionResp.thrift_struct_annotations = { +} +VerifyClientVersionResp.thrift_field_annotations = { +} + +def VerifyClientVersionResp__init__(self, error_code=None, error_msg=None,): + self.error_code = error_code + self.error_msg = error_msg + +VerifyClientVersionResp.__init__ = VerifyClientVersionResp__init__ + +def VerifyClientVersionResp__setstate__(self, state): + state.setdefault('error_code', None) + state.setdefault('error_msg', None) + self.__dict__ = state + +VerifyClientVersionResp.__getstate__ = lambda self: self.__dict__.copy() +VerifyClientVersionResp.__setstate__ = VerifyClientVersionResp__setstate__ + +all_structs.append(VerifyClientVersionReq) +VerifyClientVersionReq.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'version', False, "2.6.0", 0, ), # 1 +) + +VerifyClientVersionReq.thrift_struct_annotations = { +} +VerifyClientVersionReq.thrift_field_annotations = { +} + +def VerifyClientVersionReq__init__(self, version=VerifyClientVersionReq.thrift_spec[1][4],): + self.version = version + +VerifyClientVersionReq.__init__ = VerifyClientVersionReq__init__ + +def VerifyClientVersionReq__setstate__(self, state): + state.setdefault('version', "2.6.0") + self.__dict__ = state + +VerifyClientVersionReq.__getstate__ = lambda self: self.__dict__.copy() +VerifyClientVersionReq.__setstate__ = VerifyClientVersionReq__setstate__ + fix_spec(all_structs) del all_structs diff --git a/nebula2/meta/MetaService-remote b/nebula2/meta/MetaService-remote index cc2eab49..c8366d48 100755 --- a/nebula2/meta/MetaService-remote +++ b/nebula2/meta/MetaService-remote @@ -131,6 +131,7 @@ FUNCTIONS = { 'reportTaskFinish': Function('reportTaskFinish', 'MetaService', 'ExecResp', [('ReportTaskReq', 'req', 'ReportTaskReq')]), 'listCluster': Function('listCluster', 'MetaService', 'ListClusterInfoResp', [('ListClusterInfoReq', 'req', 'ListClusterInfoReq')]), 'getMetaDirInfo': Function('getMetaDirInfo', 'MetaService', 'GetMetaDirInfoResp', [('GetMetaDirInfoReq', 'req', 'GetMetaDirInfoReq')]), + 'verifyClientVersion': Function('verifyClientVersion', 'MetaService', 'VerifyClientVersionResp', [('VerifyClientVersionReq', 'req', 'VerifyClientVersionReq')]), } SERVICE_NAMES = ['MetaService', ] diff --git a/nebula2/meta/MetaService.py b/nebula2/meta/MetaService.py index b18cae26..b0dc3f4a 100644 --- a/nebula2/meta/MetaService.py +++ b/nebula2/meta/MetaService.py @@ -13,7 +13,7 @@ from nebula2.fbthrift.protocol.TProtocol import TProtocolException -from .ttypes import UTF8STRINGS, AlterSchemaOp, RoleType, PropertyType, IsolationLevel, HostStatus, SnapshotStatus, AdminJobOp, AdminCmd, JobStatus, ListHostType, HostRole, TaskResult, ConfigModule, ConfigMode, ListenerType, FTServiceType, QueryStatus, ID, ColumnTypeDef, ColumnDef, SchemaProp, Schema, IdName, SpaceDesc, SpaceItem, TagItem, AlterSchemaItem, EdgeItem, IndexItem, HostItem, UserItem, RoleItem, ExecResp, AdminJobReq, JobDesc, TaskDesc, AdminJobResult, AdminJobResp, Correlativity, StatsItem, CreateSpaceReq, CreateSpaceAsReq, DropSpaceReq, ListSpacesReq, ListSpacesResp, GetSpaceReq, GetSpaceResp, CreateTagReq, AlterTagReq, DropTagReq, ListTagsReq, ListTagsResp, GetTagReq, GetTagResp, CreateEdgeReq, AlterEdgeReq, GetEdgeReq, GetEdgeResp, DropEdgeReq, ListEdgesReq, ListEdgesResp, ListHostsReq, ListHostsResp, PartItem, ListPartsReq, ListPartsResp, GetPartsAllocReq, GetPartsAllocResp, MultiPutReq, GetReq, GetResp, MultiGetReq, MultiGetResp, RemoveReq, RemoveRangeReq, ScanReq, ScanResp, HBResp, LeaderInfo, HBReq, IndexFieldDef, CreateTagIndexReq, DropTagIndexReq, GetTagIndexReq, GetTagIndexResp, ListTagIndexesReq, ListTagIndexesResp, CreateEdgeIndexReq, DropEdgeIndexReq, GetEdgeIndexReq, GetEdgeIndexResp, ListEdgeIndexesReq, ListEdgeIndexesResp, RebuildIndexReq, CreateUserReq, DropUserReq, AlterUserReq, GrantRoleReq, RevokeRoleReq, ListUsersReq, ListUsersResp, ListRolesReq, ListRolesResp, GetUserRolesReq, ChangePasswordReq, BalanceReq, BalanceTask, BalanceResp, LeaderBalanceReq, ConfigItem, RegConfigReq, GetConfigReq, GetConfigResp, SetConfigReq, ListConfigsReq, ListConfigsResp, CreateSnapshotReq, DropSnapshotReq, ListSnapshotsReq, Snapshot, ListSnapshotsResp, ListIndexStatusReq, IndexStatus, ListIndexStatusResp, AddZoneReq, DropZoneReq, AddHostIntoZoneReq, DropHostFromZoneReq, GetZoneReq, GetZoneResp, ListZonesReq, Zone, ListZonesResp, AddGroupReq, DropGroupReq, AddZoneIntoGroupReq, DropZoneFromGroupReq, GetGroupReq, GetGroupResp, ListGroupsReq, Group, ListGroupsResp, AddListenerReq, RemoveListenerReq, ListListenerReq, ListenerInfo, ListListenerResp, GetStatsReq, GetStatsResp, BackupInfo, SpaceBackupInfo, BackupMeta, CreateBackupReq, CreateBackupResp, HostPair, RestoreMetaReq, FTClient, SignInFTServiceReq, SignOutFTServiceReq, ListFTClientsReq, ListFTClientsResp, FTIndex, CreateFTIndexReq, DropFTIndexReq, ListFTIndexesReq, ListFTIndexesResp, QueryDesc, Session, CreateSessionReq, CreateSessionResp, UpdateSessionsReq, UpdateSessionsResp, ListSessionsReq, ListSessionsResp, GetSessionReq, GetSessionResp, RemoveSessionReq, KillQueryReq, ReportTaskReq, ListClusterInfoResp, ListClusterInfoReq, GetMetaDirInfoResp, GetMetaDirInfoReq, SchemaVer, ClusterID +from .ttypes import UTF8STRINGS, AlterSchemaOp, RoleType, GeoShape, PropertyType, IsolationLevel, HostStatus, SnapshotStatus, AdminJobOp, AdminCmd, JobStatus, ListHostType, HostRole, TaskResult, ConfigModule, ConfigMode, ListenerType, FTServiceType, QueryStatus, ID, ColumnTypeDef, ColumnDef, SchemaProp, Schema, IdName, SpaceDesc, SpaceItem, TagItem, AlterSchemaItem, EdgeItem, IndexItem, HostItem, UserItem, RoleItem, ExecResp, AdminJobReq, JobDesc, TaskDesc, AdminJobResult, AdminJobResp, Correlativity, StatsItem, CreateSpaceReq, CreateSpaceAsReq, DropSpaceReq, ListSpacesReq, ListSpacesResp, GetSpaceReq, GetSpaceResp, CreateTagReq, AlterTagReq, DropTagReq, ListTagsReq, ListTagsResp, GetTagReq, GetTagResp, CreateEdgeReq, AlterEdgeReq, GetEdgeReq, GetEdgeResp, DropEdgeReq, ListEdgesReq, ListEdgesResp, ListHostsReq, ListHostsResp, PartItem, ListPartsReq, ListPartsResp, GetPartsAllocReq, GetPartsAllocResp, MultiPutReq, GetReq, GetResp, MultiGetReq, MultiGetResp, RemoveReq, RemoveRangeReq, ScanReq, ScanResp, HBResp, LeaderInfo, HBReq, IndexFieldDef, CreateTagIndexReq, DropTagIndexReq, GetTagIndexReq, GetTagIndexResp, ListTagIndexesReq, ListTagIndexesResp, CreateEdgeIndexReq, DropEdgeIndexReq, GetEdgeIndexReq, GetEdgeIndexResp, ListEdgeIndexesReq, ListEdgeIndexesResp, RebuildIndexReq, CreateUserReq, DropUserReq, AlterUserReq, GrantRoleReq, RevokeRoleReq, ListUsersReq, ListUsersResp, ListRolesReq, ListRolesResp, GetUserRolesReq, ChangePasswordReq, BalanceReq, BalanceTask, BalanceResp, LeaderBalanceReq, ConfigItem, RegConfigReq, GetConfigReq, GetConfigResp, SetConfigReq, ListConfigsReq, ListConfigsResp, CreateSnapshotReq, DropSnapshotReq, ListSnapshotsReq, Snapshot, ListSnapshotsResp, ListIndexStatusReq, IndexStatus, ListIndexStatusResp, AddZoneReq, DropZoneReq, AddHostIntoZoneReq, DropHostFromZoneReq, GetZoneReq, GetZoneResp, ListZonesReq, Zone, ListZonesResp, AddGroupReq, DropGroupReq, AddZoneIntoGroupReq, DropZoneFromGroupReq, GetGroupReq, GetGroupResp, ListGroupsReq, Group, ListGroupsResp, AddListenerReq, RemoveListenerReq, ListListenerReq, ListenerInfo, ListListenerResp, GetStatsReq, GetStatsResp, BackupInfo, SpaceBackupInfo, BackupMeta, CreateBackupReq, CreateBackupResp, HostPair, RestoreMetaReq, FTClient, SignInFTServiceReq, SignOutFTServiceReq, ListFTClientsReq, ListFTClientsResp, FTIndex, CreateFTIndexReq, DropFTIndexReq, ListFTIndexesReq, ListFTIndexesResp, QueryDesc, Session, CreateSessionReq, CreateSessionResp, UpdateSessionsReq, UpdateSessionsResp, ListSessionsReq, ListSessionsResp, GetSessionReq, GetSessionResp, RemoveSessionReq, KillQueryReq, ReportTaskReq, ListClusterInfoResp, ListClusterInfoReq, GetMetaDirInfoResp, GetMetaDirInfoReq, VerifyClientVersionResp, VerifyClientVersionReq, SchemaVer, ClusterID import nebula2.common.ttypes from nebula2.fbthrift.Thrift import TProcessor @@ -666,6 +666,13 @@ def getMetaDirInfo(self, req=None): """ pass + def verifyClientVersion(self, req=None): + """ + Parameters: + - req + """ + pass + class ContextIface: def createSpace(self, handler_ctx, req=None): @@ -1291,6 +1298,13 @@ def getMetaDirInfo(self, handler_ctx, req=None): """ pass + def verifyClientVersion(self, handler_ctx, req=None): + """ + Parameters: + - req + """ + pass + # HELPER FUNCTIONS AND STRUCTURES @@ -1359,7 +1373,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1456,7 +1470,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1552,7 +1566,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1649,7 +1663,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1745,7 +1759,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1842,7 +1856,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1938,7 +1952,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2035,7 +2049,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2131,7 +2145,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2228,7 +2242,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2324,7 +2338,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2421,7 +2435,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2517,7 +2531,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2614,7 +2628,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2710,7 +2724,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2807,7 +2821,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2903,7 +2917,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3000,7 +3014,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3096,7 +3110,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3193,7 +3207,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3289,7 +3303,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3386,7 +3400,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3482,7 +3496,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3579,7 +3593,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3675,7 +3689,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3772,7 +3786,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3868,7 +3882,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3965,7 +3979,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4061,7 +4075,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4158,7 +4172,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4254,7 +4268,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4351,7 +4365,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4447,7 +4461,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4544,7 +4558,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4640,7 +4654,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4737,7 +4751,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4833,7 +4847,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4930,7 +4944,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5026,7 +5040,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5123,7 +5137,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5219,7 +5233,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5316,7 +5330,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5412,7 +5426,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5509,7 +5523,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5605,7 +5619,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5702,7 +5716,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5798,7 +5812,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5895,7 +5909,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5991,7 +6005,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6088,7 +6102,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6184,7 +6198,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6281,7 +6295,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6377,7 +6391,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6474,7 +6488,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6570,7 +6584,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6667,7 +6681,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6763,7 +6777,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6860,7 +6874,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6956,7 +6970,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7053,7 +7067,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7149,7 +7163,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7246,7 +7260,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7342,7 +7356,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7439,7 +7453,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7535,7 +7549,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7632,7 +7646,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7728,7 +7742,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7825,7 +7839,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7921,7 +7935,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8018,7 +8032,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8114,7 +8128,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8211,7 +8225,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8307,7 +8321,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8404,7 +8418,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8500,7 +8514,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8597,7 +8611,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8693,7 +8707,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8790,7 +8804,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8886,7 +8900,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8983,7 +8997,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9079,7 +9093,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9176,7 +9190,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9272,7 +9286,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9369,7 +9383,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9465,7 +9479,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9562,7 +9576,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9658,7 +9672,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9755,7 +9769,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9851,7 +9865,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9948,7 +9962,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10044,7 +10058,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10141,7 +10155,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10237,7 +10251,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10334,7 +10348,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10430,7 +10444,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10527,7 +10541,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10623,7 +10637,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10720,7 +10734,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10816,7 +10830,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10913,7 +10927,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11009,7 +11023,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11106,7 +11120,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11202,7 +11216,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11299,7 +11313,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11395,7 +11409,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11492,7 +11506,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11588,7 +11602,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11685,7 +11699,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11781,7 +11795,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11878,7 +11892,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11974,7 +11988,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12071,7 +12085,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12167,7 +12181,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12264,7 +12278,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12360,7 +12374,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12457,7 +12471,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12553,7 +12567,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12650,7 +12664,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12746,7 +12760,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12843,7 +12857,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12939,7 +12953,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13036,7 +13050,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13132,7 +13146,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13229,7 +13243,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13325,7 +13339,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13422,7 +13436,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13518,7 +13532,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13615,7 +13629,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13711,7 +13725,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13808,7 +13822,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13904,7 +13918,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14001,7 +14015,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14097,7 +14111,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14194,7 +14208,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14290,7 +14304,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14387,7 +14401,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14483,7 +14497,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14580,7 +14594,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14676,7 +14690,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14773,7 +14787,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14869,7 +14883,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14966,7 +14980,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15062,7 +15076,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15159,7 +15173,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15255,7 +15269,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15352,7 +15366,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15448,7 +15462,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15545,7 +15559,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15641,7 +15655,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15738,7 +15752,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15834,7 +15848,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15931,7 +15945,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16027,7 +16041,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16124,7 +16138,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16220,7 +16234,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16317,7 +16331,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16413,7 +16427,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16510,7 +16524,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16606,7 +16620,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16703,7 +16717,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16799,7 +16813,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16896,7 +16910,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16992,7 +17006,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17089,7 +17103,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17185,7 +17199,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17282,7 +17296,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17378,7 +17392,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17475,7 +17489,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17571,7 +17585,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17668,7 +17682,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17764,7 +17778,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17861,7 +17875,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17957,7 +17971,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -18054,7 +18068,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -18150,7 +18164,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -18247,7 +18261,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -18343,7 +18357,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -18440,7 +18454,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -18471,6 +18485,199 @@ def getMetaDirInfo_result__setstate__(self, state): getMetaDirInfo_result.__getstate__ = lambda self: self.__dict__.copy() getMetaDirInfo_result.__setstate__ = getMetaDirInfo_result__setstate__ +class verifyClientVersion_args: + """ + Attributes: + - req + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = VerifyClientVersionReq() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('verifyClientVersion_args') + if self.req != None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.req is not None: + value = pprint.pformat(self.req, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' req=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +all_structs.append(verifyClientVersion_args) +verifyClientVersion_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', [VerifyClientVersionReq, VerifyClientVersionReq.thrift_spec, False], None, 2, ), # 1 +) + +verifyClientVersion_args.thrift_struct_annotations = { +} +verifyClientVersion_args.thrift_field_annotations = { +} + +def verifyClientVersion_args__init__(self, req=None,): + self.req = req + +verifyClientVersion_args.__init__ = verifyClientVersion_args__init__ + +def verifyClientVersion_args__setstate__(self, state): + state.setdefault('req', None) + self.__dict__ = state + +verifyClientVersion_args.__getstate__ = lambda self: self.__dict__.copy() +verifyClientVersion_args.__setstate__ = verifyClientVersion_args__setstate__ + +class verifyClientVersion_result: + """ + Attributes: + - success + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = VerifyClientVersionResp() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('verifyClientVersion_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.success is not None: + value = pprint.pformat(self.success, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' success=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +all_structs.append(verifyClientVersion_result) +verifyClientVersion_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [VerifyClientVersionResp, VerifyClientVersionResp.thrift_spec, False], None, 2, ), # 0 +) + +verifyClientVersion_result.thrift_struct_annotations = { +} +verifyClientVersion_result.thrift_field_annotations = { +} + +def verifyClientVersion_result__init__(self, success=None,): + self.success = success + +verifyClientVersion_result.__init__ = verifyClientVersion_result__init__ + +def verifyClientVersion_result__setstate__(self, state): + state.setdefault('success', None) + self.__dict__ = state + +verifyClientVersion_result.__getstate__ = lambda self: self.__dict__.copy() +verifyClientVersion_result.__setstate__ = verifyClientVersion_result__setstate__ + class Client(Iface): def __enter__(self): return self @@ -21156,6 +21363,36 @@ def recv_getMetaDirInfo(self, ): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getMetaDirInfo failed: unknown result"); + def verifyClientVersion(self, req=None): + """ + Parameters: + - req + """ + self.send_verifyClientVersion(req) + return self.recv_verifyClientVersion() + + def send_verifyClientVersion(self, req=None): + self._oprot.writeMessageBegin('verifyClientVersion', TMessageType.CALL, self._seqid) + args = verifyClientVersion_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_verifyClientVersion(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = verifyClientVersion_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyClientVersion failed: unknown result"); + class Processor(Iface, TProcessor): _onewayMethods = () @@ -21343,6 +21580,8 @@ def __init__(self, handler): self._priorityMap["listCluster"] = TPriority.NORMAL self._processMap["getMetaDirInfo"] = Processor.process_getMetaDirInfo self._priorityMap["getMetaDirInfo"] = TPriority.NORMAL + self._processMap["verifyClientVersion"] = Processor.process_verifyClientVersion + self._priorityMap["verifyClientVersion"] = TPriority.NORMAL def onewayMethods(self): l = [] @@ -22331,6 +22570,17 @@ def process_getMetaDirInfo(self, args, handler_ctx): result = Thrift.TApplicationException(message=repr(ex)) return result + @thrift_process_method(verifyClientVersion_args, oneway=False) + def process_verifyClientVersion(self, args, handler_ctx): + result = verifyClientVersion_result() + try: + result.success = self._handler.verifyClientVersion(args.req) + except: + ex = sys.exc_info()[1] + self._event_handler.handlerError(handler_ctx, 'verifyClientVersion', ex) + result = Thrift.TApplicationException(message=repr(ex)) + return result + Iface._processor_type = Processor class ContextProcessor(ContextIface, TProcessor): @@ -22519,6 +22769,8 @@ def __init__(self, handler): self._priorityMap["listCluster"] = TPriority.NORMAL self._processMap["getMetaDirInfo"] = ContextProcessor.process_getMetaDirInfo self._priorityMap["getMetaDirInfo"] = TPriority.NORMAL + self._processMap["verifyClientVersion"] = ContextProcessor.process_verifyClientVersion + self._priorityMap["verifyClientVersion"] = TPriority.NORMAL def onewayMethods(self): l = [] @@ -23507,6 +23759,17 @@ def process_getMetaDirInfo(self, args, handler_ctx): result = Thrift.TApplicationException(message=repr(ex)) return result + @thrift_process_method(verifyClientVersion_args, oneway=False) + def process_verifyClientVersion(self, args, handler_ctx): + result = verifyClientVersion_result() + try: + result.success = self._handler.verifyClientVersion(handler_ctx, args.req) + except: + ex = sys.exc_info()[1] + self._event_handler.handlerError(handler_ctx, 'verifyClientVersion', ex) + result = Thrift.TApplicationException(message=repr(ex)) + return result + ContextIface._processor_type = ContextProcessor fix_spec(all_structs) diff --git a/nebula2/meta/constants.py b/nebula2/meta/constants.py index e368b678..39b81f67 100644 --- a/nebula2/meta/constants.py +++ b/nebula2/meta/constants.py @@ -16,5 +16,5 @@ import nebula2.common.ttypes -from .ttypes import UTF8STRINGS, AlterSchemaOp, RoleType, PropertyType, IsolationLevel, HostStatus, SnapshotStatus, AdminJobOp, AdminCmd, JobStatus, ListHostType, HostRole, TaskResult, ConfigModule, ConfigMode, ListenerType, FTServiceType, QueryStatus, ID, ColumnTypeDef, ColumnDef, SchemaProp, Schema, IdName, SpaceDesc, SpaceItem, TagItem, AlterSchemaItem, EdgeItem, IndexItem, HostItem, UserItem, RoleItem, ExecResp, AdminJobReq, JobDesc, TaskDesc, AdminJobResult, AdminJobResp, Correlativity, StatsItem, CreateSpaceReq, CreateSpaceAsReq, DropSpaceReq, ListSpacesReq, ListSpacesResp, GetSpaceReq, GetSpaceResp, CreateTagReq, AlterTagReq, DropTagReq, ListTagsReq, ListTagsResp, GetTagReq, GetTagResp, CreateEdgeReq, AlterEdgeReq, GetEdgeReq, GetEdgeResp, DropEdgeReq, ListEdgesReq, ListEdgesResp, ListHostsReq, ListHostsResp, PartItem, ListPartsReq, ListPartsResp, GetPartsAllocReq, GetPartsAllocResp, MultiPutReq, GetReq, GetResp, MultiGetReq, MultiGetResp, RemoveReq, RemoveRangeReq, ScanReq, ScanResp, HBResp, LeaderInfo, HBReq, IndexFieldDef, CreateTagIndexReq, DropTagIndexReq, GetTagIndexReq, GetTagIndexResp, ListTagIndexesReq, ListTagIndexesResp, CreateEdgeIndexReq, DropEdgeIndexReq, GetEdgeIndexReq, GetEdgeIndexResp, ListEdgeIndexesReq, ListEdgeIndexesResp, RebuildIndexReq, CreateUserReq, DropUserReq, AlterUserReq, GrantRoleReq, RevokeRoleReq, ListUsersReq, ListUsersResp, ListRolesReq, ListRolesResp, GetUserRolesReq, ChangePasswordReq, BalanceReq, BalanceTask, BalanceResp, LeaderBalanceReq, ConfigItem, RegConfigReq, GetConfigReq, GetConfigResp, SetConfigReq, ListConfigsReq, ListConfigsResp, CreateSnapshotReq, DropSnapshotReq, ListSnapshotsReq, Snapshot, ListSnapshotsResp, ListIndexStatusReq, IndexStatus, ListIndexStatusResp, AddZoneReq, DropZoneReq, AddHostIntoZoneReq, DropHostFromZoneReq, GetZoneReq, GetZoneResp, ListZonesReq, Zone, ListZonesResp, AddGroupReq, DropGroupReq, AddZoneIntoGroupReq, DropZoneFromGroupReq, GetGroupReq, GetGroupResp, ListGroupsReq, Group, ListGroupsResp, AddListenerReq, RemoveListenerReq, ListListenerReq, ListenerInfo, ListListenerResp, GetStatsReq, GetStatsResp, BackupInfo, SpaceBackupInfo, BackupMeta, CreateBackupReq, CreateBackupResp, HostPair, RestoreMetaReq, FTClient, SignInFTServiceReq, SignOutFTServiceReq, ListFTClientsReq, ListFTClientsResp, FTIndex, CreateFTIndexReq, DropFTIndexReq, ListFTIndexesReq, ListFTIndexesResp, QueryDesc, Session, CreateSessionReq, CreateSessionResp, UpdateSessionsReq, UpdateSessionsResp, ListSessionsReq, ListSessionsResp, GetSessionReq, GetSessionResp, RemoveSessionReq, KillQueryReq, ReportTaskReq, ListClusterInfoResp, ListClusterInfoReq, GetMetaDirInfoResp, GetMetaDirInfoReq, SchemaVer, ClusterID +from .ttypes import UTF8STRINGS, AlterSchemaOp, RoleType, GeoShape, PropertyType, IsolationLevel, HostStatus, SnapshotStatus, AdminJobOp, AdminCmd, JobStatus, ListHostType, HostRole, TaskResult, ConfigModule, ConfigMode, ListenerType, FTServiceType, QueryStatus, ID, ColumnTypeDef, ColumnDef, SchemaProp, Schema, IdName, SpaceDesc, SpaceItem, TagItem, AlterSchemaItem, EdgeItem, IndexItem, HostItem, UserItem, RoleItem, ExecResp, AdminJobReq, JobDesc, TaskDesc, AdminJobResult, AdminJobResp, Correlativity, StatsItem, CreateSpaceReq, CreateSpaceAsReq, DropSpaceReq, ListSpacesReq, ListSpacesResp, GetSpaceReq, GetSpaceResp, CreateTagReq, AlterTagReq, DropTagReq, ListTagsReq, ListTagsResp, GetTagReq, GetTagResp, CreateEdgeReq, AlterEdgeReq, GetEdgeReq, GetEdgeResp, DropEdgeReq, ListEdgesReq, ListEdgesResp, ListHostsReq, ListHostsResp, PartItem, ListPartsReq, ListPartsResp, GetPartsAllocReq, GetPartsAllocResp, MultiPutReq, GetReq, GetResp, MultiGetReq, MultiGetResp, RemoveReq, RemoveRangeReq, ScanReq, ScanResp, HBResp, LeaderInfo, HBReq, IndexFieldDef, CreateTagIndexReq, DropTagIndexReq, GetTagIndexReq, GetTagIndexResp, ListTagIndexesReq, ListTagIndexesResp, CreateEdgeIndexReq, DropEdgeIndexReq, GetEdgeIndexReq, GetEdgeIndexResp, ListEdgeIndexesReq, ListEdgeIndexesResp, RebuildIndexReq, CreateUserReq, DropUserReq, AlterUserReq, GrantRoleReq, RevokeRoleReq, ListUsersReq, ListUsersResp, ListRolesReq, ListRolesResp, GetUserRolesReq, ChangePasswordReq, BalanceReq, BalanceTask, BalanceResp, LeaderBalanceReq, ConfigItem, RegConfigReq, GetConfigReq, GetConfigResp, SetConfigReq, ListConfigsReq, ListConfigsResp, CreateSnapshotReq, DropSnapshotReq, ListSnapshotsReq, Snapshot, ListSnapshotsResp, ListIndexStatusReq, IndexStatus, ListIndexStatusResp, AddZoneReq, DropZoneReq, AddHostIntoZoneReq, DropHostFromZoneReq, GetZoneReq, GetZoneResp, ListZonesReq, Zone, ListZonesResp, AddGroupReq, DropGroupReq, AddZoneIntoGroupReq, DropZoneFromGroupReq, GetGroupReq, GetGroupResp, ListGroupsReq, Group, ListGroupsResp, AddListenerReq, RemoveListenerReq, ListListenerReq, ListenerInfo, ListListenerResp, GetStatsReq, GetStatsResp, BackupInfo, SpaceBackupInfo, BackupMeta, CreateBackupReq, CreateBackupResp, HostPair, RestoreMetaReq, FTClient, SignInFTServiceReq, SignOutFTServiceReq, ListFTClientsReq, ListFTClientsResp, FTIndex, CreateFTIndexReq, DropFTIndexReq, ListFTIndexesReq, ListFTIndexesResp, QueryDesc, Session, CreateSessionReq, CreateSessionResp, UpdateSessionsReq, UpdateSessionsResp, ListSessionsReq, ListSessionsResp, GetSessionReq, GetSessionResp, RemoveSessionReq, KillQueryReq, ReportTaskReq, ListClusterInfoResp, ListClusterInfoReq, GetMetaDirInfoResp, GetMetaDirInfoReq, VerifyClientVersionResp, VerifyClientVersionReq, SchemaVer, ClusterID diff --git a/nebula2/meta/ttypes.py b/nebula2/meta/ttypes.py index ffc00ea4..f1fd795e 100644 --- a/nebula2/meta/ttypes.py +++ b/nebula2/meta/ttypes.py @@ -31,7 +31,7 @@ all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -__all__ = ['UTF8STRINGS', 'AlterSchemaOp', 'RoleType', 'PropertyType', 'IsolationLevel', 'HostStatus', 'SnapshotStatus', 'AdminJobOp', 'AdminCmd', 'JobStatus', 'ListHostType', 'HostRole', 'TaskResult', 'ConfigModule', 'ConfigMode', 'ListenerType', 'FTServiceType', 'QueryStatus', 'ID', 'ColumnTypeDef', 'ColumnDef', 'SchemaProp', 'Schema', 'IdName', 'SpaceDesc', 'SpaceItem', 'TagItem', 'AlterSchemaItem', 'EdgeItem', 'IndexItem', 'HostItem', 'UserItem', 'RoleItem', 'ExecResp', 'AdminJobReq', 'JobDesc', 'TaskDesc', 'AdminJobResult', 'AdminJobResp', 'Correlativity', 'StatsItem', 'CreateSpaceReq', 'CreateSpaceAsReq', 'DropSpaceReq', 'ListSpacesReq', 'ListSpacesResp', 'GetSpaceReq', 'GetSpaceResp', 'CreateTagReq', 'AlterTagReq', 'DropTagReq', 'ListTagsReq', 'ListTagsResp', 'GetTagReq', 'GetTagResp', 'CreateEdgeReq', 'AlterEdgeReq', 'GetEdgeReq', 'GetEdgeResp', 'DropEdgeReq', 'ListEdgesReq', 'ListEdgesResp', 'ListHostsReq', 'ListHostsResp', 'PartItem', 'ListPartsReq', 'ListPartsResp', 'GetPartsAllocReq', 'GetPartsAllocResp', 'MultiPutReq', 'GetReq', 'GetResp', 'MultiGetReq', 'MultiGetResp', 'RemoveReq', 'RemoveRangeReq', 'ScanReq', 'ScanResp', 'HBResp', 'LeaderInfo', 'HBReq', 'IndexFieldDef', 'CreateTagIndexReq', 'DropTagIndexReq', 'GetTagIndexReq', 'GetTagIndexResp', 'ListTagIndexesReq', 'ListTagIndexesResp', 'CreateEdgeIndexReq', 'DropEdgeIndexReq', 'GetEdgeIndexReq', 'GetEdgeIndexResp', 'ListEdgeIndexesReq', 'ListEdgeIndexesResp', 'RebuildIndexReq', 'CreateUserReq', 'DropUserReq', 'AlterUserReq', 'GrantRoleReq', 'RevokeRoleReq', 'ListUsersReq', 'ListUsersResp', 'ListRolesReq', 'ListRolesResp', 'GetUserRolesReq', 'ChangePasswordReq', 'BalanceReq', 'BalanceTask', 'BalanceResp', 'LeaderBalanceReq', 'ConfigItem', 'RegConfigReq', 'GetConfigReq', 'GetConfigResp', 'SetConfigReq', 'ListConfigsReq', 'ListConfigsResp', 'CreateSnapshotReq', 'DropSnapshotReq', 'ListSnapshotsReq', 'Snapshot', 'ListSnapshotsResp', 'ListIndexStatusReq', 'IndexStatus', 'ListIndexStatusResp', 'AddZoneReq', 'DropZoneReq', 'AddHostIntoZoneReq', 'DropHostFromZoneReq', 'GetZoneReq', 'GetZoneResp', 'ListZonesReq', 'Zone', 'ListZonesResp', 'AddGroupReq', 'DropGroupReq', 'AddZoneIntoGroupReq', 'DropZoneFromGroupReq', 'GetGroupReq', 'GetGroupResp', 'ListGroupsReq', 'Group', 'ListGroupsResp', 'AddListenerReq', 'RemoveListenerReq', 'ListListenerReq', 'ListenerInfo', 'ListListenerResp', 'GetStatsReq', 'GetStatsResp', 'BackupInfo', 'SpaceBackupInfo', 'BackupMeta', 'CreateBackupReq', 'CreateBackupResp', 'HostPair', 'RestoreMetaReq', 'FTClient', 'SignInFTServiceReq', 'SignOutFTServiceReq', 'ListFTClientsReq', 'ListFTClientsResp', 'FTIndex', 'CreateFTIndexReq', 'DropFTIndexReq', 'ListFTIndexesReq', 'ListFTIndexesResp', 'QueryDesc', 'Session', 'CreateSessionReq', 'CreateSessionResp', 'UpdateSessionsReq', 'UpdateSessionsResp', 'ListSessionsReq', 'ListSessionsResp', 'GetSessionReq', 'GetSessionResp', 'RemoveSessionReq', 'KillQueryReq', 'ReportTaskReq', 'ListClusterInfoResp', 'ListClusterInfoReq', 'GetMetaDirInfoResp', 'GetMetaDirInfoReq', 'SchemaVer', 'ClusterID'] +__all__ = ['UTF8STRINGS', 'AlterSchemaOp', 'RoleType', 'GeoShape', 'PropertyType', 'IsolationLevel', 'HostStatus', 'SnapshotStatus', 'AdminJobOp', 'AdminCmd', 'JobStatus', 'ListHostType', 'HostRole', 'TaskResult', 'ConfigModule', 'ConfigMode', 'ListenerType', 'FTServiceType', 'QueryStatus', 'ID', 'ColumnTypeDef', 'ColumnDef', 'SchemaProp', 'Schema', 'IdName', 'SpaceDesc', 'SpaceItem', 'TagItem', 'AlterSchemaItem', 'EdgeItem', 'IndexItem', 'HostItem', 'UserItem', 'RoleItem', 'ExecResp', 'AdminJobReq', 'JobDesc', 'TaskDesc', 'AdminJobResult', 'AdminJobResp', 'Correlativity', 'StatsItem', 'CreateSpaceReq', 'CreateSpaceAsReq', 'DropSpaceReq', 'ListSpacesReq', 'ListSpacesResp', 'GetSpaceReq', 'GetSpaceResp', 'CreateTagReq', 'AlterTagReq', 'DropTagReq', 'ListTagsReq', 'ListTagsResp', 'GetTagReq', 'GetTagResp', 'CreateEdgeReq', 'AlterEdgeReq', 'GetEdgeReq', 'GetEdgeResp', 'DropEdgeReq', 'ListEdgesReq', 'ListEdgesResp', 'ListHostsReq', 'ListHostsResp', 'PartItem', 'ListPartsReq', 'ListPartsResp', 'GetPartsAllocReq', 'GetPartsAllocResp', 'MultiPutReq', 'GetReq', 'GetResp', 'MultiGetReq', 'MultiGetResp', 'RemoveReq', 'RemoveRangeReq', 'ScanReq', 'ScanResp', 'HBResp', 'LeaderInfo', 'HBReq', 'IndexFieldDef', 'CreateTagIndexReq', 'DropTagIndexReq', 'GetTagIndexReq', 'GetTagIndexResp', 'ListTagIndexesReq', 'ListTagIndexesResp', 'CreateEdgeIndexReq', 'DropEdgeIndexReq', 'GetEdgeIndexReq', 'GetEdgeIndexResp', 'ListEdgeIndexesReq', 'ListEdgeIndexesResp', 'RebuildIndexReq', 'CreateUserReq', 'DropUserReq', 'AlterUserReq', 'GrantRoleReq', 'RevokeRoleReq', 'ListUsersReq', 'ListUsersResp', 'ListRolesReq', 'ListRolesResp', 'GetUserRolesReq', 'ChangePasswordReq', 'BalanceReq', 'BalanceTask', 'BalanceResp', 'LeaderBalanceReq', 'ConfigItem', 'RegConfigReq', 'GetConfigReq', 'GetConfigResp', 'SetConfigReq', 'ListConfigsReq', 'ListConfigsResp', 'CreateSnapshotReq', 'DropSnapshotReq', 'ListSnapshotsReq', 'Snapshot', 'ListSnapshotsResp', 'ListIndexStatusReq', 'IndexStatus', 'ListIndexStatusResp', 'AddZoneReq', 'DropZoneReq', 'AddHostIntoZoneReq', 'DropHostFromZoneReq', 'GetZoneReq', 'GetZoneResp', 'ListZonesReq', 'Zone', 'ListZonesResp', 'AddGroupReq', 'DropGroupReq', 'AddZoneIntoGroupReq', 'DropZoneFromGroupReq', 'GetGroupReq', 'GetGroupResp', 'ListGroupsReq', 'Group', 'ListGroupsResp', 'AddListenerReq', 'RemoveListenerReq', 'ListListenerReq', 'ListenerInfo', 'ListListenerResp', 'GetStatsReq', 'GetStatsResp', 'BackupInfo', 'SpaceBackupInfo', 'BackupMeta', 'CreateBackupReq', 'CreateBackupResp', 'HostPair', 'RestoreMetaReq', 'FTClient', 'SignInFTServiceReq', 'SignOutFTServiceReq', 'ListFTClientsReq', 'ListFTClientsResp', 'FTIndex', 'CreateFTIndexReq', 'DropFTIndexReq', 'ListFTIndexesReq', 'ListFTIndexesResp', 'QueryDesc', 'Session', 'CreateSessionReq', 'CreateSessionResp', 'UpdateSessionsReq', 'UpdateSessionsResp', 'ListSessionsReq', 'ListSessionsResp', 'GetSessionReq', 'GetSessionResp', 'RemoveSessionReq', 'KillQueryReq', 'ReportTaskReq', 'ListClusterInfoResp', 'ListClusterInfoReq', 'GetMetaDirInfoResp', 'GetMetaDirInfoReq', 'VerifyClientVersionResp', 'VerifyClientVersionReq', 'SchemaVer', 'ClusterID'] class AlterSchemaOp: ADD = 1 @@ -76,6 +76,26 @@ class RoleType: "GUEST": 5, } +class GeoShape: + ANY = 0 + POINT = 1 + LINESTRING = 2 + POLYGON = 3 + + _VALUES_TO_NAMES = { + 0: "ANY", + 1: "POINT", + 2: "LINESTRING", + 3: "POLYGON", + } + + _NAMES_TO_VALUES = { + "ANY": 0, + "POINT": 1, + "LINESTRING": 2, + "POLYGON": 3, + } + class PropertyType: UNKNOWN = 0 BOOL = 1 @@ -92,6 +112,7 @@ class PropertyType: DATE = 24 DATETIME = 25 TIME = 26 + GEOGRAPHY = 31 _VALUES_TO_NAMES = { 0: "UNKNOWN", @@ -109,6 +130,7 @@ class PropertyType: 24: "DATE", 25: "DATETIME", 26: "TIME", + 31: "GEOGRAPHY", } _NAMES_TO_VALUES = { @@ -127,6 +149,7 @@ class PropertyType: "DATE": 24, "DATETIME": 25, "TIME": 26, + "GEOGRAPHY": 31, } class IsolationLevel: @@ -425,7 +448,7 @@ class ID(object): EDGE_TYPE = 3 INDEX_ID = 4 CLUSTER_ID = 5 - + @staticmethod def isUnion(): return True @@ -588,7 +611,7 @@ def write(self, oprot): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeUnionEnd() - + def __eq__(self, other): if not isinstance(other, self.__class__): return False @@ -603,6 +626,7 @@ class ColumnTypeDef: Attributes: - type - type_length + - geo_shape """ thrift_spec = None @@ -635,6 +659,11 @@ def read(self, iprot): self.type_length = iprot.readI16() else: iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.geo_shape = iprot.readI32() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -656,6 +685,10 @@ def write(self, oprot): oprot.writeFieldBegin('type_length', TType.I16, 2) oprot.writeI16(self.type_length) oprot.writeFieldEnd() + if self.geo_shape != None: + oprot.writeFieldBegin('geo_shape', TType.I32, 3) + oprot.writeI32(self.geo_shape) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -670,13 +703,17 @@ def __repr__(self): value = pprint.pformat(self.type_length, indent=0) value = padding.join(value.splitlines(True)) L.append(' type_length=%s' % (value)) + if self.geo_shape is not None: + value = pprint.pformat(self.geo_shape, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' geo_shape=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -806,7 +843,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -907,7 +944,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -952,7 +989,7 @@ def read(self, iprot): _elem5 = ColumnDef() _elem5.read(iprot) self.columns.append(_elem5) - else: + else: while iprot.peekList(): _elem6 = ColumnDef() _elem6.read(iprot) @@ -1010,7 +1047,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1098,7 +1135,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1284,7 +1321,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1372,7 +1409,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1488,7 +1525,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1576,7 +1613,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1692,7 +1729,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1762,7 +1799,7 @@ def read(self, iprot): _elem13 = ColumnDef() _elem13.read(iprot) self.fields.append(_elem13) - else: + else: while iprot.peekList(): _elem14 = ColumnDef() _elem14.read(iprot) @@ -1851,7 +1888,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -1907,7 +1944,7 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.leader_parts = {} - (_ktype17, _vtype18, _size16 ) = iprot.readMapBegin() + (_ktype17, _vtype18, _size16 ) = iprot.readMapBegin() if _size16 >= 0: for _i20 in six.moves.range(_size16): _key21 = iprot.readString() @@ -1917,13 +1954,13 @@ def read(self, iprot): for _i27 in six.moves.range(_size23): _elem28 = iprot.readI32() _val22.append(_elem28) - else: + else: while iprot.peekList(): _elem29 = iprot.readI32() _val22.append(_elem29) iprot.readListEnd() self.leader_parts[_key21] = _val22 - else: + else: while iprot.peekMap(): _key30 = iprot.readString() _val31 = [] @@ -1932,7 +1969,7 @@ def read(self, iprot): for _i36 in six.moves.range(_size32): _elem37 = iprot.readI32() _val31.append(_elem37) - else: + else: while iprot.peekList(): _elem38 = iprot.readI32() _val31.append(_elem38) @@ -1944,7 +1981,7 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.all_parts = {} - (_ktype40, _vtype41, _size39 ) = iprot.readMapBegin() + (_ktype40, _vtype41, _size39 ) = iprot.readMapBegin() if _size39 >= 0: for _i43 in six.moves.range(_size39): _key44 = iprot.readString() @@ -1954,13 +1991,13 @@ def read(self, iprot): for _i50 in six.moves.range(_size46): _elem51 = iprot.readI32() _val45.append(_elem51) - else: + else: while iprot.peekList(): _elem52 = iprot.readI32() _val45.append(_elem52) iprot.readListEnd() self.all_parts[_key44] = _val45 - else: + else: while iprot.peekMap(): _key53 = iprot.readString() _val54 = [] @@ -1969,7 +2006,7 @@ def read(self, iprot): for _i59 in six.moves.range(_size55): _elem60 = iprot.readI32() _val54.append(_elem60) - else: + else: while iprot.peekList(): _elem61 = iprot.readI32() _val54.append(_elem61) @@ -2101,7 +2138,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2244,7 +2281,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2345,7 +2382,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2448,7 +2485,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2503,7 +2540,7 @@ def read(self, iprot): for _i72 in six.moves.range(_size68): _elem73 = iprot.readString() self.paras.append(_elem73) - else: + else: while iprot.peekList(): _elem74 = iprot.readString() self.paras.append(_elem74) @@ -2562,7 +2599,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2620,7 +2657,7 @@ def read(self, iprot): for _i80 in six.moves.range(_size76): _elem81 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() self.paras.append(_elem81) - else: + else: while iprot.peekList(): _elem82 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() self.paras.append(_elem82) @@ -2718,7 +2755,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2862,7 +2899,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -2914,7 +2951,7 @@ def read(self, iprot): _elem89 = JobDesc() _elem89.read(iprot) self.job_desc.append(_elem89) - else: + else: while iprot.peekList(): _elem90 = JobDesc() _elem90.read(iprot) @@ -2931,7 +2968,7 @@ def read(self, iprot): _elem96 = TaskDesc() _elem96.read(iprot) self.task_desc.append(_elem96) - else: + else: while iprot.peekList(): _elem97 = TaskDesc() _elem97.read(iprot) @@ -3007,7 +3044,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3110,7 +3147,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3197,7 +3234,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3241,13 +3278,13 @@ def read(self, iprot): if fid == 1: if ftype == TType.MAP: self.tag_vertices = {} - (_ktype101, _vtype102, _size100 ) = iprot.readMapBegin() + (_ktype101, _vtype102, _size100 ) = iprot.readMapBegin() if _size100 >= 0: for _i104 in six.moves.range(_size100): _key105 = iprot.readString() _val106 = iprot.readI64() self.tag_vertices[_key105] = _val106 - else: + else: while iprot.peekMap(): _key107 = iprot.readString() _val108 = iprot.readI64() @@ -3258,13 +3295,13 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.edges = {} - (_ktype110, _vtype111, _size109 ) = iprot.readMapBegin() + (_ktype110, _vtype111, _size109 ) = iprot.readMapBegin() if _size109 >= 0: for _i113 in six.moves.range(_size109): _key114 = iprot.readString() _val115 = iprot.readI64() self.edges[_key114] = _val115 - else: + else: while iprot.peekMap(): _key116 = iprot.readString() _val117 = iprot.readI64() @@ -3285,7 +3322,7 @@ def read(self, iprot): elif fid == 5: if ftype == TType.MAP: self.positive_part_correlativity = {} - (_ktype119, _vtype120, _size118 ) = iprot.readMapBegin() + (_ktype119, _vtype120, _size118 ) = iprot.readMapBegin() if _size118 >= 0: for _i122 in six.moves.range(_size118): _key123 = iprot.readI32() @@ -3296,14 +3333,14 @@ def read(self, iprot): _elem130 = Correlativity() _elem130.read(iprot) _val124.append(_elem130) - else: + else: while iprot.peekList(): _elem131 = Correlativity() _elem131.read(iprot) _val124.append(_elem131) iprot.readListEnd() self.positive_part_correlativity[_key123] = _val124 - else: + else: while iprot.peekMap(): _key132 = iprot.readI32() _val133 = [] @@ -3313,7 +3350,7 @@ def read(self, iprot): _elem139 = Correlativity() _elem139.read(iprot) _val133.append(_elem139) - else: + else: while iprot.peekList(): _elem140 = Correlativity() _elem140.read(iprot) @@ -3326,7 +3363,7 @@ def read(self, iprot): elif fid == 6: if ftype == TType.MAP: self.negative_part_correlativity = {} - (_ktype142, _vtype143, _size141 ) = iprot.readMapBegin() + (_ktype142, _vtype143, _size141 ) = iprot.readMapBegin() if _size141 >= 0: for _i145 in six.moves.range(_size141): _key146 = iprot.readI32() @@ -3337,14 +3374,14 @@ def read(self, iprot): _elem153 = Correlativity() _elem153.read(iprot) _val147.append(_elem153) - else: + else: while iprot.peekList(): _elem154 = Correlativity() _elem154.read(iprot) _val147.append(_elem154) iprot.readListEnd() self.negative_part_correlativity[_key146] = _val147 - else: + else: while iprot.peekMap(): _key155 = iprot.readI32() _val156 = [] @@ -3354,7 +3391,7 @@ def read(self, iprot): _elem162 = Correlativity() _elem162.read(iprot) _val156.append(_elem162) - else: + else: while iprot.peekList(): _elem163 = Correlativity() _elem163.read(iprot) @@ -3472,7 +3509,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3560,7 +3597,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3647,7 +3684,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3734,7 +3771,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3789,7 +3826,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3846,7 +3883,7 @@ def read(self, iprot): _elem179 = IdName() _elem179.read(iprot) self.spaces.append(_elem179) - else: + else: while iprot.peekList(): _elem180 = IdName() _elem180.read(iprot) @@ -3906,7 +3943,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -3979,7 +4016,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4082,7 +4119,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4198,7 +4235,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4255,7 +4292,7 @@ def read(self, iprot): _elem187 = AlterSchemaItem() _elem187.read(iprot) self.tag_items.append(_elem187) - else: + else: while iprot.peekList(): _elem188 = AlterSchemaItem() _elem188.read(iprot) @@ -4329,7 +4366,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4430,7 +4467,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4503,7 +4540,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4560,7 +4597,7 @@ def read(self, iprot): _elem195 = TagItem() _elem195.read(iprot) self.tags.append(_elem195) - else: + else: while iprot.peekList(): _elem196 = TagItem() _elem196.read(iprot) @@ -4620,7 +4657,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4721,7 +4758,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4824,7 +4861,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4940,7 +4977,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -4997,7 +5034,7 @@ def read(self, iprot): _elem203 = AlterSchemaItem() _elem203.read(iprot) self.edge_items.append(_elem203) - else: + else: while iprot.peekList(): _elem204 = AlterSchemaItem() _elem204.read(iprot) @@ -5071,7 +5108,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5172,7 +5209,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5275,7 +5312,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5376,7 +5413,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5449,7 +5486,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5506,7 +5543,7 @@ def read(self, iprot): _elem211 = EdgeItem() _elem211.read(iprot) self.edges.append(_elem211) - else: + else: while iprot.peekList(): _elem212 = EdgeItem() _elem212.read(iprot) @@ -5566,7 +5603,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5639,7 +5676,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5696,7 +5733,7 @@ def read(self, iprot): _elem219 = HostItem() _elem219.read(iprot) self.hosts.append(_elem219) - else: + else: while iprot.peekList(): _elem220 = HostItem() _elem220.read(iprot) @@ -5756,7 +5793,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5814,7 +5851,7 @@ def read(self, iprot): _elem227 = nebula2.common.ttypes.HostAddr() _elem227.read(iprot) self.peers.append(_elem227) - else: + else: while iprot.peekList(): _elem228 = nebula2.common.ttypes.HostAddr() _elem228.read(iprot) @@ -5831,7 +5868,7 @@ def read(self, iprot): _elem234 = nebula2.common.ttypes.HostAddr() _elem234.read(iprot) self.losts.append(_elem234) - else: + else: while iprot.peekList(): _elem235 = nebula2.common.ttypes.HostAddr() _elem235.read(iprot) @@ -5902,7 +5939,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -5951,7 +5988,7 @@ def read(self, iprot): for _i242 in six.moves.range(_size238): _elem243 = iprot.readI32() self.part_ids.append(_elem243) - else: + else: while iprot.peekList(): _elem244 = iprot.readI32() self.part_ids.append(_elem244) @@ -6002,7 +6039,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6059,7 +6096,7 @@ def read(self, iprot): _elem251 = PartItem() _elem251.read(iprot) self.parts.append(_elem251) - else: + else: while iprot.peekList(): _elem252 = PartItem() _elem252.read(iprot) @@ -6119,7 +6156,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6192,7 +6229,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6244,7 +6281,7 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.parts = {} - (_ktype255, _vtype256, _size254 ) = iprot.readMapBegin() + (_ktype255, _vtype256, _size254 ) = iprot.readMapBegin() if _size254 >= 0: for _i258 in six.moves.range(_size254): _key259 = iprot.readI32() @@ -6255,14 +6292,14 @@ def read(self, iprot): _elem266 = nebula2.common.ttypes.HostAddr() _elem266.read(iprot) _val260.append(_elem266) - else: + else: while iprot.peekList(): _elem267 = nebula2.common.ttypes.HostAddr() _elem267.read(iprot) _val260.append(_elem267) iprot.readListEnd() self.parts[_key259] = _val260 - else: + else: while iprot.peekMap(): _key268 = iprot.readI32() _val269 = [] @@ -6272,7 +6309,7 @@ def read(self, iprot): _elem275 = nebula2.common.ttypes.HostAddr() _elem275.read(iprot) _val269.append(_elem275) - else: + else: while iprot.peekList(): _elem276 = nebula2.common.ttypes.HostAddr() _elem276.read(iprot) @@ -6285,13 +6322,13 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.terms = {} - (_ktype278, _vtype279, _size277 ) = iprot.readMapBegin() + (_ktype278, _vtype279, _size277 ) = iprot.readMapBegin() if _size277 >= 0: for _i281 in six.moves.range(_size277): _key282 = iprot.readI32() _val283 = iprot.readI64() self.terms[_key282] = _val283 - else: + else: while iprot.peekMap(): _key284 = iprot.readI32() _val285 = iprot.readI64() @@ -6367,7 +6404,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6417,7 +6454,7 @@ def read(self, iprot): _elem296 = nebula2.common.ttypes.KeyValue() _elem296.read(iprot) self.pairs.append(_elem296) - else: + else: while iprot.peekList(): _elem297 = nebula2.common.ttypes.KeyValue() _elem297.read(iprot) @@ -6469,7 +6506,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6556,7 +6593,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6658,7 +6695,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6707,7 +6744,7 @@ def read(self, iprot): for _i303 in six.moves.range(_size299): _elem304 = iprot.readString() self.keys.append(_elem304) - else: + else: while iprot.peekList(): _elem305 = iprot.readString() self.keys.append(_elem305) @@ -6758,7 +6795,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6814,7 +6851,7 @@ def read(self, iprot): for _i311 in six.moves.range(_size307): _elem312 = iprot.readString() self.values.append(_elem312) - else: + else: while iprot.peekList(): _elem313 = iprot.readString() self.values.append(_elem313) @@ -6873,7 +6910,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -6960,7 +6997,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7061,7 +7098,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7162,7 +7199,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7218,7 +7255,7 @@ def read(self, iprot): for _i319 in six.moves.range(_size315): _elem320 = iprot.readString() self.values.append(_elem320) - else: + else: while iprot.peekList(): _elem321 = iprot.readString() self.values.append(_elem321) @@ -7277,7 +7314,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7407,7 +7444,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7494,7 +7531,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7553,7 +7590,7 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.leader_partIds = {} - (_ktype324, _vtype325, _size323 ) = iprot.readMapBegin() + (_ktype324, _vtype325, _size323 ) = iprot.readMapBegin() if _size323 >= 0: for _i327 in six.moves.range(_size323): _key328 = iprot.readI32() @@ -7564,14 +7601,14 @@ def read(self, iprot): _elem335 = LeaderInfo() _elem335.read(iprot) _val329.append(_elem335) - else: + else: while iprot.peekList(): _elem336 = LeaderInfo() _elem336.read(iprot) _val329.append(_elem336) iprot.readListEnd() self.leader_partIds[_key328] = _val329 - else: + else: while iprot.peekMap(): _key337 = iprot.readI32() _val338 = [] @@ -7581,7 +7618,7 @@ def read(self, iprot): _elem344 = LeaderInfo() _elem344.read(iprot) _val338.append(_elem344) - else: + else: while iprot.peekList(): _elem345 = LeaderInfo() _elem345.read(iprot) @@ -7681,7 +7718,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7768,7 +7805,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -7832,7 +7869,7 @@ def read(self, iprot): _elem354 = IndexFieldDef() _elem354.read(iprot) self.fields.append(_elem354) - else: + else: while iprot.peekList(): _elem355 = IndexFieldDef() _elem355.read(iprot) @@ -7926,7 +7963,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8027,7 +8064,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8114,7 +8151,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8217,7 +8254,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8290,7 +8327,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8347,7 +8384,7 @@ def read(self, iprot): _elem362 = IndexItem() _elem362.read(iprot) self.items.append(_elem362) - else: + else: while iprot.peekList(): _elem363 = IndexItem() _elem363.read(iprot) @@ -8407,7 +8444,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8471,7 +8508,7 @@ def read(self, iprot): _elem370 = IndexFieldDef() _elem370.read(iprot) self.fields.append(_elem370) - else: + else: while iprot.peekList(): _elem371 = IndexFieldDef() _elem371.read(iprot) @@ -8565,7 +8602,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8666,7 +8703,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8753,7 +8790,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8856,7 +8893,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8929,7 +8966,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -8986,7 +9023,7 @@ def read(self, iprot): _elem378 = IndexItem() _elem378.read(iprot) self.items.append(_elem378) - else: + else: while iprot.peekList(): _elem379 = IndexItem() _elem379.read(iprot) @@ -9046,7 +9083,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9133,7 +9170,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9234,7 +9271,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9321,7 +9358,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9408,7 +9445,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9482,7 +9519,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9556,7 +9593,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9611,7 +9648,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9662,13 +9699,13 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.users = {} - (_ktype382, _vtype383, _size381 ) = iprot.readMapBegin() + (_ktype382, _vtype383, _size381 ) = iprot.readMapBegin() if _size381 >= 0: for _i385 in six.moves.range(_size381): _key386 = iprot.readString() _val387 = iprot.readString() self.users[_key386] = _val387 - else: + else: while iprot.peekMap(): _key388 = iprot.readString() _val389 = iprot.readString() @@ -9729,7 +9766,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9802,7 +9839,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9859,7 +9896,7 @@ def read(self, iprot): _elem397 = RoleItem() _elem397.read(iprot) self.roles.append(_elem397) - else: + else: while iprot.peekList(): _elem398 = RoleItem() _elem398.read(iprot) @@ -9919,7 +9956,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -9992,7 +10029,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10093,7 +10130,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10151,7 +10188,7 @@ def read(self, iprot): _elem405 = nebula2.common.ttypes.HostAddr() _elem405.read(iprot) self.host_del.append(_elem405) - else: + else: while iprot.peekList(): _elem406 = nebula2.common.ttypes.HostAddr() _elem406.read(iprot) @@ -10237,7 +10274,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10324,7 +10361,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10387,7 +10424,7 @@ def read(self, iprot): _elem413 = BalanceTask() _elem413.read(iprot) self.tasks.append(_elem413) - else: + else: while iprot.peekList(): _elem414 = BalanceTask() _elem414.read(iprot) @@ -10455,7 +10492,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10510,7 +10547,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10626,7 +10663,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10670,7 +10707,7 @@ def read(self, iprot): _elem421 = ConfigItem() _elem421.read(iprot) self.items.append(_elem421) - else: + else: while iprot.peekList(): _elem422 = ConfigItem() _elem422.read(iprot) @@ -10714,7 +10751,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10788,7 +10825,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10845,7 +10882,7 @@ def read(self, iprot): _elem429 = ConfigItem() _elem429.read(iprot) self.items.append(_elem429) - else: + else: while iprot.peekList(): _elem430 = ConfigItem() _elem430.read(iprot) @@ -10905,7 +10942,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -10979,7 +11016,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11066,7 +11103,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11123,7 +11160,7 @@ def read(self, iprot): _elem437 = ConfigItem() _elem437.read(iprot) self.items.append(_elem437) - else: + else: while iprot.peekList(): _elem438 = ConfigItem() _elem438.read(iprot) @@ -11183,7 +11220,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11238,7 +11275,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11311,7 +11348,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11366,7 +11403,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11467,7 +11504,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11524,7 +11561,7 @@ def read(self, iprot): _elem445 = Snapshot() _elem445.read(iprot) self.snapshots.append(_elem445) - else: + else: while iprot.peekList(): _elem446 = Snapshot() _elem446.read(iprot) @@ -11584,7 +11621,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11657,7 +11694,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11744,7 +11781,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11801,7 +11838,7 @@ def read(self, iprot): _elem453 = IndexStatus() _elem453.read(iprot) self.statuses.append(_elem453) - else: + else: while iprot.peekList(): _elem454 = IndexStatus() _elem454.read(iprot) @@ -11861,7 +11898,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -11911,7 +11948,7 @@ def read(self, iprot): _elem461 = nebula2.common.ttypes.HostAddr() _elem461.read(iprot) self.nodes.append(_elem461) - else: + else: while iprot.peekList(): _elem462 = nebula2.common.ttypes.HostAddr() _elem462.read(iprot) @@ -11963,7 +12000,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12036,7 +12073,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12124,7 +12161,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12212,7 +12249,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12285,7 +12322,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12342,7 +12379,7 @@ def read(self, iprot): _elem469 = nebula2.common.ttypes.HostAddr() _elem469.read(iprot) self.hosts.append(_elem469) - else: + else: while iprot.peekList(): _elem470 = nebula2.common.ttypes.HostAddr() _elem470.read(iprot) @@ -12402,7 +12439,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12457,7 +12494,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12507,7 +12544,7 @@ def read(self, iprot): _elem477 = nebula2.common.ttypes.HostAddr() _elem477.read(iprot) self.nodes.append(_elem477) - else: + else: while iprot.peekList(): _elem478 = nebula2.common.ttypes.HostAddr() _elem478.read(iprot) @@ -12559,7 +12596,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12616,7 +12653,7 @@ def read(self, iprot): _elem485 = Zone() _elem485.read(iprot) self.zones.append(_elem485) - else: + else: while iprot.peekList(): _elem486 = Zone() _elem486.read(iprot) @@ -12676,7 +12713,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12725,7 +12762,7 @@ def read(self, iprot): for _i492 in six.moves.range(_size488): _elem493 = iprot.readString() self.zone_names.append(_elem493) - else: + else: while iprot.peekList(): _elem494 = iprot.readString() self.zone_names.append(_elem494) @@ -12776,7 +12813,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12849,7 +12886,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -12936,7 +12973,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13023,7 +13060,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13096,7 +13133,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13152,7 +13189,7 @@ def read(self, iprot): for _i500 in six.moves.range(_size496): _elem501 = iprot.readString() self.zone_names.append(_elem501) - else: + else: while iprot.peekList(): _elem502 = iprot.readString() self.zone_names.append(_elem502) @@ -13211,7 +13248,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13266,7 +13303,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13315,7 +13352,7 @@ def read(self, iprot): for _i508 in six.moves.range(_size504): _elem509 = iprot.readString() self.zone_names.append(_elem509) - else: + else: while iprot.peekList(): _elem510 = iprot.readString() self.zone_names.append(_elem510) @@ -13366,7 +13403,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13423,7 +13460,7 @@ def read(self, iprot): _elem517 = Group() _elem517.read(iprot) self.groups.append(_elem517) - else: + else: while iprot.peekList(): _elem518 = Group() _elem518.read(iprot) @@ -13483,7 +13520,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13539,7 +13576,7 @@ def read(self, iprot): _elem525 = nebula2.common.ttypes.HostAddr() _elem525.read(iprot) self.hosts.append(_elem525) - else: + else: while iprot.peekList(): _elem526 = nebula2.common.ttypes.HostAddr() _elem526.read(iprot) @@ -13599,7 +13636,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13686,7 +13723,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13759,7 +13796,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13875,7 +13912,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -13932,7 +13969,7 @@ def read(self, iprot): _elem533 = ListenerInfo() _elem533.read(iprot) self.listeners.append(_elem533) - else: + else: while iprot.peekList(): _elem534 = ListenerInfo() _elem534.read(iprot) @@ -13992,7 +14029,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14065,7 +14102,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14168,7 +14205,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14219,7 +14256,7 @@ def read(self, iprot): _elem541 = nebula2.common.ttypes.CheckpointInfo() _elem541.read(iprot) self.info.append(_elem541) - else: + else: while iprot.peekList(): _elem542 = nebula2.common.ttypes.CheckpointInfo() _elem542.read(iprot) @@ -14271,7 +14308,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14322,7 +14359,7 @@ def read(self, iprot): _elem549 = BackupInfo() _elem549.read(iprot) self.info.append(_elem549) - else: + else: while iprot.peekList(): _elem550 = BackupInfo() _elem550.read(iprot) @@ -14374,7 +14411,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14417,14 +14454,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.MAP: self.backup_info = {} - (_ktype553, _vtype554, _size552 ) = iprot.readMapBegin() + (_ktype553, _vtype554, _size552 ) = iprot.readMapBegin() if _size552 >= 0: for _i556 in six.moves.range(_size552): _key557 = iprot.readI32() _val558 = SpaceBackupInfo() _val558.read(iprot) self.backup_info[_key557] = _val558 - else: + else: while iprot.peekMap(): _key559 = iprot.readI32() _val560 = SpaceBackupInfo() @@ -14441,7 +14478,7 @@ def read(self, iprot): for _i565 in six.moves.range(_size561): _elem566 = iprot.readString() self.meta_files.append(_elem566) - else: + else: while iprot.peekList(): _elem567 = iprot.readString() self.meta_files.append(_elem567) @@ -14548,7 +14585,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14591,7 +14628,7 @@ def read(self, iprot): for _i575 in six.moves.range(_size571): _elem576 = iprot.readString() self.spaces.append(_elem576) - else: + else: while iprot.peekList(): _elem577 = iprot.readString() self.spaces.append(_elem577) @@ -14634,7 +14671,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14737,7 +14774,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14826,7 +14863,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -14870,7 +14907,7 @@ def read(self, iprot): for _i583 in six.moves.range(_size579): _elem584 = iprot.readString() self.files.append(_elem584) - else: + else: while iprot.peekList(): _elem585 = iprot.readString() self.files.append(_elem585) @@ -14886,7 +14923,7 @@ def read(self, iprot): _elem591 = HostPair() _elem591.read(iprot) self.hosts.append(_elem591) - else: + else: while iprot.peekList(): _elem592 = HostPair() _elem592.read(iprot) @@ -14941,7 +14978,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15043,7 +15080,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15093,7 +15130,7 @@ def read(self, iprot): _elem600 = FTClient() _elem600.read(iprot) self.clients.append(_elem600) - else: + else: while iprot.peekList(): _elem601 = FTClient() _elem601.read(iprot) @@ -15145,7 +15182,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15200,7 +15237,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15255,7 +15292,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15312,7 +15349,7 @@ def read(self, iprot): _elem608 = FTClient() _elem608.read(iprot) self.clients.append(_elem608) - else: + else: while iprot.peekList(): _elem609 = FTClient() _elem609.read(iprot) @@ -15372,7 +15409,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15428,7 +15465,7 @@ def read(self, iprot): for _i615 in six.moves.range(_size611): _elem616 = iprot.readString() self.fields.append(_elem616) - else: + else: while iprot.peekList(): _elem617 = iprot.readString() self.fields.append(_elem617) @@ -15487,7 +15524,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15575,7 +15612,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15662,7 +15699,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15717,7 +15754,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15768,14 +15805,14 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.indexes = {} - (_ktype620, _vtype621, _size619 ) = iprot.readMapBegin() + (_ktype620, _vtype621, _size619 ) = iprot.readMapBegin() if _size619 >= 0: for _i623 in six.moves.range(_size619): _key624 = iprot.readString() _val625 = FTIndex() _val625.read(iprot) self.indexes[_key624] = _val625 - else: + else: while iprot.peekMap(): _key626 = iprot.readString() _val627 = FTIndex() @@ -15837,7 +15874,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -15967,7 +16004,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16055,14 +16092,14 @@ def read(self, iprot): elif fid == 9: if ftype == TType.MAP: self.configs = {} - (_ktype631, _vtype632, _size630 ) = iprot.readMapBegin() + (_ktype631, _vtype632, _size630 ) = iprot.readMapBegin() if _size630 >= 0: for _i634 in six.moves.range(_size630): _key635 = iprot.readString() _val636 = nebula2.common.ttypes.Value() _val636.read(iprot) self.configs[_key635] = _val636 - else: + else: while iprot.peekMap(): _key637 = iprot.readString() _val638 = nebula2.common.ttypes.Value() @@ -16074,14 +16111,14 @@ def read(self, iprot): elif fid == 10: if ftype == TType.MAP: self.queries = {} - (_ktype640, _vtype641, _size639 ) = iprot.readMapBegin() + (_ktype640, _vtype641, _size639 ) = iprot.readMapBegin() if _size639 >= 0: for _i643 in six.moves.range(_size639): _key644 = iprot.readI64() _val645 = QueryDesc() _val645.read(iprot) self.queries[_key644] = _val645 - else: + else: while iprot.peekMap(): _key646 = iprot.readI64() _val647 = QueryDesc() @@ -16203,7 +16240,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16305,7 +16342,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16408,7 +16445,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16452,7 +16489,7 @@ def read(self, iprot): _elem657 = Session() _elem657.read(iprot) self.sessions.append(_elem657) - else: + else: while iprot.peekList(): _elem658 = Session() _elem658.read(iprot) @@ -16496,7 +16533,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16547,19 +16584,19 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.killed_queries = {} - (_ktype661, _vtype662, _size660 ) = iprot.readMapBegin() + (_ktype661, _vtype662, _size660 ) = iprot.readMapBegin() if _size660 >= 0: for _i664 in six.moves.range(_size660): _key665 = iprot.readI64() _val666 = {} - (_ktype668, _vtype669, _size667 ) = iprot.readMapBegin() + (_ktype668, _vtype669, _size667 ) = iprot.readMapBegin() if _size667 >= 0: for _i671 in six.moves.range(_size667): _key672 = iprot.readI64() _val673 = QueryDesc() _val673.read(iprot) _val666[_key672] = _val673 - else: + else: while iprot.peekMap(): _key674 = iprot.readI64() _val675 = QueryDesc() @@ -16567,18 +16604,18 @@ def read(self, iprot): _val666[_key674] = _val675 iprot.readMapEnd() self.killed_queries[_key665] = _val666 - else: + else: while iprot.peekMap(): _key676 = iprot.readI64() _val677 = {} - (_ktype679, _vtype680, _size678 ) = iprot.readMapBegin() + (_ktype679, _vtype680, _size678 ) = iprot.readMapBegin() if _size678 >= 0: for _i682 in six.moves.range(_size678): _key683 = iprot.readI64() _val684 = QueryDesc() _val684.read(iprot) _val677[_key683] = _val684 - else: + else: while iprot.peekMap(): _key685 = iprot.readI64() _val686 = QueryDesc() @@ -16646,7 +16683,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16701,7 +16738,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16758,7 +16795,7 @@ def read(self, iprot): _elem696 = Session() _elem696.read(iprot) self.sessions.append(_elem696) - else: + else: while iprot.peekList(): _elem697 = Session() _elem697.read(iprot) @@ -16818,7 +16855,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16891,7 +16928,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -16994,7 +17031,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17067,7 +17104,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17105,7 +17142,7 @@ def read(self, iprot): if fid == 1: if ftype == TType.MAP: self.kill_queries = {} - (_ktype700, _vtype701, _size699 ) = iprot.readMapBegin() + (_ktype700, _vtype701, _size699 ) = iprot.readMapBegin() if _size699 >= 0: for _i703 in six.moves.range(_size699): _key704 = iprot.readI64() @@ -17115,13 +17152,13 @@ def read(self, iprot): for _i710 in six.moves.range(_size706): _elem711 = iprot.readI64() _val705.add(_elem711) - else: + else: while iprot.peekSet(): _elem712 = iprot.readI64() _val705.add(_elem712) iprot.readSetEnd() self.kill_queries[_key704] = _val705 - else: + else: while iprot.peekMap(): _key713 = iprot.readI64() _val714 = set() @@ -17130,7 +17167,7 @@ def read(self, iprot): for _i719 in six.moves.range(_size715): _elem720 = iprot.readI64() _val714.add(_elem720) - else: + else: while iprot.peekSet(): _elem721 = iprot.readI64() _val714.add(_elem721) @@ -17179,7 +17216,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17295,7 +17332,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17353,7 +17390,7 @@ def read(self, iprot): _elem730 = nebula2.common.ttypes.HostAddr() _elem730.read(iprot) self.meta_servers.append(_elem730) - else: + else: while iprot.peekList(): _elem731 = nebula2.common.ttypes.HostAddr() _elem731.read(iprot) @@ -17370,7 +17407,7 @@ def read(self, iprot): _elem737 = nebula2.common.ttypes.NodeInfo() _elem737.read(iprot) self.storage_servers.append(_elem737) - else: + else: while iprot.peekList(): _elem738 = nebula2.common.ttypes.NodeInfo() _elem738.read(iprot) @@ -17441,7 +17478,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17496,7 +17533,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17584,7 +17621,7 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17639,7 +17676,182 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - return self.__dict__ == other.__dict__ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +class VerifyClientVersionResp: + """ + Attributes: + - code + - leader + - error_msg + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.code = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.leader = nebula2.common.ttypes.HostAddr() + self.leader.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.error_msg = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('VerifyClientVersionResp') + if self.code != None: + oprot.writeFieldBegin('code', TType.I32, 1) + oprot.writeI32(self.code) + oprot.writeFieldEnd() + if self.leader != None: + oprot.writeFieldBegin('leader', TType.STRUCT, 2) + self.leader.write(oprot) + oprot.writeFieldEnd() + if self.error_msg != None: + oprot.writeFieldBegin('error_msg', TType.STRING, 3) + oprot.writeString(self.error_msg) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.code is not None: + value = pprint.pformat(self.code, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' code=%s' % (value)) + if self.leader is not None: + value = pprint.pformat(self.leader, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' leader=%s' % (value)) + if self.error_msg is not None: + value = pprint.pformat(self.error_msg, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' error_msg=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + # Override the __hash__ function for Python3 - t10434117 + if not six.PY2: + __hash__ = object.__hash__ + +class VerifyClientVersionReq: + """ + Attributes: + - version + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.version = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('VerifyClientVersionReq') + if self.version != None: + oprot.writeFieldBegin('version', TType.STRING, 1) + oprot.writeString(self.version) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.version is not None: + value = pprint.pformat(self.version, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' version=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) @@ -17696,6 +17908,7 @@ def ID__init__(self, space_id=None, tag_id=None, edge_type=None, index_id=None, None, # 0 (1, TType.I32, 'type', PropertyType, None, 0, ), # 1 (2, TType.I16, 'type_length', None, 0, 1, ), # 2 + (3, TType.I32, 'geo_shape', GeoShape, None, 1, ), # 3 ) ColumnTypeDef.thrift_struct_annotations = { @@ -17703,15 +17916,17 @@ def ID__init__(self, space_id=None, tag_id=None, edge_type=None, index_id=None, ColumnTypeDef.thrift_field_annotations = { } -def ColumnTypeDef__init__(self, type=None, type_length=ColumnTypeDef.thrift_spec[2][4],): +def ColumnTypeDef__init__(self, type=None, type_length=ColumnTypeDef.thrift_spec[2][4], geo_shape=None,): self.type = type self.type_length = type_length + self.geo_shape = geo_shape ColumnTypeDef.__init__ = ColumnTypeDef__init__ def ColumnTypeDef__setstate__(self, state): state.setdefault('type', None) state.setdefault('type_length', 0) + state.setdefault('geo_shape', None) self.__dict__ = state ColumnTypeDef.__getstate__ = lambda self: self.__dict__.copy() @@ -22146,5 +22361,57 @@ def GetMetaDirInfoResp__setstate__(self, state): GetMetaDirInfoReq.thrift_field_annotations = { } +all_structs.append(VerifyClientVersionResp) +VerifyClientVersionResp.thrift_spec = ( + None, # 0 + (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (3, TType.STRING, 'error_msg', False, None, 1, ), # 3 +) + +VerifyClientVersionResp.thrift_struct_annotations = { +} +VerifyClientVersionResp.thrift_field_annotations = { +} + +def VerifyClientVersionResp__init__(self, code=None, leader=None, error_msg=None,): + self.code = code + self.leader = leader + self.error_msg = error_msg + +VerifyClientVersionResp.__init__ = VerifyClientVersionResp__init__ + +def VerifyClientVersionResp__setstate__(self, state): + state.setdefault('code', None) + state.setdefault('leader', None) + state.setdefault('error_msg', None) + self.__dict__ = state + +VerifyClientVersionResp.__getstate__ = lambda self: self.__dict__.copy() +VerifyClientVersionResp.__setstate__ = VerifyClientVersionResp__setstate__ + +all_structs.append(VerifyClientVersionReq) +VerifyClientVersionReq.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'version', False, "2.6.0", 0, ), # 1 +) + +VerifyClientVersionReq.thrift_struct_annotations = { +} +VerifyClientVersionReq.thrift_field_annotations = { +} + +def VerifyClientVersionReq__init__(self, version=VerifyClientVersionReq.thrift_spec[1][4],): + self.version = version + +VerifyClientVersionReq.__init__ = VerifyClientVersionReq__init__ + +def VerifyClientVersionReq__setstate__(self, state): + state.setdefault('version', "2.6.0") + self.__dict__ = state + +VerifyClientVersionReq.__getstate__ = lambda self: self.__dict__.copy() +VerifyClientVersionReq.__setstate__ = VerifyClientVersionReq__setstate__ + fix_spec(all_structs) del all_structs