예제 #1
0
def test_get_marathon_clients_from_config():
    with mock.patch("paasta_tools.deployd.common.load_system_paasta_config",
                    autospec=True), mock.patch(
                        "paasta_tools.deployd.common.get_marathon_servers",
                        autospec=True), mock.patch(
                            "paasta_tools.deployd.common.get_marathon_clients",
                            autospec=True) as mock_marathon_clients:
        assert get_marathon_clients_from_config(
        ) == mock_marathon_clients.return_value
예제 #2
0
 def __init__(
     self,
     instances_to_bounce: DelayDeadlineQueueProtocol,
     cluster: str,
     config: SystemPaastaConfig,
     **kwargs: Any,
 ) -> None:
     super().__init__(instances_to_bounce, cluster, config)
     self.draining: Set[str] = set()
     self.marathon_clients = get_marathon_clients_from_config()
 def __init__(self) -> None:
     super().__init__()
     self.started = False
     self.daemon = True
     service_configuration_lib.disable_yaml_cache()
     self.config = load_system_paasta_config()
     self.setup_logging()
     self.metrics = get_metrics_interface("paasta.deployd")
     self.setup_instances_to_bounce()
     self.control = PaastaQueue("ControlQueue")
     self.marathon_clients = get_marathon_clients_from_config()
예제 #4
0
 def __init__(self):
     super(DeployDaemon, self).__init__()
     self.started = False
     self.daemon = True
     service_configuration_lib.disable_yaml_cache()
     self.config = load_system_paasta_config()
     self.setup_logging()
     self.bounce_q = DedupedPriorityQueue("BounceQueue")
     self.inbox_q = PaastaQueue("InboxQueue")
     self.control = PaastaQueue("ControlQueue")
     self.inbox = Inbox(self.inbox_q, self.bounce_q)
     self.marathon_clients = get_marathon_clients_from_config()
예제 #5
0
 def __init__(self):
     super().__init__()
     self.started = False
     self.daemon = True
     service_configuration_lib.disable_yaml_cache()
     self.config = load_system_paasta_config()
     self.setup_logging()
     self.instances_to_bounce_now = DedupedPriorityQueue("instances_to_bounce_now")
     self.instances_to_bounce_later = PaastaQueue("instances_to_bounce_later")  # noqa: E501
     self.control = PaastaQueue("ControlQueue")
     self.inbox = Inbox(
         self.instances_to_bounce_later, self.instances_to_bounce_now,
     )
     self.marathon_clients = get_marathon_clients_from_config()
예제 #6
0
 def my_init(self, filewatcher):
     self.filewatcher = filewatcher
     self.marathon_clients = get_marathon_clients_from_config()
예제 #7
0
 def my_init(self, filewatcher):
     self.filewatcher = filewatcher
     self.public_config = load_system_paasta_config()
     self.marathon_clients = get_marathon_clients_from_config()
예제 #8
0
 def __init__(self, inbox_q, cluster, config, **kwargs):
     super().__init__(inbox_q, cluster, config)
     self.draining: Set[str] = set()
     self.marathon_clients = get_marathon_clients_from_config()
예제 #9
0
 def my_init(self, filewatcher: SoaFileWatcher) -> None:
     self.filewatcher = filewatcher
     self.marathon_clients = get_marathon_clients_from_config()
예제 #10
0
파일: watchers.py 프로젝트: pjbaur/paasta
 def __init__(self, instances_that_need_to_be_bounced_in_the_future,
              cluster, config, **kwargs):
     super().__init__(instances_that_need_to_be_bounced_in_the_future,
                      cluster, config)
     self.draining: Set[str] = set()
     self.marathon_clients = get_marathon_clients_from_config()