Loading proto/service.proto +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ service ServiceService { rpc GetServiceList (context.Empty) returns (ServiceList) {} rpc CreateService (Service) returns (ServiceId) {} rpc UpdateService (Service) returns (ServiceId) {} rpc DeleteService (Service) returns (context.Empty) {} rpc DeleteService (ServiceId) returns (context.Empty) {} rpc GetServiceById (ServiceId) returns (Service) {} rpc GetConnectionList (context.Empty) returns (ConnectionList) {} Loading src/common/database/api/context/Keys.py +1 −1 Original line number Diff line number Diff line Loading @@ -34,4 +34,4 @@ KEY_SERVICE_CONSTRAINTS = KEY_SERVICE + '/constraints{container_name}' KEY_SERVICE_ENDPOINT = KEY_SERVICE + '/endpoint[{endpoint_uuid}]' # Context.Service.Constraint Keys KEY_SERVICE_CONSTRAINT = KEY_SERVICE + '/constraint[{constraint_uuid}]' KEY_SERVICE_CONSTRAINT = KEY_SERVICE + '/constraint[{constraint_type}]' src/common/database/api/context/service/Constraint.py +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class Constraint(_Entity): self.update(update_attributes={ 'constraint_value': constraint_value, }) self.parent.endpoints.add(self.constraint_type) self.parent.constraints.add(self.constraint_type) return self def update(self, update_attributes={}, remove_attributes=[]) -> 'Constraint': Loading @@ -48,7 +48,7 @@ class Constraint(_Entity): def delete(self) -> None: self.attributes.delete() self.parent.endpoints.delete(self.constraint_type) self.parent.constraints.delete(self.constraint_type) def dump_id(self) -> Dict: return { Loading src/common/database/api/context/service/Service.py +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class Service(_Entity): if isinstance(service_type, ServiceType): service_type = service_type.value service_state = attributes.get('service_state', None) if isinstance(service_state, ServiceState): service_state = service_state.value service_config = attributes.get('device_config', None) service_config = attributes.get('service_config', None) endpoints = [self.endpoint(endpoint_uuid).dump() for endpoint_uuid in self.endpoints.get()] constraints = [self.constraint(constraint_type).dump() for constraint_type in self.constraints.get()] return { Loading src/service/client/ServiceClient.py +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ class ServiceClient: return response @retry(exceptions=set(), max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') def DeleteService(self, request : Service) -> Empty: def DeleteService(self, request : ServiceId) -> Empty: LOGGER.debug('DeleteService request: {}'.format(request)) response = self.stub.DeleteService(request) LOGGER.debug('DeleteService result: {}'.format(response)) Loading Loading
proto/service.proto +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ service ServiceService { rpc GetServiceList (context.Empty) returns (ServiceList) {} rpc CreateService (Service) returns (ServiceId) {} rpc UpdateService (Service) returns (ServiceId) {} rpc DeleteService (Service) returns (context.Empty) {} rpc DeleteService (ServiceId) returns (context.Empty) {} rpc GetServiceById (ServiceId) returns (Service) {} rpc GetConnectionList (context.Empty) returns (ConnectionList) {} Loading
src/common/database/api/context/Keys.py +1 −1 Original line number Diff line number Diff line Loading @@ -34,4 +34,4 @@ KEY_SERVICE_CONSTRAINTS = KEY_SERVICE + '/constraints{container_name}' KEY_SERVICE_ENDPOINT = KEY_SERVICE + '/endpoint[{endpoint_uuid}]' # Context.Service.Constraint Keys KEY_SERVICE_CONSTRAINT = KEY_SERVICE + '/constraint[{constraint_uuid}]' KEY_SERVICE_CONSTRAINT = KEY_SERVICE + '/constraint[{constraint_type}]'
src/common/database/api/context/service/Constraint.py +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class Constraint(_Entity): self.update(update_attributes={ 'constraint_value': constraint_value, }) self.parent.endpoints.add(self.constraint_type) self.parent.constraints.add(self.constraint_type) return self def update(self, update_attributes={}, remove_attributes=[]) -> 'Constraint': Loading @@ -48,7 +48,7 @@ class Constraint(_Entity): def delete(self) -> None: self.attributes.delete() self.parent.endpoints.delete(self.constraint_type) self.parent.constraints.delete(self.constraint_type) def dump_id(self) -> Dict: return { Loading
src/common/database/api/context/service/Service.py +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class Service(_Entity): if isinstance(service_type, ServiceType): service_type = service_type.value service_state = attributes.get('service_state', None) if isinstance(service_state, ServiceState): service_state = service_state.value service_config = attributes.get('device_config', None) service_config = attributes.get('service_config', None) endpoints = [self.endpoint(endpoint_uuid).dump() for endpoint_uuid in self.endpoints.get()] constraints = [self.constraint(constraint_type).dump() for constraint_type in self.constraints.get()] return { Loading
src/service/client/ServiceClient.py +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ class ServiceClient: return response @retry(exceptions=set(), max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') def DeleteService(self, request : Service) -> Empty: def DeleteService(self, request : ServiceId) -> Empty: LOGGER.debug('DeleteService request: {}'.format(request)) response = self.stub.DeleteService(request) LOGGER.debug('DeleteService result: {}'.format(response)) Loading