Sha256: e3f936bd6dccc0d2ae4482817c4443acd162c9f5c816dfd5a40224839aa67df6
Contents?: true
Size: 594 Bytes
Versions: 2
Compression:
Stored size: 594 Bytes
Contents
# -*- coding: utf-8 -*- module Dcmgr module VNet module Isolators # Isolates instances based on security groups # Access to instances in another security group is blocked class BySecurityGroup < Isolator def determine_friends(me,others) #TODO: make sure that me and others are vnic maps others.dup.delete_if { |other| # Delete if we are not in the same security group me[:security_groups].find {|my_group| other[:security_groups].member?(my_group) }.nil? } end end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
wakame-vdc-agents-11.12.0 | lib/dcmgr/vnet/isolators/by_securitygroup.rb |
wakame-vdc-dcmgr-11.12.0 | lib/dcmgr/vnet/isolators/by_securitygroup.rb |