Add functional test to gurarantee consistent behavior of provisioning callback with jt launch.

This commit is contained in:
Aaron Tan
2017-03-17 15:40:55 -04:00
parent 6083e9482e
commit 2edd4b338d
2 changed files with 29 additions and 1 deletions

View File

@@ -2678,7 +2678,8 @@ class JobTemplateCallback(GenericAPIView):
def post(self, request, *args, **kwargs):
extra_vars = None
if request.content_type == "application/json":
# Be careful here: content_type can look like '<content_type>; charset=blar'
if request.content_type.startswith("application/json"):
extra_vars = request.data.get("extra_vars", None)
# Permission class should have already validated host_config_key.
job_template = self.get_object()