Revert "Corrections to getRegisteredApplications and CLI implementation"
ApplicationService is not available. For example, when using the ONOS CLI:
onos> apps -s -a
Service org.onosproject.app.ApplicationService not found
The issue seems to be a circular dependency, as ApplicationManager depends on CoreService, but CoreManager depends on ApplicationService.
Reverting for now.
This reverts commit 35ef3d3000f8b19608531dfd06f8e78482c45b32.
Change-Id: I298c3c7844df7f2395e092fbb89a8e9264883094
diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java
index 806449e..24b2da1 100644
--- a/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java
@@ -62,23 +62,16 @@
private boolean sortByName = false;
- @Option(name = "-r", aliases = "--regapps", description = "Get Registered Apps for Runtime Version")
- private boolean getRegisteredApps = false;
-
@Override
protected void doExecute() {
ApplicationService service = get(ApplicationService.class);
- List<Application> apps;
- if (getRegisteredApps) {
- apps = newArrayList(service.getRegisteredApplications());
- } else {
- apps = newArrayList(service.getApplications());
- }
+ List<Application> apps = newArrayList(service.getApplications());
if (sortByName) {
apps.sort(Comparator.comparing(app -> app.id().name()));
} else {
Collections.sort(apps, Comparators.APP_COMPARATOR);
}
+
if (outputJson()) {
print("%s", json(service, apps));
} else {