|
24 | 24 |
|
25 | 25 | import com.microsoft.azure.management.Azure; |
26 | 26 | import com.microsoft.azure.management.appservice.AppServicePlan; |
| 27 | +import com.microsoft.azure.management.appservice.OperatingSystem; |
27 | 28 | import com.microsoft.azure.management.appservice.WebApp; |
28 | 29 | import com.microsoft.azure.management.resources.Location; |
29 | 30 | import com.microsoft.azure.management.resources.ResourceGroup; |
|
35 | 36 | import com.microsoft.azuretools.authmanage.SubscriptionManager; |
36 | 37 | import com.microsoft.azuretools.authmanage.models.SubscriptionDetail; |
37 | 38 | import com.microsoft.azuretools.sdkmanage.AzureManager; |
38 | | -import rx.Observable; |
39 | | -import rx.Subscriber; |
40 | | -import rx.functions.Action1; |
41 | | -import rx.functions.Func1; |
42 | | -import rx.schedulers.Schedulers; |
| 39 | +import com.microsoft.azuretools.utils.WebAppUtils.WebAppDetails; |
43 | 40 |
|
44 | 41 | import java.io.IOException; |
45 | | -import java.util.*; |
| 42 | +import java.util.Collections; |
| 43 | +import java.util.Comparator; |
| 44 | +import java.util.LinkedList; |
| 45 | +import java.util.List; |
| 46 | +import java.util.Map; |
46 | 47 | import java.util.logging.Level; |
47 | 48 | import java.util.logging.Logger; |
| 49 | +import java.util.stream.Collectors; |
48 | 50 |
|
49 | | -import static com.microsoft.azuretools.utils.WebAppUtils.WebAppDetails; |
| 51 | +import rx.Observable; |
| 52 | +import rx.Subscriber; |
| 53 | +import rx.functions.Action1; |
| 54 | +import rx.functions.Func1; |
| 55 | +import rx.schedulers.Schedulers; |
50 | 56 |
|
51 | 57 | /** |
52 | 58 | * Created by vlashch on 1/9/17. |
@@ -197,7 +203,9 @@ public Observable<? extends RgDepParams> call(ResourceGroup rg) { |
197 | 203 | @Override |
198 | 204 | public void call(Subscriber<? super RgDepParams> subscriber) { |
199 | 205 | List<WebApp> wal = azure.webApps().listByResourceGroup(rg.name()); |
200 | | - List<AppServicePlan> aspl = azure.appServices().appServicePlans().listByResourceGroup(rg.name()); |
| 206 | + List<AppServicePlan> aspl = azure.appServices().appServicePlans().listByResourceGroup(rg.name()) |
| 207 | + .stream().filter(item -> OperatingSystem.WINDOWS.equals(item.operatingSystem())) |
| 208 | + .collect(Collectors.toList()); |
201 | 209 | subscriber.onNext(new RgDepParams(rg, wal, aspl)); |
202 | 210 | subscriber.onCompleted(); |
203 | 211 | } |
|
0 commit comments