Changes between Version 8 and Version 9 of OpenFlow/FOAM/Testing


Ignore:
Timestamp:
04/26/12 16:31:45 (12 years ago)
Author:
Josh Smift
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenFlow/FOAM/Testing

    v8 v9  
    122122NOTE: Do the [wiki:OpenFlow/FOAM/Testing#Creation Creation] section immediately before starting this section.
    123123
     124NOTE: This section is not really compatible with FOAM 0.7, which auto-approves the sliver. We need to reconsider what to do as a simple test here.
     125
    124126The steps in this section look at a newly-created sliver, approve it, confirm that it shows up in the FlowVisor, delete it, and confirm that it vanishes from the FlowVisor.
    125127
     
    212214
    213215NOTE: Do the [wiki:OpenFlow/FOAM/Testing#Creation Creation] section immediately before starting this section.
     216
     217NOTE: These tests assume that the default auto-approval settings are active, and that the test sliver's flowspace will be auto-approved.
    214218
    215219The steps in this section look at a newly-created sliver, run through a sequence of approve/disable/reject actions to confirm that it can transition from any of those states to the others, and check the FlowVisor after each change; then delete the sliver, and confirm that it vanishes from the FlowVisor.
     
    227231}}}
    228232
    229 Show the sliver, and confirm that 'status' is "Pending":
    230 
    231 {{{
    232 foamctl geni:show-sliver -u $sliver_urn --passwd-file=/opt/foam/etc/foampasswd
    233 }}}
    234 
    235 Confirm that the sliver doesn't yet show up in FlowVisor:
    236 
    237 {{{
    238 fvctl --passwd-file=/etc/flowvisor/fvpasswd getSliceInfo $fv_slicename
    239 }}}
    240 
    241 (Expect a "slice does not exist" error; and likewise every time you do a "confirm that the sliver doesn't show up in FlowVisor" step below.)
     233Confirm that the sliver was auto-approved: Check that 'status' is "Approved", and that the sliver shows up in FlowVisor, with two flowspace rules:
     234
     235{{{
     236ssh $foamserver foamctl geni:show-sliver -u $sliver_urn --passwd-file=/opt/foam/etc/foampasswd
     237ssh $fvserver fvctl --passwd-file=/etc/flowvisor/fvpasswd getSliceInfo $fv_slicename
     238ssh $fvserver fvctl --passwd-file=/etc/flowvisor/fvpasswd listFlowSpace | grep $fv_slicename
     239}}}
     240
     241(Ignore warnings saying that it can't connect to the sliver's controller, if any; and likewise every time you confirm that the sliver shows up in Flowvisor below.)
    242242
    243243Add a temporary cron job to tell FOAM to generate e-mail with a list of pending slivers:
     
    247247}}}
    248248
    249 (Within a minute (when the cron job fires), that should generate e-mail to the FOAM admin with a list of pending slivers, including your test sliver; and a message to gpo-ops saying that the cron job ran.)
     249(Within a minute (when the cron job fires), that should generate a message to gpo-ops saying that the cron job ran, and one of two other things will happen: (a) If there are *other* pending slivers, it should generate a message to the FOAM admin listing only those slivers, and not your test sliver; OR (b) If there are no other pending slivers, it should not send any message about pending slivers to the FOAM admin.)
     250
     251Disable the sliver, to put it back into the pending queue:
     252
     253{{{
     254foamctl geni:disable-sliver -u $sliver_urn --passwd-file=/opt/foam/etc/foampasswd
     255}}}
     256
     257(That should generate a "sliver disabled" e-mail message, one to the experimenter and one to the FOAM admin.)
     258
     259Confirm that 'status' is now "Pending", and that the sliver now does not show up in FlowVisor, and has no flowspace rules:
     260
     261{{{
     262foamctl geni:show-sliver -u $sliver_urn --passwd-file=/opt/foam/etc/foampasswd
     263fvctl --passwd-file=/etc/flowvisor/fvpasswd getSliceInfo $fv_slicename
     264fvctl --passwd-file=/etc/flowvisor/fvpasswd listFlowSpace | grep $fv_slicename
     265}}}
     266
     267(Expect a "slice does not exist" error for the getSliceInfo step; and likewise every time you do a "confirm that the sliver doesn't show up in FlowVisor" step below.)
     268
     269Add a temporary cron job to tell FOAM to generate e-mail with a list of pending slivers:
     270
     271{{{
     272sudo sh -c "echo $(date +'%M %H' -d 'now + 1 min') '* * *  www-data  /opt/foam/bin/daily-queue ; echo foamtest cron job ran at $(date)' > /etc/cron.d/foamtest"
     273}}}
     274
     275(Within a minute (when the cron job fires), that should generate a message to gpo-ops saying that the cron job ran; and e-mail to the FOAM admin with a list of pending slivers, including your test sliver.)
     276
     277Clean up the cron job:
     278
     279{{{
     280sudo rm /etc/cron.d/foamtest
     281}}}
     282
     283This next set of tests will generate a bunch of e-mail; check at the end that it all showed up as expected.
    250284
    251285Approve the sliver, confirm that 'status' is now "Approved", and confirm that the sliver now shows up in FlowVisor, with two flowspace rules:
     
    258292}}}
    259293
    260 (Don't worry about the ouptut saying that it can't connect to the controller; this is expected if your rspec didn't include a controller that's actually running, which the example one doesn't. Likewise every time you confirm that the sliver shows up in Flowvisor below.)
    261 
    262 (That should generate a "sliver approved" e-mail message, one to the experimenter and one to the FOAM admin.)
    263 
    264 Add a temporary cron job to tell FOAM to generate e-mail with a list of pending slivers:
    265 
    266 {{{
    267 sudo sh -c "echo $(date +'%M %H' -d 'now + 1 min') '* * *  www-data  /opt/foam/bin/daily-queue ; echo foamtest cron job ran at $(date)' > /etc/cron.d/foamtest"
    268 }}}
    269 
    270 (Within a minute (when the cron job fires), either (a) if there were other slivers in the previous mail, that should generate a message to the FOAM admin listing only those slivers, and not your test sliver, or otherwise (b) not send any message to the FOAM admin; and a message to gpo-ops saying that the cron job ran.)
    271 
    272 Clean up the cron job:
    273 
    274 {{{
    275 sudo rm /etc/cron.d/foamtest
    276 }}}
    277 
    278 This next set of tests will generate a bunch of e-mail; check at the end that it all showed up as expected.
    279 
    280294Disable the sliver, confirm that 'status' is now "Pending", and confirm that the sliver now does not show up in FlowVisor, and has no flowspace rules:
    281295
     
    341355}}}
    342356
    343 That set of tests should generate seven e-mail messages to the experimenter and seven to the FOAM admin: There should be a "sliver disabled" message, then "sliver rejected", then approved, rejected, disabled, approved, and deleted. Probably in that order, although e-mail is sometimes delivered out of sequence, so don't worry too much if they're not in order.
     357That set of tests should generate eight e-mail messages to the experimenter and eight to the FOAM admin: There should be a "sliver approved" message, then "sliver disabled", then "sliver rejected", then approved, rejected, disabled, approved, and deleted. Probably in that order, although e-mail is sometimes delivered out of sequence, so don't worry too much if they're not in order.
    344358
    345359== Expiration ==