original_docstring: Create a deployment group and create deployments in it.
  
      :param group_id: An existing deployment group ID.
      :type group_id: str
      :param blueprint_id: An existing blueprint ID.
      :type blueprint_id: str
      :param deployment_ids: A list of existing deployment IDs to add to group.
      :type deployment_ids: list
      :param inputs: a list of dicts of deployment inputs.
      :type inputs: list
      :param labels: a list of dicts of deployment labels.
      :type labels: list
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return: request's JSON response
      :rtype: dict
      
docstring: Create a deployment group and create deployments in it.
docstring_tokens: Create a deployment group and create deployments in it .
code: def create_deployments(group_id,
                         blueprint_id,
                         deployment_ids,
                         inputs,
                         labels,
                         rest_client):
      """Create a deployment group and create deployments in it.
  
      :param group_id: An existing deployment group ID.
      :type group_id: str
      :param blueprint_id: An existing blueprint ID.
      :type blueprint_id: str
      :param deployment_ids: A list of existing deployment IDs to add to group.
      :type deployment_ids: list
      :param inputs: a list of dicts of deployment inputs.
      :type inputs: list
      :param labels: a list of dicts of deployment labels.
      :type labels: list
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return: request's JSON response
      :rtype: dict
      """
      rest_client.deployment_groups.put(
          group_id=group_id,
          blueprint_id=blueprint_id,
          labels=labels)
      try:
          rest_client.deployment_groups.add_deployments(
              group_id,
              new_deployments=[
                  {
                      'display_name': dep_id,
                      'inputs': inp
                  } for dep_id, inp in zip(deployment_ids, inputs)]
          )
      except TypeError:
          for dep_id, inp, label in zip(deployment_ids, inputs, labels):
              create_deployment(inp, label, blueprint_id, dep_id)
          rest_client.deployment_groups.add_deployments(
              group_id,
              deployment_ids=deployment_ids)
code_tokens: def create_deployments ( group_id , blueprint_id , deployment_ids , inputs , labels , rest_client ) : rest_client . deployment_groups . put ( group_id = group_id , blueprint_id = blueprint_id , labels = labels ) try : rest_client . deployment_groups . add_deployments ( group_id , new_deployments = [ { 'display_name' : dep_id , 'inputs' : inp } for dep_id , inp in zip ( deployment_ids , inputs ) ] ) except TypeError : for dep_id , inp , label in zip ( deployment_ids , inputs , labels ) : create_deployment ( inp , label , blueprint_id , dep_id ) rest_client . deployment_groups . add_deployments ( group_id , deployment_ids = deployment_ids )
short_docstring: Create a deployment group and create deployments in it.
short_docstring_tokens: Create a deployment group and create deployments in it .
comment: """Create a deployment group and create deployments in it.
  
      :param group_id: An existing deployment group ID.
      :type group_id: str
      :param blueprint_id: An existing blueprint ID.
      :type blueprint_id: str
      :param deployment_ids: A list of existing deployment IDs to add to group.
      :type deployment_ids: list
      :param inputs: a list of dicts of deployment inputs.
      :type inputs: list
      :param labels: a list of dicts of deployment labels.
      :type labels: list
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return: request's JSON response
      :rtype: dict
      """