Update imports for new structure
This commit is contained in:
parent
676659cb6c
commit
50847877ed
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from app.deploy import get_stack_status
|
from app.deploy.deploy import get_stack_status
|
||||||
from decouple import config
|
from decouple import config
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from app.util import get_yaml
|
from app.util import get_yaml
|
||||||
from app.deploy_types import DeployCommandContext, LaconicStackSetupCommand, DeploymentContext
|
from app.deploy.deploy_types import DeployCommandContext, LaconicStackSetupCommand, DeploymentContext
|
||||||
from app.stack_state import State
|
from app.deploy.stack_state import State
|
||||||
from app.deploy_util import VolumeMapping, run_container_command
|
from app.deploy.deploy_util import VolumeMapping, run_container_command
|
||||||
from app.command_types import CommandOptions
|
from app.command_types import CommandOptions
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from app.util import get_yaml
|
from app.util import get_yaml
|
||||||
from app.deploy_types import DeployCommandContext
|
from app.deploy.deploy_types import DeployCommandContext
|
||||||
from app.stack_state import State
|
from app.deploy.stack_state import State
|
||||||
from app.deploy_util import VolumeMapping, run_container_command
|
from app.deploy.deploy_util import VolumeMapping, run_container_command
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
default_spec_file_content = """config:
|
default_spec_file_content = """config:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from python_on_whales import DockerClient, DockerException
|
from python_on_whales import DockerClient, DockerException
|
||||||
from app.deployer import Deployer, DeployerException
|
from app.deploy.deployer import Deployer, DeployerException
|
||||||
|
|
||||||
|
|
||||||
class DockerDeployer(Deployer):
|
class DockerDeployer(Deployer):
|
||||||
|
@ -25,12 +25,12 @@ import subprocess
|
|||||||
import click
|
import click
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from app.util import include_exclude_check, get_parsed_stack_config, global_options2, get_dev_root_path
|
from app.util import include_exclude_check, get_parsed_stack_config, global_options2, get_dev_root_path
|
||||||
from app.deployer import Deployer, DeployerException
|
from app.deploy.deployer import Deployer, DeployerException
|
||||||
from app.deployer_factory import getDeployer
|
from app.deploy.deployer_factory import getDeployer
|
||||||
from app.deploy_types import ClusterContext, DeployCommandContext
|
from app.deploy.deploy_types import ClusterContext, DeployCommandContext
|
||||||
from app.deployment_create import create as deployment_create
|
from app.deploy.deployment_create import create as deployment_create
|
||||||
from app.deployment_create import init as deployment_init
|
from app.deploy.deployment_create import init as deployment_init
|
||||||
from app.deployment_create import setup as deployment_setup
|
from app.deploy.deployment_create import setup as deployment_setup
|
||||||
|
|
||||||
|
|
||||||
@click.group()
|
@click.group()
|
||||||
|
@ -17,7 +17,7 @@ from typing import List
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from app.command_types import CommandOptions
|
from app.command_types import CommandOptions
|
||||||
from app.deployer import Deployer
|
from app.deploy.deployer import Deployer
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from typing import List
|
from typing import List
|
||||||
from app.deploy_types import DeployCommandContext, VolumeMapping
|
from app.deploy.deploy_types import DeployCommandContext, VolumeMapping
|
||||||
from app.util import get_parsed_stack_config, get_yaml, get_compose_file_dir, get_pod_list
|
from app.util import get_parsed_stack_config, get_yaml, get_compose_file_dir, get_pod_list
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from app.deploy_k8s import K8sDeployer
|
from app.deploy.k8s.deploy_k8s import K8sDeployer
|
||||||
from app.deploy_docker import DockerDeployer
|
from app.deploy.compose.deploy_docker import DockerDeployer
|
||||||
|
|
||||||
|
|
||||||
def getDeployer(type, compose_files, compose_project_name, compose_env_file):
|
def getDeployer(type, compose_files, compose_project_name, compose_env_file):
|
||||||
|
@ -18,8 +18,8 @@ from pathlib import Path
|
|||||||
import sys
|
import sys
|
||||||
from app.deploy import up_operation, down_operation, ps_operation, port_operation
|
from app.deploy import up_operation, down_operation, ps_operation, port_operation
|
||||||
from app.deploy import exec_operation, logs_operation, create_deploy_context
|
from app.deploy import exec_operation, logs_operation, create_deploy_context
|
||||||
from app.stack import Stack
|
from app.deploy.stack import Stack
|
||||||
from app.spec import Spec
|
from app.deploy.spec import Spec
|
||||||
|
|
||||||
|
|
||||||
class DeploymentContext:
|
class DeploymentContext:
|
||||||
|
@ -23,7 +23,7 @@ from shutil import copy, copyfile, copytree
|
|||||||
import sys
|
import sys
|
||||||
from app.util import (get_stack_file_path, get_parsed_deployment_spec, get_parsed_stack_config, global_options, get_yaml,
|
from app.util import (get_stack_file_path, get_parsed_deployment_spec, get_parsed_stack_config, global_options, get_yaml,
|
||||||
get_pod_list, get_pod_file_path, pod_has_scripts, get_pod_script_paths, get_plugin_code_path)
|
get_pod_list, get_pod_file_path, pod_has_scripts, get_pod_script_paths, get_plugin_code_path)
|
||||||
from app.deploy_types import DeploymentContext, DeployCommandContext, LaconicStackSetupCommand
|
from app.deploy.deploy_types import DeploymentContext, DeployCommandContext, LaconicStackSetupCommand
|
||||||
|
|
||||||
|
|
||||||
def _make_default_deployment_dir():
|
def _make_default_deployment_dir():
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from kubernetes import client, config
|
from kubernetes import client, config
|
||||||
from app.deployer import Deployer
|
from app.deploy.deployer import Deployer
|
||||||
|
|
||||||
|
|
||||||
class K8sDeployer(Deployer):
|
class K8sDeployer(Deployer):
|
||||||
|
Loading…
Reference in New Issue
Block a user