diff options
-rw-r--r-- | lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java | 12 | ||||
-rw-r--r-- | lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java | 11 |
2 files changed, 8 insertions, 15 deletions
diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java index 939836be..e441bda5 100644 --- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java +++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java @@ -5,6 +5,7 @@ package org.onap.ccsdk.sli.northbound; * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,33 +24,24 @@ package org.onap.ccsdk.sli.northbound; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Properties; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; -import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; import org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.*; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.common.header.CommonHeaderBuilder; -import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.status.Status; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.status.StatusBuilder; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.base.Optional; -import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; import org.onap.ccsdk.sli.northbound.LcmResponseCode.*; @@ -83,8 +75,6 @@ public class LcmProvider implements AutoCloseable, LCMService { private static final Logger LOG = LoggerFactory.getLogger(LcmProvider.class); - private static final String ACTIVE_VERSION = "active"; - private static final String APPLICATION_NAME = "LCM"; private final ExecutorService executor; diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java index 9fcc92c8..54e53c77 100644 --- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java +++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java @@ -5,6 +5,7 @@ package org.onap.ccsdk.sli.northbound; * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +37,8 @@ public class LcmSliClient { private final SvcLogicService svcLogicService; + private String ErrorCode = "error-code"; + public LcmSliClient(final SvcLogicService svcLogicService) { this.svcLogicService = svcLogicService; } @@ -80,12 +83,12 @@ public class LcmSliClient { if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) { - if (!respProps.containsKey("error-code")) { - respProps.setProperty("error-code", "500"); + if (!respProps.containsKey(ErrorCode)) { + respProps.setProperty(ErrorCode, "500"); } } else { - if (!respProps.containsKey("error-code")) { - respProps.setProperty("error-code", "200"); + if (!respProps.containsKey(ErrorCode)) { + respProps.setProperty(ErrorCode, "200"); } } |