aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/requirements.yaml
blob: 897df32ce0f5947225d3c0401df90ce10adf344a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright © 2017 Amdocs, Bell Canada
# Modifications Copyright © 2018 AT&T
#
# 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.

dependencies:
  - name: common
    version: ~3.0.0
    repository: '@local'
*/ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<!--
  ============LICENSE_START=======================================================
  ONAP Policy Engine - Common Modules
  ================================================================================
  Copyright (C) 2017-2021 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=========================================================
  -->

<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.common</groupId>
        <artifactId>common-modules</artifactId>
        <version>1.9.2</version>
    </parent>

    <artifactId>ONAP-Logging</artifactId>
    <description>ONAP Logging Framework</description>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.re2j</groupId>
            <artifactId>re2j</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.att.eelf</groupId>
            <artifactId>eelf-core</artifactId>
            <version>2.0.0-oss</version>
            <exclusions>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
         <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.att.eelf</groupId>
                <artifactId>eelf-maven-plugin</artifactId>
                <version>2.0.0-oss</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>WikiMsgGenerator</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <!-- We need to include the dependency of the project so that its include
                        in classpath when running plugin -->
                    <dependency>
                        <groupId>org.onap.policy.common</groupId>
                        <artifactId>ONAP-Logging</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <outputDirectory>target/messages</outputDirectory>
                    <outputFile>messages.html</outputFile>
                    <resources>
                        <resource>
                            <messageClass>org.onap.policy.common.logging.eelf.MessageCodes</messageClass>
                            This needs to be replaced with your Enum
                            class name .which
                            implements EELFResolvableErrorEnum and have your defined error
                            codes.
                            <header><![CDATA[<p>   <ac:macro ac:name="toc" /> </p>
                <p>
        <ac:macro ac:name="anchor"> <ac:default-parameter>Application Messages</ac:default-parameter>  </ac:macro> </p> <h2>Application Messages</h2>]]></header>
                        </resource>

                    </resources>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
o">=None, reupload_cba = False): ret_data = { CDS_IS_SUCCESSFUL_KEY: cds_is_successful, RESULTS_LOG_KEY: results_log } if error: ret_data[ERR_MSG_KEY] = error # CBA needs to be reuploaded case: if reupload_cba: ret_data[REUPLOAD_CBA_KEY] = True return ret_data # Truncate execution logs to make sure gRPC response doesn't exceed the gRPC buffer capacity def truncate_execution_output(execution_output): sum_truncated_chars = 0 if execution_output.ByteSize() > RESPONSE_MAX_SIZE: while execution_output.ByteSize() > RESPONSE_MAX_SIZE: removed_item = execution_output.response.pop() sum_truncated_chars += len(removed_item) execution_output.response.append( "[...] TRUNCATED CHARS : {}".format(sum_truncated_chars)) return execution_output # Read temp file 'outputfile' into results_log and split out the returned payload into payload_result def parse_cmd_exec_output(outputfile, logger, payload_result, results_log, extra): payload_section = [] is_payload_section = False outputfile.seek(0) while True: output = outputfile.readline() if output == '': break if output.startswith('BEGIN_EXTRA_PAYLOAD'): is_payload_section = True output = outputfile.readline() if output.startswith('END_EXTRA_PAYLOAD'): is_payload_section = False output = '' payload = '\n'.join(payload_section) msg = email.parser.Parser().parsestr(payload) for part in msg.get_payload(): payload_result.update(json.loads(part.get_payload())) if output and not is_payload_section: logger.info(output.strip(), extra=extra) results_log.append(output.strip()) else: payload_section.append(output.strip()) def getExtraLogData(request=None): extra = {'request_id': '', 'subrequest_id': '', 'originator_id': ''} if request is not None: extra = { 'request_id': request.requestId, 'subrequest_id': request.subRequestId, 'originator_id': request.originatorId } return extra