diff --git a/console/repositories/app.py b/console/repositories/app.py index 7dd5e08b04..1f89502972 100644 --- a/console/repositories/app.py +++ b/console/repositories/app.py @@ -11,7 +11,7 @@ from console.repositories.base import BaseConnection from django.db import transaction from docker_image import reference -from www.models.main import (ServiceWebhooks, TenantServiceInfo, TenantServiceInfoDelete, OpenApiDeployAppEvent) +from www.models.main import (ServiceWebhooks, TenantServiceInfo, TenantServiceInfoDelete) logger = logging.getLogger('default') @@ -502,19 +502,6 @@ def update_access_key(self, enterprise_id, name, access_key): return AppMarket.objects.filter(enterprise_id=enterprise_id, name=name).update(access_key=access_key) -class DeployAppEvent(object): - def get_deploy_app_event(self, event_id): - event = OpenApiDeployAppEvent.objects.filter(event_id=event_id) - if not event: - raise ServiceHandleException(status_code=404, msg="no found event", msg_show="事件信息不存在") - - def create_deploy_app_event(self, kwargs): - return OpenApiDeployAppEvent.objects.create(**kwargs) - - def update_deploy_app_event(self, event_id, kwargs): - return OpenApiDeployAppEvent.objects.filter(event_id=event_id).update(**kwargs) - - service_repo = TenantServiceInfoRepository() service_source_repo = ServiceSourceRepository() recycle_bin_repo = ServiceRecycleBinRepository() @@ -523,4 +510,4 @@ def update_deploy_app_event(self, event_id, kwargs): service_webhooks_repo = TenantServiceWebhooks() app_tag_repo = AppTagRepository() app_market_repo = AppMarketRepository() -deploy_app_event = DeployAppEvent() + diff --git a/console/services/group_service.py b/console/services/group_service.py index f4826bea4b..0590202202 100644 --- a/console/services/group_service.py +++ b/console/services/group_service.py @@ -12,7 +12,7 @@ from console.enum.app import GovernanceModeEnum, AppType from console.exception.bcode import ErrUserNotFound, ErrApplicationNotFound, ErrK8sAppExists from console.exception.main import AbortRequest, ServiceHandleException -from console.repositories.app import service_repo, service_source_repo, deploy_app_event +from console.repositories.app import service_repo, service_source_repo from console.repositories.app_config import (domain_repo, env_var_repo, port_repo, tcp_domain, dep_relation_repo) from console.repositories.app_config_group import app_config_group_repo from console.repositories.backup_repo import backup_record_repo @@ -926,14 +926,4 @@ def get_watch_managed_data(self, tenant, region_name, app_id): } return data - def get_deploy_app_event(self, event_id): - return deploy_app_event.get_deploy_app_event(event_id=event_id) - - def create_deploy_app_event(self, kwargs): - return deploy_app_event.create_deploy_app_event(kwargs=kwargs) - - def update_deploy_app_event(self, event_id, kwargs): - return deploy_app_event.update_deploy_app_event(event_id=event_id, kwargs=kwargs) - - group_service = GroupService() diff --git a/console/services/region_services.py b/console/services/region_services.py index 42735982fd..9350023b89 100644 --- a/console/services/region_services.py +++ b/console/services/region_services.py @@ -599,7 +599,7 @@ def conver_region_info(self, region, check_status, level="open"): enterprise_id=region.enterprise_id, region=region.region_name) region_services_status = region_repo.get_service_status_count_by_region_name(region) res, body = region_api.get_region_resources(region.enterprise_id, region=region.region_name) - rbd_version = "" + rbd_version = rbd_version["raw"] if res.get("status") == 200: region_resource["total_memory"] = body["bean"]["cap_mem"] region_resource["used_memory"] = body["bean"]["req_mem"] diff --git a/openapi/services/component_action.py b/openapi/services/component_action.py index 4cf933210e..1fe3229b0f 100644 --- a/openapi/services/component_action.py +++ b/openapi/services/component_action.py @@ -37,9 +37,4 @@ def component_build(self, tenant: Tenants, component: TenantServiceInfo, user: U raise ServiceHandleException(msg=message, msg_show=message, status_code=code) -class DeployApp(object): - def deploy_app_by_ram(self): - return - - component_action_service = ComponnetActionService()