def _get_host_group(grp_name): handler = ApiPortal() data = handler.api_get_group(grp_name) if not data: abort(404) #return jsonify(msg="success",data= data),200 return data
def _create_host_group(grp_name): handler = ApiPortal() #grp_name = request.form["resource_name"].strip() if not handler.api_create_group(grp_name): abort(500) data = handler.api_get_group(grp_name) #return jsonify(msg="success",action="create",data= data),200 return True
def _delete_host_group(grp_name): handler = ApiPortal() # grp_name = request.form["resource_name"].strip() if not handler.api_get_group(grp_name): abort(404) if not handler.api_delete_group(grp_name): abort(500) #return jsonify(msg="success",action="delete"),200 return True