def main(cls): LOG.warn(_LW('keystone-manage ssl_setup is not recommended for ' 'production use.')) keystone_user_id, keystone_group_id = cls.get_user_group() conf_ssl = openssl.ConfigureSSL(keystone_user_id, keystone_group_id, rebuild=CONF.command.rebuild) conf_ssl.run()
def main(cls): msg = _('keystone-manage ssl_setup is not recommended for production ' 'use.') LOG.warn(msg) keystone_user_id, keystone_group_id = cls.get_user_group() conf_ssl = openssl.ConfigureSSL(keystone_user_id, keystone_group_id) conf_ssl.run()
def test_running_an_invalid_command(self, mock_poll, mock_communicate): output = 'this is the output string' mock_communicate.return_value = (output, '') mock_poll.return_value = 1 cmd = ['ls'] ssl = openssl.ConfigureSSL('keystone_user', 'keystone_group') e = self.assertRaises(environment.subprocess.CalledProcessError, ssl.exec_command, cmd) self.assertThat(e.output, matchers.Equals(output))
def test_running_an_invalid_command(self, mock_check_output): cmd = ['ls'] output = 'this is the output string' error = environment.subprocess.CalledProcessError(returncode=1, cmd=cmd, output=output) mock_check_output.side_effect = error ssl = openssl.ConfigureSSL('keystone_user', 'keystone_group') e = self.assertRaises(environment.subprocess.CalledProcessError, ssl.exec_command, cmd) self.assertThat(e.output, matchers.Equals(output))
def test_create_ssl_certs(self, rebuild=False): ssl = openssl.ConfigureSSL(None, None, rebuild=rebuild) ssl.run() self.assertTrue(os.path.exists(CONF.eventlet_server_ssl.ca_certs)) self.assertTrue(os.path.exists(CONF.eventlet_server_ssl.certfile)) self.assertTrue(os.path.exists(CONF.eventlet_server_ssl.keyfile))
def test_running_a_successful_command(self, mock_poll): mock_poll.return_value = 0 ssl = openssl.ConfigureSSL('keystone_user', 'keystone_group') ssl.exec_command(['ls'])
def test_create_ssl_certs(self): ssl = openssl.ConfigureSSL(None, None) ssl.run() self.assertTrue(os.path.exists(CONF.ssl.ca_certs)) self.assertTrue(os.path.exists(CONF.ssl.certfile)) self.assertTrue(os.path.exists(CONF.ssl.keyfile))
def main(cls): keystone_user_id, keystone_group_id = cls.get_user_group() conf_ssl = openssl.ConfigureSSL(keystone_user_id, keystone_group_id) conf_ssl.run()