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
6d9323aa
Commit
6d9323aa
authored
2 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Device component:
- Minor code cleanup before merging
parent
8eac01b3
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/device/service/Tools.py
+3
-5
3 additions, 5 deletions
src/device/service/Tools.py
with
3 additions
and
5 deletions
src/device/service/Tools.py
+
3
−
5
View file @
6d9323aa
...
@@ -21,8 +21,6 @@ from common.proto.device_pb2 import MonitoringSettings
...
@@ -21,8 +21,6 @@ from common.proto.device_pb2 import MonitoringSettings
from
common.proto.kpi_sample_types_pb2
import
KpiSampleType
from
common.proto.kpi_sample_types_pb2
import
KpiSampleType
from
common.tools.grpc.ConfigRules
import
update_config_rule_custom
from
common.tools.grpc.ConfigRules
import
update_config_rule_custom
from
common.tools.grpc.Tools
import
grpc_message_to_json
from
common.tools.grpc.Tools
import
grpc_message_to_json
from
context.client.ContextClient
import
ContextClient
from
google.protobuf
import
json_format
from
.driver_api._Driver
import
_Driver
,
RESOURCE_ENDPOINTS
from
.driver_api._Driver
import
_Driver
,
RESOURCE_ENDPOINTS
from
.monitoring.MonitoringLoops
import
MonitoringLoops
from
.monitoring.MonitoringLoops
import
MonitoringLoops
from
.ErrorMessages
import
(
from
.ErrorMessages
import
(
...
@@ -195,9 +193,9 @@ def populate_endpoints(
...
@@ -195,9 +193,9 @@ def populate_endpoints(
device_endpoint
.
kpi_sample_types
.
append
(
kpi_sample_type
)
device_endpoint
.
kpi_sample_types
.
append
(
kpi_sample_type
)
monitoring_loops
.
add_resource_key
(
device_uuid
,
endpoint_uuid
,
kpi_sample_type
,
monitor_resource_key
)
monitoring_loops
.
add_resource_key
(
device_uuid
,
endpoint_uuid
,
kpi_sample_type
,
monitor_resource_key
)
location
=
resource_value
.
get
(
'
location
'
,
{}
)
location
=
resource_value
.
get
(
'
location
'
,
None
)
if
location
:
if
location
is
not
None
:
json_format
.
Parse
(
json
.
dumps
(
location
),
device_endpoint
.
endpoint_location
)
device_endpoint
.
endpoint_location
.
MergeFrom
(
Location
(
**
location
)
)
elif
resource_key
.
startswith
(
'
/links/link
'
):
elif
resource_key
.
startswith
(
'
/links/link
'
):
# create sub-link
# create sub-link
...
...
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