Commit 6d806418 authored by Dietmar Maurer's avatar Dietmar Maurer

improve ceph API paths

parent e67078ee
...@@ -259,11 +259,8 @@ __PACKAGE__->register_method ({ ...@@ -259,11 +259,8 @@ __PACKAGE__->register_method ({
my $result = [ my $result = [
{ name => 'init' }, { name => 'init' },
{ name => 'createmon' }, { name => 'mon' },
{ name => 'destroymon' }, { name => 'osd' },
{ name => 'listmon' },
{ name => 'createosd' },
{ name => 'destroyosd' },
{ name => 'stop' }, { name => 'stop' },
{ name => 'start' }, { name => 'start' },
{ name => 'status' }, { name => 'status' },
...@@ -297,7 +294,7 @@ __PACKAGE__->register_method ({ ...@@ -297,7 +294,7 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'listmon', name => 'listmon',
path => 'listmon', path => 'mon',
method => 'GET', method => 'GET',
description => "Get Ceph monitor list.", description => "Get Ceph monitor list.",
proxyto => 'node', proxyto => 'node',
...@@ -317,6 +314,7 @@ __PACKAGE__->register_method ({ ...@@ -317,6 +314,7 @@ __PACKAGE__->register_method ({
addr => { type => 'string' }, addr => { type => 'string' },
}, },
}, },
links => [ { rel => 'child', href => "{name}" } ],
}, },
code => sub { code => sub {
my ($param) = @_; my ($param) = @_;
...@@ -426,7 +424,7 @@ __PACKAGE__->register_method ({ ...@@ -426,7 +424,7 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'createmon', name => 'createmon',
path => 'createmon', path => 'mon',
method => 'POST', method => 'POST',
description => "Create Ceph Monitor", description => "Create Ceph Monitor",
proxyto => 'node', proxyto => 'node',
...@@ -535,8 +533,8 @@ __PACKAGE__->register_method ({ ...@@ -535,8 +533,8 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'destroymon', name => 'destroymon',
path => 'destroymon', path => 'mon/{monid}',
method => 'POST', method => 'DELETE',
description => "Destroy Ceph monitor.", description => "Destroy Ceph monitor.",
proxyto => 'node', proxyto => 'node',
protected => 1, protected => 1,
...@@ -703,7 +701,7 @@ __PACKAGE__->register_method ({ ...@@ -703,7 +701,7 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'createosd', name => 'createosd',
path => 'createosd', path => 'osd',
method => 'POST', method => 'POST',
description => "Create OSD", description => "Create OSD",
proxyto => 'node', proxyto => 'node',
...@@ -750,8 +748,8 @@ __PACKAGE__->register_method ({ ...@@ -750,8 +748,8 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'destroyosd', name => 'destroyosd',
path => 'destroyosd', path => 'osd/{osdid}',
method => 'POST', method => 'DELETE',
description => "Destroy OSD", description => "Destroy OSD",
proxyto => 'node', proxyto => 'node',
protected => 1, protected => 1,
......
...@@ -19,7 +19,7 @@ Ext.define('PVE.node.CephMonList', { ...@@ -19,7 +19,7 @@ Ext.define('PVE.node.CephMonList', {
model: 'ceph-mon-list', model: 'ceph-mon-list',
proxy: { proxy: {
type: 'pve', type: 'pve',
url: "/api2/json/nodes/" + nodename + "/ceph/listmon" url: "/api2/json/nodes/" + nodename + "/ceph/mon"
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment