diff options
Diffstat (limited to 'examples/examples-onap-vcpe/src/main/resources/logic/standalone/ConfigureBlackWhiteListTask.js')
-rw-r--r-- | examples/examples-onap-vcpe/src/main/resources/logic/standalone/ConfigureBlackWhiteListTask.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ConfigureBlackWhiteListTask.js b/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ConfigureBlackWhiteListTask.js index 2d41e5f90..b16404292 100644 --- a/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ConfigureBlackWhiteListTask.js +++ b/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ConfigureBlackWhiteListTask.js @@ -1,6 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,21 +30,24 @@ var targetType = executor.inFields.get("targetType"); var target = executor.inFields.get("target"); var black = executor.inFields.get("black"); -var returnValue = executor.isTrue; +var returnValue = true; -if (targetType === "VNF") { +if (targetType == "VNF") { executor.getContextAlbum("VnfIdWhiteBlackListAlbum").put(target, black); executor.logger.info("added VNF ID \"" + target + "\" with black flag \"" + black + "\" to VNF ID list"); } -else if (targetType === "Service") { +else if (targetType == "Service") { executor.getContextAlbum("ServiceIdWhiteBlackListAlbum").put(target, black); executor.logger.info("added Service ID \"" + target + "\" with black flag \"" + black + "\" to Service ID list"); } -else if (targetType === "VServer") { +else if (targetType == "VServer") { executor.getContextAlbum("VServerIdWhiteBlackListAlbum").put(target, black); executor.logger.info("added VServer ID \"" + target + "\" with black flag \"" + black + "\" to VServer ID list"); } else { executor.logger.warn("unknown target type \"" + targetType + "\" specified"); - returnValue = executor.isFalse; + returnValue = false; } + +returnValue; + |