<commit_before>#!/bin/sh -

if [ $# -lt 2 ]; then
  echo "Usage: $0 SERVICE_NAME SERVICE_PORT [SERVICE_IP]"
  exit 1
fi

SERVICE_NAME=$1
SERVICE_PORT=$2
if [ $# -gt 2 ]; then
  SERVICE_IP=$3
else
  SERVICE_IP=`/opt/data/tools/resolve-ip.sh`
fi

/usr/bin/etcdctl set /services/$SERVICE_NAME/1 \{\"host\":\"$SERVICE_IP\",\"port\":$SERVICE_PORT\}<commit_msg>NXIO-142 use location key to put location instead of service root<commit_after>#!/bin/sh -

if [ $# -lt 2 ]; then
  echo "Usage: $0 SERVICE_NAME SERVICE_PORT [SERVICE_IP]"
  exit 1
fi

SERVICE_NAME=$1
SERVICE_PORT=$2
if [ $# -gt 2 ]; then
  SERVICE_IP=$3
else
  SERVICE_IP=`/opt/data/tools/resolve-ip.sh`
fi

/usr/bin/etcdctl set /services/$SERVICE_NAME/1/location \{\"host\":\"$SERVICE_IP\",\"port\":$SERVICE_PORT\}
{'fraction_non_alphanumeric': 0.1815823605706874, 'fraction_numerical': 0.02464332036316472, 'mean_word_length': 4.045751633986928, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5404407', 'n_tokens_mistral': 321, 'n_tokens_neox': 316, 'n_words': 65}