Beispiel #1
0
 def test_register_configs_apache24(self, exists):
     exists.return_value = True
     self.os_release.return_value = 'grizzly'
     self.relation_ids.return_value = False
     configs = utils.register_configs()
     calls = []
     for conf in [
             utils.GLANCE_REGISTRY_CONF, utils.GLANCE_API_CONF,
             utils.HAPROXY_CONF, utils.HTTPS_APACHE_24_CONF
     ]:
         calls.append(call(conf, utils.CONFIG_FILES[conf]['hook_contexts']))
     configs.register.assert_has_calls(calls, any_order=True)
 def test_register_configs_apache24(self, exists):
     exists.return_value = True
     self.os_release.return_value = 'grizzly'
     self.relation_ids.return_value = False
     configs = utils.register_configs()
     calls = []
     for conf in [utils.GLANCE_REGISTRY_CONF,
                  utils.GLANCE_API_CONF,
                  utils.HAPROXY_CONF,
                  utils.HTTPS_APACHE_24_CONF]:
         calls.append(
             call(conf,
                  utils.CONFIG_FILES[conf]['hook_contexts'])
         )
     configs.register.assert_has_calls(calls, any_order=True)
Beispiel #3
0
 def test_register_configs_ceph(self, exists):
     exists.return_value = True
     self.os_release.return_value = 'grizzly'
     self.relation_ids.return_value = ['ceph:0']
     self.service_name.return_value = 'glance'
     configs = utils.register_configs()
     calls = []
     for conf in [
             utils.GLANCE_REGISTRY_CONF, utils.GLANCE_API_CONF,
             utils.HAPROXY_CONF,
             utils.ceph_config_file()
     ]:
         calls.append(call(conf, utils.CONFIG_FILES[conf]['hook_contexts']))
     configs.register.assert_has_calls(calls, any_order=True)
     self.mkdir.assert_called_with('/etc/ceph')
 def test_register_configs_ceph(self, exists):
     exists.return_value = True
     self.os_release.return_value = 'grizzly'
     self.relation_ids.return_value = ['ceph:0']
     self.service_name.return_value = 'glance'
     configs = utils.register_configs()
     calls = []
     for conf in [utils.GLANCE_REGISTRY_CONF,
                  utils.GLANCE_API_CONF,
                  utils.HAPROXY_CONF,
                  utils.ceph_config_file()]:
         calls.append(
             call(conf,
                  utils.CONFIG_FILES[conf]['hook_contexts'])
         )
     configs.register.assert_has_calls(calls, any_order=True)
     self.mkdir.assert_called_with('/etc/ceph')
Beispiel #5
0
def resume(args):
    """Resume all the Glance services.

    @raises Exception if any services fail to start
    """
    resume_unit_helper(register_configs())
Beispiel #6
0
def pause(args):
    """Pause all the Glance services.

    @raises Exception if any services fail to stop
    """
    pause_unit_helper(register_configs())
Beispiel #7
0
def resume(args):
    """Resume all the Glance services.

    @raises Exception if any services fail to start
    """
    resume_unit_helper(register_configs())
Beispiel #8
0
def pause(args):
    """Pause all the Glance services.

    @raises Exception if any services fail to stop
    """
    pause_unit_helper(register_configs())