Rework & fix pool-create / pool-modify / pool-ls
This commit is contained in:
+5
-43
@@ -1,48 +1,10 @@
|
||||
/*
|
||||
=========================================================================
|
||||
Copyright (c) 2023 MIND Software LLC. All Rights Reserved.
|
||||
This file is part of the Software-Defined Storage MIND UStor Project.
|
||||
For more information about this product, please visit https://mindsw.io
|
||||
or contact us directly at info@mindsw.io
|
||||
=========================================================================
|
||||
*/
|
||||
// Copyright (c) Vitaliy Filippov, 2024
|
||||
// License: VNPL-1.1 (see README.md for details)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "json11/json11.hpp"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "etcd_state_client.h"
|
||||
#include "str_util.h"
|
||||
|
||||
struct pool_configurator_t
|
||||
{
|
||||
protected:
|
||||
std::string error;
|
||||
bool is_valid_scheme_string(std::string scheme_str);
|
||||
bool is_valid_immediate_commit_string(std::string immediate_commit_str);
|
||||
|
||||
public:
|
||||
std::string name;
|
||||
|
||||
std::string scheme;
|
||||
uint64_t pg_size, pg_minsize, pg_count;
|
||||
uint64_t parity_chunks;
|
||||
|
||||
std::string immediate_commit;
|
||||
std::string failure_domain;
|
||||
std::string root_node;
|
||||
|
||||
uint64_t max_osd_combinations;
|
||||
uint64_t block_size, bitmap_granularity;
|
||||
uint64_t pg_stripe_size;
|
||||
|
||||
std::string osd_tags;
|
||||
std::string primary_affinity_tags;
|
||||
|
||||
std::string scrub_interval;
|
||||
|
||||
std::string get_error_string();
|
||||
|
||||
bool parse(json11::Json cfg, bool new_pool);
|
||||
bool validate(etcd_state_client_t &st_cli, pool_config_t *pool_config, bool strict);
|
||||
};
|
||||
std::string validate_pool_config(json11::Json::object & new_cfg, json11::Json old_cfg,
|
||||
uint64_t global_block_size, uint64_t global_bitmap_granularity, bool force);
|
||||
|
||||
Reference in New Issue
Block a user