class RepoCommandResponse(TlvModel):
    name = NameField()
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = BytesField(RepoTypeNumber.PROCESS_ID)
    status_code = UintField(RepoTypeNumber.STATUS_CODE)
    insert_num = UintField(RepoTypeNumber.INSERT_NUM)
    delete_num = UintField(RepoTypeNumber.DELETE_NUM)
示例#2
0
 class Model(TlvModel):
     name = NameField()
     int_val = UintField(0x03)
     bytes_val = BytesField(0x02)
     bool_val = BoolField(0x01)
     array = ModelField(0x05, WordArray)
     flag_val = UintField(0x06, val_base_type=FlagVal)
     enum_arr = RepeatedField(UintField(0x07, val_base_type=EnumVal))
     str_val = BytesField(0x08, is_string=True)
     str_arr = RepeatedField(BytesField(0x09, is_string=True))
class RepoCommandParameter(TlvModel):
    name = NameField()
    forwarding_hint = ModelField(RepoTypeNumber.FORWARDING_HINT,
                                 ForwardingHint)
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = BytesField(RepoTypeNumber.PROCESS_ID)
    register_prefix = ModelField(RepoTypeNumber.REGISTER_PREFIX,
                                 RegisterPrefix)
    check_prefix = ModelField(RepoTypeNumber.CHECK_PREFIX, CheckPrefix)
示例#4
0
class ProjectConfig(TlvModel):
    project_id = BytesField(0x80)
    description = BytesField(0x90)
    inherit_from = BytesField(0x91)
    sync_interval = UintField(0x92)
    ref_configs = RepeatedField(ModelField(0x93, RefConfig))
    labels = RepeatedField(ModelField(0x94, LabelConfig))
 class NotifyAppParam(TlvModel):
     """
     Used to serialize application parameters for PubSub notify interest.
     """
     publisher_prefix = NameField()
     nonce = UintField(128)
     publisher_fwd_hint = NameField()
示例#6
0
class Comment(TlvModel):
    comment_id = BytesField(0x87)
    filename = BytesField(0xa8)
    line_nbr = UintField(0xa9)
    author = BytesField(0xaa)
    written_on = BytesField(0xab)
    message = BytesField(0xac)
    rev_id = BytesField(0xad)
    unsolved = BoolField(0xae)
示例#7
0
class ServiceItem(TlvModel):
    service_id = UintField(1)
    exp_time = UintField(2)
    service_name = NameField()
示例#8
0
class DatainfoTlvModel(TlvModel):
    data_name = BytesField(0x02)  # string
    hash = BytesField(0x02)  # string
    desired_copies = UintField(0x03)  # int
示例#9
0
class Vote(TlvModel):
    label = BytesField(0x98)
    value = UintField(0xa0, fixed_len=1)
示例#10
0
 class Inner(TlvModel):
     val = UintField(0x01)
示例#11
0
class CipherBlock(TlvModel):
    iv = BytesField(TLV_AC_AES_IV)
    keyid = UintField(TLV_AC_KEYID)
    cipher = BytesField(TLV_AC_ENCRYPTED_PAYLOAD)
示例#12
0
class ServiceItem(TlvModel):
    service_id = UintField(1)
    service_name = BytesField(2)
    exp_time = UintField(3)
示例#13
0
class LabelConfig(TlvModel):
    label = BytesField(0x98)
    function = UintField(0x99)
    default_value = UintField(0x9a)
    values = RepeatedField(ModelField(0x9b, LabelValue))
示例#14
0
class LabelValue(TlvModel):
    value = UintField(0xa0, fixed_len=1)
    description = BytesField(0xa1)
示例#15
0
class LabelRule(TlvModel):
    label = BytesField(0x98)
    min_value = UintField(0x9e, fixed_len=1)
    max_value = UintField(0x9f, fixed_len=1)
    user_id = BytesField(0x81)
    group_id = BytesField(0x82)
示例#16
0
 class A2(A1):
     _a1 = IncludeBase(A1)
     m2 = UintField(0x02)
示例#17
0
 class A1(TlvModel):
     m1 = UintField(0x01)
示例#18
0
 class Derived(Base):
     m1 = UintField(0x01)
     _base = IncludeBase(Base)
     m3 = UintField(0x03)
示例#19
0
 class Base(TlvModel):
     m2 = UintField(0x02)
示例#20
0
class ServiceMetaItem(TlvModel):
    service_id = UintField(1)
    encryption_key = BytesField(3)
示例#21
0
class StateVectorComponentModel(TlvModel):
    node_id = BytesField(StateVectorModelTypes.KEY.value)
    seq_num = UintField(StateVectorModelTypes.VALUE.value)
示例#22
0
 class Model(TlvModel):
     name = NameField()
     int_val = UintField(0x03)
     str_val = BytesField(0x02)
     bool_val = BoolField(0x01)
示例#23
0
class AccessItem(TlvModel):
    prefix = BytesField(1)
    type = UintField(2)
    encryption_key = BytesField(3)
    decryption_key = BytesField(4)
示例#24
0
 class B2(A):
     _base = IncludeBase(A)
     m1 = UintField(0x03)
     m5 = UintField(0x05)
示例#25
0
class KeyInfo(TlvModel):
    keyid = UintField(TLV_AC_KEYID)
示例#26
0
 class WordArray(TlvModel):
     words = RepeatedField(UintField(0x01, fixed_len=2))
示例#27
0
class OperationRule(TlvModel):
    operation = UintField(0x9c)
    access = UintField(0x9d)
    user_id = BytesField(0x81)
    group_id = BytesField(0x82)
示例#28
0
class ChangeMeta(TlvModel):
    change_id = BytesField(0x85)
    status = UintField(0xa6)
    patch_set = UintField(0x86)
    subject = BytesField(0xa7)
示例#29
0
class RepoCommandParameter(TlvModel):
    name = NameField()
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = UintField(RepoTypeNumber.PROCESS_ID)
示例#30
0
 class B1(A):
     _base = IncludeBase(A)
     m1 = UintField(0x02)
     m4 = UintField(0x04)