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
9dd7b10b
Commit
9dd7b10b
authored
2 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Slice component:
- Removed unneeded log messages/reduced log levels
parent
41f314a8
No related branches found
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!62
Add relese/2.0.1 fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/slice/service/SliceServiceServicerImpl.py
+8
-8
8 additions, 8 deletions
src/slice/service/SliceServiceServicerImpl.py
with
8 additions
and
8 deletions
src/slice/service/SliceServiceServicerImpl.py
+
8
−
8
View file @
9dd7b10b
...
...
@@ -24,7 +24,7 @@ from common.tools.grpc.ConfigRules import copy_config_rules
from
common.tools.grpc.Constraints
import
copy_constraints
from
common.tools.grpc.EndPointIds
import
copy_endpoint_ids
from
common.tools.grpc.ServiceIds
import
update_service_ids
from
common.tools.grpc.Tools
import
grpc_message_to_json_string
#
from common.tools.grpc.Tools import grpc_message_to_json_string
from
context.client.ContextClient
import
ContextClient
from
interdomain.client.InterdomainClient
import
InterdomainClient
from
service.client.ServiceClient
import
ServiceClient
...
...
@@ -109,13 +109,13 @@ class SliceServiceServicerImpl(SliceServiceServicer):
service_request
.
service_type
=
ServiceTypeEnum
.
SERVICETYPE_UNKNOWN
for
config_rule
in
request
.
slice_config
.
config_rules
:
LOGGER
.
info
(
'
config_rule: {:s}
'
.
format
(
grpc_message_to_json_string
(
config_rule
)))
#
LOGGER.
debug
('config_rule: {:s}'.format(grpc_message_to_json_string(config_rule)))
config_rule_kind
=
config_rule
.
WhichOneof
(
'
config_rule
'
)
LOGGER
.
info
(
'
config_rule_kind: {:s}
'
.
format
(
str
(
config_rule_kind
)))
#
LOGGER.
debug
('config_rule_kind: {:s}'.format(str(config_rule_kind)))
if
config_rule_kind
!=
'
custom
'
:
continue
custom
=
config_rule
.
custom
resource_key
=
custom
.
resource_key
LOGGER
.
info
(
'
resource_key: {:s}
'
.
format
(
str
(
resource_key
)))
#
LOGGER.
debug
('resource_key: {:s}'.format(str(resource_key)))
# TODO: parse resource key with regular expression, e.g.:
# m = re.match('\/device\[[^\]]\]\/endpoint\[[^\]]\]\/settings', s)
...
...
@@ -123,21 +123,21 @@ class SliceServiceServicerImpl(SliceServiceServicer):
if
not
resource_key
.
endswith
(
'
/settings
'
):
continue
resource_value
=
json
.
loads
(
custom
.
resource_value
)
LOGGER
.
info
(
'
resource_value: {:s}
'
.
format
(
str
(
resource_value
)))
#
LOGGER.
debug
('resource_value: {:s}'.format(str(resource_value)))
if
service_request
.
service_type
==
ServiceTypeEnum
.
SERVICETYPE_UNKNOWN
:
if
(
resource_value
.
get
(
'
address_ip
'
)
is
not
None
and
\
resource_value
.
get
(
'
address_prefix
'
)
is
not
None
):
service_request
.
service_type
=
ServiceTypeEnum
.
SERVICETYPE_L3NM
LOGGER
.
info
(
'
is L3
'
)
#
LOGGER.
debug
('is L3')
else
:
service_request
.
service_type
=
ServiceTypeEnum
.
SERVICETYPE_L2NM
LOGGER
.
info
(
'
is L2
'
)
#
LOGGER.
debug
('is L2')
break
if
service_request
.
service_type
==
ServiceTypeEnum
.
SERVICETYPE_UNKNOWN
:
service_request
.
service_type
=
ServiceTypeEnum
.
SERVICETYPE_L2NM
LOGGER
.
info
(
'
assume L2
'
)
#
LOGGER.
debug
('assume L2')
service_client
.
UpdateService
(
service_request
)
...
...
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