Tiago Melo
6bb951b1bf
mgr/dashboard: Add RBD Trash endpoints
...
Fixes: http://tracker.ceph.com/issues/24272
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-09-25 14:02:58 +01:00
Sebastian Wagner
70aa650014
Fixed qa tests:
...
* `s/_post/_task_post/g' for pools.
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-07-24 16:20:04 +02:00
Tiago Melo
f21d0da5a3
mgr/dashboard: Add support for URI encode
...
Created a decorator and pipe to help encode special URI components in the
frontend.
Modified the backend request handler to decode all the string args.
fixes: http://tracker.ceph.com/issues/24621
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-06-26 14:35:15 +01:00
Ricardo Dias
01a1a1ff84
qa/tasks/mgr/dashboard: Adapted tests to work with new authentication system
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-06-26 12:28:54 +01:00
Sebastian Wagner
3a34bae0fe
mgr/dashboard: Applied Exception handling to RBDs
...
* DashboardTestCase: Removed waiter-thread
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:46:47 +02:00
Sebastian Wagner
a49f39f60e
mgr/dashboard: Change to Status Code 400 by default.
...
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:39:51 +02:00
Sebastian Wagner
c08999a59c
mgr/dashboard: Improved Exception handling in Tasks
...
* Set default status code to 400
* Added tests
* Fixed globbing in `test_task.py`
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:36:44 +02:00
Ricardo Marques
eeb87d3e42
mgr/dashboard: Add RBD default features REST API endpoint
...
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-04-24 16:50:37 +01:00
Ricardo Marques
838c9ce9e3
mgr/dashboard: RBD flatten
...
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-04-24 16:50:37 +01:00
Ricardo Dias
fb41b943e0
qa/tasks/mgr/dashboard: rbd: use JSON schema validator
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:50 +01:00
Ricardo Dias
d575653738
mgr/dashboard: rbd: changed REST API prefix to /block/image
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:50 +01:00
Ricardo Dias
bbe12b0b8a
qa/tasks/mgr/dashboard: rbd: image copy test
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:50 +01:00
Ricardo Dias
67f3ac643a
qa/tasks/mgr/dashboard: rbd: snapshot clone test
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
3e0e883e4d
qa/tasks/mgr/dashboard: rbd: snapshot rollback test
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
386a7b53f2
mgr/dashboard: taskmanager: support exception handler
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
e11ae2355e
mgr/dashboard: rbd: major refactoring for using the Task decorator
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
9f027edfc9
qa/tasks/mgr/dashboard: rbd: snapshot edit tests
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:48 +01:00
Ricardo Dias
266ce4c8ee
qa/tasks/mgr/dashboard: rbd: use dashboard pool API for creating pools
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:48 +01:00
Ricardo Dias
1e854da1cc
qa/tasks/mgr/dashboard: rbd: image edit tests
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:48 +01:00
Ricardo Dias
3013d7ac8a
qa/tasks/mgr/dashboard: rbd: snapshot create/delete tests
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:47 +01:00
Ricardo Dias
8264e93458
qa/tasks/mgr/dashboard: rbd: image deletion test
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:47 +01:00
Ricardo Dias
fa7cac8158
mgr/dashboard: rbd: image disk usage implementation
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:47 +01:00
Ricardo Dias
3ab7612d97
qa/tasks/mgr/dashboard: rbd: asynchronous image create test
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:46 +01:00
Ricardo Dias
77c676ca6f
qa/tasks/mgr/dashboard: rbd: new image list format
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:46 +01:00
zouaiguo
4840e899f1
[mgr/dashboard] add image id to rbd info instead of block_name_prefix
...
when create images use data_pool parameter, such as:
rbd create -p pool1 -s 1G --data-pool pool2 image1
then get image info from mgr use request http://192.7.7.36:7000/rbd_pool_data/pool1
we got the response:
[{"parent_name": "", "parent_pool": 18446744073709551615, "name": "image1", "num_objs": 256, "block_name_prefix": "rbd_data.14.f561643c986", "obj_size": 4194304, "features": 189, "features_name": "fast-diff, layering, exclusive-lock, deep-flatten, object-map, data-pool", "order": 22, "size": 1073741824}]
notice:
since block_name_prefix is deprecated,
from block_name_prefix we can not get image id(the real id is ''f561643c9869')
we need add image id to rbd info instead block_name_prefix
Python 2.7.5 (default, Jun 17 2014, 18:11:42)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rados
>>> import rbd
>>> RADOS_NAME = 'client.admin'
>>> cluster_name="ceph"
>>> cluster_handle = rados.Rados(name=RADOS_NAME, clustername=cluster_name, conffile='')
>>> cluster_handle.connect()
>>> ioctx = cluster_handle.open_ioctx("pool1")
>>> image_inst = rbd.Image(ioctx, "image1")
>>> image_inst.stat()
{'parent_name': '', 'parent_pool': 18446744073709551615L, 'num_objs': 256L, 'block_name_prefix': u'rbd_data.14.f561643c986', 'obj_size': 4194304L, 'order': 22, 'size': 1073741824L}
>>> image_inst.id()
u'f561643c9869'
after fix:
[root@tfg36 site-packages]# curl http://192.7.7.36:7000/rbd_pool_data/pool1
[{"parent_name": "", "parent_pool": 18446744073709551615, "name": "image1", "num_objs": 256, "block_name_prefix": "rbd_data.14.f561643c986", "obj_size": 4194304, "features": 189, "id": "f561643c9869", "features_name": "fast-diff, layering, exclusive-lock, deep-flatten, object-map, data-pool", "order": 22, "size": 1073741824}]
Signed-off-by: zouaiguo <zou.aiguo@zte.com.cn>
2018-03-28 10:14:42 +08:00
Lenz Grimmer
d5e54fda5c
Merge pull request #21024 from s0nea/wip-dashboard-return-features-list
...
mgr/dashboard: Convert the RBD feature names to a list of strings
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2018-03-27 11:45:54 +02:00
Tatjana Dehler
33e15ecd39
mgr/dashboard: convert RBD features to a list of strings
...
Until now the API returns the features provided by an RBD as one comma
separated string. It's more usable for the frontend to receive a list
of strings instead.
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2018-03-26 09:41:56 +02:00
Tatjana Dehler
075102468b
mgr/dashboard: skip 'test_create_rbd_in_data_pool' without bluestore
...
Skip the test case 'test_create_rbd_in_data_pool' only if the cluster
does not support bluestore, otherwise run the test. The Ceph mgr
provides the information if the cluster supports bluestore or not, so
the test will be skipped depending on the current cluster.
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2018-03-23 11:11:27 +01:00
Ricardo Dias
aa205a6731
mgr/dashboard: renamed dashboard_v2 to dashboard
...
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-16 07:23:08 +00:00