diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2020-11-02 12:38:04 +0100 |
---|---|---|
committer | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2020-11-03 04:52:05 +0000 |
commit | 1d9becc737e698f3f06bca34c94fd63254052154 (patch) | |
tree | 6f71798c06b0b7b0c6588c2952cfe57eadc19765 /sdnr/wt/netconfnode-state-service/model/src | |
parent | 562b91c16ea3670bf0c4f7a2bf4d578207eecf07 (diff) |
Set coremodel for ONF Devicemanagers
Set coremodel for ONF Devicemanagers
Issue-ID: SDNC-1383
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: Ia6015dbf16ec7ded8066a2e68d1cb53d130670c3
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/netconfnode-state-service/model/src')
-rw-r--r-- | sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java index 6b790afc8..a348b29ad 100644 --- a/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java +++ b/sdnr/wt/netconfnode-state-service/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/Capabilities.java @@ -49,6 +49,7 @@ public class Capabilities { private static final Logger LOG = LoggerFactory.getLogger(Capabilities.class); private static final String METHODNAME = "getCapability"; + private static final String UNSUPPORTED = "Unsupported"; private final List<String> capabilities = new ArrayList<>(); private final DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); @@ -218,9 +219,17 @@ public class Capabilities { return QName.create(capability).getRevision().get().toString(); } } - return "Unsupported"; + return UNSUPPORTED; } + /** + * Verify if QName namespace is supported by capabilities + * @param revision result of getRevisionForNamespace() + * @return true if namespace is supported. + */ + static public boolean isNamespaceSupported(String revision) { + return revision != UNSUPPORTED; + } @Override public String toString() { |