<commit_before>#!/bin/bash
set -e
set -x

printheader "https://github.com/sonata-nfv/son-emu/wiki/Example-2"

SONEMU() {
    docker exec son-emu-int-sdk-pipeline "$@"
}

SONCLI() {
    docker exec son-cli-int-test "$@"
}

### Starting the topology
SONEMU screen -L -S sonemu -d -m sudo python /son-emu/src/emuvim/examples/sonata_y1_demo_topology_1.py
### Setup screen for immediate flusing
SONEMU screen -S sonemu -X logfile flush 0
### Wait for the cli to start
SONEMU W '^*** Starting CLI:' 60s
### Print nodes
SONEMU Cmd 'nodes'

SONCLI son-access -p emu push --upload son-examples/service-projects/sonata-empty-service.son
SONCLI son-access -p emu push --deploy latest

SONEMU son-emu-cli compute list
SONEMU sync # avoid text overlapping

SONEMU Cmd 'empty_vnf2 ifconfig && echo "... checked empty_vnf2"'
SONEMU W "^... checked empty_vnf2"
SONEMU Cmd 'empty_vnf1 ping -c 2 empty_vnf2 && echo "... checked ping between empty_vnf1 and empty_vnf2"'
SONEMU W "^... checked ping between empty_vnf1 and empty_vnf2"
SONEMU Cmd 'empty_vnf2 ping -c 2 empty_vnf1 && echo "... checked ping between empty_vnf2 and empty_vnf1"'<commit_msg>Make the ping command more verbose<commit_after>#!/bin/bash
set -e
set -x

printheader "https://github.com/sonata-nfv/son-emu/wiki/Example-2"

SONEMU() {
    docker exec son-emu-int-sdk-pipeline "$@"
}

SONCLI() {
    docker exec son-cli-int-test "$@"
}

### Starting the topology
SONEMU screen -L -S sonemu -d -m sudo python /son-emu/src/emuvim/examples/sonata_y1_demo_topology_1.py
### Setup screen for immediate flusing
SONEMU screen -S sonemu -X logfile flush 0
### Wait for the cli to start
SONEMU W '^*** Starting CLI:' 60s
### Print nodes
SONEMU Cmd 'nodes'

SONCLI son-access -p emu push --upload son-examples/service-projects/sonata-empty-service.son
SONCLI son-access -p emu push --deploy latest

SONEMU son-emu-cli compute list
SONEMU sync # avoid text overlapping

SONEMU Cmd 'empty_vnf2 ifconfig && echo "... checked empty_vnf2"'
SONEMU W "^... checked empty_vnf2"
SONEMU Cmd 'empty_vnf1 ping -v -c 2 empty_vnf2 && echo "... checked ping between empty_vnf1 and empty_vnf2"'
SONEMU W "^... checked ping between empty_vnf1 and empty_vnf2"
SONEMU Cmd 'empty_vnf2 ping -v -c 2 empty_vnf1 && echo "... checked ping between empty_vnf2 and empty_vnf1"'
{'fraction_non_alphanumeric': 0.12145041502839668, 'fraction_numerical': 0.01834862385321101, 'mean_word_length': 3.893162393162393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '980086', 'n_tokens_mistral': 890, 'n_tokens_neox': 827, 'n_words': 260}