def respSymptomGetHandler(name, path, data, ctype): print(name) print(path) response = ricrest.initResponse() response['payload'] = ('[{"service" : "xapp-test"}]') print(json.loads(response['payload'])) return response
def symptomdataGetHandler(name, path, data, ctype): reponse = ricrest.initResponse() (zipfile, size, filedata) = getSymptomData(symptomHndl, self.path[20:]) if filedata != None: reponse['payload'] = filedata reponse['ctype'] = 'application/zip' reponse['attachment'] = "symptomdata.zip" reponse['mode'] = 'binary' return reponse logging.error("Symptom data does not exists") reponse['response'] = 'System error - symptomdata does not exists' reponse['status'] = 500 return reponse
def respPostHandler(name, path, data, ctype): print(name) print(path) print(data) response = ricrest.initResponse() response['payload'] = ('{ "SubscriptionResponse": {' '"SubscriptionId": "testing",' '"SubscriptionInstances": [{' '"XappEventInstanceID": "16253",' '"E2EventInstanceID": "1241"' '}]' '}' '}') return response
def respGetHandler(name, path, data, ctype): print(name) print(path) response = ricrest.initResponse() response['payload'] = ('{ "SubscriptionList": [{' '"SubscriptionId": "12345",' '"Meid": "gnb123456",' '"ClientEndpoint": ["127.0.0.1:4056"],' '"SubscriptionInstances": [{' '"XappEventInstanceID": "16253",' '"E2EventInstanceID": "1241"' '}]' '}]' '}') return response
def respDeleteHandler(name, path, data, ctype): print(name) print(path) response = ricrest.initResponse() response['payload'] = ('{}') return response