diff options
author | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-31 15:54:24 -0400 |
---|---|---|
committer | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-31 15:57:02 -0400 |
commit | d9007d680d19734d5dc106479784c420236cca4b (patch) | |
tree | b3356847c3d6e1543098b447c1df7d49e7118652 /POLICY-SDK-APP/src/test/resources | |
parent | 6a5e800771311208c66ad79ce1bdf76affd144b2 (diff) |
[Policy-17] Removed the sql scripts from sdk app
Change-Id: I5b017aad569014c7f12eab35e1dbd1c215f90ebe
Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/test/resources')
4 files changed, 565 insertions, 0 deletions
diff --git a/POLICY-SDK-APP/src/test/resources/Config_SampleTest1206.1.xml b/POLICY-SDK-APP/src/test/resources/Config_SampleTest1206.1.xml new file mode 100644 index 000000000..5c32cd4f1 --- /dev/null +++ b/POLICY-SDK-APP/src/test/resources/Config_SampleTest1206.1.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:xacml:policy:id:0b67998b-57e2-4e25-9ea9-f9154bf18df1" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides"> + <Description>SampleTest1206@CreatedBy:test@CreatedBy:@ModifiedBy:test@ModifiedBy:</Description> + <Target> + <AnyOf> + <AllOf> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_SampleTest1206.1.xml</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="PolicyName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + </AllOf> + <AllOf> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">success</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ECOMPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">PROD</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskType" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskLevel" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">True</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="guard" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="TTLDate" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + <Match MatchId="org.openecomp.function.regex-match"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleTest1206</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + </AllOf> + </AnyOf> + </Target> + <Rule RuleId="urn:com:xacml:rule:id:7e46d503-af54-4ea5-a86c-9eb6dd1f4f43" Effect="Permit"> + <Target> + <AnyOf> + <AllOf> + <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue> + <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/> + </Match> + </AllOf> + </AnyOf> + </Target> + <AdviceExpressions> + <AdviceExpression AdviceId="configID" AppliesTo="Permit"> + <AttributeAssignmentExpression AttributeId="type" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="URLID" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">$URL/Config/com.Config_SampleTest1206.1.txt</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="PolicyName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_SampleTest1206.1.xml</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="VersionNumber" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="matching:ECOMPName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">success</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="matching:ConfigName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleTest1206</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="RiskType" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">PROD</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="RiskLevel" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="guard" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">True</AttributeValue> + </AttributeAssignmentExpression> + <AttributeAssignmentExpression AttributeId="TTLDate" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer=""> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue> + </AttributeAssignmentExpression> + </AdviceExpression> + </AdviceExpressions> + </Rule> +</Policy> diff --git a/POLICY-SDK-APP/src/test/resources/logback.xml b/POLICY-SDK-APP/src/test/resources/logback.xml new file mode 100644 index 000000000..b119a4e3b --- /dev/null +++ b/POLICY-SDK-APP/src/test/resources/logback.xml @@ -0,0 +1,254 @@ +<!-- + ============LICENSE_START======================================================= + ECOMP-PAP-REST + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + 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. + ============LICENSE_END========================================================= + --> + +<configuration scan="true" scanPeriod="3 seconds" debug="true"> + <!--<jmxConfigurator /> --> + <!-- directory path for all other type logs --> + <property name="logDir" value="logs" /> + + <!-- directory path for debugging type logs --> + <property name="debugDir" value="logs" /> + + <!-- specify the component name + <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" --> + <property name="componentName" value="Policy"></property> + <property name="subComponentName" value="XACML-PAP-REST"></property> + + <!-- log file names --> + <property name="errorLogName" value="error" /> + <property name="metricsLogName" value="metrics" /> + <property name="auditLogName" value="audit" /> + <property name="debugLogName" value="debug" /> + + + <!-- modified time stamp format --> + + <!-- A U D I T + <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> + <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{ElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> + --> + <property name="defaultAuditPattern" value="%X{TransactionBeginTimestamp}|%X{TransactionEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{TransactionElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> + + + + <!-- M E T R I C + <property name="defaultMetricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> + --> + <property name="defaultMetricPattern" value="%X{MetricBeginTimestamp}|%X{MetricEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%p|%X{severity}|%X{serverIpAddress}|%X{MetricElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> + + + + + <!-- E R R O R + <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" /> + --> + <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{requestId}|%t|%X{serviceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" /> + + + + <!-- D E B U G + <property name="debugLoggerPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%caller{3}]|%msg%n" /> + <property name="debugLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> --> + --> + <property name="debugLoggerPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%msg%n" /> + + + + <!-- D E F A U L T + <property name="defaultPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|%msg%n" /> + <property name="defaultPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> + --> + <property name="defaultPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%c||%msg%n" /> + + + + <!-- P A T H + <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" /> + <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" /> + + --> + <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" /> + <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" /> + + + + + <!-- Example evaluator filter applied against console appender --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + + <!-- ============================================================================ --> + <!-- EELF Appenders --> + <!-- ============================================================================ --> + + <!-- The EELFAppender is used to record events to the general application + log --> + + <!-- EELF Audit Appender. This appender is used to record audit engine + related logging events. The audit logger and appender are specializations + of the EELF application root logger and appender. This can be used to segregate + Policy engine events from other components, or it can be eliminated to record + these events as part of the application root log. --> + + <appender name="EELFAudit" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${auditLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultAuditPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFAudit" /> + </appender> + + + + +<appender name="EELFMetrics" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${metricsLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - + %msg%n"</pattern> --> + <pattern>${defaultMetricPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFMetrics"/> + </appender> + + + + + <appender name="EELFError" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${errorLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>ERROR</level> + </filter> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultErrorPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFError"/> + </appender> + + + + <appender name="EELFDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${debugLogDirectory}/${debugLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>INFO</level> + </filter> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${debugLoggerPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFDebug" /> + <includeCallerData>true</includeCallerData> + </appender> + + + <!-- ============================================================================ --> + <!-- EELF loggers --> + <!-- ============================================================================ --> + + <logger name="com.att.eelf.audit" level="info" additivity="false"> + <appender-ref ref="asyncEELFAudit" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="asyncEELFMetrics" /> + </logger> + + <logger name="com.att.eelf.error" level="error" additivity="false"> + <appender-ref ref="asyncEELFError" /> + </logger> + + <logger name="com.att.eelf.debug" level="info" additivity="false"> + <appender-ref ref="asyncEELFDebug" /> + </logger> + + + + <root level="INFO"> + <appender-ref ref="asyncEELFDebug" /> + <appender-ref ref="asyncEELFError" /> + </root> + +</configuration> diff --git a/POLICY-SDK-APP/src/test/resources/policy_tosca_tca_v1707.yml b/POLICY-SDK-APP/src/test/resources/policy_tosca_tca_v1707.yml new file mode 100644 index 000000000..0c30ceea0 --- /dev/null +++ b/POLICY-SDK-APP/src/test/resources/policy_tosca_tca_v1707.yml @@ -0,0 +1,65 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 + +node_types: + # policy root node + policy.nodes.Root: + derived_from: tosca.nodes.Root + properties: + policyName: + type: string + required: true + policyVersion: + type: string + required: true + policyScope: + type: string + required: true + policyDescription: + type: string + required: false + + # virtual policy node for string matcher + policy.nodes.tca: + derived_from: policy.nodes.Root + properties: + functionalRole: + type: string + required: true + default: "ClosedLoop_F5-d925ed73-8231-4d02-9545-db4e101f88f8" + policyName: + type: string + required: true + default: "configuration.dcae.microservice.tca.xml" + policyVersion: + type: string + required: true + default: "v0.0.1" + threshholds: + type: list + entry_schema: + - type:policy.data.Threshold + +data_types: + policy.data.Threshold: + derived_from: tosca.nodes.Root + properties: + closedLoopControlName: + type: string + required: true + version: + type: string + required: true + default: "1.0.2" + fieldPath: + type: string + required: true + thresholdValue: + type: integer + required: true + direction: + type: string + required: true + severity: + type: string + required: true + diff --git a/POLICY-SDK-APP/src/test/resources/schedulerPolicies1707.xmi b/POLICY-SDK-APP/src/test/resources/schedulerPolicies1707.xmi new file mode 100644 index 000000000..22afa23a2 --- /dev/null +++ b/POLICY-SDK-APP/src/test/resources/schedulerPolicies1707.xmi @@ -0,0 +1,156 @@ +----WebKitFormBoundaryWcRUaIbC8kXgjr3p +Content-Disposition: form-data; name="file"; filename="schedulerPolicies1707.xmi" + +<?xml version="1.0" encoding="ASCII"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="scheduler" nsURI="org.ecomp.test.scheduler" nsPrefix="scheduler"> + <eAnnotations source="http://www.eclipse.org/emf/2011/Xcore"> + <details key="ecomp" value="http://ecomp.org.com"/> + <details key="policy" value="http://ecomp.org.com/policy"/> + </eAnnotations> + <eClassifiers xsi:type="ecore:EClass" name="TimeLimitAndVerticalTopology" eSuperTypes="//SniroPolicyMetaInfo"> + <eAnnotations source="http://ecomp.org.com/policy"> + <details key="policyTemplate" value="SNIRO-SCHEDULER"/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" unique="false" eType="//TimeLimitNVerticalTopologyType"> + <eAnnotations source="http://ecomp.org.com/policy"> + <details key="matching" value="true"/> + </eAnnotations> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="serviceType" unique="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="nodeType" unique="false" upperBound="-1" eType="//EntityType"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="conflictScope" unique="false" eType="//ConflictScope"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="timeSchedule" eType="//TimeSchedule" containment="true" resolveProxies="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="TimeSchedule"> + <eStructuralFeatures xsi:type="ecore:EReference" name="allowedPeriodicTime" upperBound="-1" eType="//AllowedPeriodicTime" containment="true" resolveProxies="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="TimeRange"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="start_time" unique="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="end_time" unique="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="AllowedPeriodicTime"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="day" unique="false" eType="//DayType"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="timeRange" upperBound="-1" eType="//TimeRange" containment="true" resolveProxies="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="SniroPolicyMetaInfo"> + <eAnnotations source="http://ecomp.org.com/policy"> + <details key="policyTemplate" value="SNIRO"/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="identity" unique="false"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="policyScope" eType="//Scope" containment="true" resolveProxies="false"> + <eAnnotations source="http://ecomp.org.com/policy"> + <details key="matching" value="true"/> + </eAnnotations> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Scope"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="serviceType" unique="false" upperBound="-1" eType="//ServiceType"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="entityType" unique="false" upperBound="-1" eType="//EntityType"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="aicZone" unique="false" upperBound="-1"> + <eAnnotations source="http://ecomp.org.com"> + <details key="type" value="configuration"/> + </eAnnotations> + <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="WorkflowType"> + <eLiterals name="softwareDownload" value="1"/> + <eLiterals name="softwareUpgrade" value="2"/> + <eLiterals name="configurationChange" value="3"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="ServiceType"> + <eLiterals name="networkOnDemand" value="1"/> + <eLiterals name="changeManagement" value="2"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="ConflictScope"> + <eLiterals name="vnf" value="1"/> + <eLiterals name="vnf_pserver" value="2"/> + <eLiterals name="vnf_zone" value="3"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="EntityType"> + <eLiterals name="vnf" value="1"/> + <eLiterals name="pServer" value="2"/> + <eLiterals name="vServer" value="3"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="DayType"> + <eLiterals name="weekday" value="1"/> + <eLiterals name="weekend" value="2"/> + <eLiterals name="holiday" value="3"/> + <eLiterals name="mon" value="4"/> + <eLiterals name="tue" value="5"/> + <eLiterals name="wed" value="6"/> + <eLiterals name="thu" value="7"/> + <eLiterals name="fri" value="8"/> + <eLiterals name="sat" value="9"/> + <eLiterals name="sun" value="10"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="TimeLimitNVerticalTopologyType"> + <eLiterals name="timeLimitAndVerticalTopology"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EDataType" name="UUID" instanceClassName="java.util.UUID"/> +</ecore:EPackage> + +------WebKitFormBoundaryWcRUaIbC8kXgjr3p +Content-Disposition: form-data; name="file"; filename="schedulerPolicies1707.xmi" +Content-Type: application/octet-stream + + +------WebKitFormBoundaryWcRUaIbC8kXgjr3p--
\ No newline at end of file |