Guest User

Untitled

a guest
Feb 11th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. def sense_containers
  2. Docker::Container.all(:all => true).each { |c|
  3. c.info['Names'].each { |name|
  4. if(name.start_with?('/bigsense'))
  5. unit = name.split('-')[1]
  6. if(unit)
  7. yield c
  8. end
  9. end
  10. }
  11. }
  12. end
  13.  
  14. def list_containers
  15. sense_containers { |c| puts(c) }
  16. end
Advertisement
Add Comment
Please, Sign In to add comment