Changeset 963


Ignore:
Timestamp:
11/05/13 09:26:12 (10 years ago)
Author:
jripsl
Message:
  • add host/port variables.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Monitoring/libIGCM_mock/libIGCM_mock.sh

    r878 r963  
    1818# init 
    1919 
    20 send_msg_cmd="/home/jripsl/snapshot/Monitoring/CNClient/sendAMQPMsg" 
     20l__configcard_file_sample_dir="/home/cscompute/CNClient/sample" 
     21send_msg_cmd="/home/cscompute/CNClient/sendAMQPMsg" 
     22 
     23g__broker_host=cstest-broker.ipsl.jussieu.fr 
     24g__broker_port=5672 
    2125g__stackfile= 
    2226g__scenario_dir=scenario 
     
    5054OPTIONS: 
    5155   -c              ask for confirmation 
     56   -d              dry-run 
    5257   -h              this help 
    5358   -f              set stack file 
     
    9499send_cleanup_msg() 
    95100{ 
    96         $send_msg_cmd -h localhost -p 5672 -b "$( echo {\"code\":\"8888\"} | base64 -w 0 )" 
     101        $send_msg_cmd -h $g__broker_host -p $g__broker_port -b "$( echo {\"code\":\"8888\"} | base64 -w 0 )" 
    97102} 
    98103 
     
    171176                                # special processing for "file" key (base64 encoding) 
    172177 
    173                                 l__configcard_file="/home/jripsl/snapshot/Monitoring/sample/${field_arr[1]}" 
     178                                l__configcard_file="$l__configcard_file_sample_dir/${field_arr[1]}" 
    174179 
    175180                                # check 
     
    211216                # debug 
    212217                #echo $l__JSON_msg_buf_encoded 
    213                 #echo $send_msg_cmd -h localhost -p 5672 -b "$l__JSON_msg_buf_encoded" 
     218                #echo $send_msg_cmd -h $g__broker_host -p $g__broker_port -b "$l__JSON_msg_buf_encoded" 
    214219 
    215220                # send AMQP message 
    216221                if [ "$g__dryrun" = "1" ]; then 
    217222 
    218                         echo $send_msg_cmd -h localhost -p 5672 -b "$l__JSON_msg_buf" 
     223                        echo $send_msg_cmd -h $g__broker_host -p $g__broker_port -b "$l__JSON_msg_buf" 
    219224 
    220225 
     
    230235 
    231236                else 
    232                         $send_msg_cmd -h localhost -p 5672 -b "$l__JSON_msg_buf_encoded" 
     237                        $send_msg_cmd -h $g__broker_host -p $g__broker_port -b "$l__JSON_msg_buf_encoded" 
    233238                fi 
    234239 
     
    266271                #echo $line | awk -F" " '{print $4}' 
    267272                callname=$(echo $line | awk -F" " '{print $4}' ) 
    268                 $send_msg_cmd localhost 5672 string "$callname" 
     273                $send_msg_cmd $g__broker_host $g__broker_port string "$callname" 
    269274        done 
    270275else 
Note: See TracChangeset for help on using the changeset viewer.