Skip to content

Commit

Permalink
mgmt, exclude arc sites from appservice (Azure#23813)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Aug 31, 2021
1 parent 23ca049 commit 9c9628b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.regex.Pattern;

/** The implementation for WebApps. */
public class FunctionAppsImpl
Expand Down Expand Up @@ -177,6 +179,13 @@ public PagedFlux<FunctionAppBasic> listAsync() {
}

private static boolean isFunctionApp(SiteInner inner) {
return inner.kind() != null && Arrays.asList(inner.kind().split(",")).contains("functionapp");
boolean ret = false;
if (inner.kind() != null) {
List<String> kinds = Arrays.asList(inner.kind().split(Pattern.quote(",")));
if (kinds.contains("functionapp") && !kinds.contains("kubernetes")) {
ret = true;
}
}
return ret;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.regex.Pattern;

/** The implementation for WebApps. */
public class WebAppsImpl
Expand Down Expand Up @@ -142,8 +143,8 @@ private static boolean isWebApp(SiteInner inner) {
if (inner.kind() == null) {
ret = true;
} else {
List<String> kinds = Arrays.asList(inner.kind().split(","));
if (kinds.contains("app") || kinds.contains("api")) {
List<String> kinds = Arrays.asList(inner.kind().split(Pattern.quote(",")));
if ((kinds.contains("app") || kinds.contains("api")) && !kinds.contains("kubernetes")) {
ret = true;
}
}
Expand Down

0 comments on commit 9c9628b

Please sign in to comment.