예제 #1
0
 def __init__(self):
     self.YOUTUBE_VIDEO_ID_LIST = LocalSettingsLoader(
     ).LOCAL_SETTINGS['YOUTUBE_VIDEO_ID_LIST']
     self.file_helper_obj = FileHelper()
     self.shell_executor = ShellExecutor()
예제 #2
0
 def __init__(self):
     self.local_settings_loader_obj = LocalSettingsLoader()
     self.shell_executor_obj = ShellExecutor()
     self.system_user_name = getpass.getuser()
     self.git_folder_path = 'cd $SYSTEM_ROOT_GIT_REPO_FOLDER/'.format(
         system_user_name=self.system_user_name)
예제 #3
0
 def __init__(self,topic):
     self.topic = topic
     self.shell_exec = ShellExecutor()
예제 #4
0
from cloud_provider import DigitalOceanCloudProvider
from input_adapter import FileInputAdapter
from shell_executor import ShellExecutor


class ApplicationController:
    def __init__(self, input_adapter, cloud_provider, shell_executor):
        self.input_adapter = input_adapter
        self.cloud_provider = cloud_provider
        self.shell_executor = shell_executor

    def run(self):
        config = self.input_adapter.read()
        print(config)
        ips = self.cloud_provider.run(config)
        self.shell_executor.run(config, ips)


ApplicationController(input_adapter=FileInputAdapter(file_name="input.json"),
                      cloud_provider=DigitalOceanCloudProvider(),
                      shell_executor=ShellExecutor()).run()