original_docstring:  Create a site or update it's location. Associate it with a deployment.
      :param deployment_id: A Cloudify deployment ID or name.
      :type deployment_id: str
      :param location: The longitude and latitude of the site.
      :type location: str
      :param location_name: The name of the site.
      :type location_name: str
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return:
      :rtype: NoneType
      
docstring: Create a site or update it's location. Associate it with a deployment.
docstring_tokens: Create a site or update it ' s location . Associate it with a deployment .
code: def assign_site(deployment_id, location, location_name):
      """ Create a site or update it's location. Associate it with a deployment.
      :param deployment_id: A Cloudify deployment ID or name.
      :type deployment_id: str
      :param location: The longitude and latitude of the site.
      :type location: str
      :param location_name: The name of the site.
      :type location_name: str
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return:
      :rtype: NoneType
      """
      location_name = format_location_name(location_name)
      site = get_site(location_name)
      if not site:
          create_site(location_name, location)
      elif not site.get('location'):
          update_site(location_name, location)
      update_deployment_site(deployment_id, location_name)
code_tokens: def assign_site ( deployment_id , location , location_name ) : location_name = format_location_name ( location_name ) site = get_site ( location_name ) if not site : create_site ( location_name , location ) elif not site . get ( 'location' ) : update_site ( location_name , location ) update_deployment_site ( deployment_id , location_name )
short_docstring: Create a site or update it's location.
short_docstring_tokens: Create a site or update it ' s location .
comment: """ Create a site or update it's location. Associate it with a deployment.
      :param deployment_id: A Cloudify deployment ID or name.
      :type deployment_id: str
      :param location: The longitude and latitude of the site.
      :type location: str
      :param location_name: The name of the site.
      :type location_name: str
      :param rest_client: A Cloudify REST client.
      :type rest_client: cloudify_rest_client.client.CloudifyClient
      :return:
      :rtype: NoneType
      """