def interpolate_link_spec_properties(links_spec, consumer_variable_set)
      if links_spec.nil?
        return links_spec
      end

      errors = []
      consumer_deployment_name = consumer_variable_set.deployment.name
      links_spec_copy = Bosh::Common::DeepCopy.copy(links_spec)

      links_spec_copy.each do |link_name, link_spec|
        if link_spec.has_key?('properties') && !link_spec['properties'].nil?
          begin
            provider_deployment_name = link_spec['deployment_name']
            if provider_deployment_name == consumer_deployment_name
              interpolated_link_properties = @config_server_client.interpolate_with_versioning(link_spec['properties'], consumer_variable_set)
              link_spec['properties'] = interpolated_link_properties
            else
              provider_deployment = get_deployment_by_name(provider_deployment_name)
              provider_variable_set = provider_last_successful_variable_set(provider_deployment)

              interpolated_link_properties = @config_server_client.interpolate_cross_deployment_link(link_spec['properties'], consumer_variable_set, provider_variable_set)
              link_spec['properties'] = interpolated_link_properties
            end
          rescue Exception => e
            header = "- Unable to interpolate link '#{link_name}' properties; provided by '#{link_spec['deployment_name']}' deployment. Errors are:"
            errors << Bosh::Director::FormatterHelper.new.prepend_header_and_indent_body(header, e.message.strip, {:indent_by => 2})
          end
        end
      end

      raise errors.join("\n") unless errors.empty?

      links_spec_copy
    end
def interpolate_link_spec_properties(links_spec, consumer_variable_set)
      if links_spec.nil?
        return links_spec
      end

      errors = []
      consumer_deployment_name = consumer_variable_set.deployment.name
      links_spec_copy = Bosh::Common::DeepCopy.copy(links_spec)

      links_spec_copy.each do |link_name, link_spec|
        if link_spec.has_key?('properties') && !link_spec['properties'].nil?
          begin
            provider_deployment_name = link_spec['deployment_name']
            if provider_deployment_name == consumer_deployment_name
              interpolated_link_properties = @config_server_client.interpolate_with_versioning(link_spec['properties'], consumer_variable_set)
              link_spec['properties'] = interpolated_link_properties
            else
              provider_deployment = get_deployment_by_name(provider_deployment_name)
              provider_variable_set = provider_last_successful_variable_set(provider_deployment)

              interpolated_link_properties = @config_server_client.interpolate_cross_deployment_link(link_spec['properties'], consumer_variable_set, provider_variable_set)
              link_spec['properties'] = interpolated_link_properties
            end
          rescue Exception => e
            header = "- Unable to interpolate link '#{link_name}' properties; provided by '#{link_spec['deployment_name']}' deployment. Errors are:"
            errors << Bosh::Director::FormatterHelper.new.prepend_header_and_indent_body(header, e.message.strip, {:indent_by => 2})
          end
        end
      end

      raise errors.join("\n") unless errors.empty?

      links_spec_copy
    end
Note: The links properties will be interpolated in the context of the deployment that provides them
 @param [Hash] links_spec Hash to be interpolated
 @param [Bosh::Director::Models::VariableSet] consumer_variable_set
 @return [Hash] A Deep copy of the interpolated links_spec. Only the properties for the links will be interpolated