def do_POST(self):
deploy_steps_match = re.match(
r'/v1/nodes/([^/]*)/vendor_passthru/deploy_steps', self.path)
callback_match = re.search(
r'/v1/nodes/([^/]*)/vendor_passthru', self.path)
if deploy_steps_match is not None:
tmp = tempfile.NamedTemporaryFile()
json.dump({'url': None}, tmp)
tmp.flush()
self.path = tmp.name
elif callback_match is not None:
callback_file_path = os.path.join(
CONF.ramdisk_func_test_workdir, callback_match.group(1),
'callback')
open(callback_file_path, 'a').close()
LOG.info("Got callback: %s", self.path)
self.path = os.path.join(self.ctx.htdocs, 'stubfile')
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
评论列表
文章目录