|
@@ -65,6 +65,33 @@ def check_appid_exist(app_id):
|
|
myLogger.info_logger("Check complete.")
|
|
myLogger.info_logger("Check complete.")
|
|
return True
|
|
return True
|
|
|
|
|
|
|
|
+def check_appid_include_rq(app_id):
|
|
|
|
+ message = ""
|
|
|
|
+ code = None
|
|
|
|
+ if app_id == None:
|
|
|
|
+ code = const.ERROR_CLIENT_PARAM_BLANK
|
|
|
|
+ message = "AppID is null"
|
|
|
|
+ elif re.match('^[a-zA-Z0-9]+_[a-z0-9]+$', app_id):
|
|
|
|
+ code = const.ERROR_CLIENT_PARAM_Format
|
|
|
|
+ message = "APP name can only be composed of numbers and lowercase letters"
|
|
|
|
+ elif not docker.check_appid_exist(app_id):
|
|
|
|
+ code = const.ERROR_CLIENT_PARAM_NOTEXIST
|
|
|
|
+ message = "AppID is not exist"
|
|
|
|
+ return code, message
|
|
|
|
+
|
|
|
|
+def check_app_id(app_id):
|
|
|
|
+ message = ""
|
|
|
|
+ code = None
|
|
|
|
+ if app_id == None:
|
|
|
|
+ code = const.ERROR_CLIENT_PARAM_BLANK
|
|
|
|
+ message = "AppID is null"
|
|
|
|
+ elif re.match('^[a-zA-Z0-9]+_[a-z0-9]+$', app_id):
|
|
|
|
+ code = const.ERROR_CLIENT_PARAM_Format
|
|
|
|
+ message = "APP name can only be composed of numbers and lowercase letters"
|
|
|
|
+ # elif not docker.check_appid_exist(app_id):
|
|
|
|
+ # code = const.ERROR_CLIENT_PARAM_NOTEXIST
|
|
|
|
+ # message = "AppID is not exist"
|
|
|
|
+ return code, message
|
|
|
|
|
|
def check_app_id(app_id):
|
|
def check_app_id(app_id):
|
|
message = ""
|
|
message = ""
|