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
1b5ba6ae
Commit
1b5ba6ae
authored
1 year ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Pre-merge code cleanup
parent
64370dc1
No related branches found
Branches containing commit
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!133
Integration of TE component
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/service/ServiceServiceServicerImpl.py
+16
-22
16 additions, 22 deletions
src/service/service/ServiceServiceServicerImpl.py
with
16 additions
and
22 deletions
src/service/service/ServiceServiceServicerImpl.py
+
16
−
22
View file @
1b5ba6ae
...
@@ -206,27 +206,21 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
...
@@ -206,27 +206,21 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
pathcomp_request
=
PathCompRequest
()
pathcomp_request
=
PathCompRequest
()
pathcomp_request
.
services
.
append
(
service_with_uuids
)
# pylint: disable=no-member
pathcomp_request
.
services
.
append
(
service_with_uuids
)
# pylint: disable=no-member
tasks_scheduler
=
TasksScheduler
(
self
.
service_handler_factory
)
if
num_disjoint_paths
is
None
or
num_disjoint_paths
in
{
0
,
1
}:
if
len
(
service_with_uuids
.
service_endpoint_ids
)
>=
num_expected_endpoints
:
pathcomp_request
.
shortest_path
.
Clear
()
# pylint: disable=no-member
pathcomp_request
=
PathCompRequest
()
else
:
pathcomp_request
.
services
.
append
(
service_with_uuids
)
# pylint: disable=no-member
pathcomp_request
.
k_disjoint_path
.
num_disjoint
=
num_disjoint_paths
# pylint: disable=no-member
if
num_disjoint_paths
is
None
or
num_disjoint_paths
in
{
0
,
1
}:
LOGGER
.
info
(
'
pathcomp_request={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_request
)))
pathcomp_request
.
shortest_path
.
Clear
()
# pylint: disable=no-member
pathcomp
=
PathCompClient
()
else
:
pathcomp_reply
=
pathcomp
.
Compute
(
pathcomp_request
)
pathcomp_request
.
k_disjoint_path
.
num_disjoint
=
num_disjoint_paths
# pylint: disable=no-member
pathcomp
.
close
()
LOGGER
.
info
(
'
pathcomp_reply={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_reply
)))
LOGGER
.
info
(
'
pathcomp_request={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_request
)))
pathcomp
=
PathCompClient
()
# Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among
pathcomp_reply
=
pathcomp
.
Compute
(
pathcomp_request
)
# the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be
pathcomp
.
close
()
# executed) to implement the requested create/update operation.
LOGGER
.
info
(
'
pathcomp_reply={:s}
'
.
format
(
grpc_message_to_json_string
(
pathcomp_reply
)))
tasks_scheduler
.
compose_from_pathcompreply
(
pathcomp_reply
,
is_delete
=
False
)
# 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
# executed) to implement the requested create/update operation.
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
...
@@ -414,4 +408,4 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
...
@@ -414,4 +408,4 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
updated_service_with_uuids
,
old_connection
,
new_connection
)
updated_service_with_uuids
,
old_connection
,
new_connection
)
tasks_scheduler
.
execute_all
()
tasks_scheduler
.
execute_all
()
return
Empty
()
return
Empty
()
\ No newline at end of file
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