Merge "Revert "Cleanup dirty daisy build workspace directory""
[releng.git] / utils / test / testapi / opnfv_testapi / common / message.py
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'
11
12
13 def no_body():
14     return 'No Body'
15
16
17 def not_found(key, value):
18     return '{} {} [{}]'.format(not_found_base, key, value)
19
20
21 def missing(name):
22     return '{} Missing'.format(name)
23
24
25 def exist(key, value):
26     return '{} [{}] {}'.format(key, value, exist_base)
27
28
29 def bad_format(error):
30     return 'Bad Format [{}]'.format(error)
31
32
33 def unauthorized():
34     return 'No Authentication Header'
35
36
37 def invalid_token():
38     return 'Invalid Token'
39
40
41 def no_update():
42     return 'Nothing to update'
43
44
45 def must_int(name):
46     return '{} must be int'.format(name)