diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2022-10-18 12:08:45 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2022-10-19 08:31:02 -0500 |
commit | 6652164b384221018bf605b1d5fb809425b26a8e (patch) | |
tree | 6e440f5379010f5bbb20841384c55b86da37b533 /policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java | |
parent | e58a8c52dadfe14b8b77c8eb7c236697c710ddd5 (diff) |
Support optional cluster name in policy engine
This allows also for correlation with running pod hostnames
in the case of multiple drools pdp flavors coexist.
Issue-ID: POLICY-4403
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I81affeeec622e6c0e9627651bf34c0775a796827
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java index 10623c50..75e7c74a 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2022 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -122,6 +122,25 @@ public interface PolicyEngine extends Startable, Lockable, TopicListener { String setEnvironmentProperty(String key, String value); /** + * Gets the hostname used by this PDP-D. + */ + String getHostName(); + + /** + * Gets the cluster name as configured in $CLUSTER_NAME, + * otherwise it will assume an UUID as the cluster name. + */ + String getClusterName(); + + /** + * Gets the PDP Name from hostname and $CLUSTER_NAME, + * otherwise if CLUSTER_NAME is not set, the PdpName + * will be the concatenation of the hostname and a + * UUID. + */ + String getPdpName(); + + /** * registers a new Policy Controller with the Policy Engine initialized per properties. * * @param properties properties to initialize the Policy Controller |