<commit_before>#!/usr/bin/env bash

set -e

source bosh-cpi-release/ci/tasks/utils.sh

check_param BASE_OS
check_param BAT_VCAP_PASSWORD
check_param BAT_SECOND_STATIC_IP
check_param SL_DATACENTER
check_param SL_VLAN_PUBLIC
check_param SL_VLAN_PRIVATE
check_param SL_VM_NAME_PREFIX
check_param SL_VM_DOMAIN


DIRECTOR=`cat ${PWD}/deployment/director-info`

source /etc/profile.d/chruby.sh
chruby 2.1.2

echo "DirectorIP =" $DIRECTOR

export BAT_DIRECTOR=$DIRECTOR
export BAT_DNS_HOST=$DIRECTOR
export BAT_STEMCELL=`echo $PWD/stemcell/*.tgz`
export BAT_DEPLOYMENT_SPEC="${PWD}/${BASE_OS}-bats-config.yml"
export BAT_VCAP_PASSWORD=$<PASSWORD>
export BAT_INFRASTRUCTURE=softlayer
export BAT_NETWORKING=dynamic
export BAT_DEBUG_MODE=true

STEMCELL_VERSION=$(cat stemcell-version/number | sed 's/\.0$//;s/\.0$//')

bosh -n target $BAT_DIRECTOR
echo Using This version of bosh:
bosh --version
cat > "${BAT_DEPLOYMENT_SPEC}" <<EOF
---
cpi: softlayer
manifest_template_path: $(echo `pwd`/softlayer.yml.erb)
properties:
  uuid: $(bosh status --uuid)
  stemcell:
    name: light-bosh-stemcell-$STEMCELL_VERSION-softlayer-esxi-ubuntu-trusty-go_agent
    version: latest
  cloud_properties:
    bosh_ip: $BAT_DIRECTOR
    public_vlan_id: $SL_VLAN_PUBLIC
    private_vlan_id: $SL_VLAN_PRIVATE
    vm_name_prefix: $SL_VM_NAME_PREFIX
    data_center: $SL_DATACENTER
    domain: $SL_VM_DOMAIN
  pool_size: 1
  instances: 1
  password: "\$6\$3n/Y5RP0\$Jr1nLxatojY9Wlqduzwh66w8KmYxjoj9vzI62n3Mmstd5mNVnm0SS1N0YizKOTlJCY5R/DFmeWgbkrqHIMGd51"
  networks:
  - name: default<commit_msg>Fixed stemcell name in run_bats.sh<commit_after>#!/usr/bin/env bash

set -e

source bosh-cpi-release/ci/tasks/utils.sh

check_param BASE_OS
check_param BAT_VCAP_PASSWORD
check_param BAT_SECOND_STATIC_IP
check_param SL_DATACENTER
check_param SL_VLAN_PUBLIC
check_param SL_VLAN_PRIVATE
check_param SL_VM_NAME_PREFIX
check_param SL_VM_DOMAIN


DIRECTOR=`cat ${PWD}/deployment/director-info`

source /etc/profile.d/chruby.sh
chruby 2.1.2

echo "DirectorIP =" $DIRECTOR

export BAT_DIRECTOR=$DIRECTOR
export BAT_DNS_HOST=$DIRECTOR
export BAT_STEMCELL=`echo $PWD/stemcell/*.tgz`
export BAT_DEPLOYMENT_SPEC="${PWD}/${BASE_OS}-bats-config.yml"
export BAT_VCAP_PASSWORD=$BAT_VCAP_PASSWORD
export BAT_INFRASTRUCTURE=softlayer
export BAT_NETWORKING=dynamic
export BAT_DEBUG_MODE=true

STEMCELL_VERSION=$(cat stemcell-version/number | sed 's/\.0$//;s/\.0$//')

bosh -n target $BAT_DIRECTOR
echo Using This version of bosh:
bosh --version
cat > "${BAT_DEPLOYMENT_SPEC}" <<EOF
---
cpi: softlayer
manifest_template_path: $(echo `pwd`/softlayer.yml.erb)
properties:
  uuid: $(bosh status --uuid)
  stemcell:
    name: bosh-softlayer-esxi-ubuntu-trusty-go_agent
    version: latest
  cloud_properties:
    bosh_ip: $BAT_DIRECTOR
    public_vlan_id: $SL_VLAN_PUBLIC
    private_vlan_id: $SL_VLAN_PRIVATE
    vm_name_prefix: $SL_VM_NAME_PREFIX
    data_center: $SL_DATACENTER
    domain: $SL_VM_DOMAIN
  pool_size: 1
  instances: 1
  password: <PASSWORD>"
  networks:
  - name: default
{'fraction_non_alphanumeric': 0.10366457576758006, 'fraction_numerical': 0.011224826675470452, 'mean_word_length': 5.615720524017467, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '3264896', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1214, 'n_words': 211}