Beispiel #1
0
def make_admin_client_with_options(cluster):
  options = app.get_options()

  return make_admin_client(
      cluster=cluster,
      verbose=getattr(options, 'verbosity', 'normal') == 'verbose',
      bypass_leader_redirect=options.bypass_leader_redirect)
Beispiel #2
0
def make_admin_client_with_options(cluster):
    options = app.get_options()

    return make_admin_client(
        cluster=cluster,
        verbose=getattr(options, 'verbosity', 'normal') == 'verbose',
        bypass_leader_redirect=options.bypass_leader_redirect)
 def __init__(self,
              cluster,
              verbosity,
              wait_event=None,
              bypass_leader_redirect=False):
     self._client = make_admin_client(
         cluster=cluster,
         verbose=verbosity == 'verbose',
         bypass_leader_redirect=bypass_leader_redirect)
     self._wait_event = wait_event or Event()
Beispiel #4
0
 def test_make_admin_client_cluster_object(self):
   with mock.patch('apache.aurora.admin.admin_util.CLUSTERS', new=self.TEST_CLUSTERS):
     self.assertIsNotNone(make_admin_client(self.TEST_CLUSTER))
Beispiel #5
0
 def __init__(self, cluster, verbosity, wait_event=None, bypass_leader_redirect=False):
   self._client = make_admin_client(
       cluster=cluster,
       verbose=verbosity == 'verbose',
       bypass_leader_redirect=bypass_leader_redirect)
   self._wait_event = wait_event or Event()
Beispiel #6
0
 def test_make_admin_client_cluster_object(self):
     with mock.patch('apache.aurora.admin.admin_util.CLUSTERS',
                     new=self.TEST_CLUSTERS):
         self.assertIsNotNone(make_admin_client(self.TEST_CLUSTER))