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
763aad11
Commit
763aad11
authored
2 years ago
by
Carlos Manso
Browse files
Options
Downloads
Patches
Plain Diff
Select bugfix
parent
fce9aa69
No related branches found
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!89
First implementation of location-aware services
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/tests/MockServicerImpl_Context.py
+3
-4
3 additions, 4 deletions
src/common/tests/MockServicerImpl_Context.py
with
3 additions
and
4 deletions
src/common/tests/MockServicerImpl_Context.py
+
3
−
4
View file @
763aad11
...
...
@@ -222,7 +222,7 @@ class MockServicerImpl_Context(ContextServiceServicer):
LOGGER
.
info
(
'
[SelectDevice] request={:s}
'
.
format
(
grpc_message_to_json_string
(
request
)))
container_entry_uuids
:
Dict
[
str
,
Set
[
str
]]
=
{}
container_name
=
'
device
'
for
device_id
in
request
.
device_ids
:
for
device_id
in
request
.
device_ids
.
device_ids
:
device_uuid
=
device_id
.
device_uuid
.
uuid
container_entry_uuids
.
setdefault
(
container_name
,
set
()).
add
(
device_uuid
)
...
...
@@ -329,7 +329,7 @@ class MockServicerImpl_Context(ContextServiceServicer):
def
SelectSlice
(
self
,
request
:
SliceFilter
,
context
:
grpc
.
ServicerContext
)
->
SliceList
:
LOGGER
.
info
(
'
[SelectSlice] request={:s}
'
.
format
(
grpc_message_to_json_string
(
request
)))
container_entry_uuids
:
Dict
[
str
,
Set
[
str
]]
=
{}
for
slice_id
in
request
.
slice_ids
:
for
slice_id
in
request
.
slice_ids
.
slice_ids
:
container_name
=
'
slice[{:s}]
'
.
format
(
str
(
slice_id
.
context_id
.
context_uuid
.
uuid
))
slice_uuid
=
slice_id
.
slice_uuid
.
uuid
container_entry_uuids
.
setdefault
(
container_name
,
set
()).
add
(
slice_uuid
)
...
...
@@ -403,13 +403,12 @@ class MockServicerImpl_Context(ContextServiceServicer):
def
SelectService
(
self
,
request
:
ServiceFilter
,
context
:
grpc
.
ServicerContext
)
->
ServiceList
:
LOGGER
.
info
(
'
[SelectService] request={:s}
'
.
format
(
grpc_message_to_json_string
(
request
)))
LOGGER
.
warning
(
'
type: {}
'
.
format
(
type
(
request
)))
container_entry_uuids
:
Dict
[
str
,
Set
[
str
]]
=
{}
for
service_id
in
request
.
service_ids
.
service_ids
:
container_name
=
'
service[{:s}]
'
.
format
(
str
(
service_id
.
context_id
.
context_uuid
.
uuid
))
service_uuid
=
service_id
.
service_uuid
.
uuid
container_entry_uuids
.
setdefault
(
container_name
,
set
()).
add
(
service_uuid
)
exclude_endpoint_ids
=
not
request
.
include_endpoint_ids
exclude_constraints
=
not
request
.
include_constraints
exclude_config_rules
=
not
request
.
include_config_rules
...
...
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