summaryrefslogtreecommitdiffstats
path: root/kubernetes/uui/components/uui-intent-analysis/resources
diff options
context:
space:
mode:
authorxudan16 <xudan16@huawei.com>2022-07-21 17:27:14 +0800
committerFiachra Corcoran <fiachra.corcoran@est.tech>2022-11-22 14:22:33 +0000
commitc7f36a6a47fd94dd29de8a3fab9a198c99ae6df3 (patch)
tree169c050152e2f8ae3f8b38217ffa811b837fb99c /kubernetes/uui/components/uui-intent-analysis/resources
parent3502e73a2762fc50f9ba3ae5d65a3efe5f05bead (diff)
[UUI] Add intent analysis and postgres deployments for uui
1. Intent analysis is the new component of uui 2. UUI decides to use postgres as an independent MS 3. Using the postgres template supported by the Community 4. Make this component Service Mesh Compatibility Signed-off-by: xudan16 <xudan16@huawei.com> Issue-ID: OOM-2997 Change-Id: I1c40c3e4b6d67591507475723f3465031372471c
Diffstat (limited to 'kubernetes/uui/components/uui-intent-analysis/resources')
-rw-r--r--kubernetes/uui/components/uui-intent-analysis/resources/config/intent-analysis-init.sql91
-rw-r--r--kubernetes/uui/components/uui-intent-analysis/resources/entrypoint/run.sh31
2 files changed, 122 insertions, 0 deletions
diff --git a/kubernetes/uui/components/uui-intent-analysis/resources/config/intent-analysis-init.sql b/kubernetes/uui/components/uui-intent-analysis/resources/config/intent-analysis-init.sql
new file mode 100644
index 0000000000..ac3eaf0fed
--- /dev/null
+++ b/kubernetes/uui/components/uui-intent-analysis/resources/config/intent-analysis-init.sql
@@ -0,0 +1,91 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Huawei Technologies Co., Ltd.
+ * ================================================================================
+ * 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=========================================================
+ */
+
+CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
+
+create table if not exists intent(
+ intent_id varchar(255) primary key,
+ intent_name varchar(255)
+);
+
+create table if not exists expectation(
+ expectation_id varchar(255) primary key,
+ expectation_name varchar(255),
+ expectation_type varchar(255),
+ intent_id varchar(255)
+);
+
+create table if not exists expectation_object(
+ object_id varchar(255) DEFAULT uuid_generate_v4 (),
+ primary key(object_id),
+ object_type varchar(255),
+ object_instance varchar(255),
+ expectation_id varchar(255)
+);
+
+create table if not exists expectation_target(
+ target_id varchar(255) primary key,
+ target_name varchar(255),
+ expectation_id varchar(255)
+);
+
+create table if not exists context(
+ context_id varchar(255) primary key,
+ context_name varchar(255),
+ parent_id varchar(255)
+);
+
+create table if not exists context_mapping(
+ context_id varchar(255) primary key,
+ parent_type varchar(255),
+ parent_id varchar(255)
+);
+
+create table if not exists fulfilment_info(
+ fulfilment_info_id varchar(255) primary key,
+ fulfilment_info_status varchar(255),
+ not_fulfilled_state varchar(255),
+ not_fulfilled_reason varchar(255)
+);
+
+create table if not exists state(
+ state_id varchar(255) primary key,
+ state_name varchar(255),
+ is_satisfied boolean,
+ condition varchar(255),
+ expectation_id varchar(255)
+);
+
+create table if not exists condition(
+ condition_id varchar(255) primary key,
+ condition_name varchar(255),
+ operator_type varchar(255),
+ condition_value varchar(255),
+ parent_id varchar(255)
+ );
+
+create table if not exists intent_management_function_reg_info(
+ imfr_info_id varchar(255) primary key,
+ imfr_info_description varchar(255),
+ support_area varchar(255),
+ support_model varchar(255),
+ support_interfaces varchar(255),
+ handle_name varchar(255),
+ intent_function_type varchar(255)
+ );
diff --git a/kubernetes/uui/components/uui-intent-analysis/resources/entrypoint/run.sh b/kubernetes/uui/components/uui-intent-analysis/resources/entrypoint/run.sh
new file mode 100644
index 0000000000..cf68e7c96a
--- /dev/null
+++ b/kubernetes/uui/components/uui-intent-analysis/resources/entrypoint/run.sh
@@ -0,0 +1,31 @@
+{{/*
+#
+# Copyright (C) 2022 Huawei Technologies Co., Ltd. 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.
+#
+*/}}
+
+main_path="/home/uui"
+echo @main_path@ $main_path
+
+JAVA_PATH="$JAVA_HOME/bin/java"
+JAVA_OPTS="-Xms50m -Xmx128m"
+echo @JAVA_PATH@ $JAVA_PATH
+echo @JAVA_OPTS@ $JAVA_OPTS
+
+jar_path="$main_path/usecase-ui-intent-analysis.jar"
+echo @jar_path@ $jar_path
+
+echo "Starting usecase-ui-intent-analysis..."
+$JAVA_PATH $JAVA_OPTS -classpath $jar_path -jar $jar_path $SPRING_OPTS