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
41befba7
Commit
41befba7
authored
2 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Service component:
- Added update of ServiceType during UpdateService
parent
7a612dd1
No related branches found
No related tags found
2 merge requests
!54
Release 2.0.0
,
!43
CI pipeline and multiple module fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/service/ServiceServiceServicerImpl.py
+3
-1
3 additions, 1 deletion
src/service/service/ServiceServiceServicerImpl.py
with
3 additions
and
1 deletion
src/service/service/ServiceServiceServicerImpl.py
+
3
−
1
View file @
41befba7
...
@@ -16,7 +16,7 @@ import grpc, json, logging
...
@@ -16,7 +16,7 @@ import grpc, json, logging
from
typing
import
Optional
from
typing
import
Optional
from
common.method_wrappers.Decorator
import
MetricsPool
,
safe_and_metered_rpc_method
from
common.method_wrappers.Decorator
import
MetricsPool
,
safe_and_metered_rpc_method
from
common.method_wrappers.ServiceExceptions
import
AlreadyExistsException
,
InvalidArgumentException
from
common.method_wrappers.ServiceExceptions
import
AlreadyExistsException
,
InvalidArgumentException
from
common.proto.context_pb2
import
Empty
,
Service
,
ServiceId
,
ServiceStatusEnum
from
common.proto.context_pb2
import
Empty
,
Service
,
ServiceId
,
ServiceStatusEnum
,
ServiceTypeEnum
from
common.proto.pathcomp_pb2
import
PathCompRequest
from
common.proto.pathcomp_pb2
import
PathCompRequest
from
common.proto.service_pb2_grpc
import
ServiceServiceServicer
from
common.proto.service_pb2_grpc
import
ServiceServiceServicer
from
common.tools.grpc.Tools
import
grpc_message_to_json
,
grpc_message_to_json_string
from
common.tools.grpc.Tools
import
grpc_message_to_json
,
grpc_message_to_json_string
...
@@ -93,6 +93,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
...
@@ -93,6 +93,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
_service
:
Optional
[
Service
]
=
get_service
(
context_client
,
request
.
service_id
)
_service
:
Optional
[
Service
]
=
get_service
(
context_client
,
request
.
service_id
)
service
=
Service
()
service
=
Service
()
service
.
CopyFrom
(
request
if
_service
is
None
else
_service
)
service
.
CopyFrom
(
request
if
_service
is
None
else
_service
)
if
service
.
service_type
==
ServiceTypeEnum
.
SERVICETYPE_UNKNOWN
:
# pylint: disable=no-member
service
.
service_type
=
request
.
service_type
# pylint: disable=no-member
service
.
service_status
.
service_status
=
ServiceStatusEnum
.
SERVICESTATUS_PLANNED
# pylint: disable=no-member
service
.
service_status
.
service_status
=
ServiceStatusEnum
.
SERVICESTATUS_PLANNED
# pylint: disable=no-member
del
service
.
service_endpoint_ids
[:]
# pylint: disable=no-member
del
service
.
service_endpoint_ids
[:]
# pylint: disable=no-member
...
...
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