From a3ce7457a800e4b624a2966b34044c3d0db0748d Mon Sep 17 00:00:00 2001 From: meek Date: Wed, 25 Oct 2023 16:27:23 +0200 Subject: [PATCH] SingleLayerTeamsSmell's only refactoring is now SpliTeamsByService --- microfreshener/core/analyser/costants.py | 4 ++-- microfreshener/core/analyser/smell.py | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/microfreshener/core/analyser/costants.py b/microfreshener/core/analyser/costants.py index 28b119c..8efc6c3 100644 --- a/microfreshener/core/analyser/costants.py +++ b/microfreshener/core/analyser/costants.py @@ -1,5 +1,5 @@ SMELLS_NAME = SMELL_ENDPOINT_BASED_SERVICE_INTERACTION, SMELL_WOBBLY_SERVICE_INTERACTION_SMELL, SMELL_SHARED_PERSISTENCY, SMELL_NO_API_GATEWAY, SMELL_SINGLE_LAYER_TEAMS, SMELL_MULTIPLE_SERVICES_IN_ONE_CONTAINER, SMELL_ESB_MISUSE =\ "Endpoint-based-service-interaction", "Wobbly-service-interaction", "Shared-persistency", "No-api-gateway", "Single-layer-teams", "Multiple-services-in-one-container", "ESB-misuse" -REFACTORING_NAMES = REFACTORING_ADD_SERVICE_DISCOVERY, REFACTORING_ADD_MESSAGE_ROUTER, REFACTORING_ADD_MESSAGE_BROKER, REFACTORING_ADD_CIRCUIT_BREAKER, REFACTORING_USE_TIMEOUT, REFACTORING_MERGE_SERVICES, REFACTORING_SPLIT_DATABASE, REFACTORING_ADD_DATA_MANAGER, REFACTORING_ADD_API_GATEWAY, REFACTORING_ADD_TEAM_DATA_MANAGER, REFACTORING_CHANGE_DATABASE_OWENRSHIP, REFACTORING_CHANGE_SERVICE_OWENRSHIP, REFACTORING_SPLIT_SERVICES, REFACTORING_MERGE_TEAMS =\ - 'Add-service-discovery', 'Add-message-router', 'Add-message-broker', 'Add-circuit-breaker', "Use-timeout", "Merge-service", "Split-Datastore", "Add-data-manager", "Add-api-gateway", "Add-data-team-data-manager", "Change-Datastore-ownership","Change-service-ownership","Split-service-in-two-pods", "Merge-teams" +REFACTORING_NAMES = REFACTORING_ADD_SERVICE_DISCOVERY, REFACTORING_ADD_MESSAGE_ROUTER, REFACTORING_ADD_MESSAGE_BROKER, REFACTORING_ADD_CIRCUIT_BREAKER, REFACTORING_USE_TIMEOUT, REFACTORING_MERGE_SERVICES, REFACTORING_SPLIT_DATABASE, REFACTORING_ADD_DATA_MANAGER, REFACTORING_ADD_API_GATEWAY, REFACTORING_SPLIT_SERVICES, REFACTORING_SPLIT_TEAMS_BY_SERVICE =\ + "Add-service-discovery", "Add-message-router", "Add-message-broker", "Add-circuit-breaker", "Use-timeout", "Merge-service", "Split-Datastore", "Add-data-manager", "Add-api-gateway", "Split-service-in-two-pods", "Split-teams-by-service" diff --git a/microfreshener/core/analyser/smell.py b/microfreshener/core/analyser/smell.py index 0c2beea..d0bf816 100644 --- a/microfreshener/core/analyser/smell.py +++ b/microfreshener/core/analyser/smell.py @@ -1,7 +1,7 @@ from ..model import Relationship from ..model import nodes from .costants import SMELL_ENDPOINT_BASED_SERVICE_INTERACTION, SMELL_NO_API_GATEWAY, SMELL_SHARED_PERSISTENCY, SMELL_WOBBLY_SERVICE_INTERACTION_SMELL, SMELL_SINGLE_LAYER_TEAMS, SMELL_MULTIPLE_SERVICES_IN_ONE_CONTAINER -from .costants import REFACTORING_ADD_SERVICE_DISCOVERY, REFACTORING_ADD_MESSAGE_ROUTER, REFACTORING_ADD_MESSAGE_BROKER, REFACTORING_ADD_CIRCUIT_BREAKER, REFACTORING_USE_TIMEOUT, REFACTORING_MERGE_SERVICES, REFACTORING_SPLIT_DATABASE, REFACTORING_ADD_DATA_MANAGER, REFACTORING_ADD_API_GATEWAY, REFACTORING_ADD_TEAM_DATA_MANAGER, REFACTORING_CHANGE_DATABASE_OWENRSHIP, REFACTORING_CHANGE_SERVICE_OWENRSHIP, REFACTORING_SPLIT_SERVICES, REFACTORING_MERGE_TEAMS +from .costants import REFACTORING_ADD_SERVICE_DISCOVERY, REFACTORING_ADD_MESSAGE_ROUTER, REFACTORING_ADD_MESSAGE_BROKER, REFACTORING_ADD_CIRCUIT_BREAKER, REFACTORING_USE_TIMEOUT, REFACTORING_MERGE_SERVICES, REFACTORING_SPLIT_DATABASE, REFACTORING_ADD_DATA_MANAGER, REFACTORING_ADD_API_GATEWAY, REFACTORING_SPLIT_SERVICES, REFACTORING_SPLIT_TEAMS_BY_SERVICE class Smell(object): def __init__(self, name): @@ -143,10 +143,7 @@ def __str__(self): def to_dict(self): sup_dict = super(SingleLayerTeamsSmell, self).to_dict() return {**sup_dict, **{"refactorings": [ - {"name": REFACTORING_SPLIT_DATABASE, "description": "Split the Datastore."}, - {"name": REFACTORING_MERGE_TEAMS, "description": "Merge the teams owning the different nodes."}, - {"name": REFACTORING_CHANGE_DATABASE_OWENRSHIP, "description": "Move the Datastore to another team"}, - {"name": REFACTORING_CHANGE_SERVICE_OWENRSHIP, "description": "Move the service to another team"}, + {"name": REFACTORING_SPLIT_TEAMS_BY_SERVICE, "description": "Split the teams by service."}, ]}} class MultipleServicesInOneContainerSmell(NodeSmell):