[pve-devel] [PATCH manager] ceph api: added check for /etc/pve/ceph.conf to remaining/new endpoints
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Dec 13 10:56:56 CET 2018
On 12/11/18 11:08 AM, Tim Marx wrote:
> Signed-off-by: Tim Marx <t.marx at proxmox.com>
applied, with a minor fixup on top
additionally nit: it would've been nice to the name the exact API methods in
the commit message, it helps reviewing as diff context is not too useful in
finding out which method is modified with our API schema code => subs
anyway, thanks!
> ---
> PVE/API2/Ceph.pm | 2 ++
> PVE/API2/Ceph/FS.pm | 2 ++
> PVE/API2/Ceph/MDS.pm | 2 ++
> 3 files changed, 6 insertions(+)
>
> diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
> index 76933dad..fc71205e 100644
> --- a/PVE/API2/Ceph.pm
> +++ b/PVE/API2/Ceph.pm
> @@ -2013,6 +2013,8 @@ __PACKAGE__->register_method({
> },
> code => sub {
> my ($param) = @_;
> +
^^^^^
fixing up the whitespace errors introduced here
> + PVE::CephTools::check_ceph_inited();
>
> my $rpcenv = PVE::RPCEnvironment::get();
> my $user = $rpcenv->get_user();
> diff --git a/PVE/API2/Ceph/FS.pm b/PVE/API2/Ceph/FS.pm
> index 084a3e28..d4becf1c 100644
> --- a/PVE/API2/Ceph/FS.pm
> +++ b/PVE/API2/Ceph/FS.pm
> @@ -53,6 +53,8 @@ __PACKAGE__->register_method ({
> code => sub {
> my ($param) = @_;
>
> + PVE::CephTools::check_ceph_inited();
> +
> my $rados = PVE::RADOS->new();
>
> my $cephfs_list = $rados->mon_command({ prefix => "fs ls" });
> diff --git a/PVE/API2/Ceph/MDS.pm b/PVE/API2/Ceph/MDS.pm
> index 9a2791ae..dff28405 100644
> --- a/PVE/API2/Ceph/MDS.pm
> +++ b/PVE/API2/Ceph/MDS.pm
> @@ -64,6 +64,8 @@ __PACKAGE__->register_method ({
> code => sub {
> my ($param) = @_;
>
> + PVE::CephTools::check_ceph_inited();
> +
> my $res = [];
>
> my $cfg = PVE::CephTools::parse_ceph_config();
>
More information about the pve-devel
mailing list