vitastor-cli: add commands to control pools: pool-create, pool-ls, pool-modify, pool-rm

PR #59 - https://github.com/vitalif/vitastor/pull/58/commits

By MIND Software LLC

By submitting this pull request, I accept Vitastor CLA
This commit is contained in:
idelson
2024-02-28 13:08:04 +03:00
committed by Vitaliy Filippov
parent 02d1f16bbd
commit dc92851322
19 changed files with 2700 additions and 263 deletions
+48
View File
@@ -0,0 +1,48 @@
/*
=========================================================================
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
=========================================================================
*/
#pragma once
#include "json11/json11.hpp"
#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);
};