Created
November 22, 2013 21:46
-
-
Save dallasmarlow/7607427 to your computer and use it in GitHub Desktop.
row4 nodes needing intake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layer3_racks = ["C401", "C402"] | |
row4_assets = collins.find rack_position: 'EWR01-C4', | |
type: :server_node, | |
size: 10000 | |
filters = [ | |
Proc.new {|asset, _| asset.nics.any? {|nic| nic['SPEED'] == 10000000000}}, | |
Proc.new {|asset, layer3_racks| layer3_racks.any? {|rack| asset.rack_position.include?(rack)}} | |
] | |
row4_assets.reject {|asset| filters.any? {|filter| filter.call asset, layer3_racks}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment