Bunch more places that need to be bytes for protocol backwards compatibility.
This commit is contained in:
parent
5d9a1a5ab5
commit
d8c9affccb
|
@ -2836,17 +2836,17 @@ class RIControlClient(RemoteInterface):
|
|||
|
||||
# debug stuff
|
||||
|
||||
def upload_random_data_from_file(size=int, convergence=str):
|
||||
def upload_random_data_from_file(size=int, convergence=bytes):
|
||||
return str
|
||||
|
||||
def download_to_tempfile_and_delete(uri=str):
|
||||
def download_to_tempfile_and_delete(uri=bytes):
|
||||
return None
|
||||
|
||||
def get_memory_usage():
|
||||
"""Return a dict describes the amount of memory currently in use. The
|
||||
keys are 'VmPeak', 'VmSize', and 'VmData'. The values are integers,
|
||||
measuring memory consupmtion in bytes."""
|
||||
return DictOf(str, int)
|
||||
return DictOf(bytes, int)
|
||||
|
||||
def speed_test(count=int, size=int, mutable=Any()):
|
||||
"""Write 'count' tempfiles to disk, all of the given size. Measure
|
||||
|
@ -2871,7 +2871,7 @@ class RIControlClient(RemoteInterface):
|
|||
return DictOf(str, float)
|
||||
|
||||
|
||||
UploadResults = Any() #DictOf(str, str)
|
||||
UploadResults = Any() #DictOf(bytes, bytes)
|
||||
|
||||
|
||||
class RIEncryptedUploadable(RemoteInterface):
|
||||
|
@ -2884,7 +2884,7 @@ class RIEncryptedUploadable(RemoteInterface):
|
|||
return (int, int, int, long)
|
||||
|
||||
def read_encrypted(offset=Offset, length=ReadSize):
|
||||
return ListOf(str)
|
||||
return ListOf(bytes)
|
||||
|
||||
def close():
|
||||
return None
|
||||
|
@ -2897,7 +2897,7 @@ class RICHKUploadHelper(RemoteInterface):
|
|||
"""
|
||||
Return a dictionary of version information.
|
||||
"""
|
||||
return DictOf(str, Any())
|
||||
return DictOf(bytes, Any())
|
||||
|
||||
def upload(reader=RIEncryptedUploadable):
|
||||
return UploadResults
|
||||
|
@ -2910,7 +2910,7 @@ class RIHelper(RemoteInterface):
|
|||
"""
|
||||
Return a dictionary of version information.
|
||||
"""
|
||||
return DictOf(str, Any())
|
||||
return DictOf(bytes, Any())
|
||||
|
||||
def upload_chk(si=StorageIndex):
|
||||
"""See if a file with a given storage index needs uploading. The
|
||||
|
@ -2944,7 +2944,7 @@ class RIStatsProvider(RemoteInterface):
|
|||
stats are instantaneous measures (potentially time averaged
|
||||
internally)
|
||||
"""
|
||||
return DictOf(str, DictOf(str, ChoiceOf(float, int, long, None)))
|
||||
return DictOf(bytes, DictOf(bytes, ChoiceOf(float, int, long, None)))
|
||||
|
||||
|
||||
class RIStatsGatherer(RemoteInterface):
|
||||
|
@ -2953,7 +2953,7 @@ class RIStatsGatherer(RemoteInterface):
|
|||
Provides a monitoring service for centralised collection of stats
|
||||
"""
|
||||
|
||||
def provide(provider=RIStatsProvider, nickname=str):
|
||||
def provide(provider=RIStatsProvider, nickname=bytes):
|
||||
"""
|
||||
@param provider: a stats collector instance that should be polled
|
||||
periodically by the gatherer to collect stats.
|
||||
|
@ -2965,7 +2965,7 @@ class RIStatsGatherer(RemoteInterface):
|
|||
class IStatsProducer(Interface):
|
||||
def get_stats():
|
||||
"""
|
||||
returns a dictionary, with str keys representing the names of stats
|
||||
returns a dictionary, with bytes keys representing the names of stats
|
||||
to be monitored, and numeric values.
|
||||
"""
|
||||
|
||||
|
|
Loading…
Reference in New Issue