예제 #1
0
 def to_protobuf(repository):
     parameters = common_pb2.PluginDefinedObject()
     parameters.json = json.dumps(repository.to_dict())
     repository_protobuf = common_pb2.Repository()
     repository_protobuf.parameters.CopyFrom(parameters)
     return repository_protobuf
예제 #2
0
 def to_protobuf(snapshot):
     parameters = common_pb2.PluginDefinedObject()
     parameters.json = json.dumps(snapshot.to_dict())
     snapshot_protobuf = common_pb2.Snapshot()
     snapshot_protobuf.parameters.CopyFrom(parameters)
     return snapshot_protobuf
예제 #3
0
 def to_protobuf(source_config):
     parameters = common_pb2.PluginDefinedObject()
     parameters.json = json.dumps(source_config.to_dict())
     source_config_protobuf = common_pb2.SourceConfig()
     source_config_protobuf.parameters.CopyFrom(parameters)
     return source_config_protobuf