Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Merge requests
!238
add tasks for partner creation, modification and deletion
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add tasks for partner creation, modification and deletion
feature/NAT-677-creat-update-task-for-partner
into
develop
Overview
2
Commits
4
Pipelines
13
Changes
17
Merged
Mohammad Torkashvand
requested to merge
feature/NAT-677-creat-update-task-for-partner
into
develop
10 months ago
Overview
2
Commits
4
Pipelines
13
Changes
17
Expand
0
0
Merge request reports
Compare
develop
version 12
2194003d
10 months ago
version 11
a230fbd8
10 months ago
version 10
d627a313
10 months ago
version 9
8b2822f4
10 months ago
version 8
98b9d9c1
10 months ago
version 7
070303a5
10 months ago
version 6
1b94915b
10 months ago
version 5
5c65d696
10 months ago
version 4
7a998401
10 months ago
version 3
478ddd19
10 months ago
version 2
f2b55c76
10 months ago
version 1
82e3e2f9
10 months ago
develop (base)
and
latest version
latest version
799803e1
4 commits,
10 months ago
version 12
2194003d
4 commits,
10 months ago
version 11
a230fbd8
3 commits,
10 months ago
version 10
d627a313
2 commits,
10 months ago
version 9
8b2822f4
1 commit,
10 months ago
version 8
98b9d9c1
1 commit,
10 months ago
version 7
070303a5
1 commit,
10 months ago
version 6
1b94915b
1 commit,
10 months ago
version 5
5c65d696
1 commit,
10 months ago
version 4
7a998401
1 commit,
10 months ago
version 3
478ddd19
1 commit,
10 months ago
version 2
f2b55c76
1 commit,
10 months ago
version 1
82e3e2f9
1 commit,
10 months ago
17 files
+
722
−
98
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
Search (e.g. *.vue) (Ctrl+P)
gso/db/models.py
+
1
−
26
Options
"""
Database model definitions and table mappings for the GSO system.
"""
import
enum
import
structlog
from
orchestrator.db
import
UtcTimestamp
from
orchestrator.db.database
import
BaseModel
from
sqlalchemy
import
(
Enum
,
String
,
text
,
)
from
sqlalchemy.dialects.postgresql
import
ARRAY
from
sqlalchemy.orm
import
mapped_column
logger
=
structlog
.
get_logger
(
__name__
)
class
PartnerType
(
str
,
enum
.
Enum
):
"""
Defining different types of partners in the GSO system.
"""
NREN
=
"
NREN
"
RE_PEER
=
"
RE_PEER
"
PUBLIC_PEER
=
"
PUBLIC_PEER
"
PRIVATE_PEER
=
"
PRIVATE_PEER
"
UPSTREAM
=
"
UPSTREAM
"
GEANT
=
"
GEANT
"
class
PartnerTable
(
BaseModel
):
"""
Database table for the partners in the GSO system.
"""
__tablename__
=
"
partners
"
partner_id
=
mapped_column
(
String
,
server_default
=
text
(
"
uuid_generate_v4
"
),
primary_key
=
True
)
name
=
mapped_column
(
String
,
unique
=
True
,
nullable
=
Tru
e
)
name
=
mapped_column
(
String
,
unique
=
True
,
nullable
=
Fals
e
)
email
=
mapped_column
(
String
,
unique
=
True
,
nullable
=
False
)
partner_type
=
mapped_column
(
Enum
(
PartnerType
),
nullable
=
False
)
as_number
=
mapped_column
(
String
,
unique
=
True
,
nullable
=
True
)
# the as_number and as_set are mutually exclusive. if you give me one I don't need the other
as_set
=
mapped_column
(
String
,
nullable
=
True
)
route_set
=
mapped_column
(
String
,
nullable
=
True
)
black_listed_as_sets
=
mapped_column
(
ARRAY
(
String
),
nullable
=
True
)
additional_routers
=
mapped_column
(
ARRAY
(
String
),
nullable
=
True
)
additional_bgp_speakers
=
mapped_column
(
ARRAY
(
String
),
nullable
=
True
)
created_at
=
mapped_column
(
UtcTimestamp
,
server_default
=
text
(
"
current_timestamp
"
),
nullable
=
False
)
updated_at
=
mapped_column
(
Loading