-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated yang models: - entities and relationships can now have groups - updated most relationship descriptions - added attributes to AntennaModule - added dUpLMNId to ODUFunction - updated Sector azimuth to decimal degrees - added an ANTENNAMODULE_SERVES_NRCELLDU relationship * Added auditing to teiv * Refactoring of teiv * Updated pgsql-schema-generator to generate groups - can run as both a jar and through the IDE * Updated exposure.Dockerfile to work with groups * Updated cloud event example Issue-ID: SMO-168 Issue-ID: SMO-169 Change-Id: I316c5766862cd0ff3e3275e81058090cbf092fe8 Signed-off-by: JvD_Ericsson <[email protected]>
- Loading branch information
1 parent
4b19403
commit 1ca7e0a
Showing
393 changed files
with
40,313 additions
and
10,624 deletions.
There are no files selected for viewing
98 changes: 61 additions & 37 deletions
98
charts/smo/topology-exposure-inventory/resources/init_sql/00_init-teiv-exposure-model.sql
Large diffs are not rendered by default.
Oops, something went wrong.
172 changes: 143 additions & 29 deletions
172
charts/smo/topology-exposure-inventory/resources/init_sql/01_init-teiv-exposure-data.sql
Large diffs are not rendered by default.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
charts/smo/topology-exposure-inventory/resources/init_sql/03_init-teiv-exposure-groups.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
-- | ||
-- ============LICENSE_START======================================================= | ||
-- Copyright (C) 2024 Ericsson | ||
-- Modifications Copyright (C) 2024 OpenInfra Foundation Europe | ||
-- ================================================================================ | ||
-- 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========================================================= | ||
-- | ||
|
||
BEGIN; | ||
|
||
CREATE SCHEMA IF NOT EXISTS ties_groups; | ||
ALTER SCHEMA ties_groups OWNER TO topology_exposure_user; | ||
SET default_tablespace = ''; | ||
SET default_table_access_method = heap; | ||
|
||
SET ROLE 'topology_exposure_user'; | ||
|
||
-- Function to create CONSTRAINT only if it does not exists | ||
CREATE OR REPLACE FUNCTION ties_groups.create_constraint_if_not_exists ( | ||
t_name TEXT, c_name TEXT, constraint_sql TEXT | ||
) | ||
RETURNS void AS | ||
$$ | ||
BEGIN | ||
IF NOT EXISTS (SELECT constraint_name FROM information_schema.table_constraints WHERE table_schema = 'ties_groups' AND table_name = t_name AND constraint_name = c_name) THEN | ||
EXECUTE constraint_sql; | ||
END IF; | ||
END; | ||
$$ language 'plpgsql'; | ||
|
||
CREATE TABLE IF NOT EXISTS ties_groups."groups" ( | ||
"id" VARCHAR(150) PRIMARY KEY, | ||
"name" VARCHAR(150) NOT NULL, | ||
"type" VARCHAR(50) NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS ties_groups."static_groups" ( | ||
"id" VARCHAR(150), | ||
"topology_type" TEXT NOT NULL, | ||
"provided_members_ids" TEXT[] NOT NULL, | ||
PRIMARY KEY ("id", "topology_type"), | ||
FOREIGN KEY ("id") REFERENCES ties_groups."groups" ("id") ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS ties_groups."dynamic_groups" ( | ||
"id" VARCHAR(150) PRIMARY KEY, | ||
"criteria" JSONB NOT NULL, | ||
FOREIGN KEY ("id") REFERENCES ties_groups."groups" ("id") ON DELETE CASCADE | ||
); | ||
|
||
SELECT ties_groups.create_constraint_if_not_exists( | ||
'groups', | ||
'CHECK_groups_type', | ||
'ALTER TABLE ties_groups."groups" ADD CONSTRAINT "CHECK_groups_type" CHECK ("type" IN (''static'', ''dynamic''))' | ||
); | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.