public OperationFuture < Server > removePublicIp ( Server serverRef ) { checkNotNull ( serverRef , "Server reference must be not null" ) ; ServerMetadata serverMetadata = findByRef ( serverRef ) ; List < JobFuture > jobFutures = serverMetadata . getDetails ( ) . getIpAddresses ( ) . stream ( ) . map ( IpAddress :: getPublicIp ) . filter ( notNull ( ) ) . map ( address -> removePublicIp ( serverRef , address ) . jobFuture ( ) ) . collect ( toList ( ) ) ; return new OperationFuture <> ( serverRef , new ParallelJobsFuture ( jobFutures ) ) ; }
Remove all public IPs from server