summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorQuoc-Nghia Nguyen <quocnghia.nguyen@orange.com>2018-07-13 09:52:43 +0200
committerQuoc-Nghia Nguyen <quocnghia.nguyen@orange.com>2018-07-13 10:12:24 +0200
commit0e3e6d0a87f7c8dcc998fc57b4c04d49c7a56a76 (patch)
tree493d03e3de47d78d87dab2082c62f1ded50eb516 /src/main
parentd44d6c6ea00241f586ee7fb3b173821d98decbab (diff)
add option to disable registration with msb
Issue-ID: EXTAPI-101 Change-Id: I54911da3fde479f1a387f931fdcc72341c5b2092 Signed-off-by: Quoc-Nghia Nguyen <quocnghia.nguyen@orange.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/nbi/ServiceRegisterRunner.java5
-rw-r--r--src/main/resources/application.properties1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/onap/nbi/ServiceRegisterRunner.java b/src/main/java/org/onap/nbi/ServiceRegisterRunner.java
index e8cca00..a30be98 100644
--- a/src/main/java/org/onap/nbi/ServiceRegisterRunner.java
+++ b/src/main/java/org/onap/nbi/ServiceRegisterRunner.java
@@ -37,6 +37,9 @@ import java.util.Set;
public class ServiceRegisterRunner implements CommandLineRunner {
private static final Logger logger = LoggerFactory.getLogger(ServiceRegisterRunner.class);
+ @Value("${msb.enabled}")
+ private boolean IS_ENABLED;
+
@Value("${msb.discovery.host}")
private String DISCOVERY_HOST;
@@ -72,6 +75,8 @@ public class ServiceRegisterRunner implements CommandLineRunner {
@Override
public void run(String... strings) throws Exception {
+ if (!IS_ENABLED) return;
+
MicroServiceInfo msinfo = new MicroServiceInfo();
msinfo.setServiceName(SERVICE_NAME);
msinfo.setVersion(SERVICE_VERSION);
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index cc3a2b9..8c07ce0 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -50,6 +50,7 @@ so.owning.entity.name=OE-generic
so.project.name=Project-generic
# MSB
+msb.enabled=true
msb.discovery.host=msb_discovery
msb.discovery.port=10081
msb.service.host=