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
a21008c9
Commit
a21008c9
authored
1 year ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Device - IETF ACTN Driver:
- Add mgmt endpoint by default
parent
3ab5419e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/device/service/drivers/ietf_actn/IetfActnDriver.py
+8
-2
8 additions, 2 deletions
src/device/service/drivers/ietf_actn/IetfActnDriver.py
with
8 additions
and
2 deletions
src/device/service/drivers/ietf_actn/IetfActnDriver.py
+
8
−
2
View file @
a21008c9
...
...
@@ -16,7 +16,7 @@ import json, logging, requests, threading
from
typing
import
Any
,
Iterator
,
List
,
Optional
,
Tuple
,
Union
from
common.method_wrappers.Decorator
import
MetricsPool
,
metered_subclass_method
from
common.type_checkers.Checkers
import
chk_string
,
chk_type
from
device.service.driver_api._Driver
import
_Driver
,
RESOURCE_SERVICES
from
device.service.driver_api._Driver
import
_Driver
,
RESOURCE_ENDPOINTS
,
RESOURCE_SERVICES
from
.handlers.EthtServiceHandler
import
EthtServiceHandler
from
.handlers.OsuTunnelHandler
import
OsuTunnelHandler
from
.handlers.RestApiClient
import
RestApiClient
...
...
@@ -25,6 +25,7 @@ from .Tools import get_etht_services, get_osu_tunnels, parse_resource_key
LOGGER
=
logging
.
getLogger
(
__name__
)
ALL_RESOURCE_KEYS
=
[
RESOURCE_ENDPOINTS
,
RESOURCE_SERVICES
,
]
...
...
@@ -78,7 +79,12 @@ class IetfActnDriver(_Driver):
try
:
_results
=
list
()
if
resource_key
==
RESOURCE_SERVICES
:
if
resource_key
==
RESOURCE_ENDPOINTS
:
# Add mgmt endpoint by default
resource_key
=
'
/endpoints/endpoint[mgmt]
'
resource_value
=
{
'
uuid
'
:
'
mgmt
'
,
'
name
'
:
'
mgmt
'
,
'
type
'
:
'
mgmt
'
}
results
.
append
((
resource_key
,
resource_value
))
elif
resource_key
==
RESOURCE_SERVICES
:
get_osu_tunnels
(
self
.
_handler_osu_tunnel
,
_results
)
get_etht_services
(
self
.
_handler_etht_service
,
_results
)
else
:
...
...
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