diff options
Diffstat (limited to 'auth/cli-editor')
50 files changed, 14961 insertions, 0 deletions
diff --git a/auth/cli-editor/pom.xml b/auth/cli-editor/pom.xml new file mode 100644 index 000000000..1f1863da6 --- /dev/null +++ b/auth/cli-editor/pom.xml @@ -0,0 +1,47 @@ +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2018 Ericsson. 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.apex-pdp.auth</groupId> + <artifactId>auth</artifactId> + <version>2.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-editor</artifactId> + <name>${project.artifactId}</name> + <description>Command line editor for Apex models</description> + + <dependencies> + <dependency> + <groupId>org.onap.policy.apex-pdp.model</groupId> + <artifactId>model-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.4</version> + </dependency> + </dependencies> +</project>
\ No newline at end of file diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCLIEditorMain.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCLIEditorMain.java new file mode 100644 index 000000000..4a2635efa --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCLIEditorMain.java @@ -0,0 +1,195 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Set; +import java.util.TreeSet; + +import org.onap.policy.apex.model.utilities.json.JSONHandler; +import org.slf4j.ext.XLogger; +import org.slf4j.ext.XLoggerFactory; + +/** + * This class initiates an Apex CLI editor from a java main method. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class ApexCLIEditorMain { + // Get a reference to the logger + private static final XLogger LOGGER = XLoggerFactory.getXLogger(ApexCLIEditorMain.class); + + // The editor parameters + private CLIParameters parameters; + + // The CLI commands read in from JSON + private CLICommands commands; + + // The Apex model properties read in from JSON + private ApexModelProperties apexModelProperties; + + // The number of errors encountered in command processing + private int errorCount = 0; + + /** + * Instantiates the Apex CLI editor. + * + * @param args the command line arguments + */ + public ApexCLIEditorMain(final String[] args) { + LOGGER.info("Starting Apex CLI editor " + Arrays.toString(args) + " . . ."); + + try { + final CLIParameterParser parser = new CLIParameterParser(); + parameters = parser.parse(args); + + if (parameters.isHelpSet()) { + parser.help(ApexCLIEditorMain.class.getCanonicalName()); + return; + } + parameters.validate(); + } catch (final Exception e) { + LOGGER.error("start of Apex command line editor failed, " + e.getMessage()); + errorCount++; + return; + } + + LOGGER.debug("parameters are: " + parameters.toString()); + + // Read the command definitions + try { + commands = new JSONHandler<CLICommands>().read(CLICommands.class, parameters.getMetadataStream()); + LOGGER.debug("found " + commands.getCommandSet().size() + " commands"); + } catch (final Exception e) { + LOGGER.error("start of Apex command line editor failed, error reading command metadata from " + + parameters.getMetadataLocation()); + LOGGER.error(e.getMessage()); + errorCount++; + return; + } + + // The JSON processing returns null if there is an empty file + if (null == commands) { + LOGGER.error("start of Apex command line editor failed, no commands found in " + + parameters.getApexPropertiesLocation()); + errorCount++; + return; + } + + // Read the Apex properties + try { + apexModelProperties = new JSONHandler<ApexModelProperties>().read(ApexModelProperties.class, + parameters.getApexPropertiesStream()); + LOGGER.debug("model properties are: " + apexModelProperties.toString()); + } catch (final Exception e) { + LOGGER.error("start of Apex command line editor failed, error reading Apex model properties from " + + parameters.getApexPropertiesLocation()); + LOGGER.error(e.getMessage()); + errorCount++; + return; + } + + // The JSON processing returns null if there is an empty file + if (apexModelProperties == null) { + LOGGER.error("start of Apex command line editor failed, no Apex model properties found in " + + parameters.getApexPropertiesLocation()); + errorCount++; + return; + } + + // Find the system commands + final Set<KeywordNode> systemCommandNodes = new TreeSet<>(); + for (final CLICommand command : commands.getCommandSet()) { + if (command.isSystemCommand()) { + systemCommandNodes.add(new KeywordNode(command.getName(), command)); + } + } + + // Read in the command hierarchy, this builds a tree of commands + final KeywordNode rootKeywordNode = new KeywordNode("root"); + for (final CLICommand command : commands.getCommandSet()) { + rootKeywordNode.processKeywords(command.getKeywordlist(), command); + } + rootKeywordNode.addSystemCommandNodes(systemCommandNodes); + + // Create the model we will work towards + ApexModelHandler modelHandler = null; + try { + modelHandler = + new ApexModelHandler(apexModelProperties.getProperties(), parameters.getInputModelFileName()); + } catch (final Exception e) { + LOGGER.error("execution of Apex command line editor failed: " + e.getMessage()); + errorCount++; + return; + } + + final CLIEditorLoop cliEditorLoop = + new CLIEditorLoop(apexModelProperties.getProperties(), modelHandler, rootKeywordNode); + try { + errorCount = + cliEditorLoop.runLoop(parameters.getCommandInputStream(), parameters.getOutputStream(), parameters); + + if (errorCount == 0) { + LOGGER.info("Apex CLI editor completed execution"); + } else { + LOGGER.error("execution of Apex command line editor failed: " + errorCount + + " command execution failure(s) occurred"); + } + } catch (final IOException e) { + LOGGER.error("execution of Apex command line editor failed: " + e.getMessage()); + return; + } + } + + /** + * Get the number of errors encountered in command processing + * + * @return the number of errors + */ + public int getErrorCount() { + return errorCount; + } + + /** + * Sets the number of errors encountered in command processing. + * + * @param errorCount the number of errors + */ + public void setErrorCount(final int errorCount) { + this.errorCount = errorCount; + } + + + /** + * The main method, kicks off the editor. + * + * @param args the arguments + */ + public static void main(final String[] args) { + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(args); + + // Only call system.exit on errors as it brings the JVM down + if (cliEditor.getErrorCount() > 0) { + System.exit(cliEditor.getErrorCount()); + } + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java new file mode 100644 index 000000000..a5e5302f9 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelHandler.java @@ -0,0 +1,185 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Properties; +import java.util.TreeMap; + +import org.onap.policy.apex.model.modelapi.ApexAPIResult; +import org.onap.policy.apex.model.modelapi.ApexModel; +import org.onap.policy.apex.model.modelapi.ApexModelFactory; + +/** + * This class instantiates and holds the Apex model being manipulated by the editor. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class ApexModelHandler { + private ApexModel apexModel = null; + + /** + * Create the Apex Model with the properties specified. + * + * @param properties The properties of the Apex model + */ + public ApexModelHandler(final Properties properties) { + apexModel = new ApexModelFactory().createApexModel(properties, true); + } + + /** + * Create the Apex Model with the properties specified and load it from a file. + * + * @param properties The properties of the Apex model + * @param modelFileName The name of the model file to edit + */ + public ApexModelHandler(final Properties properties, final String modelFileName) { + this(properties); + + if (modelFileName == null) { + return; + } + + final ApexAPIResult result = apexModel.loadFromFile(modelFileName); + if (result.isNOK()) { + throw new CLIException(result.getMessages().get(0)); + } + } + + /** + * Execute a command on the Apex model. + * + * @param command The command to execute + * @param argumentValues Arguments of the command + * @param writer A writer to which to write output + * @return the result of the executed command + */ + public ApexAPIResult executeCommand(final CLICommand command, + final TreeMap<String, CLIArgumentValue> argumentValues, final PrintWriter writer) { + // Get the method + final Method apiMethod = getCommandMethod(command); + + // Get the method arguments + final Object[] parameterArray = getParameterArray(command, argumentValues, apiMethod); + + try { + final Object returnObject = apiMethod.invoke(apexModel, parameterArray); + + if (returnObject instanceof ApexAPIResult) { + final ApexAPIResult result = (ApexAPIResult) returnObject; + writer.println(result); + return result; + } else { + throw new CLIException( + "invocation of specified method \"" + command.getApiMethod() + "\" failed for command \"" + + command.getName() + "\" the returned object is not an instance of ApexAPIResult"); + } + } catch (IllegalAccessException | IllegalArgumentException e) { + writer.println("invocation of specified method \"" + command.getApiMethod() + "\" failed for command \"" + + command.getName() + "\""); + e.printStackTrace(writer); + throw new CLIException("invocation of specified method \"" + command.getApiMethod() + + "\" failed for command \"" + command.getName() + "\"", e); + } catch (final InvocationTargetException e) { + writer.println("invocation of specified method \"" + command.getApiMethod() + "\" failed for command \"" + + command.getName() + "\""); + e.getCause().printStackTrace(writer); + throw new CLIException("invocation of specified method \"" + command.getApiMethod() + + "\" failed for command \"" + command.getName() + "\"", e); + } + } + + /** + * Find the API method for the command. + * + * @param command The command + * @return the API method + */ + private Method getCommandMethod(final CLICommand command) { + final String className = command.getAPIClassName(); + final String methodName = command.getAPIMethodName(); + + try { + final Class<? extends Object> apiClass = Class.forName(className); + for (final Method apiMethod : apiClass.getMethods()) { + if (apiMethod.getName().equals(methodName)) { + return apiMethod; + } + } + throw new CLIException("specified method \"" + command.getApiMethod() + "\" not found for command \"" + + command.getName() + "\""); + } catch (final ClassNotFoundException e) { + throw new CLIException("specified class \"" + command.getApiMethod() + "\" not found for command \"" + + command.getName() + "\""); + } + } + + /** + * Get the arguments of the command as an ordered array of objects ready for the method. + * + * @param command the command that invoked the method + * @param argumentValues the argument values for the method + * @param apiMethod the method itself + * @return the argument list + */ + private Object[] getParameterArray(final CLICommand command, final TreeMap<String, CLIArgumentValue> argumentValues, + final Method apiMethod) { + final Object[] parameterArray = new Object[argumentValues.size()]; + + int i = 0; + try { + for (final Class<?> parametertype : apiMethod.getParameterTypes()) { + final String parameterValue = + argumentValues.get(command.getArgumentList().get(i).getArgumentName()).getValue(); + + if (parametertype.equals(boolean.class)) { + parameterArray[i] = (boolean) Boolean.valueOf(parameterValue); + } else { + parameterArray[i] = parameterValue; + } + i++; + } + } catch (final Exception e) { + throw new CLIException("number of argument mismatch on method \"" + command.getApiMethod() + + "\" for command \"" + command.getName() + "\""); + } + + return parameterArray; + } + + /** + * Save the model to a string. + * + * @param messageWriter the writer to write status messages to + * @return the string + */ + public String writeModelToString(final PrintWriter messageWriter) { + final ApexAPIResult result = apexModel.listModel(); + + if (result.isOK()) { + return result.getMessage(); + } else { + return null; + } + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelProperties.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelProperties.java new file mode 100644 index 000000000..6ed68288a --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexModelProperties.java @@ -0,0 +1,215 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.util.Properties; + +/** + * This class contains the definitions of Apex model properties. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class ApexModelProperties { + /** The default version that will be used for concepts. */ + public static final String DEFAULT_CONCEPT_VERSION = "0.0.1"; + + /** The default name space that will be used for concepts. */ + public static final String DEFAULT_EVENT_NAMESPACE = "org.onap.policy.apex"; + + /** The default source that will be used for events. */ + public static final String DEFAULT_EVENT_SOURCE = "eventSource"; + + /** The default target that will be used for events. */ + public static final String DEFAULT_EVENT_TARGET = "eventTarget"; + + /** The default logic block start token. */ + public static final String DEFAULT_LOGIC_BLOCK_START_TAG = "LB{"; + + /** The default logic block end token. */ + public static final String DEFAULT_LOGIC_BLOCK_END_TAG = "}LB"; + + /** The default logic block end token. */ + public static final String DEFAULT_POLICY_TEMPLATE = "FREEFORM"; + + /** The default macro file token. */ + public static final String DEFAULT_MACRO_FILE_TAG = "#MACROFILE:"; + + // @formatter:off + private String defaultConceptVersion = DEFAULT_CONCEPT_VERSION; + private String defaultEventNamespace = DEFAULT_EVENT_NAMESPACE; + private String defaultEventSource = DEFAULT_EVENT_SOURCE; + private String defaultEventTarget = DEFAULT_EVENT_TARGET; + private String defaultLogicBlockStartTag = DEFAULT_LOGIC_BLOCK_START_TAG; + private String defaultLogicBlockEndTag = DEFAULT_LOGIC_BLOCK_END_TAG; + private String defaultPolicyTemplate = DEFAULT_POLICY_TEMPLATE; + private String defaultMacroFileTag = DEFAULT_MACRO_FILE_TAG; + // @formatter:on + + /** + * Gets the default property values for the Apex CLI editor. + * + * @return the default properties + */ + public Properties getProperties() { + final Properties properties = new Properties(); + // @formatter:off + properties.setProperty("DEFAULT_CONCEPT_VERSION", defaultConceptVersion); + properties.setProperty("DEFAULT_EVENT_NAMESPACE", defaultEventNamespace); + properties.setProperty("DEFAULT_EVENT_SOURCE", defaultEventSource); + properties.setProperty("DEFAULT_EVENT_TARGET", defaultEventTarget); + properties.setProperty("DEFAULT_LOGIC_BLOCK_START_TAG", defaultLogicBlockStartTag); + properties.setProperty("DEFAULT_LOGIC_BLOCK_END_TAG", defaultLogicBlockEndTag); + properties.setProperty("DEFAULT_MACRO_FILE_TAG", defaultMacroFileTag); + // @formatter:on + return properties; + } + + /** + * Gets the default concept version. + * + * @return the default concept version + */ + public String getDefaultConceptVersion() { + return defaultConceptVersion; + } + + /** + * Sets the default concept version. + * + * @param defaultConceptVersion the default concept version + */ + public void setDefaultConceptVersion(final String defaultConceptVersion) { + this.defaultConceptVersion = defaultConceptVersion; + } + + /** + * Gets the default event namespace. + * + * @return the default event namespace + */ + public String getDefaultEventNamespace() { + return defaultEventNamespace; + } + + /** + * Sets the default event namespace. + * + * @param defaultEventNamespace the default event namespace + */ + public void setDefaultEventNamespace(final String defaultEventNamespace) { + this.defaultEventNamespace = defaultEventNamespace; + } + + /** + * Gets the default event source. + * + * @return the default event source + */ + public String getDefaultEventSource() { + return defaultEventSource; + } + + /** + * Sets the default event source. + * + * @param defaultEventSource the default event source + */ + public void setDefaultEventSource(final String defaultEventSource) { + this.defaultEventSource = defaultEventSource; + } + + /** + * Gets the default event target. + * + * @return the default event target + */ + public String getDefaultEventTarget() { + return defaultEventTarget; + } + + /** + * Sets the default event target. + * + * @param defaultEventTarget the default event target + */ + public void setDefaultEventTarget(final String defaultEventTarget) { + this.defaultEventTarget = defaultEventTarget; + } + + /** + * Gets the default logic block start tag. + * + * @return the default logic block start tag + */ + public String getDefaultLogicBlockStartTag() { + return defaultLogicBlockStartTag; + } + + /** + * Gets the default logic block end tag. + * + * @return the default logic block end tag + */ + public String getDefaultLogicBlockEndTag() { + return defaultLogicBlockEndTag; + } + + /** + * Gets the default policy template type. + * + * @return the default policy template + */ + public String getDefaultPolicyTemplate() { + return defaultPolicyTemplate; + } + + /** + * Sets the default policy template type. + * + * @param defaultPolicyTemplate the new default policy template + */ + public void setDefaultPolicyTemplate(final String defaultPolicyTemplate) { + this.defaultPolicyTemplate = defaultPolicyTemplate; + } + + /** + * Gets the default macro file tag. + * + * @return the default macro file end tag + */ + public String getDefaultMacroFileTag() { + return defaultMacroFileTag; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "ApexModelProperties [defaultConceptVersion=" + defaultConceptVersion + ", defaultEventNamespace=" + + defaultEventNamespace + ", defaultEventSource=" + defaultEventSource + ", defaultEventTarget=" + + defaultEventTarget + ", defaultLogicBlockStartTag=" + defaultLogicBlockStartTag + + ", defaultLogicBlockEndTag=" + defaultLogicBlockEndTag + ", defaultPolicyTemplate=" + + defaultPolicyTemplate + ", defaultMacroFileTag=" + defaultMacroFileTag + "]"; + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIArgument.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIArgument.java new file mode 100644 index 000000000..b215f69e4 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIArgument.java @@ -0,0 +1,144 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import org.onap.policy.apex.model.utilities.Assertions; + +/** + * This class holds the definition of an argument of a CLI command. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLIArgument implements Comparable<CLIArgument> { + private final String argumentName; + private final boolean nullable; + private final String description; + + /** + * This Constructor constructs a non nullable command line argument with a blank name and + * description. + */ + public CLIArgument() { + this("", false, ""); + } + + /** + * This Constructor constructs a non nullable command line argument with the given name and + * description. + * + * @param incomingArgumentName the argument name + */ + public CLIArgument(final String incomingArgumentName) { + this(incomingArgumentName, false, ""); + } + + /** + * This Constructor constructs a command line argument with the given name, nullability, and + * description. + * + * @param argumentName the argument name + * @param nullable the nullable + * @param description the description + */ + public CLIArgument(final String argumentName, final boolean nullable, final String description) { + this.argumentName = argumentName; + this.nullable = nullable; + this.description = description; + } + + /** + * Gets the argument name. + * + * @return the argument name + */ + public String getArgumentName() { + return argumentName; + } + + /** + * Checks if the argument is nullable. + * + * @return true, if checks if the argument is nullable + */ + public boolean isNullable() { + return nullable; + } + + /** + * Gets the argument description. + * + * @return the argument description + */ + public String getDescription() { + return description; + } + + /** + * Gets the argument help. + * + * @return the argument help + */ + public String getHelp() { + final StringBuilder builder = new StringBuilder(); + builder.append(argumentName); + builder.append(nullable ? ": (O) " : ": (M) "); + builder.append(description); + return builder.toString(); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "CLIArgument [argumentName=" + argumentName + ", nullable=" + nullable + ", description=" + description + + "]"; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + @Override + public int compareTo(final CLIArgument otherArgument) { + Assertions.argumentNotNull(otherArgument, "comparison object may not be null"); + + if (this == otherArgument) { + return 0; + } + if (getClass() != otherArgument.getClass()) { + return this.hashCode() - otherArgument.hashCode(); + } + + final CLIArgument other = otherArgument; + + if (!argumentName.equals(other.argumentName)) { + return argumentName.compareTo(other.argumentName); + } + if (nullable != other.nullable) { + return (this.hashCode() - other.hashCode()); + } + return description.compareTo(otherArgument.description); + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIArgumentValue.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIArgumentValue.java new file mode 100644 index 000000000..d87a8dc5b --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIArgumentValue.java @@ -0,0 +1,91 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +/** + * This class represents an argument used on a command and its value. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLIArgumentValue { + private final CLIArgument cliArgument; + private boolean specified; + private String value; + + /** + * The Constructor creates an argument value for the given argument, has not been set, and has + * no value. + * + * @param cliArgument the argument for which this object is a value + */ + public CLIArgumentValue(final CLIArgument cliArgument) { + this.cliArgument = cliArgument; + specified = false; + value = null; + } + + /** + * Gets the argument for which this object is a value. + * + * @return the argument for which this object is a value + */ + public CLIArgument getCliArgument() { + return cliArgument; + } + + /** + * Checks if the argument value is specified. + * + * @return true, if the argument value is specified + */ + public boolean isSpecified() { + return specified; + } + + /** + * Gets the argument value. + * + * @return the argument value + */ + public String getValue() { + return value; + } + + /** + * Sets the argument value. + * + * @param value the argument value + */ + public void setValue(final String value) { + this.value = value; + specified = true; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "CLIArgumentValue [cliArgument=" + cliArgument + ", specified=" + specified + ", value=" + value + "]"; + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLICommand.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLICommand.java new file mode 100644 index 000000000..74f4a6f92 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLICommand.java @@ -0,0 +1,240 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.policy.apex.model.utilities.Assertions; + +/** + * This class represents a single Apex CLI command that is issued to the Apex Editor Java API + * {@link com.ericsson.apex.model.modelapi.ApexEditorAPI}. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLICommand implements Comparable<CLICommand> { + private String name = ""; + private final List<String> keywordlist = new ArrayList<>(); + private final List<CLIArgument> argumentList = new ArrayList<>(); + private String apiMethod = ""; + private boolean systemCommand = false; + private String description = ""; + + /** + * Gets the class name of the class that executes this command in the Java API. + * + * @return the class name of the class that executes this command in the Java API + */ + public String getAPIClassName() { + final int lastDotPos = apiMethod.lastIndexOf('.'); + if (lastDotPos == -1) { + throw new CLIException("invalid API method name specified on command \"" + name + + "\", class name not found: " + apiMethod); + } + return apiMethod.substring(0, lastDotPos); + } + + /** + * Gets the method name of the method that executes this command in the Java API. + * + * @return the the method name of the method that executes this command in the Java API + */ + public String getAPIMethodName() { + final int lastDotPos = apiMethod.lastIndexOf('.'); + if (lastDotPos == -1) { + throw new CLIException("invalid API method name specified on command \"" + name + + "\", class name not found: " + apiMethod); + } + if (lastDotPos == apiMethod.length() - 1) { + throw new CLIException("no API method name specified on command \"" + name + "\": " + apiMethod); + } + return apiMethod.substring(lastDotPos + 1); + } + + /** + * Gets the name of the editor command. + * + * @return the name of the editor command + */ + public String getName() { + return name; + } + + /** + * Sets the name of the editor command. + * + * @param name the name of the editor command + */ + public void setName(final String name) { + this.name = name; + } + + /** + * Gets the list of keywords for this command. + * + * @return the list of keywords for this command + */ + public List<String> getKeywordlist() { + return keywordlist; + } + + /** + * Gets the list of arguments for this command. + * + * @return the list of arguments for this command + */ + public List<CLIArgument> getArgumentList() { + return argumentList; + } + + /** + * Gets the method of the method that executes this command in the Java API. + * + * @return the method of the method that executes this command in the Java API + */ + public String getApiMethod() { + return apiMethod; + } + + /** + * Sets the method of the method that executes this command in the Java API. + * + * @param apiMethod the method of the method that executes this command in the Java API + */ + public void setApiMethod(final String apiMethod) { + this.apiMethod = apiMethod; + } + + /** + * Gets the description of the command. + * + * @return the description of the command + */ + public String getDescription() { + return description; + } + + /** + * Sets the description of the command. + * + * @param description the description of the command + */ + public void setDescription(final String description) { + this.description = description; + } + + /** + * Checks if this command is a system command. + * + * @return true, if this command is a system command + */ + public boolean isSystemCommand() { + return systemCommand; + } + + /** + * Sets whether this command is a system command. + * + * @param systemCommand whether this command is a system command + */ + public void setSystemCommand(final boolean systemCommand) { + this.systemCommand = systemCommand; + } + + /** + * Gets help for this command. + * + * @return the help for this command + */ + public String getHelp() { + final StringBuilder builder = new StringBuilder(); + for (final String keyword : keywordlist) { + builder.append(keyword); + builder.append(' '); + } + builder.append('{'); + builder.append(name); + builder.append("}: "); + builder.append(description); + + for (final CLIArgument argument : argumentList) { + if (argument == null) { + continue; + } + builder.append("\n\t"); + builder.append(argument.getHelp()); + } + return builder.toString(); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "CLICommand [name=" + name + ",keywordlist=" + keywordlist + ", argumentList=" + argumentList + + ", apiMethod=" + apiMethod + ", systemCommand=" + systemCommand + ", description=" + description + + "]"; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + @Override + public int compareTo(final CLICommand otherCommand) { + Assertions.argumentNotNull(otherCommand, "comparison object may not be null"); + + if (this == otherCommand) { + return 0; + } + if (getClass() != otherCommand.getClass()) { + return this.hashCode() - otherCommand.hashCode(); + } + + final CLICommand other = otherCommand; + + for (int i = 0, j = 0;; i++, j++) { + if (i < keywordlist.size() && j < otherCommand.keywordlist.size()) { + if (!keywordlist.get(i).equals(other.keywordlist.get(j))) { + return keywordlist.get(i).compareTo(other.keywordlist.get(j)); + } + } else if (i == keywordlist.size() && j == otherCommand.keywordlist.size()) { + break; + } else if (i == keywordlist.size()) { + return -1; + } else { + return 1; + } + } + if (!argumentList.equals(other.argumentList)) { + return (argumentList.hashCode() - other.argumentList.hashCode()); + } + if (systemCommand != other.systemCommand) { + return (this.hashCode() - other.hashCode()); + } + return apiMethod.compareTo(other.apiMethod); + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLICommands.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLICommands.java new file mode 100644 index 000000000..4c9bab045 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLICommands.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.util.Set; +import java.util.TreeSet; + +/** + * This class contains the CLI commands read in from a JSON file. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLICommands { + private final Set<CLICommand> commandList = new TreeSet<>(); + + /** + * Gets the command set. + * + * @return the command set + */ + public Set<CLICommand> getCommandSet() { + return commandList; + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIEditorLoop.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIEditorLoop.java new file mode 100644 index 000000000..560648901 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIEditorLoop.java @@ -0,0 +1,543 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.util.AbstractMap.SimpleEntry; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.TreeMap; + +import org.onap.policy.apex.model.modelapi.ApexAPIResult; +import org.onap.policy.apex.model.modelapi.ApexAPIResult.RESULT; +import org.onap.policy.apex.model.utilities.TextFileUtils; +import org.onap.policy.apex.model.utilities.TreeMapUtils; + +/** + * This class implements the editor loop, the loop of execution that continuously executes commands + * until the quit command is issued or EOF is detected on input. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLIEditorLoop { + // The model handler that is handling the API towards the Apex model being editied + private final ApexModelHandler modelHandler; + + // Holds the current location in the keyword hierarchy + private final ArrayDeque<KeywordNode> keywordNodeDeque = new ArrayDeque<>(); + + // Logic block tags + private final String logicBlockStartTag; + private final String logicBlockEndTag; + + // File Macro tag + private final String macroFileTag; + + /** + * Initiate the loop with the keyword node tree. + * + * @param properties The CLI editor properties defined for execution + * @param modelHandler the model handler that will handle commands + * @param rootKeywordNode The root keyword node tree + */ + public CLIEditorLoop(final Properties properties, final ApexModelHandler modelHandler, + final KeywordNode rootKeywordNode) { + this.modelHandler = modelHandler; + keywordNodeDeque.push(rootKeywordNode); + + logicBlockStartTag = properties.getProperty("DEFAULT_LOGIC_BLOCK_START_TAG"); + logicBlockEndTag = properties.getProperty("DEFAULT_LOGIC_BLOCK_END_TAG"); + macroFileTag = properties.getProperty("DEFAULT_MACRO_FILE_TAG"); + } + + /** + * Run a command loop. + * + * @param inputStream The stream to read commands from + * @param outputStream The stream to write command output and messages to + * @param parameters The parameters for the CLI editor + * @return the exit code from command processing + * @throws IOException Thrown on exceptions on IO + */ + public int runLoop(final InputStream inputStream, final OutputStream outputStream, final CLIParameters parameters) + throws IOException { + // Readers and writers for input and output + final BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); + final PrintWriter writer = new PrintWriter(new OutputStreamWriter(outputStream)); + + // The parser parses the input lines into commands and arguments + final CLILineParser parser = new CLILineParser(); + + // The main loop for command handing, it continues until EOF on the input stream or until a + // quit command + int errorCount = 0; + ApexAPIResult result = new ApexAPIResult(); + while (result.getResult() != RESULT.FINISHED) { + if (!parameters.isIgnoreCommandFailures() && errorCount > 0) { + break; + } + + // Output prompt and get a line of input + writer.print(getPrompt()); + writer.flush(); + String line = reader.readLine(); + if (line == null) { + break; + } + + // Expand any macros in the script + try { + while (line.contains(macroFileTag)) { + line = expandMacroFile(parameters, line); + } + } + // Print any error messages from command parsing and finding + catch (final CLIException e) { + writer.println(e.getMessage()); + errorCount++; + continue; + } + + if (parameters.isEchoSet()) { + writer.println(line); + } + + String logicBlock = null; + if (line.trim().endsWith(logicBlockStartTag)) { + line = line.replace(logicBlockStartTag, "").trim(); + + logicBlock = ""; + while (true) { + String logicLine = reader.readLine(); + if (logicLine == null) { + logicBlock = null; + break; + } + + try { + while (logicLine.contains(macroFileTag)) { + logicLine = expandMacroFile(parameters, logicLine); + } + } + // Print any error messages from command parsing and finding + catch (final CLIException e) { + writer.println(e.getMessage()); + errorCount++; + continue; + } + + if (parameters.isEchoSet()) { + writer.println(logicLine); + } + + if (logicLine.trim().endsWith(logicBlockEndTag)) { + logicBlock += logicLine.replace(logicBlockEndTag, "").trim() + "\n"; + break; + } else { + logicBlock += logicLine + "\n"; + } + } + } + + try { + // Parse the line into a list of commands and arguments + final ArrayList<String> commandWords = parser.parse(line, logicBlock); + + // Find the command, if the command is null, then we are simply changing position in + // the hierarchy + final CLICommand command = findCommand(commandWords); + if (command != null) { + // Check the arguments of the command + final TreeMap<String, CLIArgumentValue> argumentValues = getArgumentValues(command, commandWords); + + // Execute the command, a FINISHED result means a command causes the loop to + // leave execution + result = executeCommand(command, argumentValues, writer); + if (result.isNOK()) { + errorCount++; + } + } + } + // Print any error messages from command parsing and finding + catch (final CLIException e) { + writer.println(e.getMessage()); + errorCount++; + } catch (final Exception e) { + e.printStackTrace(writer); + } + } + + // Get the output model + if (!parameters.isSuppressModelOutputSet()) { + final String modelString = modelHandler.writeModelToString(writer); + + if (parameters.checkSetOutputModelFileName()) { + TextFileUtils.putStringAsTextFile(modelString, parameters.getOutputModelFileName()); + } else { + System.out.println(modelString); + } + } + + reader.close(); + writer.close(); + + return errorCount; + } + + /** + * Output a prompt that indicates where in the keyword hierarchy we are. + * + * @return A string with the prompt + */ + private String getPrompt() { + final StringBuilder builder = new StringBuilder(); + final Iterator<KeywordNode> keynodeDequeIter = keywordNodeDeque.descendingIterator(); + + while (keynodeDequeIter.hasNext()) { + builder.append('/'); + builder.append(keynodeDequeIter.next().getKeyword()); + } + builder.append("> "); + + return builder.toString(); + } + + /** + * Finds a command for the given input command words. Command words need only ne specified + * enough to uniquely identify them. Therefore, "p s o c" will find the command "policy state + * output create" + * + * @param commandWords The commands and arguments parsed from the command line by the parser + * @return The found command + */ + + private CLICommand findCommand(final ArrayList<String> commandWords) { + CLICommand command = null; + + final KeywordNode startKeywordNode = keywordNodeDeque.peek(); + + // Go down through the keywords searching for the command + for (int i = 0; i < commandWords.size(); i++) { + final KeywordNode searchKeywordNode = keywordNodeDeque.peek(); + + // We have got to the arguments, time to stop looking + if (commandWords.get(i).indexOf('=') > 0) { + unwindStack(startKeywordNode); + throw new CLIException("command not found: " + stringAL2String(commandWords)); + } + + // If the node entries found is not equal to one, then we have either no command or more + // than one command matching + final List<Entry<String, KeywordNode>> foundNodeEntries = + TreeMapUtils.findMatchingEntries(searchKeywordNode.getChildren(), commandWords.get(i)); + if (foundNodeEntries.size() == 0) { + unwindStack(startKeywordNode); + throw new CLIException("command not found: " + stringAL2String(commandWords)); + } else if (foundNodeEntries.size() > 1) { + unwindStack(startKeywordNode); + throw new CLIException("multiple commands matched: " + stringAL2String(commandWords) + " [" + + nodeAL2String(foundNodeEntries) + ']'); + } + + // Record the fully expanded command word + commandWords.set(i, foundNodeEntries.get(0).getKey()); + + // Check if there is a command + final KeywordNode childKeywordNode = foundNodeEntries.get(0).getValue(); + command = childKeywordNode.getCommand(); + + // If the command is null, we go into a sub mode, otherwise we unwind the stack of + // commands and return the found command + if (command == null) { + keywordNodeDeque.push(childKeywordNode); + } else { + unwindStack(startKeywordNode); + return command; + } + } + + return null; + } + + /** + * Unwind the stack of keyword node entries we have placed on the queue in a command search. + * + * @param startKeywordNode The point on the queue we want to unwind to + */ + private void unwindStack(final KeywordNode startKeywordNode) { + // Unwind the stack + while (true) { + if (keywordNodeDeque.peek().equals(startKeywordNode)) { + return; + } + keywordNodeDeque.pop(); + } + } + + /** + * Check the arguments of the command. + * + * @param command The command to check + * @param commandWords The command words entered + * @return the argument values + */ + private TreeMap<String, CLIArgumentValue> getArgumentValues(final CLICommand command, + final ArrayList<String> commandWords) { + final TreeMap<String, CLIArgumentValue> argumentValues = new TreeMap<>(); + for (final CLIArgument argument : command.getArgumentList()) { + if (argument != null) { + argumentValues.put(argument.getArgumentName(), new CLIArgumentValue(argument)); + } + } + + // Set the value of the arguments + for (final Entry<String, String> argument : getCommandArguments(commandWords)) { + final List<Entry<String, CLIArgumentValue>> foundArguments = + TreeMapUtils.findMatchingEntries(argumentValues, argument.getKey()); + if (foundArguments.size() == 0) { + throw new CLIException("command " + stringAL2String(commandWords) + ": " + " argument \"" + + argument.getKey() + "\" not allowed on command"); + } else if (foundArguments.size() > 1) { + throw new CLIException("command " + stringAL2String(commandWords) + ": " + " argument " + argument + + " matches multiple arguments [" + argumentAL2String(foundArguments) + ']'); + } + + // Set the value of the argument, stripping off any quotes + final String argumentValue = argument.getValue().replaceAll("^\"", "").replaceAll("\"$", ""); + foundArguments.get(0).getValue().setValue(argumentValue); + } + + // Now check all mandatory arguments are set + for (final CLIArgumentValue argumentValue : argumentValues.values()) { + if (!argumentValue.isSpecified()) { + // Argument values are null by default so if this argument is not nullable it is + // mandatory + if (!argumentValue.getCliArgument().isNullable()) { + throw new CLIException("command " + stringAL2String(commandWords) + ": " + " mandatory argument \"" + + argumentValue.getCliArgument().getArgumentName() + "\" not specified"); + } + } + } + + return argumentValues; + } + + /** + * Get the arguments of the command, the command words have already been conditioned into an + * array starting with the command words and ending with the arguments as name=value tuples. + * + * @param commandWords The command words entered by the user + * @return the arguments as an entry array list + */ + private ArrayList<Entry<String, String>> getCommandArguments(final ArrayList<String> commandWords) { + final ArrayList<Entry<String, String>> arguments = new ArrayList<>(); + + // Iterate over the command words, arguments are of the format name=value + for (final String word : commandWords) { + final int equalsPos = word.indexOf('='); + if (equalsPos > 0) { + arguments.add( + new SimpleEntry<>(word.substring(0, equalsPos), word.substring(equalsPos + 1, word.length()))); + } + } + + return arguments; + } + + /** + * Execute system and editor commands. + * + * @param command The command to execute + * @param argumentValues The arguments input on the command line to invoke the command + * @param writer The writer to use for any output from the command + * @return the result of execution of the command + */ + private ApexAPIResult executeCommand(final CLICommand command, + final TreeMap<String, CLIArgumentValue> argumentValues, final PrintWriter writer) { + if (command.isSystemCommand()) { + return exceuteSystemCommand(command, writer); + } else { + return modelHandler.executeCommand(command, argumentValues, writer); + } + } + + /** + * Execute system commands. + * + * @param command The command to execute + * @param writer The writer to use for any output from the command + * @return the result of execution of the command + */ + private ApexAPIResult exceuteSystemCommand(final CLICommand command, final PrintWriter writer) { + if (command.getName().equals("back")) { + return executeBackCommand(); + } else if (command.getName().equals("help")) { + return executeHelpCommand(writer); + } else if (command.getName().equals("quit")) { + return executeQuitCommand(); + } else { + return new ApexAPIResult(RESULT.SUCCESS); + } + } + + /** + * Execute the "back" command. + * + * @return the result of execution of the command + */ + private ApexAPIResult executeBackCommand() { + if (keywordNodeDeque.size() > 1) { + keywordNodeDeque.pop(); + } + return new ApexAPIResult(RESULT.SUCCESS); + } + + /** + * Execute the "quit" command. + * + * @return the result of execution of the command + */ + private ApexAPIResult executeQuitCommand() { + return new ApexAPIResult(RESULT.FINISHED); + } + + /** + * Execute the "help" command. + * + * @param writer The writer to use for output from the command + * @return the result of execution of the command + */ + private ApexAPIResult executeHelpCommand(final PrintWriter writer) { + for (final CLICommand command : keywordNodeDeque.peek().getCommands()) { + writer.println(command.getHelp()); + } + return new ApexAPIResult(RESULT.SUCCESS); + } + + /** + * Helper method to output an array list of keyword node entries to a string. + * + * @param nodeEntryArrayList the array list of keyword node entries + * @return the string + */ + private String nodeAL2String(final List<Entry<String, KeywordNode>> nodeEntryArrayList) { + final ArrayList<String> stringArrayList = new ArrayList<>(); + for (final Entry<String, KeywordNode> node : nodeEntryArrayList) { + stringArrayList.add(node.getValue().getKeyword()); + } + + return stringAL2String(stringArrayList); + } + + /** + * Helper method to output an array list of argument entries to a string. + * + * @param argumentArrayList the argument array list + * @return the string + */ + private String argumentAL2String(final List<Entry<String, CLIArgumentValue>> argumentArrayList) { + final ArrayList<String> stringArrayList = new ArrayList<>(); + for (final Entry<String, CLIArgumentValue> argument : argumentArrayList) { + stringArrayList.add(argument.getValue().getCliArgument().getArgumentName()); + } + + return stringAL2String(stringArrayList); + } + + /** + * Helper method to output an array list of strings to a string. + * + * @param stringArrayList the array list of strings + * @return the string + */ + private String stringAL2String(final List<String> stringArrayList) { + final StringBuilder builder = new StringBuilder(); + boolean first = true; + for (final String word : stringArrayList) { + if (first) { + first = false; + } else { + builder.append(','); + } + builder.append(word); + } + + return builder.toString(); + } + + /** + * This method reads in the file from a file macro statement, expands the macro, and replaces + * the Macro tag in the line with the file contents. + * + * @param parameters The parameters for the CLI editor + * @param line The line with the macro keyword in it + * @return the expanded line + */ + private String expandMacroFile(final CLIParameters parameters, final String line) { + final int macroTagPos = line.indexOf(macroFileTag); + + // Get the line before and after the macro tag + final String lineBeforeMacroTag = line.substring(0, macroTagPos); + final String lineAfterMacroTag = line.substring(macroTagPos + macroFileTag.length()).replaceAll("^\\s*", ""); + + // Get the file name that is the argument of the Macro tag + final String[] lineWords = lineAfterMacroTag.split("\\s+"); + + if (lineWords.length == 0) { + throw new CLIException("no file name specified for Macro File Tag"); + } + + // Get the macro file name and the remainder of the line after the file name + String macroFileName = lineWords[0]; + final String lineAfterMacroFileName = lineAfterMacroTag.replaceFirst(macroFileName, ""); + + if (macroFileName.length() > 2 && macroFileName.startsWith("\"") && macroFileName.endsWith("\"")) { + macroFileName = macroFileName.substring(1, macroFileName.length() - 1); + } else { + throw new CLIException( + "macro file name \"" + macroFileName + "\" must exist and be quoted with double quotes \"\""); + } + + // Append the working directory to the macro file name + macroFileName = parameters.getWorkingDirectory() + File.separatorChar + macroFileName; + + // Now, get the text file for the argument of the macro + String macroFileContents = null; + try { + macroFileContents = TextFileUtils.getTextFileAsString(macroFileName); + } catch (final IOException e) { + throw new CLIException("file \"" + macroFileName + "\" specified in Macro File Tag not found", e); + } + + return lineBeforeMacroTag + macroFileContents + lineAfterMacroFileName; + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIException.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIException.java new file mode 100644 index 000000000..8e1104c3b --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIException.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +/** + * A run time exception used to report parsing and command input errors. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLIException extends IllegalArgumentException { + private static final long serialVersionUID = 6520231162404452427L; + + /** + * Create a CLIException with a message. + * + * @param message the message + */ + public CLIException(final String message) { + super(message); + } + + /** + * Create a CLIException with a message and an exception. + * + * @param message the message + * @param t the t + */ + public CLIException(final String message, final Throwable t) { + super(message, t); + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLILineParser.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLILineParser.java new file mode 100644 index 000000000..fd4541f28 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLILineParser.java @@ -0,0 +1,321 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.util.ArrayList; + +/** + * This class chops a command line up into commands, parameters and arguments. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLILineParser { + + /** + * This method breaks a line of input up into commands, parameters, and arguments. Commands are + * standalone words at the beginning of the line, of which there may be multiple Parameters are + * single words followed by an '=' character Arguments are single words or a block of quoted + * text following an '=' character. + * + * Format: command [command....] parameter=argument [parameter = argument] + * + * Examples entity create name=hello description="description of hello" help entity list + * + * @param line The line to parse + * @param logicBlock A block of logic code to be taken literally + * @return the string array list + */ + public ArrayList<String> parse(final String line, final String logicBlock) { + return checkFormat( + mergeArguments(mergeEquals( + splitOnEquals(stripAndSplitWords(mergeQuotes(splitOnChar(stripComments(line), '\"')))))), + logicBlock); + } + + /** + * Strip comments from lines, comments start with a # character. + * + * @param line the line + * @return the line without comments + */ + private String stripComments(final String line) { + final int commentPos = line.indexOf('#'); + if (commentPos == -1) { + return line; + } else { + return line.substring(0, commentPos); + } + } + + /** + * This method merges an array with separate quotes into an array with quotes delimiting the + * start and end of quoted words Example [Humpty ],["],[Dumpty sat on the wall],["],[, Humpty + * Dumpty had ],["],["],a ["],[great],["],[ fall] becomes [Humpty ],["Dumpty sat on the + * wall"],[, Humpty Dumpty had ],[""],[a],["great"],[ fall]. + * + * @param wordsSplitOnQuotes the words split on quotes + * @return the merged array list + */ + private ArrayList<String> mergeQuotes(final ArrayList<String> wordsSplitOnQuotes) { + final ArrayList<String> wordsWithQuotesMerged = new ArrayList<>(); + + for (int i = 0; i < wordsSplitOnQuotes.size();) { + if (wordsSplitOnQuotes.get(i).equals("\"")) { + String quotedWord = wordsSplitOnQuotes.get(i++); + + for (; i < wordsSplitOnQuotes.size(); i++) { + quotedWord += wordsSplitOnQuotes.get(i); + if (wordsSplitOnQuotes.get(i).equals("\"")) { + i++; + break; + } + } + if (quotedWord.matches("^\".*\"$")) { + wordsWithQuotesMerged.add(quotedWord); + } else { + throw new CLIException("trailing quote found in input " + wordsSplitOnQuotes); + } + } else { + wordsWithQuotesMerged.add(wordsSplitOnQuotes.get(i++)); + } + } + + return wordsWithQuotesMerged; + } + + /** + * This method splits the words on an array list into an array list where each portion of the + * line is split into words by '=', quoted words are ignored Example: aaa = bbb = ccc=ddd=eee = + * becomes [aaa ],[=],[bbb ],[=],[ccc],[=],[ddd],[=],[eee ],[=]. + * + * @param words the words + * @return the merged array list + */ + private ArrayList<String> splitOnEquals(final ArrayList<String> words) { + final ArrayList<String> wordsSplitOnEquals = new ArrayList<>(); + + for (final String word : words) { + // Is this a quoted word ? + if (word.startsWith("\"")) { + wordsSplitOnEquals.add(word); + continue; + } + + // Split on equals character + final ArrayList<String> splitWords = splitOnChar(word, '='); + for (final String splitWord : splitWords) { + wordsSplitOnEquals.add(splitWord); + } + } + + return wordsSplitOnEquals; + } + + /** + * This method merges an array with separate equals into an array with equals delimiting the + * start of words Example: [aaa ],[=],[bbb ],[=],[ccc],[=],[ddd],[=],[eee ],[=] becomes [aaa + * ],[= bbb ],[= ccc],[=ddd],[=eee ],[=]. + * + * @param wordsSplitOnEquals the words split on equals + * @return the merged array list + */ + private ArrayList<String> mergeEquals(final ArrayList<String> wordsSplitOnEquals) { + final ArrayList<String> wordsWithEqualsMerged = new ArrayList<>(); + + for (int i = 0; i < wordsSplitOnEquals.size();) { + // Is this a quoted word ? + if (wordsSplitOnEquals.get(i).startsWith("\"")) { + wordsWithEqualsMerged.add(wordsSplitOnEquals.get(i)); + continue; + } + + if (wordsSplitOnEquals.get(i).equals("=")) { + if (i < wordsSplitOnEquals.size() - 1 && !wordsSplitOnEquals.get(i + 1).startsWith("=")) { + wordsWithEqualsMerged.add(wordsSplitOnEquals.get(i) + wordsSplitOnEquals.get(i + 1)); + i += 2; + } else { + wordsWithEqualsMerged.add(wordsSplitOnEquals.get(i++)); + } + } else { + wordsWithEqualsMerged.add(wordsSplitOnEquals.get(i++)); + } + } + + return wordsWithEqualsMerged; + } + + /** + * This method merges words that start with an '=' character with the previous word if that word + * does not start with an '='. + * + * @param words the words + * @return the merged array list + */ + private ArrayList<String> mergeArguments(final ArrayList<String> words) { + final ArrayList<String> mergedArguments = new ArrayList<>(); + + for (int i = 0; i < words.size(); i++) { + // Is this a quoted word ? + if (words.get(i).startsWith("\"")) { + mergedArguments.add(words.get(i)); + continue; + } + + if (words.get(i).startsWith("=")) { + if (i > 0 && !words.get(i - 1).startsWith("=")) { + mergedArguments.remove(mergedArguments.size() - 1); + mergedArguments.add(words.get(i - 1) + words.get(i)); + } else { + mergedArguments.add(words.get(i)); + } + } else { + mergedArguments.add(words.get(i)); + } + } + + return mergedArguments; + } + + /** + * This method strips all non quoted white space down to single spaces and splits non-quoted + * words into separate words. + * + * @param words the words + * @return the array list with white space stripped and words split + */ + private ArrayList<String> stripAndSplitWords(final ArrayList<String> words) { + final ArrayList<String> strippedAndSplitWords = new ArrayList<>(); + + for (String word : words) { + // Is this a quoted word + if (word.startsWith("\"")) { + strippedAndSplitWords.add(word); + continue; + } + + // Strip white space by replacing all white space with blanks and then removing leading + // and trailing blanks + word = word.replaceAll("\\s+", " ").trim(); + + if (word.length() == 0) { + continue; + } + + // Split on space characters + final String[] splitWords = word.split(" "); + for (final String splitWord : splitWords) { + strippedAndSplitWords.add(splitWord); + } + } + + return strippedAndSplitWords; + } + + /** + * This method splits a line of text into an array list where each portion of the line is split + * into words by a character, with the characters themselves as separate words Example: Humpty + * "Dumpty sat on the wall", Humpty Dumpty had ""a "great" fall becomes [Humpty ],["],[Dumpty + * sat on the wall],["],[, Humpty Dumpty had ],["],["],a ["],[great],["],[ fall]. + * + * @param line the input line + * @param splitChar the split char + * @return the split array list + */ + private ArrayList<String> splitOnChar(final String line, final char splitChar) { + final ArrayList<String> wordsSplitOnQuotes = new ArrayList<>(); + + int currentPos = 0; + while (currentPos != -1) { + final int quotePos = line.indexOf(splitChar, currentPos); + if (quotePos != -1) { + if (currentPos < quotePos) { + wordsSplitOnQuotes.add(line.substring(currentPos, quotePos)); + } + wordsSplitOnQuotes.add("" + splitChar); + currentPos = quotePos + 1; + + if (currentPos == line.length()) { + currentPos = -1; + } + } else { + wordsSplitOnQuotes.add(line.substring(currentPos)); + currentPos = quotePos; + } + } + + return wordsSplitOnQuotes; + } + + /** + * This method checks that an array list containing a command is in the correct format. + * + * @param commandWords the command words + * @param logicBlock A block of logic code to be taken literally + * @return the checked array list + */ + private ArrayList<String> checkFormat(final ArrayList<String> commandWords, final String logicBlock) { + // There should be at least one word + if (commandWords.size() == 0) { + return commandWords; + } + + // The first word must be alphanumeric, that is a command + if (!commandWords.get(0).matches("^[a-zA-Z0-9]*$")) { + throw new CLIException( + "first command word is not alphanumeric or is not a command: " + commandWords.get(0)); + } + + // Now check that we have a sequence of commands at the beginning + int currentWordPos = 0; + while (currentWordPos < commandWords.size()) { + if (commandWords.get(currentWordPos).matches("^[a-zA-Z0-9]*$")) { + currentWordPos++; + } else { + break; + } + } + + while (currentWordPos < commandWords.size()) { + // From now on we should have a sequence of parameters with arguments delimited by a + // single '=' character + if (currentWordPos < commandWords.size() - 1 || logicBlock == null) { + // No logic block + if (commandWords.get(currentWordPos).matches("^[a-zA-Z0-9]+=[a-zA-Z0-9/\"].*$")) { + currentWordPos++; + } else { + throw new CLIException( + "command argument is not properly formed: " + commandWords.get(currentWordPos)); + } + } else { + // Logic block + if (commandWords.get(currentWordPos).matches("^[a-zA-Z0-9]+=")) { + commandWords.set(currentWordPos, commandWords.get(currentWordPos) + logicBlock); + currentWordPos++; + } else { + throw new CLIException( + "command argument is not properly formed: " + commandWords.get(currentWordPos)); + } + } + } + + return commandWords; + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIParameterParser.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIParameterParser.java new file mode 100644 index 000000000..382f23fb0 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIParameterParser.java @@ -0,0 +1,156 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.nio.file.Paths; +import java.util.Arrays; + +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +/** + * This class reads and handles command line parameters to the Apex CLI editor. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLIParameterParser { + private static final int MAX_HELP_LINE_LENGTH = 120; + + // Apache Commons CLI options + private final Options options; + + /** + * Construct the options for the CLI editor. + */ + public CLIParameterParser() { + options = new Options(); + options.addOption(Option.builder("h").longOpt("help").desc("outputs the usage of this command").required(false) + .type(Boolean.class).build()); + options.addOption(Option.builder("m").longOpt("metadata-file").desc("name of the command metadata file to use") + .hasArg().argName("CMD_METADATA_FILE").required(false).type(String.class).build()); + options.addOption( + Option.builder("a").longOpt("model-props-file").desc("name of the apex model properties file to use") + .hasArg().argName("MODEL_PROPS_FILE").required(false).type(String.class).build()); + options.addOption(Option.builder("c").longOpt("command-file") + .desc("name of a file containing editor commands to run into the editor").hasArg() + .argName("COMMAND_FILE").required(false).type(String.class).build()); + options.addOption(Option.builder("l").longOpt("log-file") + .desc("name of a file that will contain command logs from the editor, will log to standard output if not specified or suppressed with \"-nl\" flag") + .hasArg().argName("LOG_FILE").required(false).type(String.class).build()); + options.addOption(Option.builder("nl").longOpt("no-log") + .desc("if specified, no logging or output of commands to standard output or log file is carried out") + .required(false).type(Boolean.class).build()); + options.addOption(Option.builder("nm").longOpt("no-model-output") + .desc("if specified, no output of a model to standard output or model output file is carried out, " + + "the user can use the \"save\" command in a script to save a model") + .required(false).type(Boolean.class).build()); + options.addOption(Option.builder("i").longOpt("input-model-file") + .desc("name of a file that contains an input model for the editor").hasArg().argName("INPUT_MODEL_FILE") + .required(false).type(String.class).build()); + options.addOption(Option.builder("o").longOpt("output-model-file") + .desc("name of a file that will contain the output model for the editor, " + + "will output model to standard output if not specified or suppressed with \"-nm\" flag") + .hasArg().argName("OUTPUT_MODEL_FILE").required(false).type(String.class).build()); + options.addOption(Option.builder("if").longOpt("ignore-failures") + .desc("true or false, ignore failures of commands in command files and continue executing the command file") + .hasArg().argName("IGNORE_FAILURES_FLAG").required(false).type(Boolean.class).build()); + options.addOption(Option.builder("wd").longOpt("working-directory") + .desc("the working directory that is the root for the CLI editor and is the root from which to look for included macro files") + .hasArg().argName("WORKING_DIRECTORY").required(false).type(String.class).build()); + } + + /** + * Parse the command line options. + * + * @param args The arguments + * @return the CLI parameters + */ + public CLIParameters parse(final String[] args) { + CommandLine commandLine = null; + try { + commandLine = new DefaultParser().parse(options, args); + } catch (final ParseException e) { + throw new CLIException("invalid command line arguments specified : " + e.getMessage()); + } + + final CLIParameters parameters = new CLIParameters(); + final String[] remainingArgs = commandLine.getArgs(); + + if (remainingArgs.length > 0) { + throw new CLIException("too many command line arguments specified : " + Arrays.toString(remainingArgs)); + } + + if (commandLine.hasOption('h')) { + parameters.setHelp(true); + } + if (commandLine.hasOption('m')) { + parameters.setMetadataFileName(commandLine.getOptionValue('m')); + } + if (commandLine.hasOption('a')) { + parameters.setApexPorpertiesFileName(commandLine.getOptionValue('a')); + } + if (commandLine.hasOption('c')) { + parameters.setCommandFileName(commandLine.getOptionValue('c')); + } + if (commandLine.hasOption('l')) { + parameters.setLogFileName(commandLine.getOptionValue('l')); + } + if (commandLine.hasOption("nl")) { + parameters.setSuppressLog(true); + } + if (commandLine.hasOption("nm")) { + parameters.setSuppressModelOutput(true); + } + if (commandLine.hasOption('i')) { + parameters.setInputModelFileName(commandLine.getOptionValue('i')); + } + if (commandLine.hasOption('o')) { + parameters.setOutputModelFileName(commandLine.getOptionValue('o')); + } + if (commandLine.hasOption("if")) { + parameters.setIgnoreCommandFailuresSet(true); + parameters.setIgnoreCommandFailures(Boolean.valueOf(commandLine.getOptionValue("if"))); + } else { + parameters.setIgnoreCommandFailuresSet(false); + } + if (commandLine.hasOption("wd")) { + parameters.setWorkingDirectory(commandLine.getOptionValue("wd")); + } else { + parameters.setWorkingDirectory(Paths.get("").toAbsolutePath().toString()); + } + + return parameters; + } + + /** + * Print help information. + * + * @param mainClassName the main class name + */ + public void help(final String mainClassName) { + final HelpFormatter helpFormatter = new HelpFormatter(); + helpFormatter.printHelp(MAX_HELP_LINE_LENGTH, mainClassName + " [options...]", "options", options, ""); + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIParameters.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIParameters.java new file mode 100644 index 000000000..476d17e3f --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/CLIParameters.java @@ -0,0 +1,571 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.onap.policy.apex.model.utilities.ResourceUtils; + +/** + * This class reads and handles command line parameters to the Apex CLI editor. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class CLIParameters { + // Default location of the command definition meta data in JSON + private static final String JSON_COMMAND_METADATA_RESOURCE = "etc/editor/Commands.json"; + private static final String APEX_MODEL_PROPERTIES_RESOURCE = "etc/editor/ApexModelProperties.json"; + + // The editor parameters + private boolean helpSet = false; + private String metadataFileName = null; + private String apexPropertiesFileName = null; + private String commandFileName = null; + private String inputModelFileName = null; + private String outputModelFileName = null; + private String workingDirectory = null; + private String logFileName = null; + private boolean echo = false; + private boolean suppressLog = false; + private boolean suppressModelOutput = false; + private boolean ignoreCommandFailuresSet = false; + private boolean ignoreCommandFailures = false; + + /** + * Validates the command line parameters. + */ + public void validate() { + validateReadableFile("Metadata File", metadataFileName); + validateReadableFile("Properties File", apexPropertiesFileName); + validateReadableFile("Command File", commandFileName); + validateReadableFile("Input Model File", inputModelFileName); + validateWritableFile("Output Model File", outputModelFileName); + validateWritableFile("Log File", logFileName); + validateWritableDirectory("Working Directory", workingDirectory); + + if (isSuppressLogSet()) { + setEcho(false); + } else { + if (checkSetCommandFileName()) { + setEcho(true); + if (!checkSetIgnoreCommandFailures()) { + setIgnoreCommandFailures(false); + } + } else { + setEcho(false); + if (!checkSetIgnoreCommandFailures()) { + setIgnoreCommandFailures(true); + } + } + } + } + + /** + * Gets the command metadata for the editor commands as a stream. + * + * @return the command metadata for the editor commands as a stream. + * @throws IOException the IO exception + */ + public InputStream getMetadataStream() throws IOException { + if (metadataFileName == null) { + return ResourceUtils.getResourceAsStream(JSON_COMMAND_METADATA_RESOURCE); + } else { + return new FileInputStream(new File(metadataFileName)); + } + } + + /** + * Gets the location of command metadata for the editor commands. + * + * @return the location of command metadata for the editor commands + */ + public String getMetadataLocation() { + if (metadataFileName == null) { + return "resource: \"" + JSON_COMMAND_METADATA_RESOURCE + "\""; + } else { + return "file: \"" + metadataFileName + "\""; + } + } + + /** + * Gets the properties that are used for command default values as a stream. + * + * @return the properties that are used for command default values as a stream + * @throws IOException the IO exception + */ + public InputStream getApexPropertiesStream() throws IOException { + if (apexPropertiesFileName == null) { + return ResourceUtils.getResourceAsStream(APEX_MODEL_PROPERTIES_RESOURCE); + } else { + return new FileInputStream(new File(apexPropertiesFileName)); + } + } + + /** + * Gets the location of the properties that are used for command default values. + * + * @return the location of the properties that are used for command default values + */ + public String getApexPropertiesLocation() { + if (metadataFileName == null) { + return "resource: \"" + APEX_MODEL_PROPERTIES_RESOURCE + "\""; + } else { + return "file: \"" + apexPropertiesFileName + "\""; + } + } + + /** + * Gets the input stream on which commands are being received. + * + * @return the input stream on which commands are being received + * @throws IOException the IO exception + */ + public InputStream getCommandInputStream() throws IOException { + if (commandFileName == null) { + return System.in; + } else { + return new FileInputStream(new File(commandFileName)); + } + } + + /** + * Gets the output stream on which command result messages are being output. + * + * @return the output stream on which command result messages are being output + * @throws IOException the IO exception + */ + public OutputStream getOutputStream() throws IOException { + // Check if log suppression is active, if so, consume all output on a byte array output + // stream + if (isSuppressLogSet()) { + return new ByteArrayOutputStream(); + + } + if (logFileName == null) { + return System.out; + } else { + return new FileOutputStream(new File(logFileName), true); + } + } + + /** + * Validate that a file is readable. + * + * @param fileTag the file tag, a tag used for information and error messages + * @param fileName the file name to check + */ + private void validateReadableFile(final String fileTag, final String fileName) { + if (fileName == null) { + return; + } + final File theFile = new File(fileName); + if (!theFile.exists()) { + throw new CLIException("file " + fileName + " of type " + fileTag + " does not exist"); + } + if (!theFile.isFile()) { + throw new CLIException("file " + fileName + " of type " + fileTag + " is not a normal file"); + } + if (!theFile.canRead()) { + throw new CLIException("file " + fileName + " of type " + fileTag + " is ureadable"); + } + } + + /** + * Validate that a file is writable. + * + * @param fileTag the file tag, a tag used for information and error messages + * @param fileName the file name to check + */ + private void validateWritableFile(final String fileTag, final String fileName) { + if (fileName == null) { + return; + } + final File theFile = new File(fileName); + if (theFile.exists()) { + if (!theFile.isFile()) { + throw new CLIException("file " + fileName + " of type " + fileTag + " is not a normal file"); + } + if (!theFile.canWrite()) { + throw new CLIException("file " + fileName + " of type " + fileTag + " cannot be written"); + } + } else { + try { + theFile.createNewFile(); + } catch (final IOException e) { + throw new CLIException("file " + fileName + " cannot be created: " + e.getMessage()); + } + } + } + + /** + * Validate that a directory exists and is writable. + * + * @param directoryTag the directory tag, a tag used for information and error messages + * @param directoryName the directory name to check + */ + private void validateWritableDirectory(final String directoryTag, final String directoryName) { + if (directoryName == null) { + return; + } + final File theDirectory = new File(directoryName); + if (theDirectory.exists()) { + if (!theDirectory.isDirectory()) { + throw new CLIException( + "directory " + directoryName + " of type " + directoryTag + " is not a directory"); + } + if (!theDirectory.canWrite()) { + throw new CLIException( + "directory " + directoryName + " of type " + directoryTag + " cannot be written"); + } + } + } + + /** + * Checks if help is set. + * + * @return true, if help is set + */ + public boolean isHelpSet() { + return helpSet; + } + + /** + * Sets whether the help flag is set or not. + * + * @param isHelpSet the value of the help flag + */ + public void setHelp(final boolean isHelpSet) { + this.helpSet = isHelpSet; + } + + /** + * Gets the file name of the command metadata file for the editor commands. + * + * @return the file name of the command metadata file for the editor commands + */ + public String getMetadataFileName() { + return metadataFileName; + } + + /** + * Sets the file name of the command metadata file for the editor commands. + * + * @param metadataFileName the file name of the command metadata file for the editor commands + */ + public void setMetadataFileName(final String metadataFileName) { + this.metadataFileName = metadataFileName.trim(); + } + + /** + * Check if the file name of the command metadata file for the editor commands is set. + * + * @return true, if the file name of the command metadata file for the editor commands is set + */ + public boolean checkSetMetadataFileName() { + return metadataFileName != null && metadataFileName.length() > 0; + } + + /** + * Gets the file name of the file containing properties that are used for command default + * values. + * + * @return the file name of the file containing properties that are used for command default + * values + */ + public String getApexPorpertiesFileName() { + return apexPropertiesFileName; + } + + /** + * Sets the file name of the file containing properties that are used for command default + * values. + * + * @param apexPorpertiesFileName the file name of the file containing properties that are used + * for command default values + */ + public void setApexPorpertiesFileName(final String apexPorpertiesFileName) { + apexPropertiesFileName = apexPorpertiesFileName.trim(); + } + + /** + * Check if the file name of the file containing properties that are used for command default + * values is set. + * + * @return true, if the file name of the file containing properties that are used for command + * default values is set + */ + public boolean checkSetApexPropertiesFileName() { + return apexPropertiesFileName != null && apexPropertiesFileName.length() > 0; + } + + /** + * Gets the name of the file containing commands to be streamed into the CLI editor. + * + * @return the name of the file containing commands to be streamed into the CLI editor + */ + public String getCommandFileName() { + return commandFileName; + } + + /** + * Sets the name of the file containing commands to be streamed into the CLI editor. + * + * @param commandFileName the name of the file containing commands to be streamed into the CLI + * editor + */ + public void setCommandFileName(final String commandFileName) { + this.commandFileName = commandFileName.trim(); + } + + /** + * Check if the name of the file containing commands to be streamed into the CLI editor is set. + * + * @return true, if the name of the file containing commands to be streamed into the CLI editor + * is set + */ + public boolean checkSetCommandFileName() { + return commandFileName != null && commandFileName.length() > 0; + } + + /** + * Gets the name of the file containing the Apex model that will be used to initialize the Apex + * model in the CLI editor. + * + * @return the name of the file containing the Apex model that will be used to initialize the + * Apex model in the CLI editor + */ + public String getInputModelFileName() { + return inputModelFileName; + } + + /** + * Sets the name of the file containing the Apex model that will be used to initialize the Apex + * model in the CLI editor. + * + * @param inputModelFileName the name of the file containing the Apex model that will be used to + * initialize the Apex model in the CLI editor + */ + public void setInputModelFileName(final String inputModelFileName) { + this.inputModelFileName = inputModelFileName.trim(); + } + + /** + * Check if the name of the file containing the Apex model that will be used to initialize the + * Apex model in the CLI editor is set. + * + * @return true, if the name of the file containing the Apex model that will be used to + * initialize the Apex model in the CLI editor is set + */ + public boolean checkSetInputModelFileName() { + return inputModelFileName != null && inputModelFileName.length() > 0; + } + + /** + * Gets the name of the file that the Apex CLI editor will save the Apex model to when it exits. + * + * @return the name of the file that the Apex CLI editor will save the Apex model to when it + * exits + */ + public String getOutputModelFileName() { + return outputModelFileName; + } + + /** + * Sets the name of the file that the Apex CLI editor will save the Apex model to when it exits. + * + * @param outputModelFileName the name of the file that the Apex CLI editor will save the Apex + * model to when it exits + */ + public void setOutputModelFileName(final String outputModelFileName) { + this.outputModelFileName = outputModelFileName.trim(); + } + + /** + * Check if the name of the file that the Apex CLI editor will save the Apex model to when it + * exits is set. + * + * @return true, if the name of the file that the Apex CLI editor will save the Apex model to + * when it exits is set + */ + public boolean checkSetOutputModelFileName() { + return outputModelFileName != null && outputModelFileName.length() > 0; + } + + /** + * Gets the working directory that is the root for CLI editor macro includes. + * + * @return the CLI editor working directory + */ + public String getWorkingDirectory() { + return workingDirectory; + } + + /** + * Sets the working directory that is the root for CLI editor macro includes. + * + * @param workingDirectory the CLI editor working directory + */ + public void setWorkingDirectory(final String workingDirectory) { + this.workingDirectory = workingDirectory.trim(); + } + + /** + * Gets the name of the file to which the Apex CLI editor will log commands and responses. + * + * @return the name of the file to which the Apex CLI editor will log commands and responses + */ + public String getLogFileName() { + return logFileName; + } + + /** + * Sets the name of the file to which the Apex CLI editor will log commands and responses. + * + * @param logFileName the name of the file to which the Apex CLI editor will log commands and + * responses + */ + public void setLogFileName(final String logFileName) { + this.logFileName = logFileName.trim(); + } + + /** + * Check if the name of the file to which the Apex CLI editor will log commands and responses is + * set. + * + * @return true, if the name of the file to which the Apex CLI editor will log commands and + * responses is set + */ + public boolean checkSetLogFileName() { + return logFileName != null; + } + + /** + * Checks if the Apex CLI editor is set to echo commands that have been entered. + * + * @return true, if the Apex CLI editor is set to echo commands that have been entered + */ + public boolean isEchoSet() { + return echo; + } + + /** + * Sets whether the Apex CLI editor should echo commands that have been entered. + * + * @param echo true, if the Apex CLI editor should echo commands that have been entered + */ + public void setEcho(final boolean echo) { + this.echo = echo; + } + + /** + * Checks whether the Apex CLI editor is set to suppress logging of command output. + * + * @return true, if the Apex CLI editor is set to suppress logging of command output. + */ + public boolean isSuppressLogSet() { + return suppressLog; + } + + /** + * Sets whether the Apex CLI editor should suppress logging of command output. + * + * @param suppressLog true, if the Apex CLI editor should suppress logging of command output + */ + public void setSuppressLog(final boolean suppressLog) { + this.suppressLog = suppressLog; + } + + /** + * Checks whether the Apex CLI editor is set to suppress output of its Apex model on exit. + * + * @return true, if checks if the Apex CLI editor is set to suppress output of its Apex model on + * exit + */ + public boolean isSuppressModelOutputSet() { + return suppressModelOutput; + } + + /** + * Sets whether the Apex CLI editor should suppress output of its Apex model on exit. + * + * @param suppressModelOutput true, if the Apex CLI editor should suppress output of its Apex + * model on exit + */ + public void setSuppressModelOutput(final boolean suppressModelOutput) { + this.suppressModelOutput = suppressModelOutput; + } + + /** + * Check if the command failures flag is set + * + * @return true if the command failures flag has been set + */ + public boolean checkSetIgnoreCommandFailures() { + return ignoreCommandFailuresSet; + } + + /** + * Checks if the command failures flag is set. + * + * @param ignoreCommandFailuresSet true if the command failures flag has been set + */ + public void setIgnoreCommandFailuresSet(final boolean ignoreCommandFailuresSet) { + this.ignoreCommandFailuresSet = ignoreCommandFailuresSet; + } + + /** + * Checks if command failures should be ignored and command execution continue. + * + * @return true if command failures should be ignored + */ + public boolean isIgnoreCommandFailures() { + return ignoreCommandFailures; + } + + /** + * Sets if command errors should be ignored and command execution continue. + * + * @param ignoreCommandFailures true if command errors should be ignored + */ + public void setIgnoreCommandFailures(final boolean ignoreCommandFailures) { + this.ignoreCommandFailures = ignoreCommandFailures; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "CLIParameters [helpSet=" + helpSet + ", metadataFileName=" + metadataFileName + + ", apexPropertiesFileName=" + apexPropertiesFileName + ", commandFileName=" + commandFileName + + ", inputModelFileName=" + inputModelFileName + ", outputModelFileName=" + outputModelFileName + + ", logFileName=" + logFileName + ", echo=" + echo + ", suppressLog=" + suppressLog + + ", suppressModelOutput=" + suppressModelOutput + "]"; + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java new file mode 100644 index 000000000..06579e073 --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/KeywordNode.java @@ -0,0 +1,188 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.TreeMap; +import java.util.TreeSet; + +import org.onap.policy.apex.model.utilities.Assertions; + +/** + * The Class KeywordNode holds the structure of a command keyword for the Apex CLI editor. The + * keyword itself and all its children are held as a recursive tree. This class is used to manage + * interactive sub-modes in the Apex CLI editor. + */ +public class KeywordNode implements Comparable<KeywordNode> { + private final String keyword; + private final TreeMap<String, KeywordNode> children; + private CLICommand command; + + /** + * This Constructor creates a keyword node with the given keyword and no command. + * + * @param keyword the keyword of the node + */ + public KeywordNode(final String keyword) { + this(keyword, null); + } + + /** + * This Constructor creates a keyword node with the given keyword and command. + * + * @param keyword the keyword of the keyword node + * @param command the command associated with this keyword + */ + public KeywordNode(final String keyword, final CLICommand command) { + Assertions.argumentNotNull(keyword, "commands may not be null"); + + this.keyword = keyword; + children = new TreeMap<>(); + this.command = command; + } + + /** + * Process a list of keywords on this keyword node, recursing the keyword node tree, creating + * new branches for the keyword list if required. When the end of a branch has been reached, + * store the command in that keyword node.. + * + * @param keywordList the list of keywords to process on this keyword node + * @param incomingCommand the command + */ + public void processKeywords(final List<String> keywordList, final CLICommand incomingCommand) { + if (keywordList.size() <= 0) { + this.command = incomingCommand; + return; + } + + if (!children.containsKey(keywordList.get(0))) { + children.put(keywordList.get(0), new KeywordNode(keywordList.get(0))); + } + + final ArrayList<String> nextLevelKeywordList = new ArrayList<>(keywordList); + nextLevelKeywordList.remove(0); + children.get(keywordList.get(0)).processKeywords(nextLevelKeywordList, incomingCommand); + } + + /** + * Adds the system commands to the keyword node. + * + * @param systemCommandNodes the system command nodes to add to the keyword node + */ + public void addSystemCommandNodes(final Set<KeywordNode> systemCommandNodes) { + if (children.isEmpty()) { + return; + } + + for (final KeywordNode node : children.values()) { + node.addSystemCommandNodes(systemCommandNodes); + } + + for (final KeywordNode systemCommandNode : systemCommandNodes) { + children.put(systemCommandNode.getKeyword(), systemCommandNode); + } + + } + + /** + * Gets the keyword of this keyword node. + * + * @return the keyword of this keyword node + */ + public String getKeyword() { + return keyword; + } + + /** + * Gets the children of this keyword node. + * + * @return the children of this keyword node + */ + public TreeMap<String, KeywordNode> getChildren() { + return children; + } + + /** + * Gets the command of this keyword node. + * + * @return the command of this keyword node + */ + public CLICommand getCommand() { + return command; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "CommandKeywordNode [keyword=" + keyword + ", children=" + children + ", command=" + command + "]"; + } + + /** + * Gets the commands. + * + * @return the commands + */ + public Set<CLICommand> getCommands() { + final Set<CLICommand> commandSet = new TreeSet<>(); + + for (final KeywordNode child : children.values()) { + if (child.getCommand() != null) { + commandSet.add(child.getCommand()); + } + commandSet.addAll(child.getCommands()); + } + + return commandSet; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + @Override + public int compareTo(final KeywordNode otherKeywordNode) { + Assertions.argumentNotNull(otherKeywordNode, "comparison object may not be null"); + + if (this == otherKeywordNode) { + return 0; + } + if (getClass() != otherKeywordNode.getClass()) { + return this.hashCode() - otherKeywordNode.hashCode(); + } + + final KeywordNode other = otherKeywordNode; + + if (!keyword.equals(other.keyword)) { + return keyword.compareTo(other.keyword); + } + if (!children.equals(other.children)) { + return (children.hashCode() - other.children.hashCode()); + } + return command.compareTo(otherKeywordNode.command); + } +} diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/package-info.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/package-info.java new file mode 100644 index 000000000..e0e7f746e --- /dev/null +++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/package-info.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +/** + * Provides a command line editor for APEX. The command line editor can be used to interactively + * from the command line to edit policy models or it can be executed using scripts containing CLI + * commands. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +package org.onap.policy.apex.auth.clieditor; diff --git a/auth/cli-editor/src/main/resources/etc/editor/ApexModelProperties.json b/auth/cli-editor/src/main/resources/etc/editor/ApexModelProperties.json new file mode 100644 index 000000000..bd33d69da --- /dev/null +++ b/auth/cli-editor/src/main/resources/etc/editor/ApexModelProperties.json @@ -0,0 +1,9 @@ +{ + "defaultConceptVersion" : "0.0.1", + "defaultEventNamespace" : "org.onap.policy.apex.auth.clieditor", + "defaultEventSource" : "CLIEditorSource", + "defaultEventTarget" : "CLIEditorTarget", + "defaultLogicBlockStartTag" : "LS", + "defaultLogicBlockEndTag" : "LE", + "defaultMacroFileTag" : "#MACROFILE:" +} diff --git a/auth/cli-editor/src/main/resources/etc/editor/Commands.json b/auth/cli-editor/src/main/resources/etc/editor/Commands.json new file mode 100644 index 000000000..54ad92a2b --- /dev/null +++ b/auth/cli-editor/src/main/resources/etc/editor/Commands.json @@ -0,0 +1,2427 @@ +{ + "commandList": [ + { + "name": "quit", + "keywordlist": [ + "quit" + ], + "argumentList": [], + "systemCommand": "true", + "description": "quit execution of command handling, this command quits immediately without saving the model" + }, + { + "name": "back", + "keywordlist": [ + "back" + ], + "argumentList": [], + "systemCommand": "true", + "description": "go back one level in editor context hierarchy" + }, + { + "name": "help", + "keywordlist": [ + "help" + ], + "argumentList": [], + "systemCommand": "true", + "description": "output help information appropriate to this point in the editor context hierarchy" + }, + { + "name": "load", + "keywordlist": [ + "load" + ], + "argumentList": [ + { + "argumentName": "fileName", + "nullable": false, + "description": "Name of a file containing an Apex model in JSON or XML format" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.loadFromFile", + "description": "Load an Apex model from a file" + }, + { + "name": "save", + "keywordlist": [ + "save" + ], + "argumentList": [ + { + "argumentName": "fileName", + "nullable": true, + "description": "Name of the file to save the model to" + }, + { + "argumentName": "xmlFlag", + "nullable": true, + "description": "Flag indicating that the model should be saved in XML format, model saved in JSON format if flag is false or is not specified" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.saveToFile", + "description": "Save an Apex model to a file" + }, + { + "name": "analyse", + "keywordlist": [ + "analyse" + ], + "argumentList": [], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.analyse", + "description": "Analyse an Apex model to show concept usage" + }, + { + "name": "validate", + "keywordlist": [ + "validate" + ], + "argumentList": [], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.validate", + "description": "Validate the entire Apex model to ensure it is consistent" + }, + { + "name": "compare", + "keywordlist": [ + "compare" + ], + "argumentList": [ + { + "argumentName": "otherModelFileName", + "nullable": false, + "description": "The file name of the other model" + }, + { + "argumentName": "diffsOnly", + "nullable": true, + "description": "Flag indicating that only differences between the model are returned when set" + }, + { + "argumentName": "keysOnly", + "nullable": true, + "description": "Flag indicating that only keys are printed when set, more terse output" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.compare", + "description": "Compare an Apex model with another Apex model" + }, + { + "name": "split", + "keywordlist": [ + "split" + ], + "argumentList": [ + { + "argumentName": "targetModelName", + "nullable": false, + "description": "the file name of the target model in which to store the model split out from the original model" + }, + { + "argumentName": "splitOutPolicies", + "nullable": "false", + "description": "the policies form the original model to include in the split out model, specified as a comma delimited list of policy names" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.split", + "description": "Split an Apex model into a separate Apex model with only the specified policies" + }, + { + "name": "merge", + "keywordlist": [ + "merge" + ], + "argumentList": [ + { + "argumentName": "mergeInModelName", + "nullable": false, + "description": "the file name of the model to merge into the current model" + }, + { + "argumentName": "keepOriginal", + "nullable": "true", + "description": "if true, if a concept exists in both models, the original model copy of that concept is kept, if false, the mreged model overwrites" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexModel.merge", + "description": "Merge another Apex model into this model" + }, + { + "name": "createModel", + "keywordlist": [ + "model", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the model" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the model, omit to use the default version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "model UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "model description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createModel", + "description": "Create an Apex model." + }, + { + "name": "listModel", + "keywordlist": [ + "model", + "list" + ], + "argumentList": [], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listModel", + "description": "List an Apex model, list all the concepts in the model" + }, + { + "name": "deleteModel", + "keywordlist": [ + "model", + "delete" + ], + "argumentList": [], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteModel", + "description": "Delete an Apex model, clear all the concepts in the model" + }, + { + "name": "createKeyInformation", + "keywordlist": [ + "keyinfo", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the concept for the key information" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the concept for the key information, omit to use the default version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "key information UUID, set to null to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "concept description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createKeyInformation", + "description": "Create key information" + }, + { + "name": "updateKeyInformation", + "keywordlist": [ + "keyinfo", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the concept for the key information" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the concept for the key information, omit to update the latest version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "key information UUID, omit to not update" + }, + { + "argumentName": "description", + "nullable": true, + "description": "concept description, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updateKeyInformation", + "description": "Update key information" + }, + { + "name": "listKeyInformation", + "keywordlist": [ + "keyinfo", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the concept for the key information, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the concept for the key information, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.ListKeyInformation", + "description": "List key information" + }, + { + "name": "deleteKeyInformation", + "keywordlist": [ + "keyinfo", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the concept for the key information" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the concept for the key information, omit to delete all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteKeyInformation", + "description": "Delete key information" + }, + { + "name": "validateKeyInformation", + "keywordlist": [ + "keyinfo", + "validate" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the concept for the key information" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the concept for the key information, omit to validate all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.validateKeyInformation", + "description": "Validate key information" + }, + { + "name": "createSchema", + "keywordlist": [ + "schema", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the schema" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the schema, omit to use the default version" + }, + { + "argumentName": "flavour", + "nullable": true, + "description": "the flavour of the technology for this schema, defaults to \"Java\"" + }, + { + "argumentName": "schema", + "nullable": false, + "description": "the schema text that describes the item represented by the schema" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "schema UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "schema description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createContextSchema", + "description": "Create a schema." + }, + { + "name": "updateSchema", + "keywordlist": [ + "schema", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the schema" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the schema, omit to use the default version" + }, + { + "argumentName": "flavour", + "nullable": true, + "description": "the flavour of the technology for this schema, defaults to \"Java\"" + }, + { + "argumentName": "schema", + "nullable": false, + "description": "the schema text that describes the item represented by the schema" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "schema UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "schema description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updateContextSchema", + "description": "Update a schema." + }, + { + "name": "listSchemas", + "keywordlist": [ + "schema", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the schema, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the schema, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listContextSchemas", + "description": "List schemas." + }, + { + "name": "deleteSchema", + "keywordlist": [ + "schema", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the schema" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the schema, omit to delete all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteContextSchema", + "description": "Delete a schema." + }, + { + "name": "validateSchemas", + "keywordlist": [ + "schema", + "validate" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the schema, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the schema, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.validateContextSchemas", + "description": "Validate context schemas." + }, + { + "name": "createEvent", + "keywordlist": [ + "event", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the event" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the event, omit to use the default version" + }, + { + "argumentName": "nameSpace", + "nullable": true, + "description": "of the event, omit to use the default value" + }, + { + "argumentName": "source", + "nullable": true, + "description": "of the event, omit to use the default value" + }, + { + "argumentName": "target", + "nullable": true, + "description": "of the event, omit to use the default value" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "event UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "event description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createEvent", + "description": "Create an event." + }, + { + "name": "updateEvent", + "keywordlist": [ + "event", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the event" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the event, omit to use the latest version" + }, + { + "argumentName": "nameSpace", + "nullable": true, + "description": "of the event, omit to not update" + }, + { + "argumentName": "source", + "nullable": true, + "description": "of the event, omit to not update" + }, + { + "argumentName": "target", + "nullable": true, + "description": "of the event, omit to not update" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "event UUID, omit to not update" + }, + { + "argumentName": "description", + "nullable": true, + "description": "event description, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updateEvent", + "description": "Update an event." + }, + { + "name": "listEvent", + "keywordlist": [ + "event", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the event, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the event, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listEvent", + "description": "List events." + }, + { + "name": "deleteEvent", + "keywordlist": [ + "event", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the event" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the event, omit to delete all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteEvent", + "description": "Delete an event." + }, + { + "name": "validateEvent", + "keywordlist": [ + "event", + "validate" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the event, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the event, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.validateEvent", + "description": "Validate events." + }, + { + "name": "createEventPar", + "keywordlist": [ + "event", + "parameter", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the event" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the event, omit to use the latest version" + }, + { + "argumentName": "parName", + "nullable": false, + "description": "of the parameter" + }, + { + "argumentName": "schemaName", + "nullable": false, + "description": "name of the parameter schema" + }, + { + "argumentName": "schemaVersion", + "nullable": true, + "description": "version of the parameter schema, omit to use the latest version" + }, + { + "argumentName": "optional", + "nullable": true, + "description": "indicates if the parameter is optional, if omitted, the parameter is mandatory" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createEventPar", + "description": "Create an event parameter." + }, + { + "name": "listEventPar", + "keywordlist": [ + "event", + "parameter", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the event" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the event, omit to list latest version" + }, + { + "argumentName": "parName", + "nullable": true, + "description": "name of the parameter, omit to list all parameters of the event" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listEventPar", + "description": "List event parameters." + }, + { + "name": "deleteEventPar", + "keywordlist": [ + "event", + "parameter", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the event" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the event, omit to use the latest version" + }, + { + "argumentName": "parName", + "nullable": true, + "description": "of the parameter, omit to delete all parameters" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteEventPar", + "description": "Delete an event parameter." + }, + { + "name": "createAlbum", + "keywordlist": [ + "album", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the context album" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the context album, omit to use the default version" + }, + { + "argumentName": "scope", + "nullable": false, + "description": "scope of application of the context album" + }, + { + "argumentName": "writable", + "nullable": false, + "description": "true if the album is writable, false otherwise, album defaults to writable if omitted" + }, + { + "argumentName": "schemaName", + "nullable": false, + "description": "name of the album schema" + }, + { + "argumentName": "schemaVersion", + "nullable": true, + "description": "version of the album schema, omit to use the latest version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "context album UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "album description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createContextAlbum", + "description": "Create a context album." + }, + { + "name": "updateAlbum", + "keywordlist": [ + "album", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the context album" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the context album, omit to use the latest version" + }, + { + "argumentName": "scope", + "nullable": false, + "description": "scope of application of the context album" + }, + { + "argumentName": "writable", + "nullable": false, + "description": "true if the album is writable, false otherwise, album defaults to writable if omitted" + }, + { + "argumentName": "schemaName", + "nullable": false, + "description": "name of the album schema" + }, + { + "argumentName": "schemaVersion", + "nullable": true, + "description": "version of the album schema, omit to use the latest version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "context album UUID, omit to not update" + }, + { + "argumentName": "description", + "nullable": true, + "description": "album description, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updateContextAlbum", + "description": "Update a context album." + }, + { + "name": "listAlbum", + "keywordlist": [ + "album", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the context album, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the context album, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listContextAlbum", + "description": "List context albums." + }, + { + "name": "deleteAlbum", + "keywordlist": [ + "album", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the context album" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the context album, omit to delete versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteContextAlbum", + "description": "Delete a context album." + }, + { + "name": "validateAlbum", + "keywordlist": [ + "album", + "validate" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the context album, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the context album, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.validateContextAlbum", + "description": "Validate context albums." + }, + { + "name": "createTask", + "keywordlist": [ + "task", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the default version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "task UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "task description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createTask", + "description": "Create a task." + }, + { + "name": "updateTask", + "keywordlist": [ + "task", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "task UUID, omit to not update" + }, + { + "argumentName": "description", + "nullable": true, + "description": "task description, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updateTask", + "description": "Update a task." + }, + { + "name": "listTask", + "keywordlist": [ + "task", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the task, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the task, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listTask", + "description": "List tasks." + }, + { + "name": "deleteTask", + "keywordlist": [ + "task", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteTask", + "description": "Delete a task." + }, + { + "name": "validateTask", + "keywordlist": [ + "task", + "validate" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the task, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the task, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.validateTask", + "description": "Validate tasks." + }, + { + "name": "createTaskLogic", + "keywordlist": [ + "task", + "logic", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "logicFlavour", + "nullable": true, + "description": "the task logic flavour for the task, omit to use the default task logic flavour" + }, + { + "argumentName": "logic", + "nullable": false, + "description": "the source code for the logic of the task" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createTaskLogic", + "description": "Create logic for a task." + }, + { + "name": "updateTaskLogic", + "keywordlist": [ + "task", + "logic", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "logicFlavour", + "nullable": true, + "description": "the task logic flavour for the task, omit to not update" + }, + { + "argumentName": "logic", + "nullable": true, + "description": "the source code for the logic of the task, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updateTaskLogic", + "description": "Update logic for a task." + }, + { + "name": "listTaskLogic", + "keywordlist": [ + "task", + "logic", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to list the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listTaskLogic", + "description": "List task logic." + }, + { + "name": "deleteTaskLogic", + "keywordlist": [ + "task", + "logic", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteTaskLogic", + "description": "Delete logic for a task." + }, + { + "name": "createTaskInputField", + "keywordlist": [ + "task", + "inputfield", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "fieldName", + "nullable": false, + "description": "of the input field" + }, + { + "argumentName": "schemaName", + "nullable": false, + "description": "name of the input field schema" + }, + { + "argumentName": "schemaVersion", + "nullable": true, + "description": "version of the input field schema, omit to use the latest version" + }, + { + "argumentName": "optional", + "nullable": true, + "description": "indicates if the field is optional, if omitted, the field is mandatory" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createTaskInputField", + "description": "Create a task input field." + }, + { + "name": "listTaskInputField", + "keywordlist": [ + "task", + "inputfield", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "fieldName", + "nullable": true, + "description": "field name of the input field, omit to list all input fields of the task" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listTaskInputField", + "description": "List task input fields." + }, + { + "name": "deleteTaskInputField", + "keywordlist": [ + "task", + "inputfield", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "fieldName", + "nullable": true, + "description": "of the input field, omit to delete all input fields" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteTaskInputField", + "description": "Delete a task input field." + }, + { + "name": "createTaskOutputField", + "keywordlist": [ + "task", + "outputfield", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "fieldName", + "nullable": false, + "description": "of the output field" + }, + { + "argumentName": "schemaName", + "nullable": false, + "description": "name of the output field schema" + }, + { + "argumentName": "schemaVersion", + "nullable": true, + "description": "version of the output field schema, omit to use the latest version" + }, + { + "argumentName": "optional", + "nullable": true, + "description": "indicates if the field is optional, if omitted, the field is mandatory" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createTaskOutputField", + "description": "Create a task output field." + }, + { + "name": "listTaskOutputField", + "keywordlist": [ + "task", + "outputfield", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "fieldName", + "nullable": true, + "description": "field name of the output field, omit to list all output fields of the task" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listTaskOutputField", + "description": "List task output fields." + }, + { + "name": "deleteTaskOutputField", + "keywordlist": [ + "task", + "outputfield", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "fieldName", + "nullable": true, + "description": "of the output field, omit to delete all output fields" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteTaskOutputField", + "description": "Delete a task output field." + }, + { + "name": "createTaskParameter", + "keywordlist": [ + "task", + "parameter", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "parName", + "nullable": false, + "description": "of the parameter" + }, + { + "argumentName": "defaultValue", + "nullable": false, + "description": "of the parameter" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createTaskParameter", + "description": "Create a task parameter." + }, + { + "name": "listTaskParameter", + "keywordlist": [ + "task", + "parameter", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "parName", + "nullable": true, + "description": "name of the parameter, omit to list all parameters of the task" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listTaskParameter", + "description": "List task parameters." + }, + { + "name": "deleteTaskParameter", + "keywordlist": [ + "task", + "parameter", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "parName", + "nullable": true, + "description": "of the parameter, omit to delete all task parameters" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteTaskParameter", + "description": "Delete a task parameter." + }, + { + "name": "createTaskContextRef", + "keywordlist": [ + "task", + "contextref", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "albumName", + "nullable": false, + "description": "name of the context album for the context reference" + }, + { + "argumentName": "albumVersion", + "nullable": true, + "description": "version of the context album for the context reference, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createTaskContextRef", + "description": "Create a task context reference." + }, + { + "name": "listTaskContextRef", + "keywordlist": [ + "task", + "contextref", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "albumName", + "nullable": true, + "description": "name of the context album for the context reference, omit to list all task context references" + }, + { + "argumentName": "albumVersion", + "nullable": true, + "description": "version of the context album for the context reference, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listTaskContextRef", + "description": "List task context references." + }, + { + "name": "deleteTaskContextRef", + "keywordlist": [ + "task", + "contextref", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "albumName", + "nullable": true, + "description": "name of the context album for the context reference, omit to delete all task context references" + }, + { + "argumentName": "albumVersion", + "nullable": true, + "description": "version of the context album for the context reference, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deleteTaskContextRef", + "description": "Delete a task context reference." + }, + { + "name": "createPolicy", + "keywordlist": [ + "policy", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the default version" + }, + { + "argumentName": "template", + "nullable": true, + "description": "template used to create the policy, omit to use the default template" + }, + { + "argumentName": "firstState", + "nullable": false, + "description": "the first state of the policy" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "policy UUID, omit to generate a UUID" + }, + { + "argumentName": "description", + "nullable": true, + "description": "policy description, omit to generate a description" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicy", + "description": "Create a policy." + }, + { + "name": "updatePolicy", + "keywordlist": [ + "policy", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "template", + "nullable": true, + "description": "template used to create the policy, omit to not update" + }, + { + "argumentName": "firstState", + "nullable": false, + "description": "the first state of the policy" + }, + { + "argumentName": "uuid", + "nullable": true, + "description": "policy UUID, omit to not update" + }, + { + "argumentName": "description", + "nullable": true, + "description": "policy description, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updatePolicy", + "description": "Update a policy." + }, + { + "name": "listPolicy", + "keywordlist": [ + "policy", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the policy, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the policy, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicy", + "description": "List policies." + }, + { + "name": "deletePolicy", + "keywordlist": [ + "policy", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicy", + "description": "Delete a policy." + }, + { + "name": "validatePolicy", + "keywordlist": [ + "policy", + "validate" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": true, + "description": "name of the policy, omit to list all" + }, + { + "argumentName": "version", + "nullable": true, + "description": "starting version of the policy, omit to list all versions" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.validatePolicy", + "description": "Validate policies." + }, + { + "name": "createPolicyState", + "keywordlist": [ + "policy", + "state", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "triggerName", + "nullable": false, + "description": "name of the trigger event for this state" + }, + { + "argumentName": "triggerVersion", + "nullable": true, + "description": "version of the trigger event for this state, omit to use the latest version" + }, + { + "argumentName": "defaultTaskName", + "nullable": false, + "description": "the default task name" + }, + { + "argumentName": "defaultTaskVersion", + "nullable": true, + "description": "the default task version, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicyState", + "description": "Create a policy state." + }, + { + "name": "updatePolicyState", + "keywordlist": [ + "policy", + "state", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "triggerName", + "nullable": true, + "description": "name of the trigger event for this state, omit to not update" + }, + { + "argumentName": "triggerVersion", + "nullable": false, + "description": "version of the trigger event for this state, set to use latest version of trigger event" + }, + { + "argumentName": "defaultTaskName", + "nullable": true, + "description": "the default task name, omit to not update" + }, + { + "argumentName": "defaultTaskVersion", + "nullable": false, + "description": "the default task version, set to use latest version of default task" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updatePolicyState", + "description": "Update a policy state." + }, + { + "name": "listPolicyState", + "keywordlist": [ + "policy", + "state", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": true, + "description": "of the state, omit to list all states of the policy" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicyState", + "description": "List policy states." + }, + { + "name": "deletePolicyState", + "keywordlist": [ + "policy", + "state", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": true, + "description": "of the state, omit to delete all states" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicyState", + "description": "Delete a policy state." + }, + { + "name": "createPolicyStateTaskSelectionLogic", + "keywordlist": [ + "policy", + "state", + "selecttasklogic", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "logicFlavour", + "nullable": true, + "description": "the task selection logic flavour for the state, omit to use the default task logic flavour" + }, + { + "argumentName": "logic", + "nullable": false, + "description": "the source code for the logic of the state" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicyStateTaskSelectionLogic", + "description": "Create task selection logic for a state." + }, + { + "name": "updatePolicyStateTaskSelectionLogic", + "keywordlist": [ + "policy", + "state", + "selecttasklogic", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "logicFlavour", + "nullable": true, + "description": "the task selection logic flavour for the state, omit to not update" + }, + { + "argumentName": "logic", + "nullable": true, + "description": "the source code for the logic of the state, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updatePolicyStateTaskSelectionLogic", + "description": "Update task selection logic for a state." + }, + { + "name": "listPolicyStateTaskSelectionLogic", + "keywordlist": [ + "policy", + "state", + "selecttasklogic", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicyStateTaskSelectionLogic", + "description": "List task selection logic for a state." + }, + { + "name": "deletePolicyStateTaskSelectionLogic", + "keywordlist": [ + "policy", + "state", + "selecttasklogic", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicyStateTaskSelectionLogic", + "description": "Delete task selection logic for a state." + }, + { + "name": "createPolicyStateOutput", + "keywordlist": [ + "policy", + "state", + "output", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "outputName", + "nullable": false, + "description": "of the state output" + }, + { + "argumentName": "eventName", + "nullable": false, + "description": "name of the output event for this state output" + }, + { + "argumentName": "eventVersion", + "nullable": true, + "description": "version of the output event for this state output, omit to use the latest version" + }, + { + "argumentName": "nextState", + "nullable": true, + "description": "for this state to transition to, omit if this is the last state that the policy transitions to on this branch" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicyStateOutput", + "description": "Create a policy state output." + }, + { + "name": "listPolicyStateOutput", + "keywordlist": [ + "policy", + "state", + "output", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "outputName", + "nullable": true, + "description": "of the state output, omit to list all outputs of the state" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicyStateOutput", + "description": "List policy state outputs." + }, + { + "name": "deletePolicyStateOutput", + "keywordlist": [ + "policy", + "state", + "output", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "outputName", + "nullable": true, + "description": "of the state output, omit to delete all state outputs" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicyStateOutput", + "description": "Delete a policy state output." + }, + { + "name": "createPolicyStateFinalizerLogic", + "keywordlist": [ + "policy", + "state", + "finalizerlogic", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "finalizerLogicName", + "nullable": false, + "description": "name of the state finalizer logic" + }, + { + "argumentName": "logicFlavour", + "nullable": true, + "description": "the policy finalizer logic flavour for the state, omit to use the default task logic flavour" + }, + { + "argumentName": "logic", + "nullable": false, + "description": "the source code for the logic of the state" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicyStateFinalizerLogic", + "description": "Create policy finalizer logic for a state." + }, + { + "name": "updatePolicyStateFinalizerLogic", + "keywordlist": [ + "policy", + "state", + "finalizerlogic", + "update" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "finalizerLogicName", + "nullable": false, + "description": "name of the state finalizer logic" + }, + { + "argumentName": "logicFlavour", + "nullable": true, + "description": "the policy finalizer logic flavour for the state, omit to not update" + }, + { + "argumentName": "logic", + "nullable": true, + "description": "the source code for the logic of the state, omit to not update" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.updatePolicyStateFinalizerLogic", + "description": "Update policy finalizer logic for a state." + }, + { + "name": "listPolicyStateFinalizerLogic", + "keywordlist": [ + "policy", + "state", + "finalizerlogic", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "finalizerLogicName", + "nullable": false, + "description": "name of the state finalizer logic" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicyStateFinalizerLogic", + "description": "List policy finalizer logic for a state." + }, + { + "name": "deletePolicyStateFinalizerLogic", + "keywordlist": [ + "policy", + "state", + "finalizerlogic", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "finalizerLogicName", + "nullable": false, + "description": "name of the state finalizer logic" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicyStateFinalizerLogic", + "description": "Delete policy finalizer logic for a state." + }, + { + "name": "createPolicyStateTaskRef", + "keywordlist": [ + "policy", + "state", + "taskref", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "taskLocalName", + "nullable": true, + "description": "local name of the task in the state, omit to use the task name" + }, + { + "argumentName": "taskName", + "nullable": false, + "description": "name of the task" + }, + { + "argumentName": "taskVersion", + "nullable": true, + "description": "version of the task, omit to use the latest version" + }, + { + "argumentName": "outputType", + "nullable": false, + "description": "Type of output for the task, must be DIRECT for direct output to a state output or LOGIC for output to state finalizer logic" + }, + { + "argumentName": "outputName", + "nullable": false, + "description": "the name of the state output or state state finalizer logic to handle the task output" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicyStateTaskRef", + "description": "Create a policy state task reference." + }, + { + "name": "listPolicyStateTaskRef", + "keywordlist": [ + "policy", + "state", + "taskref", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "taskName", + "nullable": true, + "description": "name of the task, omit to list all task references" + }, + { + "argumentName": "taskVersion", + "nullable": true, + "description": "version of the task, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicyStateTaskRef", + "description": "List policy state task references." + }, + { + "name": "deletePolicyStateTaskRef", + "keywordlist": [ + "policy", + "state", + "taskref", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "taskName", + "nullable": true, + "description": "name of the task, omit to delete all task references" + }, + { + "argumentName": "taskVersion", + "nullable": true, + "description": "version of the task, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicyStateTaskRef", + "description": "Delete a policy state task reference." + }, + { + "name": "createPolicyStateContextRef", + "keywordlist": [ + "policy", + "state", + "contextref", + "create" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "albumName", + "nullable": false, + "description": "name of the context album for the context reference" + }, + { + "argumentName": "albumVersion", + "nullable": true, + "description": "version of the context album for the context reference, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.createPolicyStateContextRef", + "description": "Create a policy state context reference." + }, + { + "name": "listPolicyStateContextRef", + "keywordlist": [ + "policy", + "state", + "contextref", + "list" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the latest version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "albumName", + "nullable": true, + "description": "name of the context album for the context reference, omit to list all task context references" + }, + { + "argumentName": "albumVersion", + "nullable": true, + "description": "version of the context album for the context reference, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.listPolicyStateContextRef", + "description": "List policy state context references." + }, + { + "name": "deletePolicyStateContextRef", + "keywordlist": [ + "policy", + "state", + "contextref", + "delete" + ], + "argumentList": [ + { + "argumentName": "name", + "nullable": false, + "description": "name of the policy" + }, + { + "argumentName": "version", + "nullable": true, + "description": "version of the policy, omit to use the default version" + }, + { + "argumentName": "stateName", + "nullable": false, + "description": "of the state" + }, + { + "argumentName": "albumName", + "nullable": true, + "description": "name of the context album for the context reference, omit to delete all task context references" + }, + { + "argumentName": "albumVersion", + "nullable": true, + "description": "version of the context album for the context reference, omit to use the latest version" + } + ], + "apiMethod": "org.onap.policy.apex.model.modelapi.ApexEditorAPI.deletePolicyStateContextRef", + "description": "Delete a policy state context reference." + } + ] +} diff --git a/auth/cli-editor/src/main/resources/examples/scripts/ShellPolicyModel.apex b/auth/cli-editor/src/main/resources/examples/scripts/ShellPolicyModel.apex new file mode 100644 index 000000000..1b4507fc7 --- /dev/null +++ b/auth/cli-editor/src/main/resources/examples/scripts/ShellPolicyModel.apex @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=ShellPolicyModel + +schema create name=Test_type flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/main/resources/examples/scripts/ShellPolicyModelAddSchema.apex b/auth/cli-editor/src/main/resources/examples/scripts/ShellPolicyModelAddSchema.apex new file mode 100644 index 000000000..ed1b4e437 --- /dev/null +++ b/auth/cli-editor/src/main/resources/examples/scripts/ShellPolicyModelAddSchema.apex @@ -0,0 +1,21 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +schema create name=Another_Test_type flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex new file mode 100644 index 000000000..f333a3e9a --- /dev/null +++ b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex @@ -0,0 +1,569 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=Test_PolicyModel + +schema create name=AvroBoolean_type flavour=Avro schema=LS +{ + "type" : "boolean" +} +LE + +schema create name=AvroByte_type flavour=Avro schema=LS +{ + "type" : "int" +} +LE + +schema create name=AvroShort_type flavour=Avro schema=LS +{ + "type" : "int" +} +LE + +schema create name=AvroInteger_type flavour=Avro schema=LS +{ + "type" : "int" +} +LE + +schema create name=AvroLong_type flavour=Avro schema=LS +{ + "type" : "long" +} +LE + +schema create name=AvroFloat_type flavour=Avro schema=LS +{ + "type" : "float" +} +LE + +schema create name=AvroDouble_type flavour=Avro schema=LS +{ + "type" : "double" +} +LE + +schema create name=AvroString_type flavour=Avro schema=LS +{ + "type" : "string"} +LE + +schema create name=AvroMap_type flavour=Avro schema=LS +{ + "type": "map", "values": "string" +} +LE + +schema create name=AvroArray_type flavour=Avro schema=LS +{ + "type": "array", "items": "string" +} +LE + +schema create name=CustomBoolean_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem000", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "flag", "type": "boolean"} + ] +} +LE + +schema create name=CustomByte_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem001", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "byteValue", "type": "int"} + ] +} +LE + +schema create name=CustomInteger_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem002", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "intValue", "type": "int"} + ] +} +LE + +schema create name=CustomLong_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem003", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "longValue", "type": "long"} + ] +} +LE + +schema create name=CustomFloat_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem004", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "floatValue", "type": "float"} + ] +} +LE + +schema create name=CustomDouble_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem005", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "doubleValue", "type": "double"} + ] +} +LE + +schema create name=CustomString_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem006", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "stringValue", "type": "string"} + ] +} +LE + +schema create name=CustomALong_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem007", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "longValue", "type": "long"} + ] +} +LE + +schema create name=CustomDate0_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem008", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "time" , "type": "long"}, + {"name": "year" , "type": "int"}, + {"name": "month" , "type": "int"}, + {"name": "day" , "type": "int"}, + {"name": "hour" , "type": "int"}, + {"name": "minute" , "type": "int"}, + {"name": "second" , "type": "int"}, + {"name": "milliSecond", "type": "int"} + ] +} +LE + +schema create name=CustomDate1_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem009", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "dateValue" , "type": { + "type" : "record", + "name" : "TestContextItem008", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "time" , "type": "long"}, + {"name": "year" , "type": "int"}, + {"name": "month" , "type": "int"}, + {"name": "day" , "type": "int"}, + {"name": "hour" , "type": "int"}, + {"name": "minute" , "type": "int"}, + {"name": "second" , "type": "int"}, + {"name": "milliSecond", "type": "int"} + ] + } + }, + {"name": "dst" , "type": "boolean"}, + {"name": "timeZoneString", "type": "string"} + ] +} +LE + +schema create name=CustomDate2_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem00A", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "dateValue" , "type": { + "type" : "record", + "name" : "TestContextItem008", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "time" , "type": "long"}, + {"name": "year" , "type": "int"}, + {"name": "month" , "type": "int"}, + {"name": "day" , "type": "int"}, + {"name": "hour" , "type": "int"}, + {"name": "minute" , "type": "int"}, + {"name": "second" , "type": "int"}, + {"name": "milliSecond", "type": "int"} + ] + } + }, + {"name": "dst" , "type": "boolean"}, + {"name": "timeZoneString", "type": "string"}, + {"name": "utcOffset" , "type": "int"}, + {"name": "localeLanguage", "type": "string"}, + {"name": "localeCountry" , "type": "string"} + ] +} +LE + +schema create name=CustomSet_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem00B", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "setValue", "type": { + "type": "array", "items": "string" + } + } + ] +} +LE + +schema create name=CustomMap_type flavour=Avro schema=LS +{ + "type" : "record", + "name" : "TestContextItem00C", + "namespace" : "com.ericsson.apex.context.test.avro.concepts", + "fields" : [ + {"name": "mapValue", "type": { + "type": "map", "values": "string" + } + } + ] +} +LE + +event create name=Test_InputEvent nameSpace=com.ericsson.apex.test source=External target=Apex + +event parameter create name=Test_InputEvent parName=AvroBoolean schemaName=AvroBoolean_type optional=false +event parameter create name=Test_InputEvent parName=AvroByte schemaName=AvroByte_type optional=false +event parameter create name=Test_InputEvent parName=AvroShort schemaName=AvroShort_type +event parameter create name=Test_InputEvent parName=AvroInteger schemaName=AvroInteger_type optional=false +event parameter create name=Test_InputEvent parName=AvroLong schemaName=AvroLong_type +event parameter create name=Test_InputEvent parName=AvroFloat schemaName=AvroFloat_type +event parameter create name=Test_InputEvent parName=AvroDouble schemaName=AvroDouble_type optional=false +event parameter create name=Test_InputEvent parName=AvroString schemaName=AvroString_type +event parameter create name=Test_InputEvent parName=AvroMap schemaName=AvroMap_type +event parameter create name=Test_InputEvent parName=AvroArray schemaName=AvroArray_type +event parameter create name=Test_InputEvent parName=CustomBoolean schemaName=CustomBoolean_type +event parameter create name=Test_InputEvent parName=CustomByte schemaName=CustomByte_type +event parameter create name=Test_InputEvent parName=CustomInteger schemaName=CustomInteger_type +event parameter create name=Test_InputEvent parName=CustomLong schemaName=CustomLong_type +event parameter create name=Test_InputEvent parName=CustomFloat schemaName=CustomFloat_type +event parameter create name=Test_InputEvent parName=CustomDouble schemaName=CustomDouble_type +event parameter create name=Test_InputEvent parName=CustomString schemaName=CustomString_type +event parameter create name=Test_InputEvent parName=CustomALong schemaName=CustomALong_type +event parameter create name=Test_InputEvent parName=CustomDate0 schemaName=CustomDate0_type +event parameter create name=Test_InputEvent parName=CustomDate1 schemaName=CustomDate1_type +event parameter create name=Test_InputEvent parName=CustomDate2 schemaName=CustomDate2_type +event parameter create name=Test_InputEvent parName=CustomSet schemaName=CustomSet_type +event parameter create name=Test_InputEvent parName=CustomMap schemaName=CustomMap_type + +event create name=Test_OutputEvent nameSpace=com.ericsson.apex.test source=External target=Apex + +event parameter create name=Test_OutputEvent parName=AvroBoolean schemaName=AvroBoolean_type +event parameter create name=Test_OutputEvent parName=AvroByte schemaName=AvroByte_type +event parameter create name=Test_OutputEvent parName=AvroShort schemaName=AvroShort_type +event parameter create name=Test_OutputEvent parName=AvroInteger schemaName=AvroInteger_type +event parameter create name=Test_OutputEvent parName=AvroLong schemaName=AvroLong_type +event parameter create name=Test_OutputEvent parName=AvroFloat schemaName=AvroFloat_type +event parameter create name=Test_OutputEvent parName=AvroDouble schemaName=AvroDouble_type +event parameter create name=Test_OutputEvent parName=AvroString schemaName=AvroString_type +event parameter create name=Test_OutputEvent parName=AvroMap schemaName=AvroMap_type +event parameter create name=Test_OutputEvent parName=AvroArray schemaName=AvroArray_type +event parameter create name=Test_OutputEvent parName=CustomBoolean schemaName=CustomBoolean_type +event parameter create name=Test_OutputEvent parName=CustomByte schemaName=CustomByte_type +event parameter create name=Test_OutputEvent parName=CustomInteger schemaName=CustomInteger_type +event parameter create name=Test_OutputEvent parName=CustomLong schemaName=CustomLong_type +event parameter create name=Test_OutputEvent parName=CustomFloat schemaName=CustomFloat_type +event parameter create name=Test_OutputEvent parName=CustomDouble schemaName=CustomDouble_type +event parameter create name=Test_OutputEvent parName=CustomString schemaName=CustomString_type +event parameter create name=Test_OutputEvent parName=CustomALong schemaName=CustomALong_type +event parameter create name=Test_OutputEvent parName=CustomDate0 schemaName=CustomDate0_type +event parameter create name=Test_OutputEvent parName=CustomDate1 schemaName=CustomDate1_type +event parameter create name=Test_OutputEvent parName=CustomDate2 schemaName=CustomDate2_type +event parameter create name=Test_OutputEvent parName=CustomSet schemaName=CustomSet_type +event parameter create name=Test_OutputEvent parName=CustomMap schemaName=CustomMap_type + +album create name=AvroBooleanAlbum scope=policy writable=true schemaName=AvroBoolean_type +album create name=AvroByteAlbum scope=policy writable=true schemaName=AvroByte_type +album create name=AvroShortAlbum scope=policy writable=true schemaName=AvroShort_type +album create name=AvroIntegerAlbum scope=policy writable=true schemaName=AvroInteger_type +album create name=AvroLongAlbum scope=policy writable=true schemaName=AvroLong_type +album create name=AvroFloatAlbum scope=policy writable=true schemaName=AvroFloat_type +album create name=AvroDoubleAlbum scope=policy writable=true schemaName=AvroDouble_type +album create name=AvroStringAlbum scope=policy writable=true schemaName=AvroString_type +album create name=AvroMapAlbum scope=policy writable=true schemaName=AvroMap_type +album create name=AvroArrayAlbum scope=policy writable=true schemaName=AvroArray_type +album create name=CustomBooleanAlbum scope=policy writable=true schemaName=CustomBoolean_type +album create name=CustomByteAlbum scope=policy writable=true schemaName=CustomByte_type +album create name=CustomIntegerAlbum scope=policy writable=true schemaName=CustomInteger_type +album create name=CustomLongAlbum scope=policy writable=true schemaName=CustomLong_type +album create name=CustomFloatAlbum scope=policy writable=true schemaName=CustomFloat_type +album create name=CustomDoubleAlbum scope=policy writable=true schemaName=CustomDouble_type +album create name=CustomStringAlbum scope=policy writable=true schemaName=CustomString_type +album create name=CustomALongAlbum scope=policy writable=true schemaName=CustomALong_type +album create name=CustomDate0Album scope=policy writable=true schemaName=CustomDate0_type +album create name=CustomDate1Album scope=policy writable=true schemaName=CustomDate1_type +album create name=CustomDate2Album scope=policy writable=true schemaName=CustomDate2_type +album create name=CustomSetAlbum scope=policy writable=true schemaName=CustomSet_type +album create name=CustomMapAlbum scope=policy writable=true schemaName=CustomMap_type + +task create name=Test_Task + +task inputfield create name=Test_Task fieldName=AvroBoolean schemaName=AvroBoolean_type +task inputfield create name=Test_Task fieldName=AvroByte schemaName=AvroByte_type +task inputfield create name=Test_Task fieldName=AvroShort schemaName=AvroShort_type +task inputfield create name=Test_Task fieldName=AvroInteger schemaName=AvroInteger_type +task inputfield create name=Test_Task fieldName=AvroLong schemaName=AvroLong_type +task inputfield create name=Test_Task fieldName=AvroFloat schemaName=AvroFloat_type +task inputfield create name=Test_Task fieldName=AvroDouble schemaName=AvroDouble_type +task inputfield create name=Test_Task fieldName=AvroString schemaName=AvroString_type +task inputfield create name=Test_Task fieldName=AvroMap schemaName=AvroMap_type +task inputfield create name=Test_Task fieldName=AvroArray schemaName=AvroArray_type +task inputfield create name=Test_Task fieldName=CustomBoolean schemaName=CustomBoolean_type +task inputfield create name=Test_Task fieldName=CustomByte schemaName=CustomByte_type +task inputfield create name=Test_Task fieldName=CustomInteger schemaName=CustomInteger_type +task inputfield create name=Test_Task fieldName=CustomLong schemaName=CustomLong_type +task inputfield create name=Test_Task fieldName=CustomFloat schemaName=CustomFloat_type +task inputfield create name=Test_Task fieldName=CustomDouble schemaName=CustomDouble_type +task inputfield create name=Test_Task fieldName=CustomString schemaName=CustomString_type +task inputfield create name=Test_Task fieldName=CustomALong schemaName=CustomALong_type +task inputfield create name=Test_Task fieldName=CustomDate0 schemaName=CustomDate0_type +task inputfield create name=Test_Task fieldName=CustomDate1 schemaName=CustomDate1_type +task inputfield create name=Test_Task fieldName=CustomDate2 schemaName=CustomDate2_type +task inputfield create name=Test_Task fieldName=CustomSet schemaName=CustomSet_type +task inputfield create name=Test_Task fieldName=CustomMap schemaName=CustomMap_type + +task outputfield create name=Test_Task fieldName=AvroBoolean schemaName=AvroBoolean_type +task outputfield create name=Test_Task fieldName=AvroByte schemaName=AvroByte_type +task outputfield create name=Test_Task fieldName=AvroShort schemaName=AvroShort_type +task outputfield create name=Test_Task fieldName=AvroInteger schemaName=AvroInteger_type +task outputfield create name=Test_Task fieldName=AvroLong schemaName=AvroLong_type +task outputfield create name=Test_Task fieldName=AvroFloat schemaName=AvroFloat_type +task outputfield create name=Test_Task fieldName=AvroDouble schemaName=AvroDouble_type +task outputfield create name=Test_Task fieldName=AvroString schemaName=AvroString_type +task outputfield create name=Test_Task fieldName=AvroMap schemaName=AvroMap_type +task outputfield create name=Test_Task fieldName=AvroArray schemaName=AvroArray_type +task outputfield create name=Test_Task fieldName=CustomBoolean schemaName=CustomBoolean_type +task outputfield create name=Test_Task fieldName=CustomByte schemaName=CustomByte_type +task outputfield create name=Test_Task fieldName=CustomInteger schemaName=CustomInteger_type +task outputfield create name=Test_Task fieldName=CustomLong schemaName=CustomLong_type +task outputfield create name=Test_Task fieldName=CustomFloat schemaName=CustomFloat_type +task outputfield create name=Test_Task fieldName=CustomDouble schemaName=CustomDouble_type +task outputfield create name=Test_Task fieldName=CustomString schemaName=CustomString_type +task outputfield create name=Test_Task fieldName=CustomALong schemaName=CustomALong_type +task outputfield create name=Test_Task fieldName=CustomDate0 schemaName=CustomDate0_type +task outputfield create name=Test_Task fieldName=CustomDate1 schemaName=CustomDate1_type +task outputfield create name=Test_Task fieldName=CustomDate2 schemaName=CustomDate2_type +task outputfield create name=Test_Task fieldName=CustomSet schemaName=CustomSet_type +task outputfield create name=Test_Task fieldName=CustomMap schemaName=CustomMap_type + +task contextref create name=Test_Task albumName=AvroBooleanAlbum +task contextref create name=Test_Task albumName=AvroByteAlbum +task contextref create name=Test_Task albumName=AvroShortAlbum +task contextref create name=Test_Task albumName=AvroIntegerAlbum +task contextref create name=Test_Task albumName=AvroLongAlbum +task contextref create name=Test_Task albumName=AvroFloatAlbum +task contextref create name=Test_Task albumName=AvroDoubleAlbum +task contextref create name=Test_Task albumName=AvroStringAlbum +task contextref create name=Test_Task albumName=AvroMapAlbum +task contextref create name=Test_Task albumName=AvroArrayAlbum +task contextref create name=Test_Task albumName=CustomBooleanAlbum +task contextref create name=Test_Task albumName=CustomByteAlbum +task contextref create name=Test_Task albumName=CustomIntegerAlbum +task contextref create name=Test_Task albumName=CustomLongAlbum +task contextref create name=Test_Task albumName=CustomFloatAlbum +task contextref create name=Test_Task albumName=CustomDoubleAlbum +task contextref create name=Test_Task albumName=CustomStringAlbum +task contextref create name=Test_Task albumName=CustomALongAlbum +task contextref create name=Test_Task albumName=CustomDate0Album +task contextref create name=Test_Task albumName=CustomDate1Album +task contextref create name=Test_Task albumName=CustomDate2Album +task contextref create name=Test_Task albumName=CustomSetAlbum +task contextref create name=Test_Task albumName=CustomMapAlbum + +task logic create name=Test_Task logicFlavour=JAVASCRIPT logic=LS +executor.logger.debug(executor.subject.id); + +executor.logger.debug(executor.inFields); + +executor.getContextAlbum("AvroBooleanAlbum" ).put("AvroBoolean" , executor.inFields.get("AvroBoolean")); +executor.getContextAlbum("AvroByteAlbum" ).put("AvroByte" , executor.inFields.get("AvroByte" )); +executor.getContextAlbum("AvroShortAlbum" ).put("AvroShort" , executor.inFields.get("AvroShort" )); +executor.getContextAlbum("AvroIntegerAlbum" ).put("AvroInteger" , executor.inFields.get("AvroInteger")); +executor.getContextAlbum("AvroLongAlbum" ).put("AvroLong" , executor.inFields.get("AvroLong" )); +executor.getContextAlbum("AvroFloatAlbum" ).put("AvroFloat" , executor.inFields.get("AvroFloat" )); +executor.getContextAlbum("AvroDoubleAlbum" ).put("AvroDouble" , executor.inFields.get("AvroDouble" )); +executor.getContextAlbum("AvroStringAlbum" ).put("AvroString" , executor.inFields.get("AvroString" )); +executor.getContextAlbum("AvroMapAlbum" ).put("AvroMap" , executor.inFields.get("AvroMap" )); +executor.getContextAlbum("AvroArrayAlbum" ).put("AvroArray" , executor.inFields.get("AvroArray" )); +executor.getContextAlbum("CustomBooleanAlbum").put("CustomBoolean", executor.inFields.get("CustomBoolean")); +executor.getContextAlbum("CustomByteAlbum" ).put("CustomByte" , executor.inFields.get("CustomByte" )); +executor.getContextAlbum("CustomIntegerAlbum").put("CustomInteger", executor.inFields.get("CustomInteger")); +executor.getContextAlbum("CustomLongAlbum" ).put("CustomLong" , executor.inFields.get("CustomLong" )); +executor.getContextAlbum("CustomFloatAlbum" ).put("CustomFloat" , executor.inFields.get("CustomFloat" )); +executor.getContextAlbum("CustomDoubleAlbum" ).put("CustomDouble" , executor.inFields.get("CustomDouble" )); +executor.getContextAlbum("CustomStringAlbum" ).put("CustomString" , executor.inFields.get("CustomString" )); +executor.getContextAlbum("CustomALongAlbum" ).put("CustomALong" , executor.inFields.get("CustomALong" )); +executor.getContextAlbum("CustomDate0Album" ).put("CustomDate0" , executor.inFields.get("CustomDate0" )); +executor.getContextAlbum("CustomDate1Album" ).put("CustomDate1" , executor.inFields.get("CustomDate1" )); +executor.getContextAlbum("CustomDate2Album" ).put("CustomDate2" , executor.inFields.get("CustomDate2" )); +executor.getContextAlbum("CustomSetAlbum" ).put("CustomSet" , executor.inFields.get("CustomSet" )); +executor.getContextAlbum("CustomMapAlbum" ).put("CustomMap" , executor.inFields.get("CustomMap" )); + +var avroBoolean = executor.getContextAlbum("AvroBooleanAlbum" ).get("AvroBoolean" ); +var avroByte = executor.getContextAlbum("AvroByteAlbum" ).get("AvroByte" ); +var avroShort = executor.getContextAlbum("AvroShortAlbum" ).get("AvroShort" ); +var avroInteger = executor.getContextAlbum("AvroIntegerAlbum" ).get("AvroInteger" ); +var avroLong = executor.getContextAlbum("AvroLongAlbum" ).get("AvroLong" ); +var avroFloat = executor.getContextAlbum("AvroFloatAlbum" ).get("AvroFloat" ); +var avroDouble = executor.getContextAlbum("AvroDoubleAlbum" ).get("AvroDouble" ); +var avroString = executor.getContextAlbum("AvroStringAlbum" ).get("AvroString" ); +var customBoolean = executor.getContextAlbum("CustomBooleanAlbum").get("CustomBoolean"); +var customByte = executor.getContextAlbum("CustomByteAlbum" ).get("CustomByte" ); +var customInteger = executor.getContextAlbum("CustomIntegerAlbum").get("CustomInteger"); +var customLong = executor.getContextAlbum("CustomLongAlbum" ).get("CustomLong" ); +var customFloat = executor.getContextAlbum("CustomFloatAlbum" ).get("CustomFloat" ); +var customDouble = executor.getContextAlbum("CustomDoubleAlbum" ).get("CustomDouble" ); +var customString = executor.getContextAlbum("CustomStringAlbum" ).get("CustomString" ); +var customALong = executor.getContextAlbum("CustomALongAlbum" ).get("CustomALong" ); +var customDate0 = executor.getContextAlbum("CustomDate0Album" ).get("CustomDate0" ); +var customDate1 = executor.getContextAlbum("CustomDate1Album" ).get("CustomDate1" ); +var customDate2 = executor.getContextAlbum("CustomDate2Album" ).get("CustomDate2" ); +var customSet = executor.getContextAlbum("CustomSetAlbum" ).get("CustomSet" ); +var customMap = executor.getContextAlbum("CustomMapAlbum" ).get("CustomMap" ); + +javaIntegerType = Java.type("java.lang.Integer"); +javaLongType = Java.type("java.lang.Long"); +javaFloatType = Java.type("java.lang.Float"); + +avroBoolean = !avroBoolean; +avroByte = new javaIntegerType(avroByte + 1); +avroShort = new javaIntegerType(avroShort + 1); +avroInteger = new javaIntegerType(avroInteger + 1); +avroLong = new javaLongType (avroLong + 1); +avroFloat = new javaFloatType (avroFloat + 0.99); +avroDouble += 0.99; +avroString = avroString + " added to end of string"; +customBoolean.put("flag", !customBoolean.get("flag")); +customByte .put("byteValue" , customByte .get("byteValue" ) + 1); +customInteger.put("intValue" , customInteger.get("intValue" ) + 1); +customLong .put("longValue" , new javaLongType (customLong .get("longValue" ) + 1)); +customFloat .put("floatValue" , new javaFloatType(customFloat.get("floatValue") + 1.0)); +customDouble .put("doubleValue", customDouble .get("doubleValue") + 1.0); +customString .put("stringValue", customString .get("stringValue") + " added to end of string"); +customALong .put("longValue" , new javaLongType (customALong.get("longValue" ) + 1)); + +customDate0.put("year", 1922); +customDate0.put("month", 12); +customDate0.put("day", 6); + +customDate1.put("dateValue", customDate0); +customDate2.put("dateValue", customDate0); + +customSet.get("setValue").add("with"); +customSet.get("setValue").add("a"); +customSet.get("setValue").add("beard"); + +customMap.get("mapValue").put("love", "hate"); +customMap.get("mapValue").put("summer", "winter"); +customMap.get("mapValue").put("good", "bad"); + +executor.getContextAlbum("AvroBooleanAlbum" ).put("AvroBoolean" , avroBoolean); +executor.getContextAlbum("AvroByteAlbum" ).put("AvroByte" , avroByte); +executor.getContextAlbum("AvroShortAlbum" ).put("AvroShort" , avroShort); +executor.getContextAlbum("AvroIntegerAlbum" ).put("AvroInteger" , avroInteger); +executor.getContextAlbum("AvroLongAlbum" ).put("AvroLong" , avroLong); +executor.getContextAlbum("AvroFloatAlbum" ).put("AvroFloat" , avroFloat); +executor.getContextAlbum("AvroDoubleAlbum" ).put("AvroDouble" , avroDouble); +executor.getContextAlbum("AvroStringAlbum" ).put("AvroString" , avroString); +executor.getContextAlbum("CustomBooleanAlbum").put("CustomBoolean", customBoolean); +executor.getContextAlbum("CustomByteAlbum" ).put("CustomByte" , customByte); +executor.getContextAlbum("CustomIntegerAlbum").put("CustomInteger", customInteger); +executor.getContextAlbum("CustomLongAlbum" ).put("CustomLong" , customLong); +executor.getContextAlbum("CustomFloatAlbum" ).put("CustomFloat" , customFloat); +executor.getContextAlbum("CustomDoubleAlbum" ).put("CustomDouble" , customDouble); +executor.getContextAlbum("CustomStringAlbum" ).put("CustomString" , customString); +executor.getContextAlbum("CustomALongAlbum" ).put("CustomALong" , customALong); +executor.getContextAlbum("CustomDate0Album" ).put("CustomDate0" , customDate0); +executor.getContextAlbum("CustomDate1Album" ).put("CustomDate1" , customDate1); +executor.getContextAlbum("CustomDate2Album" ).put("CustomDate2" , customDate2); +executor.getContextAlbum("CustomSetAlbum" ).put("CustomSet" , customSet); +executor.getContextAlbum("CustomMapAlbum" ).put("CustomMap" , customMap); + +executor.outFields.put("AvroBoolean" , executor.getContextAlbum("AvroBooleanAlbum" ).get("AvroBoolean" )); +executor.outFields.put("AvroByte" , executor.getContextAlbum("AvroByteAlbum" ).get("AvroByte" )); +executor.outFields.put("AvroShort" , executor.getContextAlbum("AvroShortAlbum" ).get("AvroShort" )); +executor.outFields.put("AvroInteger" , executor.getContextAlbum("AvroIntegerAlbum" ).get("AvroInteger" )); +executor.outFields.put("AvroLong" , executor.getContextAlbum("AvroLongAlbum" ).get("AvroLong" )); +executor.outFields.put("AvroFloat" , executor.getContextAlbum("AvroFloatAlbum" ).get("AvroFloat" )); +executor.outFields.put("AvroDouble" , executor.getContextAlbum("AvroDoubleAlbum" ).get("AvroDouble" )); +executor.outFields.put("AvroString" , executor.getContextAlbum("AvroStringAlbum" ).get("AvroString" )); +executor.outFields.put("AvroMap" , executor.getContextAlbum("AvroMapAlbum" ).get("AvroMap" )); +executor.outFields.put("AvroArray" , executor.getContextAlbum("AvroArrayAlbum" ).get("AvroArray" )); +executor.outFields.put("CustomBoolean", executor.getContextAlbum("CustomBooleanAlbum").get("CustomBoolean")); +executor.outFields.put("CustomByte" , executor.getContextAlbum("CustomByteAlbum" ).get("CustomByte" )); +executor.outFields.put("CustomInteger", executor.getContextAlbum("CustomIntegerAlbum").get("CustomInteger")); +executor.outFields.put("CustomLong" , executor.getContextAlbum("CustomLongAlbum" ).get("CustomLong" )); +executor.outFields.put("CustomFloat" , executor.getContextAlbum("CustomFloatAlbum" ).get("CustomFloat" )); +executor.outFields.put("CustomDouble" , executor.getContextAlbum("CustomDoubleAlbum" ).get("CustomDouble" )); +executor.outFields.put("CustomString" , executor.getContextAlbum("CustomStringAlbum" ).get("CustomString" )); +executor.outFields.put("CustomALong" , executor.getContextAlbum("CustomALongAlbum" ).get("CustomALong" )); +executor.outFields.put("CustomDate0" , executor.getContextAlbum("CustomDate0Album" ).get("CustomDate0" )); +executor.outFields.put("CustomDate1" , executor.getContextAlbum("CustomDate1Album" ).get("CustomDate1" )); +executor.outFields.put("CustomDate2" , executor.getContextAlbum("CustomDate2Album" ).get("CustomDate2" )); +executor.outFields.put("CustomSet" , executor.getContextAlbum("CustomSetAlbum" ).get("CustomSet" )); +executor.outFields.put("CustomMap" , executor.getContextAlbum("CustomMapAlbum" ).get("CustomMap" )); + +executor.logger.debug(executor.outFields); + +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); + +LE + +policy create name=Test_Policy template=FREEFORM firstState=OnlyState + +policy state create name=Test_Policy stateName=OnlyState triggerName=Test_InputEvent defaultTaskName=Test_Task +policy state output create name=Test_Policy stateName=OnlyState outputName=OnlyState2Out eventName=Test_OutputEvent +policy state taskref create name=Test_Policy stateName=OnlyState taskName=Test_Task outputType=DIRECT outputName=OnlyState2Out diff --git a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex new file mode 100644 index 000000000..8d1711638 --- /dev/null +++ b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex @@ -0,0 +1,324 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=Test_PolicyModel + +schema create name=JavaBoolean_type flavour=Java schema=java.lang.Boolean +schema create name=JavaByte_type flavour=Java schema=java.lang.Byte +schema create name=JavaShort_type flavour=Java schema=java.lang.Short +schema create name=JavaInteger_type flavour=Java schema=java.lang.Integer +schema create name=JavaLong_type flavour=Java schema=java.lang.Long +schema create name=JavaFloat_type flavour=Java schema=java.lang.Float +schema create name=JavaDouble_type flavour=Java schema=java.lang.Double +schema create name=JavaString_type flavour=Java schema=java.lang.String +schema create name=CustomBoolean_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem000 +schema create name=CustomByte_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem001 +schema create name=CustomInteger_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem002 +schema create name=CustomLong_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem003 +schema create name=CustomFloat_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem004 +schema create name=CustomDouble_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem005 +schema create name=CustomString_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem006 +schema create name=CustomJLong_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem007 +schema create name=CustomDate0_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem008 +schema create name=CustomDate1_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem009 +schema create name=CustomDate2_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00A +schema create name=CustomSet_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00B +schema create name=CustomMap_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00C + +event create name=Test_InputEvent nameSpace=org.onap.policy.apex.test source=External target=Apex + +event parameter create name=Test_InputEvent parName=JavaBoolean schemaName=JavaBoolean_type +event parameter create name=Test_InputEvent parName=JavaByte schemaName=JavaByte_type +event parameter create name=Test_InputEvent parName=JavaShort schemaName=JavaShort_type +event parameter create name=Test_InputEvent parName=JavaInteger schemaName=JavaInteger_type +event parameter create name=Test_InputEvent parName=JavaLong schemaName=JavaLong_type +event parameter create name=Test_InputEvent parName=JavaFloat schemaName=JavaFloat_type +event parameter create name=Test_InputEvent parName=JavaDouble schemaName=JavaDouble_type +event parameter create name=Test_InputEvent parName=JavaString schemaName=JavaString_type +event parameter create name=Test_InputEvent parName=CustomBoolean schemaName=CustomBoolean_type +event parameter create name=Test_InputEvent parName=CustomByte schemaName=CustomByte_type +event parameter create name=Test_InputEvent parName=CustomInteger schemaName=CustomInteger_type +event parameter create name=Test_InputEvent parName=CustomLong schemaName=CustomLong_type +event parameter create name=Test_InputEvent parName=CustomFloat schemaName=CustomFloat_type +event parameter create name=Test_InputEvent parName=CustomDouble schemaName=CustomDouble_type +event parameter create name=Test_InputEvent parName=CustomString schemaName=CustomString_type +event parameter create name=Test_InputEvent parName=CustomJLong schemaName=CustomJLong_type +event parameter create name=Test_InputEvent parName=CustomDate0 schemaName=CustomDate0_type +event parameter create name=Test_InputEvent parName=CustomDate1 schemaName=CustomDate1_type +event parameter create name=Test_InputEvent parName=CustomDate2 schemaName=CustomDate2_type +event parameter create name=Test_InputEvent parName=CustomSet schemaName=CustomSet_type +event parameter create name=Test_InputEvent parName=CustomMap schemaName=CustomMap_type + +event create name=Test_OutputEvent nameSpace=org.onap.policy.apex.test source=External target=Apex + +event parameter create name=Test_OutputEvent parName=JavaBoolean schemaName=JavaBoolean_type +event parameter create name=Test_OutputEvent parName=JavaByte schemaName=JavaByte_type +event parameter create name=Test_OutputEvent parName=JavaShort schemaName=JavaShort_type +event parameter create name=Test_OutputEvent parName=JavaInteger schemaName=JavaInteger_type +event parameter create name=Test_OutputEvent parName=JavaLong schemaName=JavaLong_type +event parameter create name=Test_OutputEvent parName=JavaFloat schemaName=JavaFloat_type +event parameter create name=Test_OutputEvent parName=JavaDouble schemaName=JavaDouble_type +event parameter create name=Test_OutputEvent parName=JavaString schemaName=JavaString_type +event parameter create name=Test_OutputEvent parName=CustomBoolean schemaName=CustomBoolean_type +event parameter create name=Test_OutputEvent parName=CustomByte schemaName=CustomByte_type +event parameter create name=Test_OutputEvent parName=CustomInteger schemaName=CustomInteger_type +event parameter create name=Test_OutputEvent parName=CustomLong schemaName=CustomLong_type +event parameter create name=Test_OutputEvent parName=CustomFloat schemaName=CustomFloat_type +event parameter create name=Test_OutputEvent parName=CustomDouble schemaName=CustomDouble_type +event parameter create name=Test_OutputEvent parName=CustomString schemaName=CustomString_type +event parameter create name=Test_OutputEvent parName=CustomJLong schemaName=CustomJLong_type +event parameter create name=Test_OutputEvent parName=CustomDate0 schemaName=CustomDate0_type +event parameter create name=Test_OutputEvent parName=CustomDate1 schemaName=CustomDate1_type +event parameter create name=Test_OutputEvent parName=CustomDate2 schemaName=CustomDate2_type +event parameter create name=Test_OutputEvent parName=CustomSet schemaName=CustomSet_type +event parameter create name=Test_OutputEvent parName=CustomMap schemaName=CustomMap_type + +album create name=JavaBooleanAlbum scope=policy writable=true schemaName=JavaBoolean_type +album create name=JavaByteAlbum scope=policy writable=true schemaName=JavaByte_type +album create name=JavaShortAlbum scope=policy writable=true schemaName=JavaShort_type +album create name=JavaIntegerAlbum scope=policy writable=true schemaName=JavaInteger_type +album create name=JavaLongAlbum scope=policy writable=true schemaName=JavaLong_type +album create name=JavaFloatAlbum scope=policy writable=true schemaName=JavaFloat_type +album create name=JavaDoubleAlbum scope=policy writable=true schemaName=JavaDouble_type +album create name=JavaStringAlbum scope=policy writable=true schemaName=JavaString_type +album create name=CustomBooleanAlbum scope=policy writable=true schemaName=CustomBoolean_type +album create name=CustomByteAlbum scope=policy writable=true schemaName=CustomByte_type +album create name=CustomIntegerAlbum scope=policy writable=true schemaName=CustomInteger_type +album create name=CustomLongAlbum scope=policy writable=true schemaName=CustomLong_type +album create name=CustomFloatAlbum scope=policy writable=true schemaName=CustomFloat_type +album create name=CustomDoubleAlbum scope=policy writable=true schemaName=CustomDouble_type +album create name=CustomStringAlbum scope=policy writable=true schemaName=CustomString_type +album create name=CustomJLongAlbum scope=policy writable=true schemaName=CustomJLong_type +album create name=CustomDate0Album scope=policy writable=true schemaName=CustomDate0_type +album create name=CustomDate1Album scope=policy writable=true schemaName=CustomDate1_type +album create name=CustomDate2Album scope=policy writable=true schemaName=CustomDate2_type +album create name=CustomSetAlbum scope=policy writable=true schemaName=CustomSet_type +album create name=CustomMapAlbum scope=policy writable=true schemaName=CustomMap_type + +task create name=Test_Task + +task inputfield create name=Test_Task fieldName=JavaBoolean schemaName=JavaBoolean_type +task inputfield create name=Test_Task fieldName=JavaByte schemaName=JavaByte_type +task inputfield create name=Test_Task fieldName=JavaShort schemaName=JavaShort_type +task inputfield create name=Test_Task fieldName=JavaInteger schemaName=JavaInteger_type +task inputfield create name=Test_Task fieldName=JavaLong schemaName=JavaLong_type +task inputfield create name=Test_Task fieldName=JavaFloat schemaName=JavaFloat_type +task inputfield create name=Test_Task fieldName=JavaDouble schemaName=JavaDouble_type +task inputfield create name=Test_Task fieldName=JavaString schemaName=JavaString_type +task inputfield create name=Test_Task fieldName=CustomBoolean schemaName=CustomBoolean_type +task inputfield create name=Test_Task fieldName=CustomByte schemaName=CustomByte_type +task inputfield create name=Test_Task fieldName=CustomInteger schemaName=CustomInteger_type +task inputfield create name=Test_Task fieldName=CustomLong schemaName=CustomLong_type +task inputfield create name=Test_Task fieldName=CustomFloat schemaName=CustomFloat_type +task inputfield create name=Test_Task fieldName=CustomDouble schemaName=CustomDouble_type +task inputfield create name=Test_Task fieldName=CustomString schemaName=CustomString_type +task inputfield create name=Test_Task fieldName=CustomJLong schemaName=CustomJLong_type +task inputfield create name=Test_Task fieldName=CustomDate0 schemaName=CustomDate0_type +task inputfield create name=Test_Task fieldName=CustomDate1 schemaName=CustomDate1_type +task inputfield create name=Test_Task fieldName=CustomDate2 schemaName=CustomDate2_type +task inputfield create name=Test_Task fieldName=CustomSet schemaName=CustomSet_type +task inputfield create name=Test_Task fieldName=CustomMap schemaName=CustomMap_type + +task outputfield create name=Test_Task fieldName=JavaBoolean schemaName=JavaBoolean_type +task outputfield create name=Test_Task fieldName=JavaByte schemaName=JavaByte_type +task outputfield create name=Test_Task fieldName=JavaShort schemaName=JavaShort_type +task outputfield create name=Test_Task fieldName=JavaInteger schemaName=JavaInteger_type +task outputfield create name=Test_Task fieldName=JavaLong schemaName=JavaLong_type +task outputfield create name=Test_Task fieldName=JavaFloat schemaName=JavaFloat_type +task outputfield create name=Test_Task fieldName=JavaDouble schemaName=JavaDouble_type +task outputfield create name=Test_Task fieldName=JavaString schemaName=JavaString_type +task outputfield create name=Test_Task fieldName=CustomBoolean schemaName=CustomBoolean_type +task outputfield create name=Test_Task fieldName=CustomByte schemaName=CustomByte_type +task outputfield create name=Test_Task fieldName=CustomInteger schemaName=CustomInteger_type +task outputfield create name=Test_Task fieldName=CustomLong schemaName=CustomLong_type +task outputfield create name=Test_Task fieldName=CustomFloat schemaName=CustomFloat_type +task outputfield create name=Test_Task fieldName=CustomDouble schemaName=CustomDouble_type +task outputfield create name=Test_Task fieldName=CustomString schemaName=CustomString_type +task outputfield create name=Test_Task fieldName=CustomJLong schemaName=CustomJLong_type +task outputfield create name=Test_Task fieldName=CustomDate0 schemaName=CustomDate0_type +task outputfield create name=Test_Task fieldName=CustomDate1 schemaName=CustomDate1_type +task outputfield create name=Test_Task fieldName=CustomDate2 schemaName=CustomDate2_type +task outputfield create name=Test_Task fieldName=CustomSet schemaName=CustomSet_type +task outputfield create name=Test_Task fieldName=CustomMap schemaName=CustomMap_type + +task contextref create name=Test_Task albumName=JavaBooleanAlbum +task contextref create name=Test_Task albumName=JavaByteAlbum +task contextref create name=Test_Task albumName=JavaShortAlbum +task contextref create name=Test_Task albumName=JavaIntegerAlbum +task contextref create name=Test_Task albumName=JavaLongAlbum +task contextref create name=Test_Task albumName=JavaFloatAlbum +task contextref create name=Test_Task albumName=JavaDoubleAlbum +task contextref create name=Test_Task albumName=JavaStringAlbum +task contextref create name=Test_Task albumName=CustomBooleanAlbum +task contextref create name=Test_Task albumName=CustomByteAlbum +task contextref create name=Test_Task albumName=CustomIntegerAlbum +task contextref create name=Test_Task albumName=CustomLongAlbum +task contextref create name=Test_Task albumName=CustomFloatAlbum +task contextref create name=Test_Task albumName=CustomDoubleAlbum +task contextref create name=Test_Task albumName=CustomStringAlbum +task contextref create name=Test_Task albumName=CustomJLongAlbum +task contextref create name=Test_Task albumName=CustomDate0Album +task contextref create name=Test_Task albumName=CustomDate1Album +task contextref create name=Test_Task albumName=CustomDate2Album +task contextref create name=Test_Task albumName=CustomSetAlbum +task contextref create name=Test_Task albumName=CustomMapAlbum + +task logic create name=Test_Task logicFlavour=JAVASCRIPT logic=LS +executor.logger.debug(executor.subject.id); + +executor.logger.debug(executor.inFields); + +executor.getContextAlbum("JavaBooleanAlbum" ).put("JavaBoolean" , executor.inFields.get("JavaBoolean" )); +executor.getContextAlbum("JavaByteAlbum" ).put("JavaByte" , executor.inFields.get("JavaByte" )); +executor.getContextAlbum("JavaShortAlbum" ).put("JavaShort" , executor.inFields.get("JavaShort" )); +executor.getContextAlbum("JavaIntegerAlbum" ).put("JavaInteger" , executor.inFields.get("JavaInteger" )); +executor.getContextAlbum("JavaLongAlbum" ).put("JavaLong" , executor.inFields.get("JavaLong" )); +executor.getContextAlbum("JavaFloatAlbum" ).put("JavaFloat" , executor.inFields.get("JavaFloat" )); +executor.getContextAlbum("JavaDoubleAlbum" ).put("JavaDouble" , executor.inFields.get("JavaDouble" )); +executor.getContextAlbum("JavaStringAlbum" ).put("JavaString" , executor.inFields.get("JavaString" )); +executor.getContextAlbum("CustomBooleanAlbum").put("CustomBoolean", executor.inFields.get("CustomBoolean")); +executor.getContextAlbum("CustomByteAlbum" ).put("CustomByte" , executor.inFields.get("CustomByte" )); +executor.getContextAlbum("CustomIntegerAlbum").put("CustomInteger", executor.inFields.get("CustomInteger")); +executor.getContextAlbum("CustomLongAlbum" ).put("CustomLong" , executor.inFields.get("CustomLong" )); +executor.getContextAlbum("CustomFloatAlbum" ).put("CustomFloat" , executor.inFields.get("CustomFloat" )); +executor.getContextAlbum("CustomDoubleAlbum" ).put("CustomDouble" , executor.inFields.get("CustomDouble" )); +executor.getContextAlbum("CustomStringAlbum" ).put("CustomString" , executor.inFields.get("CustomString" )); +executor.getContextAlbum("CustomJLongAlbum" ).put("CustomJLong" , executor.inFields.get("CustomJLong" )); +executor.getContextAlbum("CustomDate0Album" ).put("CustomDate0" , executor.inFields.get("CustomDate0" )); +executor.getContextAlbum("CustomDate1Album" ).put("CustomDate1" , executor.inFields.get("CustomDate1" )); +executor.getContextAlbum("CustomDate2Album" ).put("CustomDate2" , executor.inFields.get("CustomDate2" )); +executor.getContextAlbum("CustomSetAlbum" ).put("CustomSet" , executor.inFields.get("CustomSet" )); +executor.getContextAlbum("CustomMapAlbum" ).put("CustomMap" , executor.inFields.get("CustomMap" )); + +var javaBoolean = executor.getContextAlbum("JavaBooleanAlbum" ).get("JavaBoolean" ); +var javaByte = executor.getContextAlbum("JavaByteAlbum" ).get("JavaByte" ); +var javaShort = executor.getContextAlbum("JavaShortAlbum" ).get("JavaShort" ); +var javaInteger = executor.getContextAlbum("JavaIntegerAlbum" ).get("JavaInteger" ); +var javaLong = executor.getContextAlbum("JavaLongAlbum" ).get("JavaLong" ); +var javaFloat = executor.getContextAlbum("JavaFloatAlbum" ).get("JavaFloat" ); +var javaDouble = executor.getContextAlbum("JavaDoubleAlbum" ).get("JavaDouble" ); +var javaString = executor.getContextAlbum("JavaStringAlbum" ).get("JavaString" ); +var customBoolean = executor.getContextAlbum("CustomBooleanAlbum").get("CustomBoolean"); +var customByte = executor.getContextAlbum("CustomByteAlbum" ).get("CustomByte" ); +var customInteger = executor.getContextAlbum("CustomIntegerAlbum").get("CustomInteger"); +var customLong = executor.getContextAlbum("CustomLongAlbum" ).get("CustomLong" ); +var customFloat = executor.getContextAlbum("CustomFloatAlbum" ).get("CustomFloat" ); +var customDouble = executor.getContextAlbum("CustomDoubleAlbum" ).get("CustomDouble" ); +var customString = executor.getContextAlbum("CustomStringAlbum" ).get("CustomString" ); +var customJLong = executor.getContextAlbum("CustomJLongAlbum" ).get("CustomJLong" ); +var customDate0 = executor.getContextAlbum("CustomDate0Album" ).get("CustomDate0" ); +var customDate1 = executor.getContextAlbum("CustomDate1Album" ).get("CustomDate1" ); +var customDate2 = executor.getContextAlbum("CustomDate2Album" ).get("CustomDate2" ); +var customSet = executor.getContextAlbum("CustomSetAlbum" ).get("CustomSet" ); +var customMap = executor.getContextAlbum("CustomMapAlbum" ).get("CustomMap" ); + +javaBoolean = !javaBoolean; +javaByte += 1; +javaShortType = Java.type("java.lang.Short"); +javaShort = new javaShortType(javaShort + 1); +javaInteger += 1; +javaLong += 1; +javaFloat += 0.99; +javaDouble += 0.99; +javaString = javaString + " added to end of string"; +customBoolean.setFlag(!customBoolean); +customByte .setByteValue (customByte .getByteValue() + 1); +customInteger.setIntValue (customInteger.getIntValue() + 1); +customLong .setLongValue (customLong .getLongValue() + 1); +customFloat .setFloatValue (customFloat .getFloatValue() + 1); +customDouble .setDoubleValue(customDouble .getDoubleValue() + 1); +customString .setStringValue(customString .getStringValue() + " added to end of string"); +customJLong .setLongValue (customJLong .getLongValue() + 1); + +customDate0Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem008"); +customDate0 = new customDate0Type(1499868391); + +customDate1Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem009"); +customDate1 = new customDate1Type(); +customDate1.setDateValue(customDate0); + +customDate2Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem00A"); +customDate2 = new customDate2Type(); +customDate2.setDateValue(customDate0); + +customSet.getSetValue().add("with"); +customSet.getSetValue().add("a"); +customSet.getSetValue().add("beard"); + +customMap.getMapValue().put("love", "hate"); +customMap.getMapValue().put("summer", "winter"); +customMap.getMapValue().put("good", "bad"); + +executor.getContextAlbum("JavaBooleanAlbum" ).put("JavaBoolean" , javaBoolean); +executor.getContextAlbum("JavaByteAlbum" ).put("JavaByte" , javaByte); +executor.getContextAlbum("JavaShortAlbum" ).put("JavaShort" , javaShort); +executor.getContextAlbum("JavaIntegerAlbum" ).put("JavaInteger" , javaInteger); +executor.getContextAlbum("JavaLongAlbum" ).put("JavaLong" , javaLong); +executor.getContextAlbum("JavaFloatAlbum" ).put("JavaFloat" , javaFloat); +executor.getContextAlbum("JavaDoubleAlbum" ).put("JavaDouble" , javaDouble); +executor.getContextAlbum("JavaStringAlbum" ).put("JavaString" , javaString); +executor.getContextAlbum("CustomBooleanAlbum").put("CustomBoolean", customBoolean); +executor.getContextAlbum("CustomByteAlbum" ).put("CustomByte" , customByte); +executor.getContextAlbum("CustomIntegerAlbum").put("CustomInteger", customInteger); +executor.getContextAlbum("CustomLongAlbum" ).put("CustomLong" , customLong); +executor.getContextAlbum("CustomFloatAlbum" ).put("CustomFloat" , customFloat); +executor.getContextAlbum("CustomDoubleAlbum" ).put("CustomDouble" , customDouble); +executor.getContextAlbum("CustomStringAlbum" ).put("CustomString" , customString); +executor.getContextAlbum("CustomJLongAlbum" ).put("CustomJLong" , customJLong); +executor.getContextAlbum("CustomDate0Album" ).put("CustomDate0" , customDate0); +executor.getContextAlbum("CustomDate1Album" ).put("CustomDate1" , customDate1); +executor.getContextAlbum("CustomDate2Album" ).put("CustomDate2" , customDate2); +executor.getContextAlbum("CustomSetAlbum" ).put("CustomSet" , customSet); +executor.getContextAlbum("CustomMapAlbum" ).put("CustomMap" , customMap); + +executor.outFields.put("JavaBoolean" , executor.getContextAlbum("JavaBooleanAlbum" ).get("JavaBoolean" )); +executor.outFields.put("JavaByte" , executor.getContextAlbum("JavaByteAlbum" ).get("JavaByte" )); +executor.outFields.put("JavaShort" , executor.getContextAlbum("JavaShortAlbum" ).get("JavaShort" )); +executor.outFields.put("JavaInteger" , executor.getContextAlbum("JavaIntegerAlbum" ).get("JavaInteger" )); +executor.outFields.put("JavaLong" , executor.getContextAlbum("JavaLongAlbum" ).get("JavaLong" )); +executor.outFields.put("JavaFloat" , executor.getContextAlbum("JavaFloatAlbum" ).get("JavaFloat" )); +executor.outFields.put("JavaDouble" , executor.getContextAlbum("JavaDoubleAlbum" ).get("JavaDouble" )); +executor.outFields.put("JavaString" , executor.getContextAlbum("JavaStringAlbum" ).get("JavaString" )); +executor.outFields.put("CustomBoolean", executor.getContextAlbum("CustomBooleanAlbum").get("CustomBoolean")); +executor.outFields.put("CustomByte" , executor.getContextAlbum("CustomByteAlbum" ).get("CustomByte" )); +executor.outFields.put("CustomInteger", executor.getContextAlbum("CustomIntegerAlbum").get("CustomInteger")); +executor.outFields.put("CustomLong" , executor.getContextAlbum("CustomLongAlbum" ).get("CustomLong" )); +executor.outFields.put("CustomFloat" , executor.getContextAlbum("CustomFloatAlbum" ).get("CustomFloat" )); +executor.outFields.put("CustomDouble" , executor.getContextAlbum("CustomDoubleAlbum" ).get("CustomDouble" )); +executor.outFields.put("CustomString" , executor.getContextAlbum("CustomStringAlbum" ).get("CustomString" )); +executor.outFields.put("CustomJLong" , executor.getContextAlbum("CustomJLongAlbum" ).get("CustomJLong" )); +executor.outFields.put("CustomDate0" , executor.getContextAlbum("CustomDate0Album" ).get("CustomDate0" )); +executor.outFields.put("CustomDate1" , executor.getContextAlbum("CustomDate1Album" ).get("CustomDate1" )); +executor.outFields.put("CustomDate2" , executor.getContextAlbum("CustomDate2Album" ).get("CustomDate2" )); +executor.outFields.put("CustomSet" , executor.getContextAlbum("CustomSetAlbum" ).get("CustomSet" )); +executor.outFields.put("CustomMap" , executor.getContextAlbum("CustomMapAlbum" ).get("CustomMap" )); + +executor.logger.debug(executor.outFields); + +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); + +LE + +policy create name=Test_Policy template=FREEFORM firstState=OnlyState + +policy state create name=Test_Policy stateName=OnlyState triggerName=Test_InputEvent defaultTaskName=Test_Task +policy state output create name=Test_Policy stateName=OnlyState outputName=OnlyState2Out eventName=Test_OutputEvent +policy state taskref create name=Test_Policy stateName=OnlyState taskName=Test_Task outputType=DIRECT outputName=OnlyState2Out diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java new file mode 100644 index 000000000..43238d63d --- /dev/null +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java @@ -0,0 +1,103 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import static org.junit.Assert.assertEquals; + +import java.io.File; +import java.io.IOException; + +import org.junit.Test; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; +import org.onap.policy.apex.model.utilities.TextFileUtils; + +/** + * The Class TestCLIEditorEventsContext. + */ +public class TestCLIEditorEventsContext { + // CHECKSTYLE:OFF: MagicNumber + + /** + * Test java context model. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if an Apex error happens + */ + @Test + public void testJavaContextModel() throws IOException, ApexModelException { + final File tempLogFile = File.createTempFile("TestPolicyJavaEventsAndContext", ".log"); + final File tempModelFile = File.createTempFile("TestPolicyJavaEventsAndContext", ".json"); + + final String[] cliArgs = + new String[] {"-c", "src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex", "-l", + tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath()}; + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Get the model and log into strings + final String logString = TextFileUtils.getTextFileAsString(tempLogFile.getCanonicalPath()); + final String modelString = TextFileUtils.getTextFileAsString(tempModelFile.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int logCharCount = logString.replaceAll("\\s+", "").length(); + final int modelCharCount = modelString.replaceAll("\\s+", "").length(); + + assertEquals(25911, logCharCount); + assertEquals(46138, modelCharCount); + + tempLogFile.delete(); + tempModelFile.delete(); + } + + /** + * Test avro context model. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if an Apex error happens + */ + @Test + public void testAvroContextModel() throws IOException, ApexModelException { + final File tempLogFile = File.createTempFile("TestPolicyAvroEventsAndContext", ".log"); + final File tempModelFile = File.createTempFile("TestPolicyAvroEventsAndContext", ".json"); + + final String[] cliArgs = + new String[] {"-c", "src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex", "-l", + tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath()}; + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Get the model and log into strings + final String logString = TextFileUtils.getTextFileAsString(tempLogFile.getCanonicalPath()); + final String modelString = TextFileUtils.getTextFileAsString(tempModelFile.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int logCharCount = logString.replaceAll("\\s+", "").length(); + final int modelCharCount = modelString.replaceAll("\\s+", "").length(); + + assertEquals(30315, logCharCount); + assertEquals(52930, modelCharCount); + + tempLogFile.delete(); + tempModelFile.delete(); + } +} diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorOptions.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorOptions.java new file mode 100644 index 000000000..87618e18d --- /dev/null +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorOptions.java @@ -0,0 +1,277 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.PrintStream; + +import org.junit.Test; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; +import org.onap.policy.apex.model.utilities.TextFileUtils; + +/** + * The Class TestCLIEditorOptions. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class TestCLIEditorOptions { + // CHECKSTYLE:OFF: MagicNumber + + /** + * Test script options log model. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsLogModel() throws IOException, ApexModelException { + final File tempLogFile = File.createTempFile("ShellPolicyModel", ".log"); + final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json"); + + final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l", + tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath()}; + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Get the model and log into strings + final String logString = TextFileUtils.getTextFileAsString(tempLogFile.getCanonicalPath()); + final String modelString = TextFileUtils.getTextFileAsString(tempModelFile.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int logCharCount = logString.replaceAll("\\s+", "").length(); + final int modelCharCount = modelString.replaceAll("\\s+", "").length(); + + assertEquals(1204, logCharCount); + assertEquals(2924, modelCharCount); + + tempLogFile.delete(); + tempModelFile.delete(); + } + + /** + * Test script options no log no model spec. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsNoLogNoModelSpec() throws IOException, ApexModelException { + final File tempLogFile = File.createTempFile("ShellPolicyModel", ".log"); + final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json"); + + final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l", + tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nl", "-nm"}; + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Get the model and log into strings + final String logString = TextFileUtils.getTextFileAsString(tempLogFile.getCanonicalPath()); + final String modelString = TextFileUtils.getTextFileAsString(tempModelFile.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int logCharCount = logString.replaceAll("\\s+", "").length(); + final int modelCharCount = modelString.replaceAll("\\s+", "").length(); + + assertEquals(0, logCharCount); + assertEquals(0, modelCharCount); + + tempLogFile.delete(); + tempModelFile.delete(); + } + + /** + * Test script options log no model spec. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsLogNoModelSpec() throws IOException, ApexModelException { + final File tempLogFile = File.createTempFile("ShellPolicyModel", ".log"); + final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json"); + + final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l", + tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nm"}; + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Get the model and log into strings + final String logString = TextFileUtils.getTextFileAsString(tempLogFile.getCanonicalPath()); + final String modelString = TextFileUtils.getTextFileAsString(tempModelFile.getCanonicalPath()); + + System.err.println(modelString); + // As a sanity check, count the number of non white space characters in log and model files + final int logCharCount = logString.replaceAll("\\s+", "").length(); + final int modelCharCount = modelString.replaceAll("\\s+", "").length(); + + assertEquals(1204, logCharCount); + assertEquals(0, modelCharCount); + + tempLogFile.delete(); + tempModelFile.delete(); + } + + /** + * Test script options no log model spec. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsNoLogModelSpec() throws IOException, ApexModelException { + final File tempLogFile = File.createTempFile("ShellPolicyModel", ".log"); + final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json"); + + final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l", + tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nl"}; + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Get the model and log into strings + final String logString = TextFileUtils.getTextFileAsString(tempLogFile.getCanonicalPath()); + final String modelString = TextFileUtils.getTextFileAsString(tempModelFile.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int logCharCount = logString.replaceAll("\\s+", "").length(); + final int modelCharCount = modelString.replaceAll("\\s+", "").length(); + + assertEquals(0, logCharCount); + assertEquals(2924, modelCharCount); + + tempLogFile.delete(); + tempModelFile.delete(); + } + + /** + * Test script options no log no model no spec. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsNoLogNoModelNoSpec() throws IOException, ApexModelException { + final String[] cliArgs = + new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-nl", "-nm"}; + + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + System.setOut(new PrintStream(baos)); + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Cursor for log + assertFalse(baos.toString().contains(">")); + + // Curly bracket from JSON model + assertFalse(baos.toString().contains("{")); + } + + /** + * Test script options log model no spec. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsLogModelNoSpec() throws IOException, ApexModelException { + final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex"}; + + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + final PrintStream stdout = System.out; + System.setOut(new PrintStream(baos)); + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(cliArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Cursor for log + assertTrue(baos.toString().contains(">")); + + // Curly bracket from JSON model + assertTrue(baos.toString().contains("{")); + + System.setOut(stdout); + } + + /** + * Test script options input output model. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testScriptOptionsInputOutputModel() throws IOException, ApexModelException { + final File tempLogFileIn = File.createTempFile("ShellPolicyModelIn", ".log"); + final File tempLogFileOut = File.createTempFile("ShellPolicyModelOut", ".log"); + final File tempModelFileIn = File.createTempFile("ShellPolicyModelIn", ".json"); + final File tempModelFileOut = File.createTempFile("ShellPolicyModelOut", ".json"); + + // Generate input model + final String[] cliArgsIn = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", + "-l", tempLogFileIn.getAbsolutePath(), "-o", tempModelFileIn.getAbsolutePath()}; + + final ApexCLIEditorMain cliEditorIn = new ApexCLIEditorMain(cliArgsIn); + assertEquals(0, cliEditorIn.getErrorCount()); + + // Get the model and log into strings + final String tempLogFileInString = TextFileUtils.getTextFileAsString(tempLogFileIn.getCanonicalPath()); + final String tempModelFileInString = TextFileUtils.getTextFileAsString(tempModelFileIn.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int tempLogFileInCharCount = tempLogFileInString.replaceAll("\\s+", "").length(); + final int tempModelFileInCharCount = tempModelFileInString.replaceAll("\\s+", "").length(); + + assertEquals(1204, tempLogFileInCharCount); + assertEquals(2924, tempModelFileInCharCount); + + final String[] cliArgsOut = new String[] {"-i", tempModelFileIn.getAbsolutePath(), "-c", + "src/main/resources/examples/scripts/ShellPolicyModelAddSchema.apex", "-l", + tempLogFileOut.getAbsolutePath(), "-o", tempModelFileOut.getAbsolutePath()}; + + final ApexCLIEditorMain cliEditorOut = new ApexCLIEditorMain(cliArgsOut); + assertEquals(0, cliEditorOut.getErrorCount()); + + // Get the model and log into strings + final String tempLogFileOutString = TextFileUtils.getTextFileAsString(tempLogFileOut.getCanonicalPath()); + final String tempModelFileOutString = TextFileUtils.getTextFileAsString(tempModelFileOut.getCanonicalPath()); + + // As a sanity check, count the number of non white space characters in log and model files + final int tempLogFileOutCharCount = tempLogFileOutString.replaceAll("\\s+", "").length(); + final int tempModelFileOutCharCount = tempModelFileOutString.replaceAll("\\s+", "").length(); + + assertEquals(1154, tempLogFileOutCharCount); + assertEquals(3356, tempModelFileOutCharCount); + + tempLogFileIn.delete(); + tempModelFileIn.delete(); + tempLogFileOut.delete(); + tempModelFileOut.delete(); + } +} diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorScripting.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorScripting.java new file mode 100644 index 000000000..b57a72dab --- /dev/null +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorScripting.java @@ -0,0 +1,132 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.URL; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; +import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; +import org.onap.policy.apex.model.utilities.ResourceUtils; + +/** + * The Class TestCLIEditorScripting. + * + * @author Liam Fallon (liam.fallon@ericsson.com) + */ +public class TestCLIEditorScripting { + + private File tempModelFile; + private File tempLogFile; + + private String[] sampleLBPolicyArgs; + + private String[] sampleLBPolicyMapArgs; + + /** + * Initialise args. + * + * @throws IOException Signals that an I/O exception has occurred. + */ + @Before + public void initialiseArgs() throws IOException { + tempModelFile = File.createTempFile("SampleLBPolicyMap", ".json"); + tempLogFile = File.createTempFile("SampleLBPolicyMap", ".log"); + + sampleLBPolicyArgs = new String[] {"-c", "src/test/resources/scripts/SampleLBPolicy.apex", "-o", + tempModelFile.getAbsolutePath(), "-l", tempLogFile.getAbsolutePath()}; + + sampleLBPolicyMapArgs = new String[] {"-c", "src/test/resources/scripts/SampleLBPolicy_WithMap.apex", "-o", + tempModelFile.getAbsolutePath(), "-l", tempLogFile.getAbsolutePath()}; + } + + /** + * Removes the generated files. + */ + @After + public void removeGeneratedFiles() { + tempModelFile.delete(); + tempLogFile.delete(); + } + + /** + * Test sample Fuzzy LB policy script. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testSampleLBPolicyScript() throws IOException, ApexModelException { + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(sampleLBPolicyArgs); + assertEquals(0, cliEditor.getErrorCount()); + + // Read the file from disk + final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); + + final URL writtenModelURL = ResourceUtils.getLocalFile(tempModelFile.getCanonicalPath()); + final AxPolicyModel writtenModel = modelReader.read(writtenModelURL.openStream()); + + final URL compareModelURL = + ResourceUtils.getLocalFile("src/test/resources/compare/FuzzyPolicyModel_Compare.json"); + final AxPolicyModel compareModel = modelReader.read(compareModelURL.openStream()); + + // Ignore key info UUIDs + writtenModel.getKeyInformation().getKeyInfoMap().clear(); + compareModel.getKeyInformation().getKeyInfoMap().clear(); + + assertTrue(writtenModel.equals(compareModel)); + } + + /** + * Test sample Fuzzy LB map policy script. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testSampleLBMapPolicyScript() throws IOException, ApexModelException { + tempModelFile.delete(); + + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(sampleLBPolicyMapArgs); + assertEquals(0, cliEditor.getErrorCount()); + + assertTrue(tempModelFile.isFile()); + + // Read the file from disk + final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); + + final URL writtenModelURL = ResourceUtils.getLocalFile(tempModelFile.getCanonicalPath()); + final AxPolicyModel writtenModel = modelReader.read(writtenModelURL.openStream()); + + final AxValidationResult validationResult = new AxValidationResult(); + writtenModel.validate(validationResult); + assertEquals(AxValidationResult.ValidationResult.OBSERVATION, validationResult.getValidationResult()); + } +} diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestContextAlbums.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestContextAlbums.java new file mode 100644 index 000000000..59b2f2471 --- /dev/null +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestContextAlbums.java @@ -0,0 +1,93 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.URL; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; +import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; +import org.onap.policy.apex.model.utilities.ResourceUtils; + +public class TestContextAlbums { + private String[] logicBlockArgs; + + private File tempModelFile; + + @Before + public void createTempFiles() throws IOException { + tempModelFile = File.createTempFile("TestPolicyModel", ".json"); + + logicBlockArgs = new String[] { + "-c", + "src/test/resources/scripts/ContextAlbums.apex", + "-o", + tempModelFile.getAbsolutePath(), + "-nl" + }; + } + + /** + * Removes the generated models. + */ + @After + public void removeGeneratedModels() { + tempModelFile.delete(); + } + + /** + * Test logic block. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testLogicBlock() throws IOException, ApexModelException { + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(logicBlockArgs); + assertEquals(1, cliEditor.getErrorCount()); + + // Read the file from disk + final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); + modelReader.setValidateFlag(false); + + final URL writtenModelURL = ResourceUtils.getLocalFile(tempModelFile.getCanonicalPath()); + final AxPolicyModel writtenModel = modelReader.read(writtenModelURL.openStream()); + assertNotNull(writtenModel); + + final URL compareModelURL = ResourceUtils.getLocalFile("src/test/resources/compare/ContextAlbumsModel_Compare.json"); + final AxPolicyModel compareModel = modelReader.read(compareModelURL.openStream()); + + // Ignore key info UUIDs + writtenModel.getKeyInformation().getKeyInfoMap().clear(); + compareModel.getKeyInformation().getKeyInfoMap().clear(); + + assertTrue(writtenModel.equals(compareModel)); + } +} diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestFileMacro.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestFileMacro.java new file mode 100644 index 000000000..e102bd2fd --- /dev/null +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestFileMacro.java @@ -0,0 +1,115 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.nio.file.Paths; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; +import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; +import org.onap.policy.apex.model.utilities.ResourceUtils; +import org.onap.policy.apex.model.utilities.TextFileUtils; + +/** + * Test FileMacro in the CLI. + */ +public class TestFileMacro { + private String[] fileMacroArgs; + + private File tempModelFile; + private File tempLogFile; + + @Before + public void createTempFiles() throws IOException { + tempModelFile = File.createTempFile("TestPolicyModel", ".json"); + tempLogFile = File.createTempFile("TestPolicyModel", ".log"); + + fileMacroArgs = new String[] { + "-c", + "src/test/resources/scripts/FileMacro.apex", + "-l", + tempLogFile.getCanonicalPath(), + "-o", + tempModelFile.getCanonicalPath(), + "-if", + "true" + }; + } + + @After + public void removeGeneratedModels() { + tempModelFile.delete(); + } + + /** + * Test logic block macro in CLI scripts. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testLogicBlock() throws IOException, ApexModelException { + final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(fileMacroArgs); + // We expect eight errors + assertEquals(8, cliEditor.getErrorCount()); + + // Read the file from disk + final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); + modelReader.setValidateFlag(false); + + final URL writtenModelURL = ResourceUtils.getLocalFile(tempModelFile.getCanonicalPath()); + final AxPolicyModel writtenModel = modelReader.read(writtenModelURL.openStream()); + + final URL compareModelURL = ResourceUtils.getLocalFile("src/test/resources/compare/FileMacroModel_Compare.json"); + final AxPolicyModel compareModel = modelReader.read(compareModelURL.openStream()); + + // Ignore key info UUIDs + writtenModel.getKeyInformation().getKeyInfoMap().clear(); + compareModel.getKeyInformation().getKeyInfoMap().clear(); + + assertTrue(writtenModel.equals(compareModel)); + + // The output event is in this file + final File outputLogFile = new File(tempLogFile.getCanonicalPath()); + + final String outputLogString = TextFileUtils + .getTextFileAsString(outputLogFile.getCanonicalPath()) + .replace(Paths.get("").toAbsolutePath().toString() + File.separator, "") + .replaceAll("\\s+", ""); + + // We compare the log to what we expect to get + final String outputLogCompareString = TextFileUtils + .getTextFileAsString("src/test/resources/compare/FileMacro_Compare.log") + .replaceAll("\\s+", ""); + + // Check what we got is what we expected to get + assertEquals(outputLogCompareString, outputLogString); + } +} diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestLogicBlock.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestLogicBlock.java new file mode 100644 index 000000000..2fe63fcf8 --- /dev/null +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestLogicBlock.java @@ -0,0 +1,117 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.auth.clieditor; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.URL; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; +import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; +import org.onap.policy.apex.model.utilities.ResourceUtils; + +public class TestLogicBlock { + private String[] logicBlockArgs; + private String[] avroSchemaArgs; + + private File tempLogicModelFile; + private File tempAvroModelFile; + + @Before + public void createTempFiles() throws IOException { + tempLogicModelFile = File.createTempFile("TestLogicPolicyModel", ".json"); + tempAvroModelFile = File.createTempFile("TestAvroPolicyModel", ".json"); + + logicBlockArgs = new String[] {"-c", "src/test/resources/scripts/LogicBlock.apex", "-o", + tempLogicModelFile.getCanonicalPath(), "-if", "true", "-nl"}; + + avroSchemaArgs = new String[] {"-c", "src/test/resources/scripts/AvroSchema.apex", "-o", + tempAvroModelFile.getCanonicalPath(), "-nl"}; + } + + @After + public void removeTempFiles() { + tempLogicModelFile.delete(); + tempAvroModelFile.delete(); + } + + /** + * Test logic block. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testLogicBlock() throws IOException, ApexModelException { + new ApexCLIEditorMain(logicBlockArgs); + + // Read the file from disk + final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); + modelReader.setValidateFlag(false); + + final URL writtenModelURL = ResourceUtils.getLocalFile(tempLogicModelFile.getCanonicalPath()); + final AxPolicyModel writtenModel = modelReader.read(writtenModelURL.openStream()); + + final URL compareModelURL = + ResourceUtils.getLocalFile("src/test/resources/compare/LogicBlockModel_Compare.json"); + final AxPolicyModel compareModel = modelReader.read(compareModelURL.openStream()); + + // Ignore key info UUIDs + writtenModel.getKeyInformation().getKeyInfoMap().clear(); + compareModel.getKeyInformation().getKeyInfoMap().clear(); + + assertTrue(writtenModel.equals(compareModel)); + } + + /** + * Test avro schema. + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws ApexModelException if there is an Apex error + */ + @Test + public void testAvroSchema() throws IOException, ApexModelException { + new ApexCLIEditorMain(avroSchemaArgs); + + // Read the file from disk + final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); + modelReader.setValidateFlag(false); + + final URL writtenModelURL = ResourceUtils.getLocalFile(tempAvroModelFile.getCanonicalPath()); + final AxPolicyModel writtenModel = modelReader.read(writtenModelURL.openStream()); + + final URL compareModelURL = + ResourceUtils.getLocalFile("src/test/resources/compare/AvroSchemaModel_Compare.json"); + final AxPolicyModel compareModel = modelReader.read(compareModelURL.openStream()); + + // Ignore key info UUIDs + writtenModel.getKeyInformation().getKeyInfoMap().clear(); + compareModel.getKeyInformation().getKeyInfoMap().clear(); + + assertTrue(writtenModel.equals(compareModel)); + } +} diff --git a/auth/cli-editor/src/test/resources/compare/AvroSchemaModel_Compare.json b/auth/cli-editor/src/test/resources/compare/AvroSchemaModel_Compare.json new file mode 100644 index 000000000..bea9ff97f --- /dev/null +++ b/auth/cli-editor/src/test/resources/compare/AvroSchemaModel_Compare.json @@ -0,0 +1,239 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "AvroSchemaPolicy", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "AvroSchemaPolicy_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "AvroSchemaPolicy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy", + "version" : "0.0.1" + }, + "UUID" : "9964f7a9-06fb-4a35-96d3-316bf625414b", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy:0.0.1\"" + } + }, { + "key" : { + "name" : "AvroSchemaPolicy_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy_Albums", + "version" : "0.0.1" + }, + "UUID" : "d67c4a9f-f307-472c-b4a7-21f0d3db1563", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "AvroSchemaPolicy_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy_Events", + "version" : "0.0.1" + }, + "UUID" : "b7bf6461-f656-48d8-9f4f-fd252f842021", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "AvroSchemaPolicy_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "3f8c3400-40cd-4450-b0bc-01bcdeacfbe2", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "AvroSchemaPolicy_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy_Policies", + "version" : "0.0.1" + }, + "UUID" : "f321d8e8-d8d6-43fc-adf3-c22d25668068", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "AvroSchemaPolicy_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy_Schemas", + "version" : "0.0.1" + }, + "UUID" : "804587e0-ae28-476b-83c1-db1fbd948465", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "AvroSchemaPolicy_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "AvroSchemaPolicy_Tasks", + "version" : "0.0.1" + }, + "UUID" : "d7bc0088-20a0-46dc-b7fd-d1bd06a1115e", + "description" : "Generated description for concept referred to by key \"AvroSchemaPolicy_Tasks:0.0.1\"" + } + }, { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "UUID" : "a5dd9412-1b95-4a13-91e6-823d7b8806e8", + "description" : "Generated description for concept referred to by key \"SchemaLogicTest:0.0.1\"" + } + }, { + "key" : { + "name" : "Test_InputEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Test_InputEvent", + "version" : "0.0.1" + }, + "UUID" : "c2f49864-bd50-42c2-9d20-8af67c59a073", + "description" : "Generated description for concept referred to by key \"Test_InputEvent:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "AvroSchemaPolicy_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ ] + } + }, + "tasks" : { + "key" : { + "name" : "AvroSchemaPolicy_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ ] + } + }, + "events" : { + "key" : { + "name" : "AvroSchemaPolicy_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ { + "key" : { + "name" : "Test_InputEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Test_InputEvent", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apex.test", + "source" : "External", + "target" : "Apex", + "parameter" : { + "entry" : [ { + "key" : "AAA", + "value" : { + "key" : "AAA", + "fieldSchemaKey" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "optional" : false + } + }, { + "key" : "BBB", + "value" : { + "key" : "BBB", + "fieldSchemaKey" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "optional" : true + } + }, { + "key" : "CCC", + "value" : { + "key" : "CCC", + "fieldSchemaKey" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + } + } + } ] + } + }, + "albums" : { + "key" : { + "name" : "AvroSchemaPolicy_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ ] + } + }, + "schemas" : { + "key" : { + "name" : "AvroSchemaPolicy_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "schemaFlavour" : "Avro", + "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"VPNActEvent\",\n \"namespace\" : \"org.onap.policy.apex.domains.vpn.events\",\n \"fields\" : [\n {\"name\": \"nameSpace\", \"type\": \"string\"},\n {\"name\": \"name\", \"type\": \"string\"},\n {\"name\": \"version\", \"type\": \"string\"},\n {\"name\": \"source\", \"type\": \"string\"},\n {\"name\": \"target\", \"type\": \"string\"},\n {\"name\": \"LinkMap\", \"type\": {\n \"type\" : \"record\",\n \"name\" : \"LinkMap\",\n \"namespace\" : \"org.onap.policy.apex.domains.vpn\",\n \"fields\" : [ ]\n }\n },\n {\"name\": \"CustomerMap\", \"type\": {\n \"type\" : \"record\",\n \"name\" : \"CustomerMap\",\n \"namespace\" : \"org.onap.policy.apex.domains.vpn\",\n \"fields\" : [ ]\n }\n }\n ]\n}" + } + } ] + } + } + } +}
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/compare/ContextAlbumsModel_Compare.json b/auth/cli-editor/src/test/resources/compare/ContextAlbumsModel_Compare.json new file mode 100644 index 000000000..3af04cd1e --- /dev/null +++ b/auth/cli-editor/src/test/resources/compare/ContextAlbumsModel_Compare.json @@ -0,0 +1,1625 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "Adj_CM_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adj_CM_type", + "version" : "0.0.1" + }, + "UUID" : "079f22b3-ae0f-4021-b3b2-4c30d30a62b2", + "description" : "Generated description for concept referred to by key \"Adj_CM_type:0.0.1\"" + } + }, { + "key" : { + "name" : "Adj_KPI_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adj_KPI_type", + "version" : "0.0.1" + }, + "UUID" : "b30510dc-980b-4425-8629-d564602245bb", + "description" : "Generated description for concept referred to by key \"Adj_KPI_type:0.0.1\"" + } + }, { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "UUID" : "0e1c57df-6e40-4610-9e47-c481615c2b4b", + "description" : "Generated description for concept referred to by key \"Adjacency_4G_Name_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellA_CM_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_CM_type", + "version" : "0.0.1" + }, + "UUID" : "cc342ac1-6e79-420f-afe1-7968fc0dc2b6", + "description" : "Generated description for concept referred to by key \"CellA_CM_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellA_KPI_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_KPI_type", + "version" : "0.0.1" + }, + "UUID" : "879f7be0-07ff-4511-9016-2b80021cf10f", + "description" : "Generated description for concept referred to by key \"CellA_KPI_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "UUID" : "a06af82c-d298-4531-b1eb-68795573c82a", + "description" : "Generated description for concept referred to by key \"CellA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellB_CM_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_CM_type", + "version" : "0.0.1" + }, + "UUID" : "b357ec78-e469-43aa-9bc9-29097108c10b", + "description" : "Generated description for concept referred to by key \"CellB_CM_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellB_KPI_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_KPI_type", + "version" : "0.0.1" + }, + "UUID" : "b89da6a0-1e86-4393-a5e0-7f1a24b34f62", + "description" : "Generated description for concept referred to by key \"CellB_KPI_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "UUID" : "fc1922ed-b8a3-4544-9cd9-4f0400b92af8", + "description" : "Generated description for concept referred to by key \"CellB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "UUID" : "f437e1ad-27d9-4b55-b961-46ca6750288b", + "description" : "Generated description for concept referred to by key \"ENABLE_CONGESTION_type:0.0.1\"" + } + }, { + "key" : { + "name" : "ExternalBag0", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag0", + "version" : "0.0.1" + }, + "UUID" : "938c0553-51ec-4846-bae1-972ed3c4d552", + "description" : "Generated description for concept referred to by key \"ExternalBag0:0.0.1\"" + } + }, { + "key" : { + "name" : "ExternalBag1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag1", + "version" : "0.0.1" + }, + "UUID" : "a631e868-7da5-4378-9cbd-a3d06dee3c81", + "description" : "Generated description for concept referred to by key \"ExternalBag1:0.0.1\"" + } + }, { + "key" : { + "name" : "ExternalBag2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag2", + "version" : "0.0.1" + }, + "UUID" : "ee693749-0d79-49ac-9027-19056b44d5ce", + "description" : "Generated description for concept referred to by key \"ExternalBag2:0.0.1\"" + } + }, { + "key" : { + "name" : "ExternalBag3", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag3", + "version" : "0.0.1" + }, + "UUID" : "ef711a31-c366-4184-8178-f3fa95f8d2cb", + "description" : "Generated description for concept referred to by key \"ExternalBag3:0.0.1\"" + } + }, { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "UUID" : "300185af-a93a-4e90-ae7d-44d9241d2760", + "description" : "Generated description for concept referred to by key \"FREQ_REL_TYPE_type:0.0.1\"" + } + }, { + "key" : { + "name" : "FooBar_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "FooBar_type", + "version" : "0.0.1" + }, + "UUID" : "bc32c94f-d2d0-4dfb-b5bb-6dac8aa19618", + "description" : "Generated description for concept referred to by key \"FooBar_type:0.0.1\"" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "3649128f-db51-47fd-9d6c-e78e8ca0f26b", + "description" : "Generated description for concept referred to by key \"HO_EXEC_FAIL_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "a089892e-5914-4375-879d-05cdad521c94", + "description" : "Generated description for concept referred to by key \"HO_EXEC_FAIL_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "UUID" : "567f0726-593f-4093-bab4-cf9a0eb4541f", + "description" : "Generated description for concept referred to by key \"LOW_CQI_SAMPLES_RATE_HO_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "UUID" : "75f08508-b4f3-40bd-a171-224da6e6f132", + "description" : "Generated description for concept referred to by key \"LOW_CQI_SAMPLES_RATE_HO_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "UUID" : "0a1fef5c-14f3-4357-a128-339e2515bd0a", + "description" : "Generated description for concept referred to by key \"LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "UUID" : "06227743-177e-49fe-9ed7-587e878b57f9", + "description" : "Generated description for concept referred to by key \"LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel", + "version" : "0.0.1" + }, + "UUID" : "5cc28437-d07a-4cd1-a223-38360763ac77", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Albums", + "version" : "0.0.1" + }, + "UUID" : "cad40903-a798-42a1-94f6-84d290c646de", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Events", + "version" : "0.0.1" + }, + "UUID" : "0f44b5c9-22a4-4873-aaa1-f1b80de5aa4b", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "5db641cb-d898-4f67-9f64-7dde5ecb12ae", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Policies", + "version" : "0.0.1" + }, + "UUID" : "f12f6531-bf2f-4c70-b4fe-346d945e52f1", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "UUID" : "f0e76392-4541-4fdf-910b-bbf4ee19ff2c", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "UUID" : "c65233c8-634a-4729-8d74-69061cd62c51", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Tasks:0.0.1\"" + } + }, { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "UUID" : "a6444cc9-b507-4567-981b-c80cf7a4f438", + "description" : "Generated description for concept referred to by key \"OCN_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "UUID" : "d7a7d62a-d374-4ec4-a6e5-9a272470b161", + "description" : "Generated description for concept referred to by key \"OCN_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "UUID" : "9ba290d5-c39d-45f0-b18e-0747829eec29", + "description" : "Generated description for concept referred to by key \"PDCCH_CCE_HIGH_LOAD_DELTA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "97f57551-7173-4ac7-9d1a-1582d2fc74a2", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "ab468764-2672-4b6c-b25e-3f65ee92871e", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "UUID" : "eb6d0c05-df8c-4b4c-83b3-5807cf7a0a8d", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_HIGH_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "UUID" : "8476c5a3-612a-4dc0-aad1-ed136322eea7", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_HIGH_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "UUID" : "22564698-5c73-442c-8c44-c7bf9a124bbb", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_LOW_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "UUID" : "09c76386-9d9c-42ce-b969-c85d8e60fd6b", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_LOW_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "UUID" : "ca221793-e153-49d2-8c14-6fec2c294159", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_AB_IN_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "UUID" : "93d6d2c2-b98e-4c9a-9841-22858ced9ca9", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "UUID" : "9fb35bc3-cf7d-4516-b643-4d90315f4aac", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_BA_IN_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "UUID" : "18975ab6-836c-4901-9ae2-e189e0277343", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "1c28ffda-7661-4af7-a60d-e01a8d8bad4d", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "40bc34bb-9ef0-4763-9f73-1cb915bc316d", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "UUID" : "1603fb66-0c15-4ccb-9c1a-3d4c88fe0501", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_HIGH_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "UUID" : "dbc0cd42-4d58-4a1c-a41f-4b0e3c039fc0", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_HIGH_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "UUID" : "f22a8dbc-e6d7-4a9f-8702-a4cbe41f6e54", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_LOW_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "UUID" : "6445553b-73e6-43b5-b29d-b1bdf6df73cc", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_LOW_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "6f374a84-bafa-413f-a3ae-32e446646fe9", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "521fb432-25b7-499f-80ff-1a0b7bad69a2", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "UUID" : "32488185-fc0f-45e4-84e3-adcbfb9adf83", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_HIGH_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "UUID" : "cbdfec23-6f95-4b92-8939-3a32603db654", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_HIGH_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "UUID" : "b9089519-42a0-4564-9388-e841ec53033b", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_LOW_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "UUID" : "6e8bc992-2a75-4121-8246-38995e9caf0c", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_LOW_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "UUID" : "31107997-a363-4a69-a322-82e3e0fd5dd2", + "description" : "Generated description for concept referred to by key \"RRC_CONGESTION_DELTA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "UUID" : "30401bd4-108c-4a99-9446-6c6a4b226de7", + "description" : "Generated description for concept referred to by key \"SB_OCN_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "UUID" : "88647bbf-111b-4a17-8383-e437c7d45af4", + "description" : "Generated description for concept referred to by key \"SB_OCN_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "UUID" : "0f772d7a-1386-438b-95c0-dbbc05b78183", + "description" : "Generated description for concept referred to by key \"SET_TYPE_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "0eb28504-3bcf-44a3-8ceb-2bbea3bfc93c", + "description" : "Generated description for concept referred to by key \"TOO_EARLY_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "d940ffd6-c000-4c28-b37b-658e432dbe11", + "description" : "Generated description for concept referred to by key \"TOO_EARLY_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "d01604b4-aeb4-49af-bde3-ad8ed9366e62", + "description" : "Generated description for concept referred to by key \"TOO_LATE_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "0ce0d4a3-65ce-4b05-8aca-ddae63a2639b", + "description" : "Generated description for concept referred to by key \"TOO_LATE_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TimeStamp_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TimeStamp_type", + "version" : "0.0.1" + }, + "UUID" : "2fbaea79-62fb-44ce-9810-8bd2d2fd77f9", + "description" : "Generated description for concept referred to by key \"TimeStamp_type:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ ] + } + }, + "tasks" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ ] + } + }, + "events" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ ] + } + }, + "albums" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ { + "key" : { + "name" : "ExternalBag0", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag0", + "version" : "0.0.1" + }, + "scope" : "EXTERNAL", + "isWritable" : false, + "itemSchema" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : { + "name" : "ExternalBag1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag1", + "version" : "0.0.1" + }, + "scope" : "EXTERNAL", + "isWritable" : false, + "itemSchema" : { + "name" : "CellA_CM_type", + "version" : "0.0.1" + } + } + }, { + "key" : { + "name" : "ExternalBag2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag2", + "version" : "0.0.1" + }, + "scope" : "EXTERNAL", + "isWritable" : false, + "itemSchema" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : { + "name" : "ExternalBag3", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ExternalBag3", + "version" : "0.0.1" + }, + "scope" : "EXTERNAL", + "isWritable" : false, + "itemSchema" : { + "name" : "FooBar_type", + "version" : "0.0.1" + } + } + } ] + } + }, + "schemas" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "Adj_CM_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adj_CM_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.util.HashMap<String,String>" + } + }, { + "key" : { + "name" : "Adj_KPI_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adj_KPI_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.util.HashMap<String,String>" + } + }, { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "CellA_CM_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_CM_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.util.HashMap<String,String>" + } + }, { + "key" : { + "name" : "CellA_KPI_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_KPI_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.util.HashMap<String,String>" + } + }, { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "CellB_CM_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_CM_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.util.HashMap<String,String>" + } + }, { + "key" : { + "name" : "CellB_KPI_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_KPI_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.util.HashMap<String,String>" + } + }, { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "FooBar_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "FooBar_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "org.onap.policy.apex.sample.sampletypes.sampletypes.Foo" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Double" + } + }, { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Double" + } + }, { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TimeStamp_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TimeStamp_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Long" + } + } ] + } + } + } +}
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/compare/FileMacroModel_Compare.json b/auth/cli-editor/src/test/resources/compare/FileMacroModel_Compare.json new file mode 100644 index 000000000..5a8796b14 --- /dev/null +++ b/auth/cli-editor/src/test/resources/compare/FileMacroModel_Compare.json @@ -0,0 +1,361 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "MacroFileTest_PolicyModel", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "MacroFileTest_PolicyModel", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel", + "version" : "0.0.1" + }, + "UUID" : "ac575ca5-e2f5-3958-8873-f6068cd04440", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFileTest_PolicyModel_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Albums", + "version" : "0.0.1" + }, + "UUID" : "a8864eb8-4f01-3b39-aaf8-2170311132e1", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFileTest_PolicyModel_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Events", + "version" : "0.0.1" + }, + "UUID" : "bd50051c-0761-38b0-940f-27d9d505c263", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFileTest_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "81634b5c-d5d8-3c15-a80b-d9a12bd87760", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFileTest_PolicyModel_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Policies", + "version" : "0.0.1" + }, + "UUID" : "810268e3-6a5a-33c9-b24e-4206646cdace", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFileTest_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "UUID" : "f8f180ee-551d-30b7-850b-d707318cf25e", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFileTest_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "UUID" : "ef8c00a8-3736-3e6d-be31-c07116ba67e4", + "description" : "Generated description for concept referred to by key \"MacroFileTest_PolicyModel_Tasks:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFile_type1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type1", + "version" : "0.0.1" + }, + "UUID" : "a2841e1e-e6da-3124-ab58-be301457f49c", + "description" : "Generated description for concept referred to by key \"MacroFile_type1:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFile_type2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type2", + "version" : "0.0.1" + }, + "UUID" : "d4b061be-9c01-3983-951b-8e28bb838a7c", + "description" : "Generated description for concept referred to by key \"MacroFile_type2:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFile_type3", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type3", + "version" : "0.0.1" + }, + "UUID" : "5da3c65c-bc46-3d84-a080-875b67e9a546", + "description" : "Generated description for concept referred to by key \"MacroFile_type3:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFile_type4", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type4", + "version" : "0.0.1" + }, + "UUID" : "19d7bb93-22af-34e3-a8ff-e715fdda265e", + "description" : "Generated description for concept referred to by key \"MacroFile_type4:0.0.1\"" + } + }, { + "key" : { + "name" : "MacroFile_type5", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type5", + "version" : "0.0.1" + }, + "UUID" : "15039345-454e-3c11-9524-5e5d149394dc", + "description" : "Generated description for concept referred to by key \"MacroFile_type5:0.0.1\"" + } + }, { + "key" : { + "name" : "dummyTask1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "dummyTask1", + "version" : "0.0.1" + }, + "UUID" : "41045520-f99e-3f78-8ac8-ebba16b94a98", + "description" : "Generated description for concept referred to by key \"dummyTask1:0.0.1\"" + } + }, { + "key" : { + "name" : "dummyTask2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "dummyTask2", + "version" : "0.0.1" + }, + "UUID" : "e366e97f-b769-394a-b388-4ad65e105ccb", + "description" : "Generated description for concept referred to by key \"dummyTask2:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ ] + } + }, + "tasks" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ { + "key" : { + "name" : "dummyTask1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "dummyTask1", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "JAVASCRIPT", + "logic" : "var returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);" + } + } + }, { + "key" : { + "name" : "dummyTask2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "dummyTask2", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "JAVASCRIPT", + "logic" : "x=x+1\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\n\nx=x+1\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\n\nx=x+1" + } + } + } ] + } + }, + "events" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ ] + } + }, + "albums" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ ] + } + }, + "schemas" : { + "key" : { + "name" : "MacroFileTest_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "MacroFile_type1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type1", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "MacroFile_type2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type2", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "MacroFile_type3", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type3", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "MacroFile_type4", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type4", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "MacroFile_type5", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "MacroFile_type5", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + } ] + } + } + } +} diff --git a/auth/cli-editor/src/test/resources/compare/FileMacro_Compare.log b/auth/cli-editor/src/test/resources/compare/FileMacro_Compare.log new file mode 100644 index 000000000..fd1b4173f --- /dev/null +++ b/auth/cli-editor/src/test/resources/compare/FileMacro_Compare.log @@ -0,0 +1,77 @@ +/root>#------------------------------------------------------------------------------- +/root># ============LICENSE_START======================================================= +/root># Copyright (C) 2016-2018 Ericsson. All rights reserved. +/root># ================================================================================ +/root># Licensed under the Apache License, Version 2.0 (the "License"); +/root># you may not use this file except in compliance with the License. +/root># You may obtain a copy of the License at +/root># +/root># http://www.apache.org/licenses/LICENSE-2.0 +/root># +/root># Unless required by applicable law or agreed to in writing, software +/root># distributed under the License is distributed on an "AS IS" BASIS, +/root># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/root># See the License for the specific language governing permissions and +/root># limitations under the License. +/root># +/root># SPDX-License-Identifier: Apache-2.0 +/root># ============LICENSE_END========================================================= +/root>#------------------------------------------------------------------------------- +/root> +/root> model create name=MacroFileTest_PolicyModel +result: SUCCESS + +/root> schema create name=MacroFile_type1 flavour=Java schema=java.lang.String +result: SUCCESS + +/root> macro file name "src/test/resources/macros/MacroFile0.apexmacro" must exist and be quoted with double quotes "" +/root> macro file name "src/test/resources/macros/MacroFile0.apexmacro" must exist and be quoted with double quotes "" +/root> macro file name """ must exist and be quoted with double quotes "" +/root> macro file name ""src/test/resources/macros/MacroFile1.apexmacro" must exist and be quoted with double quotes "" +/root> schema create name=MacroFile_type2 flavour=Java schema=java.lang.String +result: SUCCESS + +/root> schema create name=MacroFile_type3 flavour=Java schema=java.lang.String +result: SUCCESS + +/root> schema create name=MacroFile_type4 flavour=Java schema=java.lang.String # This is a comment +result: SUCCESS + +/root> macro file name "" must exist and be quoted with double quotes "" +/root> macro file name "" must exist and be quoted with double quotes "" +/root> #MACROFILE +/root> MACROFILE: +first command word is not alphanumeric or is not a command: MACROFILE: +/root> file "src/test/resources/macros/MacroFileNonExistant.ApexMacro" specified in Macro File Tag not found +/root> schema create schema create name=MacroFile_type5 flavour=Java schema=java.lang.String +result: SUCCESS + +/root> +/root> task create name=dummyTask1 +result: SUCCESS + +/root> task logic create name=dummyTask1 logicFlavour=JAVASCRIPT logic=LS +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); + +LE +result: SUCCESS + +/root> +/root> task create name=dummyTask2 +result: SUCCESS + +/root> task logic create name=dummyTask2 logicFlavour=JAVASCRIPT logic=LS +x=x+1 +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); + +x=x+1 +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); + +x=x+1 +LE +result: SUCCESS + +/root>
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/compare/FuzzyPolicyModel_Compare.json b/auth/cli-editor/src/test/resources/compare/FuzzyPolicyModel_Compare.json new file mode 100644 index 000000000..84874d428 --- /dev/null +++ b/auth/cli-editor/src/test/resources/compare/FuzzyPolicyModel_Compare.json @@ -0,0 +1,3897 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "UUID" : "fa58e9cd-488e-4eec-9ccb-e156f6a43a35", + "description" : "Generated description for concept referred to by key \"Adjacency_4G_Name_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "UUID" : "c41e1e24-ab71-4dbd-a2b7-7d349bade884", + "description" : "Generated description for concept referred to by key \"CellA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "UUID" : "f2d43289-fcf7-4c9c-a186-ecd2d49fafa9", + "description" : "Generated description for concept referred to by key \"CellB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "UUID" : "a2217f20-97fd-457e-8f28-30bf0c02068f", + "description" : "Generated description for concept referred to by key \"ENABLE_CONGESTION_type:0.0.1\"" + } + }, { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "UUID" : "628be116-99bb-4c8f-a833-94a452f6a582", + "description" : "Generated description for concept referred to by key \"FREQ_REL_TYPE_type:0.0.1\"" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "37c742ed-f039-48eb-a20d-2931940f4bf1", + "description" : "Generated description for concept referred to by key \"HO_EXEC_FAIL_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "29c1077f-c382-4520-80b8-9d0ddad7547a", + "description" : "Generated description for concept referred to by key \"HO_EXEC_FAIL_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "UUID" : "0de782d4-f6d7-42f1-b3e4-fbc3d917a68b", + "description" : "Generated description for concept referred to by key \"LOW_CQI_SAMPLES_RATE_HO_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "UUID" : "d81522cd-b143-4a0c-aedb-271725fc2506", + "description" : "Generated description for concept referred to by key \"LOW_CQI_SAMPLES_RATE_HO_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "UUID" : "828e3584-d194-48d1-8a49-45afb8b0cd5d", + "description" : "Generated description for concept referred to by key \"LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "UUID" : "88d9aaec-c2de-47d1-9264-4318e76ebdee", + "description" : "Generated description for concept referred to by key \"LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_InputEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_InputEvent", + "version" : "0.0.1" + }, + "UUID" : "f99b46f4-42fa-4873-a3f0-663ef950e917", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_InputEvent:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_OutputEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_OutputEvent", + "version" : "0.0.1" + }, + "UUID" : "90d481b5-d0df-4167-a14b-6c1fd9ee4a4c", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_OutputEvent:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Policy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Policy", + "version" : "0.0.1" + }, + "UUID" : "26c27f19-c56f-4ddc-8561-bfa1a89dc9db", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_Policy:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel", + "version" : "0.0.1" + }, + "UUID" : "aeb5ab2b-0b60-41ac-889d-787e3b59fd19", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Albums", + "version" : "0.0.1" + }, + "UUID" : "b72eb47e-6b70-419c-ba8d-1ed55a91aa2f", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Events", + "version" : "0.0.1" + }, + "UUID" : "952468c2-386e-4984-9f46-8c84208ad9bc", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "0e7c3475-8fbc-446d-afbe-d54ae56fc0ee", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Policies", + "version" : "0.0.1" + }, + "UUID" : "c2130341-3a43-41ae-a942-5aeba3f86724", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "UUID" : "09dd200b-9280-4f27-a85a-fab9fa276586", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "UUID" : "4eb61362-ef5b-454e-b540-e1301df8108b", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_PolicyModel_Tasks:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task", + "version" : "0.0.1" + }, + "UUID" : "76e762b7-8fdf-4d02-b4f3-60bf340997fd", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_Task:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Post", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Post", + "version" : "0.0.1" + }, + "UUID" : "3252ff86-02ee-4561-a818-4c7a12546045", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_Task_Post:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Pre", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Pre", + "version" : "0.0.1" + }, + "UUID" : "c4fde272-52f0-4ac0-a37b-a25aa043e122", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_Task_Pre:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_fromFuzzy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_fromFuzzy", + "version" : "0.0.1" + }, + "UUID" : "54b771b4-11af-43eb-94a2-d97e8b585515", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_fromFuzzy:0.0.1\"" + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_toFuzzy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_toFuzzy", + "version" : "0.0.1" + }, + "UUID" : "960205cd-3cf1-4e90-a456-a0ac59bb06d5", + "description" : "Generated description for concept referred to by key \"LoadBalancingFuzzyPolicy_toFuzzy:0.0.1\"" + } + }, { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "UUID" : "0cb3cebd-9f7e-40b6-be2b-83da8a3bb249", + "description" : "Generated description for concept referred to by key \"OCN_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "UUID" : "db41babb-500e-4369-acea-26b312de47c3", + "description" : "Generated description for concept referred to by key \"OCN_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "UUID" : "c1374266-f148-4c6e-9aa0-eb4ad4e812a0", + "description" : "Generated description for concept referred to by key \"PDCCH_CCE_HIGH_LOAD_DELTA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "285b0913-0d66-4546-8893-95bf0d267911", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "1e5556fe-bdff-4520-b8ae-606c4275b4b3", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "UUID" : "857cd994-c1ce-43b2-94f0-215e824cab75", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_HIGH_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "UUID" : "6a9fa224-1568-4da7-be8a-5fc897373f57", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_HIGH_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "UUID" : "cec3b03a-7c12-4b37-b60f-79c95a3adb97", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_LOW_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "UUID" : "2e0caf46-5081-4a67-bb64-6a4ff2721b6b", + "description" : "Generated description for concept referred to by key \"REL_HO_EXEC_FAIL_RATE_LOW_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "UUID" : "4b96864a-8922-4698-8dba-ba6d1ecc042c", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_AB_IN_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "UUID" : "670708b1-5bf4-4f0c-b6f1-47affe918580", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "UUID" : "eacfe8b0-dd88-44b0-8f7d-89bd0fc8cd8a", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_BA_IN_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "UUID" : "44129948-e185-4a0d-ac60-2851d84384c4", + "description" : "Generated description for concept referred to by key \"REL_NUM_HO_WITH_EVENTS_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "c76dfe42-a395-4977-b3c7-b9777f2873b3", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "ec904666-3e58-4d70-badc-aef1212a9b99", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "UUID" : "16f74164-13fe-4964-9ca3-76bf2448d31e", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_HIGH_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "UUID" : "9ee26f19-efc8-4df2-afef-6f0fb5b7fd41", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_HIGH_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "UUID" : "18553ab2-fe2b-4068-97eb-084f22e159b9", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_LOW_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "UUID" : "d91c982c-1e31-499f-9c9f-a98407e24ef3", + "description" : "Generated description for concept referred to by key \"REL_TOO_EARLY_HO_RATE_LOW_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "f27118e0-202f-4405-b5fa-98d429ff8f27", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "11a5c54a-2ce6-4fbc-bc6e-ce4dd7af0a6a", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "UUID" : "43e67457-2c69-48ff-90f6-bc5373e45b8d", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_HIGH_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "UUID" : "66664526-6223-41de-af3d-991f415a84ae", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_HIGH_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "UUID" : "b5d23339-ea3a-414a-a981-b6581dfe7503", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_LOW_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "UUID" : "a2043cac-1a9b-4e8a-beb9-858eb6fe025f", + "description" : "Generated description for concept referred to by key \"REL_TOO_LATE_HO_RATE_LOW_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "UUID" : "354b79b0-aebd-4bee-a69b-41f833e71b4d", + "description" : "Generated description for concept referred to by key \"RRC_CONGESTION_DELTA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "UUID" : "e9d87f24-c9ec-4e80-8b22-b598b4db11bb", + "description" : "Generated description for concept referred to by key \"SB_OCN_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "UUID" : "c53ff327-62dd-4615-ab9f-bafa5977e0ce", + "description" : "Generated description for concept referred to by key \"SB_OCN_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "UUID" : "452d1d58-6290-42c7-b78e-088cc4f2280b", + "description" : "Generated description for concept referred to by key \"SET_TYPE_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "f4ef6fe9-93a6-4558-b16b-006d2280c0e1", + "description" : "Generated description for concept referred to by key \"TOO_EARLY_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "0d2b78ee-8e18-4145-9ddb-23b122a7144f", + "description" : "Generated description for concept referred to by key \"TOO_EARLY_HO_RATE_BA_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "UUID" : "d672e9e4-7136-4aa8-aa90-1b724e244f3e", + "description" : "Generated description for concept referred to by key \"TOO_LATE_HO_RATE_AB_type:0.0.1\"" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "UUID" : "58ccdd5c-69c1-4c1d-9075-1953b5f5b39c", + "description" : "Generated description for concept referred to by key \"TOO_LATE_HO_RATE_BA_type:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Policy", + "version" : "0.0.1" + }, + "value" : { + "policyKey" : { + "name" : "LoadBalancingFuzzyPolicy_Policy", + "version" : "0.0.1" + }, + "template" : "FREEFORM", + "state" : { + "entry" : [ { + "key" : "FuzzyExecute", + "value" : { + "stateKey" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "FuzzyExecute" + }, + "trigger" : { + "name" : "LoadBalancingFuzzyPolicy_toFuzzy", + "version" : "0.0.1" + }, + "stateOutputs" : { + "entry" : [ { + "key" : "Fuzzy2Post", + "value" : { + "key" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "FuzzyExecute", + "localName" : "Fuzzy2Post" + }, + "outgoingEvent" : { + "name" : "LoadBalancingFuzzyPolicy_fromFuzzy", + "version" : "0.0.1" + }, + "nextState" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "PostExecute" + } + } + } ] + }, + "contextAlbumReference" : [ ], + "taskSelectionLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + }, + "stateFinalizerLogicMap" : { + "entry" : [ ] + }, + "defaultTask" : { + "name" : "LoadBalancingFuzzyPolicy_Task", + "version" : "0.0.1" + }, + "taskReferences" : { + "entry" : [ { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "FuzzyExecute", + "localName" : "LoadBalancingFuzzyPolicy_Policy" + }, + "outputType" : "DIRECT", + "output" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "FuzzyExecute", + "localName" : "Fuzzy2Post" + } + } + } ] + } + } + }, { + "key" : "PostExecute", + "value" : { + "stateKey" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "PostExecute" + }, + "trigger" : { + "name" : "LoadBalancingFuzzyPolicy_fromFuzzy", + "version" : "0.0.1" + }, + "stateOutputs" : { + "entry" : [ { + "key" : "Post2Out", + "value" : { + "key" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "PostExecute", + "localName" : "Post2Out" + }, + "outgoingEvent" : { + "name" : "LoadBalancingFuzzyPolicy_OutputEvent", + "version" : "0.0.1" + }, + "nextState" : { + "parentKeyName" : "NULL", + "parentKeyVersion" : "0.0.0", + "parentLocalName" : "NULL", + "localName" : "NULL" + } + } + } ] + }, + "contextAlbumReference" : [ ], + "taskSelectionLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + }, + "stateFinalizerLogicMap" : { + "entry" : [ ] + }, + "defaultTask" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Post", + "version" : "0.0.1" + }, + "taskReferences" : { + "entry" : [ { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Post", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "PostExecute", + "localName" : "LoadBalancingFuzzyPolicy_Policy" + }, + "outputType" : "DIRECT", + "output" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "PostExecute", + "localName" : "Post2Out" + } + } + } ] + } + } + }, { + "key" : "PreExecute", + "value" : { + "stateKey" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "PreExecute" + }, + "trigger" : { + "name" : "LoadBalancingFuzzyPolicy_InputEvent", + "version" : "0.0.1" + }, + "stateOutputs" : { + "entry" : [ { + "key" : "Pre2Fuzzy", + "value" : { + "key" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "PreExecute", + "localName" : "Pre2Fuzzy" + }, + "outgoingEvent" : { + "name" : "LoadBalancingFuzzyPolicy_toFuzzy", + "version" : "0.0.1" + }, + "nextState" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "FuzzyExecute" + } + } + } ] + }, + "contextAlbumReference" : [ ], + "taskSelectionLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + }, + "stateFinalizerLogicMap" : { + "entry" : [ ] + }, + "defaultTask" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Pre", + "version" : "0.0.1" + }, + "taskReferences" : { + "entry" : [ { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Pre", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "PreExecute", + "localName" : "LoadBalancingFuzzyPolicy_Policy" + }, + "outputType" : "DIRECT", + "output" : { + "parentKeyName" : "LoadBalancingFuzzyPolicy_Policy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "PreExecute", + "localName" : "Pre2Fuzzy" + } + } + } ] + } + } + } ] + }, + "firstState" : "PreExecute" + } + } ] + } + }, + "tasks" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "ENABLE_CONGESTION", + "value" : { + "key" : "ENABLE_CONGESTION", + "fieldSchemaKey" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + } + } + }, { + "key" : "FREQ_REL_TYPE", + "value" : { + "key" : "FREQ_REL_TYPE", + "fieldSchemaKey" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "value" : { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "fieldSchemaKey" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "RRC_CONGESTION_DELTA", + "value" : { + "key" : "RRC_CONGESTION_DELTA", + "fieldSchemaKey" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SET_TYPE", + "value" : { + "key" : "SET_TYPE", + "fieldSchemaKey" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + } ] + }, + "outputFields" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_AB", + "value" : { + "key" : "OCN_AB", + "fieldSchemaKey" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_BA", + "value" : { + "key" : "OCN_BA", + "fieldSchemaKey" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_AB", + "value" : { + "key" : "SB_OCN_AB", + "fieldSchemaKey" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_BA", + "value" : { + "key" : "SB_OCN_BA", + "fieldSchemaKey" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + } + } + } ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "FUZZY", + "logic" : "policymodels/fuzzy/SampleLBFuzzyLogic.xml" + } + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Post", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Post", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_AB", + "value" : { + "key" : "OCN_AB", + "fieldSchemaKey" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_BA", + "value" : { + "key" : "OCN_BA", + "fieldSchemaKey" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_AB", + "value" : { + "key" : "SB_OCN_AB", + "fieldSchemaKey" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_BA", + "value" : { + "key" : "SB_OCN_BA", + "fieldSchemaKey" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + } + } + } ] + }, + "outputFields" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_AB", + "value" : { + "key" : "OCN_AB", + "fieldSchemaKey" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_BA", + "value" : { + "key" : "OCN_BA", + "fieldSchemaKey" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_AB", + "value" : { + "key" : "SB_OCN_AB", + "fieldSchemaKey" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_BA", + "value" : { + "key" : "SB_OCN_BA", + "fieldSchemaKey" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + } + } + } ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "MVEL", + "logic" : "logger.debug(subject.id);logger.debug(inFields);outFields.putAll(inFields);logger.debug(outFields);return true;" + } + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Pre", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_Task_Pre", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "ENABLE_CONGESTION", + "value" : { + "key" : "ENABLE_CONGESTION", + "fieldSchemaKey" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + } + } + }, { + "key" : "FREQ_REL_TYPE", + "value" : { + "key" : "FREQ_REL_TYPE", + "fieldSchemaKey" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "value" : { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "fieldSchemaKey" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "RRC_CONGESTION_DELTA", + "value" : { + "key" : "RRC_CONGESTION_DELTA", + "fieldSchemaKey" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SET_TYPE", + "value" : { + "key" : "SET_TYPE", + "fieldSchemaKey" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + } ] + }, + "outputFields" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "ENABLE_CONGESTION", + "value" : { + "key" : "ENABLE_CONGESTION", + "fieldSchemaKey" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + } + } + }, { + "key" : "FREQ_REL_TYPE", + "value" : { + "key" : "FREQ_REL_TYPE", + "fieldSchemaKey" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "value" : { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "fieldSchemaKey" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "RRC_CONGESTION_DELTA", + "value" : { + "key" : "RRC_CONGESTION_DELTA", + "fieldSchemaKey" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SET_TYPE", + "value" : { + "key" : "SET_TYPE", + "fieldSchemaKey" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + } ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "MVEL", + "logic" : "logger.debug(subject.id);logger.debug(inFields);outFields.putAll(inFields);logger.debug(outFields);return true;" + } + } + } ] + } + }, + "events" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_InputEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_InputEvent", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apexaiasonom", + "source" : "external", + "target" : "apex", + "parameter" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "ENABLE_CONGESTION", + "value" : { + "key" : "ENABLE_CONGESTION", + "fieldSchemaKey" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + } + } + }, { + "key" : "FREQ_REL_TYPE", + "value" : { + "key" : "FREQ_REL_TYPE", + "fieldSchemaKey" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "value" : { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "fieldSchemaKey" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "RRC_CONGESTION_DELTA", + "value" : { + "key" : "RRC_CONGESTION_DELTA", + "fieldSchemaKey" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SET_TYPE", + "value" : { + "key" : "SET_TYPE", + "fieldSchemaKey" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + } ] + } + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_OutputEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_OutputEvent", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apexaiasonom", + "source" : "apex", + "target" : "external", + "parameter" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_AB", + "value" : { + "key" : "OCN_AB", + "fieldSchemaKey" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_BA", + "value" : { + "key" : "OCN_BA", + "fieldSchemaKey" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_AB", + "value" : { + "key" : "SB_OCN_AB", + "fieldSchemaKey" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_BA", + "value" : { + "key" : "SB_OCN_BA", + "fieldSchemaKey" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + } + } + } ] + } + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_fromFuzzy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_fromFuzzy", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apexaiasonom", + "source" : "fuzzy", + "target" : "apex", + "parameter" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_AB", + "value" : { + "key" : "OCN_AB", + "fieldSchemaKey" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "OCN_BA", + "value" : { + "key" : "OCN_BA", + "fieldSchemaKey" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_AB", + "value" : { + "key" : "SB_OCN_AB", + "fieldSchemaKey" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SB_OCN_BA", + "value" : { + "key" : "SB_OCN_BA", + "fieldSchemaKey" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + } + } + } ] + } + } + }, { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_toFuzzy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_toFuzzy", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apexaiasonom", + "source" : "apex", + "target" : "fuzzy", + "parameter" : { + "entry" : [ { + "key" : "Adjacency_4G_Name", + "value" : { + "key" : "Adjacency_4G_Name", + "fieldSchemaKey" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellA", + "value" : { + "key" : "CellA", + "fieldSchemaKey" : { + "name" : "CellA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "CellB", + "value" : { + "key" : "CellB", + "fieldSchemaKey" : { + "name" : "CellB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "ENABLE_CONGESTION", + "value" : { + "key" : "ENABLE_CONGESTION", + "fieldSchemaKey" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + } + } + }, { + "key" : "FREQ_REL_TYPE", + "value" : { + "key" : "FREQ_REL_TYPE", + "fieldSchemaKey" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_AB", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_AB", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "HO_EXEC_FAIL_RATE_BA", + "value" : { + "key" : "HO_EXEC_FAIL_RATE_BA", + "fieldSchemaKey" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_CQI_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "value" : { + "key" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA", + "fieldSchemaKey" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "value" : { + "key" : "PDCCH_CCE_HIGH_LOAD_DELTA", + "fieldSchemaKey" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "value" : { + "key" : "REL_HO_EXEC_FAIL_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_AB_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "value" : { + "key" : "REL_NUM_HO_WITH_EVENTS_BA_IN", + "fieldSchemaKey" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_EARLY_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_HIGH_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_AB", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "value" : { + "key" : "REL_TOO_LATE_HO_RATE_LOW_BA", + "fieldSchemaKey" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "RRC_CONGESTION_DELTA", + "value" : { + "key" : "RRC_CONGESTION_DELTA", + "fieldSchemaKey" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "SET_TYPE", + "value" : { + "key" : "SET_TYPE", + "fieldSchemaKey" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_AB", + "value" : { + "key" : "TOO_EARLY_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_EARLY_HO_RATE_BA", + "value" : { + "key" : "TOO_EARLY_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_AB", + "value" : { + "key" : "TOO_LATE_HO_RATE_AB", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + } + } + }, { + "key" : "TOO_LATE_HO_RATE_BA", + "value" : { + "key" : "TOO_LATE_HO_RATE_BA", + "fieldSchemaKey" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + } + } + } ] + } + } + } ] + } + }, + "albums" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ ] + } + }, + "schemas" : { + "key" : { + "name" : "LoadBalancingFuzzyPolicy_PolicyModel_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "Adjacency_4G_Name_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "CellB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "ENABLE_CONGESTION_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "FREQ_REL_TYPE_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_CQI_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Double" + } + }, { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "OCN_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Double" + } + }, { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "PDCCH_CCE_HIGH_LOAD_DELTA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_HO_EXEC_FAIL_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_IN_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_IN_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_NUM_HO_WITH_EVENTS_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_EARLY_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Boolean" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_HIGH_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "REL_TOO_LATE_HO_RATE_LOW_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "RRC_CONGESTION_DELTA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SB_OCN_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SET_TYPE_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.String" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_EARLY_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_AB_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + }, { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "TOO_LATE_HO_RATE_BA_type", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Float" + } + } ] + } + } + } +}
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/compare/LogicBlockModel_Compare.json b/auth/cli-editor/src/test/resources/compare/LogicBlockModel_Compare.json new file mode 100644 index 000000000..45a7ac37d --- /dev/null +++ b/auth/cli-editor/src/test/resources/compare/LogicBlockModel_Compare.json @@ -0,0 +1,374 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "LogicTestPolicy", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "LogicTestPolicy_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "LogicTestPolicy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy", + "version" : "0.0.1" + }, + "UUID" : "80b09a0f-1106-364a-9516-ba59fff987af", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestPolicy_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy_Albums", + "version" : "0.0.1" + }, + "UUID" : "0f52b1b6-da8c-3cb4-9c02-3c484a8c1db9", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestPolicy_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy_Events", + "version" : "0.0.1" + }, + "UUID" : "4b9e1be6-375d-3731-9021-876df01fd619", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestPolicy_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "34378780-583d-3588-8206-e57f47645cc7", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestPolicy_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy_Policies", + "version" : "0.0.1" + }, + "UUID" : "d241ce4b-8fcb-3400-b6b5-7e56bcb79ce2", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestPolicy_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy_Schemas", + "version" : "0.0.1" + }, + "UUID" : "a86c8519-c581-3ef2-9896-7574e5bdf4e3", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestPolicy_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestPolicy_Tasks", + "version" : "0.0.1" + }, + "UUID" : "c0006fa6-7b32-3fde-9217-ee26905d62c0", + "description" : "Generated description for concept referred to by key \"LogicTestPolicy_Tasks:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestTask0", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTask0", + "version" : "0.0.1" + }, + "UUID" : "17709a99-bbda-3805-a953-581cb9372cff", + "description" : "Generated description for concept referred to by key \"LogicTestTask0:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestTask1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTask1", + "version" : "0.0.1" + }, + "UUID" : "0af914cd-3151-3c1c-a59e-106d12623947", + "description" : "Generated description for concept referred to by key \"LogicTestTask1:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestTask2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTask2", + "version" : "0.0.1" + }, + "UUID" : "fbc5002e-ab8e-3953-88d4-af62c0e1d850", + "description" : "Generated description for concept referred to by key \"LogicTestTask2:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestTaskA", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTaskA", + "version" : "0.0.1" + }, + "UUID" : "960e874e-cf37-3c2f-982f-c6afcfd3e832", + "description" : "Generated description for concept referred to by key \"LogicTestTaskA:0.0.1\"" + } + }, { + "key" : { + "name" : "LogicTestTaskB", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTaskB", + "version" : "0.0.1" + }, + "UUID" : "f4772b19-cb7e-3a8d-98ca-6963d2bf688f", + "description" : "Generated description for concept referred to by key \"LogicTestTaskB:0.0.1\"" + } + }, { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "UUID" : "4f9bb262-ccbf-3b2d-9655-c16ba2d37e95", + "description" : "Generated description for concept referred to by key \"SchemaLogicTest:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "LogicTestPolicy_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ ] + } + }, + "tasks" : { + "key" : { + "name" : "LogicTestPolicy_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ { + "key" : { + "name" : "LogicTestTask0", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTask0", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "MVEL", + "logic" : "{\n\timport java.util.Date;\n\tlogger.debug(\"Running ConsistencyCheck\");\n\n\toutFields.putAll(inFields);\n\toutFields[\"Attribute1PolicyValue\"] = \"POLICY_DEFINED\";\n\tlogger.debug(\"Finished Running ConsistencyCheck\");\n\n\treturn true;\n}" + } + } + }, { + "key" : { + "name" : "LogicTestTask1", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTask1", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "MVEL", + "logic" : "import java.util.Date;" + } + } + }, { + "key" : { + "name" : "LogicTestTask2", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTask2", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "MVEL", + "logic" : "{\n\tsystem.out.println(\"{\");\n}" + } + } + }, { + "key" : { + "name" : "LogicTestTaskA", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTaskA", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + } + } + }, { + "key" : { + "name" : "LogicTestTaskB", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "LogicTestTaskB", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ ] + }, + "outputFields" : { + "entry" : [ ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ ], + "taskLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + } + } + } ] + } + }, + "events" : { + "key" : { + "name" : "LogicTestPolicy_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ ] + } + }, + "albums" : { + "key" : { + "name" : "LogicTestPolicy_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ ] + } + }, + "schemas" : { + "key" : { + "name" : "LogicTestPolicy_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SchemaLogicTest", + "version" : "0.0.1" + }, + "schemaFlavour" : "Exotic", + "schemaDefinition" : "{\nasdmasdm'asda'sdasd\n}" + } + } ] + } + } + } +} diff --git a/auth/cli-editor/src/test/resources/logback-test.xml b/auth/cli-editor/src/test/resources/logback-test.xml new file mode 100644 index 000000000..1a2026950 --- /dev/null +++ b/auth/cli-editor/src/test/resources/logback-test.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<configuration> + + <contextName>Apex</contextName> + <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> + <property name="LOG_DIR" value="${java.io.tmpdir}/apex_logging/" /> + + <!-- USE FOR STD OUT ONLY --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern> + </encoder> + </appender> + + <root level="INFO"> + <appender-ref ref="STDOUT" /> + </root> + + <logger name="org.infinispan" level="INFO" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="org.apache.zookeeper.ClientCnxn" level="OFF" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="org.onap.policy.apex.core" level="INFO" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_DIR}/apex.log</file> + <encoder> + <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level + %logger{26} - %msg %n %ex{full}</pattern> + </encoder> + </appender> + + <appender name="CTXT_FILE" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_DIR}/apex_ctxt.log</file> + <encoder> + <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level + %logger{26} - %msg %n %ex{full}</pattern> + </encoder> + </appender> + + <logger name="org.onap.policy.apex.core.context.impl.monitoring" level="TRACE" additivity="false"> + <appender-ref ref="CTXT_FILE" /> + </logger> + + <logger name="org.onap.policy.apex.core.context" level="INFO" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="org.onap.policy.apex.auth" level="INFO" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> +</configuration> diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile0.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile0.apexmacro new file mode 100644 index 000000000..b47ce111a --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile0.apexmacro @@ -0,0 +1 @@ +model create name=MacroFileTest_PolicyModel
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile1.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile1.apexmacro new file mode 100644 index 000000000..6e68088cf --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile1.apexmacro @@ -0,0 +1 @@ +schema create name=MacroFile_type1 flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile2.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile2.apexmacro new file mode 100644 index 000000000..7c9900e41 --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile2.apexmacro @@ -0,0 +1 @@ +schema create name=MacroFile_type2 flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile3.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile3.apexmacro new file mode 100644 index 000000000..e1f48e60e --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile3.apexmacro @@ -0,0 +1 @@ +schema create name=MacroFile_type3 flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile4.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile4.apexmacro new file mode 100644 index 000000000..134b561b7 --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile4.apexmacro @@ -0,0 +1 @@ +schema create name=MacroFile_type4 flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile5.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile5.apexmacro new file mode 100644 index 000000000..a9c2f0cbc --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile5.apexmacro @@ -0,0 +1 @@ +schema create name=MacroFile_type5
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile6.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile6.apexmacro new file mode 100644 index 000000000..f73796fc9 --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile6.apexmacro @@ -0,0 +1 @@ +flavour=Java schema=java.lang.String
\ No newline at end of file diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile7.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile7.apexmacro new file mode 100644 index 000000000..58c14e41d --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile7.apexmacro @@ -0,0 +1,2 @@ +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile8.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile8.apexmacro new file mode 100644 index 000000000..58c14e41d --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile8.apexmacro @@ -0,0 +1,2 @@ +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); diff --git a/auth/cli-editor/src/test/resources/macros/MacroFile9.apexmacro b/auth/cli-editor/src/test/resources/macros/MacroFile9.apexmacro new file mode 100644 index 000000000..58c14e41d --- /dev/null +++ b/auth/cli-editor/src/test/resources/macros/MacroFile9.apexmacro @@ -0,0 +1,2 @@ +var returnValueType = Java.type("java.lang.Boolean"); +var returnValue = new returnValueType(true); diff --git a/auth/cli-editor/src/test/resources/scripts/AvroSchema.apex b/auth/cli-editor/src/test/resources/scripts/AvroSchema.apex new file mode 100644 index 000000000..867c39527 --- /dev/null +++ b/auth/cli-editor/src/test/resources/scripts/AvroSchema.apex @@ -0,0 +1,57 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=AvroSchemaPolicy + + +schema create name=SchemaLogicTest flavour=Avro schema=LS +{ + "type" : "record", + "name" : "VPNActEvent", + "namespace" : "org.onap.policy.apex.domains.vpn.events", + "fields" : [ + {"name": "nameSpace", "type": "string"}, + {"name": "name", "type": "string"}, + {"name": "version", "type": "string"}, + {"name": "source", "type": "string"}, + {"name": "target", "type": "string"}, + {"name": "LinkMap", "type": { + "type" : "record", + "name" : "LinkMap", + "namespace" : "org.onap.policy.apex.domains.vpn", + "fields" : [ ] + } + }, + {"name": "CustomerMap", "type": { + "type" : "record", + "name" : "CustomerMap", + "namespace" : "org.onap.policy.apex.domains.vpn", + "fields" : [ ] + } + } + ] +} +LE + +event create name=Test_InputEvent nameSpace=org.onap.policy.apex.test source=External target=Apex + +event parameter create name=Test_InputEvent parName=AAA schemaName=SchemaLogicTest optional=false +event parameter create name=Test_InputEvent parName=BBB schemaName=SchemaLogicTest optional=true +event parameter create name=Test_InputEvent parName=CCC schemaName=SchemaLogicTest diff --git a/auth/cli-editor/src/test/resources/scripts/ContextAlbums.apex b/auth/cli-editor/src/test/resources/scripts/ContextAlbums.apex new file mode 100644 index 000000000..ace3cdb11 --- /dev/null +++ b/auth/cli-editor/src/test/resources/scripts/ContextAlbums.apex @@ -0,0 +1,81 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=LoadBalancingFuzzyPolicy_PolicyModel + +schema create name=Adj_CM_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=Adj_KPI_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=Adjacency_4G_Name_type flavour=Java schema=java.lang.String +schema create name=CellA_CM_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellA_KPI_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellA_type flavour=Java schema=java.lang.String +schema create name=CellB_CM_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellB_KPI_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellB_type flavour=Java schema=java.lang.String +schema create name=ENABLE_CONGESTION_type flavour=Java schema=java.lang.Boolean +schema create name=FREQ_REL_TYPE_type flavour=Java schema=java.lang.String +schema create name=FooBar_type flavour=Java schema=org.onap.policy.apex.sample.sampletypes.sampletypes.Foo +schema create name=HO_EXEC_FAIL_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=HO_EXEC_FAIL_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=LOW_CQI_SAMPLES_RATE_HO_AB_type flavour=Java schema=java.lang.Float +schema create name=LOW_CQI_SAMPLES_RATE_HO_BA_type flavour=Java schema=java.lang.Float +schema create name=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type flavour=Java schema=java.lang.Float +schema create name=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type flavour=Java schema=java.lang.Float +schema create name=OCN_AB_type flavour=Java schema=java.lang.Double +schema create name=OCN_BA_type flavour=Java schema=java.lang.Double +schema create name=PDCCH_CCE_HIGH_LOAD_DELTA_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_HO_EXEC_FAIL_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_AB_IN_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_NUM_HO_WITH_EVENTS_BA_IN_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_LATE_HO_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_LATE_HO_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=RRC_CONGESTION_DELTA_type flavour=Java schema=java.lang.Float +schema create name=SB_OCN_AB_type flavour=Java schema=java.lang.String +schema create name=SB_OCN_BA_type flavour=Java schema=java.lang.String +schema create name=SET_TYPE_type flavour=Java schema=java.lang.String +schema create name=TOO_EARLY_HO_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=TOO_EARLY_HO_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=TOO_LATE_HO_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=TOO_LATE_HO_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=TimeStamp_type flavour=Java schema=java.lang.Long + +album create name=ExternalBag0 scope=EXTERNAL writable=false schemaName=OCN_AB_type +album create name=ExternalBag1 scope=EXTERNAL writable=false schemaName=CellA_CM_type +album create name=ExternalBag2 scope=EXTERNAL writable=false schemaName=TOO_EARLY_HO_RATE_AB_type +album create name=ExternalBag3 scope=EXTERNAL writable=false schemaName=FooBar_type + +album create name=Application scope=APPLICATION writable=true schemaname=OCN_AB_type diff --git a/auth/cli-editor/src/test/resources/scripts/FileMacro.apex b/auth/cli-editor/src/test/resources/scripts/FileMacro.apex new file mode 100644 index 000000000..87f36c761 --- /dev/null +++ b/auth/cli-editor/src/test/resources/scripts/FileMacro.apex @@ -0,0 +1,49 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +#MACROFILE:"src/test/resources/macros/MacroFile0.apexmacro" +#MACROFILE: "src/test/resources/macros/MacroFile1.apexmacro" +#MACROFILE:src/test/resources/macros/MacroFile0.apexmacro +#MACROFILE: src/test/resources/macros/MacroFile0.apexmacro +#MACROFILE:" src/test/resources/macros/MacroFile1.apexmacro" +#MACROFILE: "src/test/resources/macros/MacroFile1.apexmacro " +#MACROFILE: "src/test/resources/macros/MacroFile2.apexmacro" +#MACROFILE: "src/test/resources/macros/MacroFile3.apexmacro" +#MACROFILE: "src/test/resources/macros/MacroFile4.apexmacro" # This is a comment +#MACROFILE: +#MACROFILE: +#MACROFILE +MACROFILE: +#MACROFILE: "src/test/resources/macros/MacroFileNonExistant.ApexMacro" +schema create #MACROFILE:"src/test/resources/macros/MacroFile5.apexmacro" #MACROFILE: "src/test/resources/macros/MacroFile6.apexmacro" + +task create name=dummyTask1 +task logic create name=dummyTask1 logicFlavour=JAVASCRIPT logic=LS +#MACROFILE:"src/test/resources/macros/MacroFile7.apexmacro" +LE + +task create name=dummyTask2 +task logic create name=dummyTask2 logicFlavour=JAVASCRIPT logic=LS +x=x+1 +#MACROFILE:"src/test/resources/macros/MacroFile8.apexmacro" +x=x+1 +#MACROFILE:"src/test/resources/macros/MacroFile9.apexmacro" +x=x+1 +LE diff --git a/auth/cli-editor/src/test/resources/scripts/LogicBlock.apex b/auth/cli-editor/src/test/resources/scripts/LogicBlock.apex new file mode 100644 index 000000000..e1fbc96ba --- /dev/null +++ b/auth/cli-editor/src/test/resources/scripts/LogicBlock.apex @@ -0,0 +1,110 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=LogicTestPolicy + +schema create name=SchemaLogicTest flavour=Exotic schema=LS +{ +asdmasdm'asda'sdasd +} +LE + +schema create name=SchemaLogicTest flavour=Avro schema=LS +{ + "type" : "record", + "name" : "VPNActEvent", + "namespace" : "org.onap.policy.apex.domains.vpn.events", + "fields" : [ + {"name": "nameSpace", "type": "string"}, + {"name": "name", "type": "string"}, + {"name": "version", "type": "string"}, + {"name": "source", "type": "string"}, + {"name": "target", "type": "string"}, + {"name": "LinkMap", "type": { + "type" : "record", + "name" : "LinkMap", + "namespace" : "org.onap.policy.apex.domains.vpn", + "fields" : [ ] + } + }, + {"name": "CustomerMap", "type": { + "type" : "record", + "name" : "CustomerMap", + "namespace" : "org.onap.policy.apex.domains.vpn", + "fields" : [ ] + } + } + ] +} +LE + +# This creates logic as a block +task logic create name=LogicTestTask0 logicFlavour=MVEL logic=LS +{ + import java.util.Date; + logger.debug("Running ConsistencyCheck"); + + outFields.putAll(inFields); + outFields["Attribute1PolicyValue"] = "POLICY_DEFINED"; + logger.debug("Finished Running ConsistencyCheck"); + + return true; +} +LE + +task create name=LogicTestTask0 + +# This creates logic as a block +task logic create name=LogicTestTask0 logicFlavour=MVEL logic=LS +{ + import java.util.Date; + logger.debug("Running ConsistencyCheck"); + + outFields.putAll(inFields); + outFields["Attribute1PolicyValue"] = "POLICY_DEFINED"; + logger.debug("Finished Running ConsistencyCheck"); + + return true; +} +LE + +task create name=LogicTestTask1 + +# This creates logic on a single line +task logic create name=LogicTestTask1 logicFlavour=MVEL logic="import java.util.Date;" + +task create name=LogicTestTask2 + +# This creates logic as a block +task logic create name=LogicTestTask2 logicFlavour=MVEL logic=LS +{ + system.out.println("{"); +}LE + +task create name=LogicTestTaskA + +# This fails as it should +task logic create name=LogicTestTaskA logicFlavour=MVEL logic= + +task create name=LogicTestTaskB + +# This fails as it should, no end tag +task logic create name=LogicTestTaskB logicFlavour=MVEL logic=LS +{ diff --git a/auth/cli-editor/src/test/resources/scripts/SampleLBPolicy.apex b/auth/cli-editor/src/test/resources/scripts/SampleLBPolicy.apex new file mode 100644 index 000000000..ddb03e5da --- /dev/null +++ b/auth/cli-editor/src/test/resources/scripts/SampleLBPolicy.apex @@ -0,0 +1,345 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=LoadBalancingFuzzyPolicy_PolicyModel + +schema create name=Adjacency_4G_Name_type flavour=Java schema=java.lang.String +schema create name=CellA_type flavour=Java schema=java.lang.String +schema create name=CellB_type flavour=Java schema=java.lang.String +schema create name=ENABLE_CONGESTION_type flavour=Java schema=java.lang.Boolean +schema create name=FREQ_REL_TYPE_type flavour=Java schema=java.lang.String +schema create name=HO_EXEC_FAIL_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=HO_EXEC_FAIL_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=LOW_CQI_SAMPLES_RATE_HO_AB_type flavour=Java schema=java.lang.Float +schema create name=LOW_CQI_SAMPLES_RATE_HO_BA_type flavour=Java schema=java.lang.Float +schema create name=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type flavour=Java schema=java.lang.Float +schema create name=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type flavour=Java schema=java.lang.Float +schema create name=OCN_AB_type flavour=Java schema=java.lang.Double +schema create name=OCN_BA_type flavour=Java schema=java.lang.Double +schema create name=PDCCH_CCE_HIGH_LOAD_DELTA_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_HO_EXEC_FAIL_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_AB_IN_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_NUM_HO_WITH_EVENTS_BA_IN_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_LATE_HO_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_LATE_HO_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=RRC_CONGESTION_DELTA_type flavour=Java schema=java.lang.Float +schema create name=SB_OCN_AB_type flavour=Java schema=java.lang.String +schema create name=SB_OCN_BA_type flavour=Java schema=java.lang.String +schema create name=SET_TYPE_type flavour=Java schema=java.lang.String +schema create name=TOO_EARLY_HO_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=TOO_EARLY_HO_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=TOO_LATE_HO_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=TOO_LATE_HO_RATE_BA_type flavour=Java schema=java.lang.Float + +event create name=LoadBalancingFuzzyPolicy_InputEvent nameSpace=org.onap.policy.apexaiasonom source=external target=apex + +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=SET_TYPE schemaName=SET_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +event create name=LoadBalancingFuzzyPolicy_OutputEvent nameSpace=org.onap.policy.apexaiasonom source=apex target=external + +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=OCN_AB schemaName=OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=OCN_BA schemaName=OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=SB_OCN_AB schemaName=SB_OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=SB_OCN_BA schemaName=SB_OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +event create name=LoadBalancingFuzzyPolicy_fromFuzzy nameSpace=org.onap.policy.apexaiasonom source=fuzzy target=apex + +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=OCN_AB schemaName=OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=OCN_BA schemaName=OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=SB_OCN_AB schemaName=SB_OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=SB_OCN_BA schemaName=SB_OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +event create name=LoadBalancingFuzzyPolicy_toFuzzy nameSpace=org.onap.policy.apexaiasonom source=apex target=fuzzy + +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=SET_TYPE schemaName=SET_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task create name=LoadBalancingFuzzyPolicy_Task + +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=SET_TYPE schemaName=SET_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA schemaName=CellA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB schemaName=CellB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=OCN_AB schemaName=OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=OCN_BA schemaName=OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=SB_OCN_AB schemaName=SB_OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=SB_OCN_BA schemaName=SB_OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA schemaName=CellA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB schemaName=CellB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task logic create name=LoadBalancingFuzzyPolicy_Task logicFlavour=FUZZY logic="policymodels/fuzzy/SampleLBFuzzyLogic.xml" + +task create name=LoadBalancingFuzzyPolicy_Task_Pre + +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=SET_TYPE schemaName=SET_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA schemaName=CellA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB schemaName=CellB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=SET_TYPE schemaName=SET_TYPE_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA schemaName=CellA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB schemaName=CellB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task logic create name=LoadBalancingFuzzyPolicy_Task_Pre logicFlavour=MVEL logic="logger.debug(subject.id);logger.debug(inFields);outFields.putAll(inFields);logger.debug(outFields);return true;" + +task create name=LoadBalancingFuzzyPolicy_Task_Post + +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_AB schemaName=OCN_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_BA schemaName=OCN_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_AB schemaName=SB_OCN_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_BA schemaName=SB_OCN_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA schemaName=CellA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB schemaName=CellB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_AB schemaName=OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_BA schemaName=OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_AB schemaName=SB_OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_BA schemaName=SB_OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA schemaName=CellA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB schemaName=CellB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type + +task logic create name=LoadBalancingFuzzyPolicy_Task_Post logicFlavour=MVEL logic="logger.debug(subject.id);logger.debug(inFields);outFields.putAll(inFields);logger.debug(outFields);return true;" + +policy create name=LoadBalancingFuzzyPolicy_Policy template=FREEFORM firstState=PreExecute + +policy state create name=LoadBalancingFuzzyPolicy_Policy stateName=PostExecute triggerName=LoadBalancingFuzzyPolicy_fromFuzzy defaultTaskName=LoadBalancingFuzzyPolicy_Task_Post +policy state output create name=LoadBalancingFuzzyPolicy_Policy stateName=PostExecute outputName=Post2Out eventName=LoadBalancingFuzzyPolicy_OutputEvent +policy state taskref create name=LoadBalancingFuzzyPolicy_Policy stateName=PostExecute taskName=LoadBalancingFuzzyPolicy_Task_Post outputType=DIRECT outputName=Post2Out + +policy state create name=LoadBalancingFuzzyPolicy_Policy stateName=FuzzyExecute triggerName=LoadBalancingFuzzyPolicy_toFuzzy defaultTaskName=LoadBalancingFuzzyPolicy_Task +policy state output create name=LoadBalancingFuzzyPolicy_Policy stateName=FuzzyExecute outputName=Fuzzy2Post eventName=LoadBalancingFuzzyPolicy_fromFuzzy nextState=PostExecute +policy state taskref create name=LoadBalancingFuzzyPolicy_Policy stateName=FuzzyExecute taskName=LoadBalancingFuzzyPolicy_Task outputType=DIRECT outputName=Fuzzy2Post + +policy state create name=LoadBalancingFuzzyPolicy_Policy stateName=PreExecute triggerName=LoadBalancingFuzzyPolicy_InputEvent defaultTaskName=LoadBalancingFuzzyPolicy_Task_Pre +policy state output create name=LoadBalancingFuzzyPolicy_Policy stateName=PreExecute outputName=Pre2Fuzzy eventName=LoadBalancingFuzzyPolicy_toFuzzy nextState=FuzzyExecute +policy state taskref create name=LoadBalancingFuzzyPolicy_Policy stateName=PreExecute taskName=LoadBalancingFuzzyPolicy_Task_Pre outputType=DIRECT outputName=Pre2Fuzzy diff --git a/auth/cli-editor/src/test/resources/scripts/SampleLBPolicy_WithMap.apex b/auth/cli-editor/src/test/resources/scripts/SampleLBPolicy_WithMap.apex new file mode 100644 index 000000000..9ae79b984 --- /dev/null +++ b/auth/cli-editor/src/test/resources/scripts/SampleLBPolicy_WithMap.apex @@ -0,0 +1,430 @@ +#------------------------------------------------------------------------------- +# ============LICENSE_START======================================================= +# Copyright (C) 2016-2018 Ericsson. 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +#------------------------------------------------------------------------------- + +model create name=LoadBalancingFuzzyPolicy_PolicyModel + +schema create name=Adj_CM_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=Adj_KPI_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=Adjacency_4G_Name_type flavour=Java schema=java.lang.String +schema create name=CellA_CM_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellA_KPI_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellA_type flavour=Java schema=java.lang.String +schema create name=CellB_CM_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellB_KPI_type flavour=Java schema=java.util.HashMap<String,String> +schema create name=CellB_type flavour=Java schema=java.lang.String +schema create name=ENABLE_CONGESTION_type flavour=Java schema=java.lang.Boolean +schema create name=FREQ_REL_TYPE_type flavour=Java schema=java.lang.String +schema create name=FooBar_type flavour=Java schema=org.onap.policy.apex.sample.sampletypes.Foo +schema create name=HO_EXEC_FAIL_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=HO_EXEC_FAIL_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=LOW_CQI_SAMPLES_RATE_HO_AB_type flavour=Java schema=java.lang.Float +schema create name=LOW_CQI_SAMPLES_RATE_HO_BA_type flavour=Java schema=java.lang.Float +schema create name=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type flavour=Java schema=java.lang.Float +schema create name=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type flavour=Java schema=java.lang.Float +schema create name=OCN_AB_type flavour=Java schema=java.lang.Double +schema create name=OCN_BA_type flavour=Java schema=java.lang.Double +schema create name=PDCCH_CCE_HIGH_LOAD_DELTA_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_HO_EXEC_FAIL_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_HO_EXEC_FAIL_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_AB_IN_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_NUM_HO_WITH_EVENTS_BA_IN_type flavour=Java schema=java.lang.Float +schema create name=REL_NUM_HO_WITH_EVENTS_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_EARLY_HO_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_EARLY_HO_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_AB_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_LATE_HO_RATE_BA_type flavour=Java schema=java.lang.Boolean +schema create name=REL_TOO_LATE_HO_RATE_HIGH_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_HIGH_BA_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_LOW_AB_type flavour=Java schema=java.lang.Float +schema create name=REL_TOO_LATE_HO_RATE_LOW_BA_type flavour=Java schema=java.lang.Float +schema create name=RRC_CONGESTION_DELTA_type flavour=Java schema=java.lang.Float +schema create name=SB_OCN_AB_type flavour=Java schema=java.lang.String +schema create name=SB_OCN_BA_type flavour=Java schema=java.lang.String +schema create name=SET_TYPE_type flavour=Java schema=java.lang.String +schema create name=TOO_EARLY_HO_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=TOO_EARLY_HO_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=TOO_LATE_HO_RATE_AB_type flavour=Java schema=java.lang.Float +schema create name=TOO_LATE_HO_RATE_BA_type flavour=Java schema=java.lang.Float +schema create name=TimeStamp_type flavour=Java schema=java.lang.Long + +event create name=LoadBalancingFuzzyPolicy_InputEvent nameSpace=org.onap.policy.apexaiasonom.types source=External target=Apex + +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=SET_TYPE schemaName=SET_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellA_CM schemaName=CellA_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellB_CM schemaName=CellB_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellA_KPI schemaName=CellA_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=CellB_KPI schemaName=CellB_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=Adj_CM schemaName=Adj_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=Adj_KPI schemaName=Adj_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=TimeStamp schemaName=TimeStamp_type +event parameter create name=LoadBalancingFuzzyPolicy_InputEvent parName=FooBar schemaName=FooBar_type + +event create name=LoadBalancingFuzzyPolicy_OutputEvent nameSpace=org.onap.policy.apexaiasonom.types source=Apex target=External +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=OCN_AB schemaName=OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=OCN_BA schemaName=OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=SB_OCN_AB schemaName=SB_OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=SB_OCN_BA schemaName=SB_OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellA_CM schemaName=CellA_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellB_CM schemaName=CellB_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellA_KPI schemaName=CellA_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=CellB_KPI schemaName=CellB_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=Adj_CM schemaName=Adj_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=Adj_KPI schemaName=Adj_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=TimeStamp schemaName=TimeStamp_type +event parameter create name=LoadBalancingFuzzyPolicy_OutputEvent parName=FooBar schemaName=FooBar_type + +event create name=LoadBalancingFuzzyPolicy_fromFuzzy nameSpace=org.onap.policy.apexaiasonom.types source=Fuzzy target=Apex +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=OCN_AB schemaName=OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=OCN_BA schemaName=OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=SB_OCN_AB schemaName=SB_OCN_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=SB_OCN_BA schemaName=SB_OCN_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellA_CM schemaName=CellA_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellB_CM schemaName=CellB_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellA_KPI schemaName=CellA_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=CellB_KPI schemaName=CellB_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=Adj_CM schemaName=Adj_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=Adj_KPI schemaName=Adj_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=TimeStamp schemaName=TimeStamp_type +event parameter create name=LoadBalancingFuzzyPolicy_fromFuzzy parName=FooBar schemaName=FooBar_type + +event create name=LoadBalancingFuzzyPolicy_toFuzzy nameSpace=org.onap.policy.apexaiasonom.types source=Apex target=Fuzzy +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=SET_TYPE schemaName=SET_TYPE_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellA schemaName=CellA_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellB schemaName=CellB_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellA_CM schemaName=CellA_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellB_CM schemaName=CellB_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellA_KPI schemaName=CellA_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=CellB_KPI schemaName=CellB_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=Adj_CM schemaName=Adj_CM_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=Adj_KPI schemaName=Adj_KPI_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=TimeStamp schemaName=TimeStamp_type +event parameter create name=LoadBalancingFuzzyPolicy_toFuzzy parName=FooBar schemaName=FooBar_type + +task create name=LoadBalancingFuzzyPolicy_Task_Pre + +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=SET_TYPE schemaName=SET_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA schemaName=CellA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB schemaName=CellB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA_CM schemaName=CellA_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB_CM schemaName=CellB_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA_KPI schemaName=CellA_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB_KPI schemaName=CellB_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adj_CM schemaName=Adj_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adj_KPI schemaName=Adj_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TimeStamp schemaName=TimeStamp_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=FooBar schemaName=FooBar_type + +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=SET_TYPE schemaName=SET_TYPE_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA schemaName=CellA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB schemaName=CellB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA_CM schemaName=CellA_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB_CM schemaName=CellB_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellA_KPI schemaName=CellA_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=CellB_KPI schemaName=CellB_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adj_CM schemaName=Adj_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=Adj_KPI schemaName=Adj_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=TimeStamp schemaName=TimeStamp_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Pre fieldName=FooBar schemaName=FooBar_type + +task logic create name=LoadBalancingFuzzyPolicy_Task_Pre logicFlavour=MVEL logic="logger.debug(subject.id);logger.debug(inFields);outputFields.putAll(inputFields);logger.debug(outputFields);return true;" + +task create name=LoadBalancingFuzzyPolicy_Task + +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=ENABLE_CONGESTION schemaName=ENABLE_CONGESTION_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=FREQ_REL_TYPE schemaName=FREQ_REL_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=HO_EXEC_FAIL_RATE_AB schemaName=HO_EXEC_FAIL_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=HO_EXEC_FAIL_RATE_BA schemaName=HO_EXEC_FAIL_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_CQI_SAMPLES_RATE_HO_AB schemaName=LOW_CQI_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_CQI_SAMPLES_RATE_HO_BA schemaName=LOW_CQI_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA schemaName=LOW_PUSCH_SINR_SAMPLES_RATE_HO_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=PDCCH_CCE_HIGH_LOAD_DELTA schemaName=PDCCH_CCE_HIGH_LOAD_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_AB schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_HIGH_BA schemaName=REL_HO_EXEC_FAIL_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_LOW_AB schemaName=REL_HO_EXEC_FAIL_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_LOW_BA schemaName=REL_HO_EXEC_FAIL_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_AB_IN schemaName=REL_NUM_HO_WITH_EVENTS_AB_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_BA_IN schemaName=REL_NUM_HO_WITH_EVENTS_BA_IN_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_HIGH_AB schemaName=REL_TOO_EARLY_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_HIGH_BA schemaName=REL_TOO_EARLY_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_LOW_AB schemaName=REL_TOO_EARLY_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_LOW_BA schemaName=REL_TOO_EARLY_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_HIGH_AB schemaName=REL_TOO_LATE_HO_RATE_HIGH_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_HIGH_BA schemaName=REL_TOO_LATE_HO_RATE_HIGH_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_LOW_AB schemaName=REL_TOO_LATE_HO_RATE_LOW_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_LOW_BA schemaName=REL_TOO_LATE_HO_RATE_LOW_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=RRC_CONGESTION_DELTA schemaName=RRC_CONGESTION_DELTA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=SET_TYPE schemaName=SET_TYPE_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_EARLY_HO_RATE_AB schemaName=TOO_EARLY_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_EARLY_HO_RATE_BA schemaName=TOO_EARLY_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_LATE_HO_RATE_AB schemaName=TOO_LATE_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TOO_LATE_HO_RATE_BA schemaName=TOO_LATE_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA schemaName=CellA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB schemaName=CellB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA_CM schemaName=CellA_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB_CM schemaName=CellB_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA_KPI schemaName=CellA_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB_KPI schemaName=CellB_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adj_CM schemaName=Adj_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adj_KPI schemaName=Adj_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TimeStamp schemaName=TimeStamp_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=FooBar schemaName=FooBar_type + +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=OCN_AB schemaName=OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=OCN_BA schemaName=OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=SB_OCN_AB schemaName=SB_OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=SB_OCN_BA schemaName=SB_OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA schemaName=CellA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB schemaName=CellB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA_CM schemaName=CellA_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB_CM schemaName=CellB_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellA_KPI schemaName=CellA_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=CellB_KPI schemaName=CellB_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adj_CM schemaName=Adj_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=Adj_KPI schemaName=Adj_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=TimeStamp schemaName=TimeStamp_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task fieldName=FooBar schemaName=FooBar_type + +task logic create name=LoadBalancingFuzzyPolicy_Task logicFlavour=FUZZY logic="policymodels/fuzzy/SampleLBFuzzyLogic.xml" + +task create name=LoadBalancingFuzzyPolicy_Task_Post + +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_AB schemaName=OCN_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_BA schemaName=OCN_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_AB schemaName=SB_OCN_AB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_BA schemaName=SB_OCN_BA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA schemaName=CellA_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB schemaName=CellB_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA_CM schemaName=CellA_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB_CM schemaName=CellB_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA_KPI schemaName=CellA_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB_KPI schemaName=CellB_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adj_CM schemaName=Adj_CM_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adj_KPI schemaName=Adj_KPI_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=TimeStamp schemaName=TimeStamp_type +task inputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=FooBar schemaName=FooBar_type + +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_AB schemaName=OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=OCN_BA schemaName=OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_AB schemaName=REL_HO_EXEC_FAIL_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_HO_EXEC_FAIL_RATE_BA schemaName=REL_HO_EXEC_FAIL_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_AB schemaName=REL_NUM_HO_WITH_EVENTS_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_NUM_HO_WITH_EVENTS_BA schemaName=REL_NUM_HO_WITH_EVENTS_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_AB schemaName=REL_TOO_EARLY_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_EARLY_HO_RATE_BA schemaName=REL_TOO_EARLY_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_AB schemaName=REL_TOO_LATE_HO_RATE_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=REL_TOO_LATE_HO_RATE_BA schemaName=REL_TOO_LATE_HO_RATE_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_AB schemaName=SB_OCN_AB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=SB_OCN_BA schemaName=SB_OCN_BA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA schemaName=CellA_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB schemaName=CellB_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adjacency_4G_Name schemaName=Adjacency_4G_Name_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA_CM schemaName=CellA_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB_CM schemaName=CellB_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellA_KPI schemaName=CellA_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=CellB_KPI schemaName=CellB_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adj_CM schemaName=Adj_CM_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=Adj_KPI schemaName=Adj_KPI_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=TimeStamp schemaName=TimeStamp_type +task outputfield create name=LoadBalancingFuzzyPolicy_Task_Post fieldName=FooBar schemaName=FooBar_type + +task logic create name=LoadBalancingFuzzyPolicy_Task_Post logicFlavour=MVEL logic="logger.debug(subject.id);logger.debug(inFields);outFields.putAll(inFields);logger.debug(outFields);return true;" + +policy create name=LoadBalancingFuzzyPolicy_Policy template=FREEFORM firstState=PreExecute + +policy state create name=LoadBalancingFuzzyPolicy_Policy stateName=PostExecute triggerName=LoadBalancingFuzzyPolicy_fromFuzzy defaultTaskName=LoadBalancingFuzzyPolicy_Task_Post +policy state output create name=LoadBalancingFuzzyPolicy_Policy stateName=PostExecute outputName=Post2Out eventName=LoadBalancingFuzzyPolicy_OutputEvent +policy state taskref create name=LoadBalancingFuzzyPolicy_Policy stateName=PostExecute taskName=LoadBalancingFuzzyPolicy_Task_Post outputType=DIRECT outputName=Post2Out + +policy state create name=LoadBalancingFuzzyPolicy_Policy stateName=FuzzyExecute triggerName=LoadBalancingFuzzyPolicy_toFuzzy defaultTaskName=LoadBalancingFuzzyPolicy_Task +policy state output create name=LoadBalancingFuzzyPolicy_Policy stateName=FuzzyExecute outputName=Fuzzy2Post eventName=LoadBalancingFuzzyPolicy_fromFuzzy nextState=PostExecute +policy state taskref create name=LoadBalancingFuzzyPolicy_Policy stateName=FuzzyExecute taskName=LoadBalancingFuzzyPolicy_Task outputType=DIRECT outputName=Fuzzy2Post + +policy state create name=LoadBalancingFuzzyPolicy_Policy stateName=PreExecute triggerName=LoadBalancingFuzzyPolicy_InputEvent defaultTaskName=LoadBalancingFuzzyPolicy_Task_Pre +policy state output create name=LoadBalancingFuzzyPolicy_Policy stateName=PreExecute outputName=Pre2Fuzzy eventName=LoadBalancingFuzzyPolicy_toFuzzy nextState=FuzzyExecute +policy state taskref create name=LoadBalancingFuzzyPolicy_Policy stateName=PreExecute taskName=LoadBalancingFuzzyPolicy_Task_Pre outputType=DIRECT outputName=Pre2Fuzzy |