Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
TFS
controller
Merge requests
!343
fix: ignore default rules when service config exists
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix: ignore default rules when service config exists
pr-path-comp-fix
into
develop
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Georgios Katsikas
requested to merge
pr-path-comp-fix
into
develop
1 month ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes issue
#283 (closed)
Edited
1 month ago
by
Georgios Katsikas
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
f2bdaff9
1 commit,
1 month ago
1 file
+
11
−
3
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/pathcomp/frontend/service/algorithms/_Algorithm.py
+
11
−
3
Options
@@ -176,13 +176,19 @@ class _Algorithm:
@@ -176,13 +176,19 @@ class _Algorithm:
service
.
service_id
.
context_id
.
context_uuid
.
uuid
=
context_uuid
service
.
service_id
.
context_id
.
context_uuid
.
uuid
=
context_uuid
service
.
service_id
.
service_uuid
.
uuid
=
service_uuid
service
.
service_id
.
service_uuid
.
uuid
=
service_uuid
service
.
service_type
=
service_type
service
.
service_type
=
service_type
rules_nb
=
len
(
config_rules
)
if
service_type
==
ServiceTypeEnum
.
SERVICETYPE_L2NM
:
if
service_type
==
ServiceTypeEnum
.
SERVICETYPE_L2NM
and
rules_nb
==
0
:
compose_l2nm_config_rules
(
config_rules
,
service
.
service_config
.
config_rules
)
compose_l2nm_config_rules
(
config_rules
,
service
.
service_config
.
config_rules
)
elif
service_type
==
ServiceTypeEnum
.
SERVICETYPE_L3NM
:
self
.
logger
.
info
(
"
Installing default rules for L2NM service
"
)
pass
elif
service_type
==
ServiceTypeEnum
.
SERVICETYPE_L3NM
and
rules_nb
==
0
:
compose_l3nm_config_rules
(
config_rules
,
service
.
service_config
.
config_rules
)
compose_l3nm_config_rules
(
config_rules
,
service
.
service_config
.
config_rules
)
elif
service_type
==
ServiceTypeEnum
.
SERVICETYPE_TAPI_CONNECTIVITY_SERVICE
:
self
.
logger
.
info
(
"
Installing default rules for L3NM service
"
)
pass
elif
service_type
==
ServiceTypeEnum
.
SERVICETYPE_TAPI_CONNECTIVITY_SERVICE
and
rules_nb
==
0
:
compose_tapi_config_rules
(
config_rules
,
service
.
service_config
.
config_rules
)
compose_tapi_config_rules
(
config_rules
,
service
.
service_config
.
config_rules
)
self
.
logger
.
info
(
"
Installing default rules for TAPI service
"
)
else
:
else
:
MSG
=
'
Unhandled generic Config Rules for service {:s} {:s}
'
MSG
=
'
Unhandled generic Config Rules for service {:s} {:s}
'
self
.
logger
.
warning
(
MSG
.
format
(
str
(
service_uuid
),
str
(
ServiceTypeEnum
.
Name
(
service_type
))))
self
.
logger
.
warning
(
MSG
.
format
(
str
(
service_uuid
),
str
(
ServiceTypeEnum
.
Name
(
service_type
))))
@@ -208,6 +214,8 @@ class _Algorithm:
@@ -208,6 +214,8 @@ class _Algorithm:
service
.
timestamp
.
CopyFrom
(
tuple_service
[
1
].
timestamp
)
service
.
timestamp
.
CopyFrom
(
tuple_service
[
1
].
timestamp
)
for
constraint
in
tuple_service
[
1
].
service_constraints
:
for
constraint
in
tuple_service
[
1
].
service_constraints
:
service
.
service_constraints
.
add
().
CopyFrom
(
constraint
)
service
.
service_constraints
.
add
().
CopyFrom
(
constraint
)
for
config_rule
in
config_rules
:
service
.
service_config
.
config_rules
.
add
().
CopyFrom
(
config_rule
)
return
service
return
service
Loading