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
Commits
394c29be
Commit
394c29be
authored
2 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Pre-merge code cleanup
parent
1b5ba6ae
No related branches found
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!133
Integration of TE component
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/service/ServiceServiceServicerImpl.py
+4
-4
4 additions, 4 deletions
src/service/service/ServiceServiceServicerImpl.py
with
4 additions
and
4 deletions
src/service/service/ServiceServiceServicerImpl.py
+
4
−
4
View file @
394c29be
...
@@ -192,7 +192,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
...
@@ -192,7 +192,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
context_client
,
service_id_with_uuids
,
rw_copy
=
False
,
context_client
,
service_id_with_uuids
,
rw_copy
=
False
,
include_config_rules
=
True
,
include_constraints
=
True
,
include_endpoint_ids
=
True
)
include_config_rules
=
True
,
include_constraints
=
True
,
include_endpoint_ids
=
True
)
num_disjoint_paths
=
None
num_disjoint_paths
=
0
for
constraint
in
request
.
service_constraints
:
for
constraint
in
request
.
service_constraints
:
if
constraint
.
WhichOneof
(
'
constraint
'
)
==
'
sla_availability
'
:
if
constraint
.
WhichOneof
(
'
constraint
'
)
==
'
sla_availability
'
:
num_disjoint_paths
=
constraint
.
sla_availability
.
num_disjoint_paths
num_disjoint_paths
=
constraint
.
sla_availability
.
num_disjoint_paths
...
@@ -211,18 +211,18 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
...
@@ -211,18 +211,18 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
else
:
else
:
pathcomp_request
.
k_disjoint_path
.
num_disjoint
=
num_disjoint_paths
# pylint: disable=no-member
pathcomp_request
.
k_disjoint_path
.
num_disjoint
=
num_disjoint_paths
# pylint: disable=no-member
LOGGER
.
info
(
'
pathcomp_request={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_request
)))
LOGGER
.
debug
(
'
pathcomp_request={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_request
)))
pathcomp
=
PathCompClient
()
pathcomp
=
PathCompClient
()
pathcomp_reply
=
pathcomp
.
Compute
(
pathcomp_request
)
pathcomp_reply
=
pathcomp
.
Compute
(
pathcomp_request
)
pathcomp
.
close
()
pathcomp
.
close
()
LOGGER
.
info
(
'
pathcomp_reply={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_reply
)))
LOGGER
.
debug
(
'
pathcomp_reply={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_reply
)))
# Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among
# Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among
# the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be
# the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be
# executed) to implement the requested create/update operation.
# executed) to implement the requested create/update operation.
tasks_scheduler
.
compose_from_pathcompreply
(
pathcomp_reply
,
is_delete
=
False
)
tasks_scheduler
.
compose_from_pathcompreply
(
pathcomp_reply
,
is_delete
=
False
)
tasks_scheduler
.
execute_all
()
tasks_scheduler
.
execute_all
()
return
service_with_uuids
.
service_id
return
service_with_uuids
.
service_id
@safe_and_metered_rpc_method
(
METRICS_POOL
,
LOGGER
)
@safe_and_metered_rpc_method
(
METRICS_POOL
,
LOGGER
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment