in mns/mns_client.py [0:0]
def list_topic(self, req, resp):
#check parameter
ListTopicValidator.validate(req)
#make request internal
req_inter = RequestInternal(req.method, "/%s" % URISEC_TOPIC)
if req.prefix != "":
req_inter.header["x-mns-prefix"] = req.prefix
if req.ret_number != -1:
req_inter.header["x-mns-ret-number"] = str(req.ret_number)
if req.marker != "":
req_inter.header["x-mns-marker"] = str(req.marker)
if req.with_meta:
req_inter.header["x-mns-with-meta"] = "true"
self.build_header(req, req_inter)
#send request
resp_inter = self.http.send_request(req_inter)
#handle result, make response
resp.status = resp_inter.status
resp.header = resp_inter.header
self.check_status(req_inter, resp_inter, resp)
if resp.error_data == "":
resp.topicurl_list, resp.next_marker, resp.topicmeta_list = ListTopicDecoder.decode(resp_inter.data, req.with_meta, req_inter.get_req_id())
first_topicurl = "" if len(resp.topicurl_list) == 0 else resp.topicurl_list[0]
last_topicurl = "" if len(resp.topicurl_list) == 0 else resp.topicurl_list[len(resp.topicurl_list)-1]
if self.logger:
self.logger.info("ListTopic RequestId:%s Prefix:%s RetNumber:%s Marker:%s TopicCount:%s FirstTopicURL:%s LastTopicURL:%s NextMarker:%s" % \
(resp.get_requestid(), req.prefix, req.ret_number, req.marker,\
len(resp.topicurl_list), first_topicurl, last_topicurl, resp.next_marker))