Esempio n. 1
0
def upgrade_ceph(orig_id, seed_id):
    orig_env = environment_obj.Environment(orig_id)
    seed_env = environment_obj.Environment(seed_id)

    tar_filename = os.path.join(magic_consts.FUEL_CACHE,
                                "env-{0}-ceph.conf.tar.gz".format(orig_id))
    conf_filename, db_path = extract_mon_conf_files(orig_env, tar_filename)
    ceph_set_new_mons(orig_env, seed_env, tar_filename, conf_filename, db_path)
    ceph.restart_radosgw(seed_env)
Esempio n. 2
0
def test_restart_radowgw(mocker):
    mock_get = mocker.patch("octane.util.env.get_one_controller")
    mock_call = mocker.patch("octane.util.ssh.call")
    mock_env = mock.Mock()

    ceph.restart_radosgw(mock_env)

    mock_get.assert_called_once_with(mock_env)
    mock_call.assert_called_once_with(["service", "radosgw", "restart"],
                                      node=mock_get.return_value)