@Test public void testExecute_WhenSGIHasSubNetSGMember_AllocatesDAIToVMPort() throws Exception { SecurityGroup sg = new SecurityGroup(null, null, null); sg.addSecurityGroupMember(newSGMWithPort(Subnet.class, 1L)); SecurityGroupInterface sgi = registerNewSGI(sg); DistributedApplianceInstance dai = registerNewDAI(); AllocateDAIWithSGIMembersTask task = this.factory.create(sgi, dai); task.execute(); assertExpectedProtectedPorts(dai); }
@Override public AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai) { AllocateDAIWithSGIMembersTask task = new AllocateDAIWithSGIMembersTask(sgi, dai); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
AllocateDAIWithSGIMembersTask extends UpdateDAIToSGIMembersTask { @Override public AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai) { AllocateDAIWithSGIMembersTask task = new AllocateDAIWithSGIMembersTask(sgi, dai); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
AllocateDAIWithSGIMembersTask extends UpdateDAIToSGIMembersTask { @Override public AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai) { AllocateDAIWithSGIMembersTask task = new AllocateDAIWithSGIMembersTask(sgi, dai); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } AllocateDAIWithSGIMembersTask(); private  AllocateDAIWithSGIMembersTask(SecurityGroupInterface sgi, DistributedApplianceInstance dai); }
AllocateDAIWithSGIMembersTask extends UpdateDAIToSGIMembersTask { @Override public AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai) { AllocateDAIWithSGIMembersTask task = new AllocateDAIWithSGIMembersTask(sgi, dai); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } AllocateDAIWithSGIMembersTask(); private  AllocateDAIWithSGIMembersTask(SecurityGroupInterface sgi, DistributedApplianceInstance dai); @Override AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai); @Override void updatePortProtection(VirtualPort protectedPort); @Override String getName(); }
AllocateDAIWithSGIMembersTask extends UpdateDAIToSGIMembersTask { @Override public AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai) { AllocateDAIWithSGIMembersTask task = new AllocateDAIWithSGIMembersTask(sgi, dai); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } AllocateDAIWithSGIMembersTask(); private  AllocateDAIWithSGIMembersTask(SecurityGroupInterface sgi, DistributedApplianceInstance dai); @Override AllocateDAIWithSGIMembersTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai); @Override void updatePortProtection(VirtualPort protectedPort); @Override String getName();  }