Corrected output of network configuration subjectKeys in JSON output; no longer relies on subject.toString.
Change-Id: If4e07bc27cfaf8feb59397a5f104e5f663504f6e
diff --git a/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java b/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java
index 5cd96ca..db484ee 100644
--- a/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java
+++ b/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java
@@ -96,7 +96,7 @@
configClasses.put(identifier(configFactory), configFactory.configClass());
SubjectFactory subjectFactory = configFactory.subjectFactory();
- subjectClasses.putIfAbsent(subjectFactory.subjectKey(), subjectFactory);
+ subjectClasses.putIfAbsent(subjectFactory.subjectClassKey(), subjectFactory);
subjectClassKeys.putIfAbsent(subjectFactory.subjectClass(), subjectFactory);
store.addConfigFactory(configFactory);
@@ -145,8 +145,8 @@
}
@Override
- public SubjectFactory getSubjectFactory(String subjectKey) {
- return subjectClasses.get(subjectKey);
+ public SubjectFactory getSubjectFactory(String subjectClassKey) {
+ return subjectClasses.get(subjectClassKey);
}
@Override
@@ -155,8 +155,8 @@
}
@Override
- public Class<? extends Config> getConfigClass(String subjectKey, String configKey) {
- return configClasses.get(new ConfigIdentifier(subjectKey, configKey));
+ public Class<? extends Config> getConfigClass(String subjectClassKey, String configKey) {
+ return configClasses.get(new ConfigIdentifier(subjectClassKey, configKey));
}
@Override
@@ -255,7 +255,7 @@
}
private static ConfigIdentifier identifier(ConfigFactory factory) {
- return new ConfigIdentifier(factory.subjectFactory().subjectKey(), factory.configKey());
+ return new ConfigIdentifier(factory.subjectFactory().subjectClassKey(), factory.configKey());
}
static final class ConfigIdentifier {