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.) |
| 233 | Confirm 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 | {{{ |
| 236 | ssh $foamserver foamctl geni:show-sliver -u $sliver_urn --passwd-file=/opt/foam/etc/foampasswd |
| 237 | ssh $fvserver fvctl --passwd-file=/etc/flowvisor/fvpasswd getSliceInfo $fv_slicename |
| 238 | ssh $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.) |
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 | |
| 251 | Disable the sliver, to put it back into the pending queue: |
| 252 | |
| 253 | {{{ |
| 254 | foamctl 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 | |
| 259 | Confirm that 'status' is now "Pending", and that the sliver now does not show up in FlowVisor, and has no flowspace rules: |
| 260 | |
| 261 | {{{ |
| 262 | foamctl geni:show-sliver -u $sliver_urn --passwd-file=/opt/foam/etc/foampasswd |
| 263 | fvctl --passwd-file=/etc/flowvisor/fvpasswd getSliceInfo $fv_slicename |
| 264 | fvctl --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 | |
| 269 | Add a temporary cron job to tell FOAM to generate e-mail with a list of pending slivers: |
| 270 | |
| 271 | {{{ |
| 272 | 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" |
| 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 | |
| 277 | Clean up the cron job: |
| 278 | |
| 279 | {{{ |
| 280 | sudo rm /etc/cron.d/foamtest |
| 281 | }}} |
| 282 | |
| 283 | This next set of tests will generate a bunch of e-mail; check at the end that it all showed up as expected. |
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 | | |
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. |
| 357 | That 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. |