Changes between Version 1 and Version 2 of GEC21Agenda/LabWiki/ModuleD


Ignore:
Timestamp:
10/15/14 20:00:17 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC21Agenda/LabWiki/ModuleD

    v1 v2  
    77{{{
    88#!ruby
    9 defProperty('source1', "nodea-testGIMI", "ID of a resource")
    10 defProperty('source2', "switch1-testGIMI", "ID of a resource")
    11 defProperty('source3', "switch2-testGIMI", "ID of a resource") #NEW
     9
     10defProperty('resource1', "nodea", "ID of a resource")
     11defProperty('resource2', "switch1", "ID of a resource")
     12defProperty('resource3', "switch2", "ID of a resource")
     13
    1214
    1315defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
    1416defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
    1517
    16 defProperty('sinkaddr21', '192.168.1.13', "Ping destination address") #NEW
    17 defProperty('sinkaddr23', '192.168.1.14', "Ping destination address") #NEW
    18 defProperty('sinkaddr24', '192.168.1.15', "Ping destination address") #NEW
     18defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
     19defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
     20defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")
    1921
    2022
     
    3335  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
    3436  app.defMeasurement('ping') do |m|
    35     m.defMetric('dest_addr',:string)
     37    m.defMetric('remote',:string)
    3638    m.defMetric('ttl',:uint32)
    3739    m.defMetric('rtt',:double)
     
    4244defApplication('trema') do |app|
    4345  app.description = 'This app runs trema from command line'
    44   app.binary_path = '/usr/local/bin/rubydir/bin/trema run /root/learning-switch.rb'
     46  app.binary_path = '/bin/sh /root/ovs-setup2.sh'
    4547end
    46 
    47 defGroup('Source2', property.source2, property.source3) do |node| #MODIFIED
     48defGroup('Source2', property.resource2, property.resource3) do |node|
    4849  node.addApplication("trema")
    4950end
    50 
    51 defGroup('Source1', property.source1) do |node|
     51defGroup('Source1', property.resource1) do |node|
    5252  node.addApplication("ping") do |app|
    5353    app.setProperty('target', property.sinkaddr12)
     
    6262    app.measure('ping', :samples => 1)
    6363  end
    64    node.addApplication("ping") do |app| #NEW
     64   node.addApplication("ping") do |app|
    6565    app.setProperty('target', property.sinkaddr21)
    6666    app.setProperty('count', 30)
     
    6868    app.measure('ping', :samples => 1)
    6969  end
    70    node.addApplication("ping") do |app| #NEW
     70   node.addApplication("ping") do |app|
    7171    app.setProperty('target', property.sinkaddr23)
    7272    app.setProperty('count', 30)
     
    7474    app.measure('ping', :samples => 1)
    7575  end
    76   node.addApplication("ping") do |app| #NEW
     76  node.addApplication("ping") do |app|
    7777    app.setProperty('target', property.sinkaddr24)
    7878    app.setProperty('count', 30)
     
    8282end
    8383
     84
    8485onEvent(:ALL_UP_AND_INSTALLED) do |event|
    8586  info "Starting the ping"
     
    8788    group('Source2').startApplications
    8889  end
    89   after 10 do
     90  after 20 do
    9091    group('Source1').startApplications
    9192  end
     
    9899
    99100defGraph 'RTT' do |g|
    100   g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
     101  g.ms('ping').select(:oml_seq, :remote, :rtt)
    101102  g.caption "RTT of received packets."
    102103  g.type 'line_chart3'
    103   g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
     104  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :remote
    104105  g.xaxis :legend => 'oml_seq'
    105106  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
    106107end
     108
    107109}}}
    108110