1 ##############################################################################
2 # Copyright (c) 2017 ZTE Corp
3 # feng.xiaowei@zte.com.cn
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 not_found_base = 'Could Not Found'
10 exist_base = 'Already Exists'
17 def not_found(key, value):
18 return '{} {} [{}]'.format(not_found_base, key, value)
22 return '{} Missing'.format(name)
25 def exist(key, value):
26 return '{} [{}] {}'.format(key, value, exist_base)
29 def bad_format(error):
30 return 'Bad Format [{}]'.format(error)
34 return 'No Authentication Header'
38 return 'Invalid Token'
42 return 'Nothing to update'
46 return '{} must be int'.format(name)