original_docstring:  Set a deployment's site property. If the deployment already
      has a site property set, then update it.
      :param deployment_id: A Cloudify deployment ID or name.
      :type deployment_id: str
      :param site_name:
      :type site_name: str
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return: request's JSON response
      :rtype: dict
      
docstring: Set a deployment's site property. If the deployment already
  has a site property set, then update it.
docstring_tokens: Set a deployment ' s site property . If the deployment already has a site property set then update it .
code: def update_deployment_site(deployment_id, site_name, rest_client):
      """ Set a deployment's site property. If the deployment already
      has a site property set, then update it.
      :param deployment_id: A Cloudify deployment ID or name.
      :type deployment_id: str
      :param site_name:
      :type site_name: str
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return: request's JSON response
      :rtype: dict
      """
      deployment = get_deployment(deployment_id)
      if deployment.site_name == site_name:
          return deployment
      elif deployment.site_name:
          return rest_client.deployments.set_site(
              deployment_id, detach_site=True)
      return rest_client.deployments.set_site(
          deployment_id, site_name)
code_tokens: def update_deployment_site ( deployment_id , site_name , rest_client ) : deployment = get_deployment ( deployment_id ) if deployment . site_name == site_name : return deployment elif deployment . site_name : return rest_client . deployments . set_site ( deployment_id , detach_site = True ) return rest_client . deployments . set_site ( deployment_id , site_name )
short_docstring: Set a deployment's site property.
short_docstring_tokens: Set a deployment ' s site property .
comment: """ Set a deployment's site property. If the deployment already
      has a site property set, then update it.
      :param deployment_id: A Cloudify deployment ID or name.
      :type deployment_id: str
      :param site_name:
      :type site_name: str
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return: request's JSON response
      :rtype: dict
      """