Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pybind/rados: add support open_ioctx2 API #17710

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

Songweibin
Copy link
Contributor

Can use client.open_ioct2(pool_id) to open an IO.

Signed-off-by: songweibin song.weibin@zte.com.cn

@scienceluo
Copy link
Contributor

jenkins retest this please.

@Songweibin
Copy link
Contributor Author

@jdurgin Would you please help to take a look? Thanks in advance.

@@ -17,6 +17,7 @@ context::
cluster.connect()
ioctx = cluster.open_ioctx('mypool')

Also, you can use `open_ioctx2(mypool_id)` method to open an IO.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to put this line in the example. it is not supposed to be exhaustive.

@tchaikov
Copy link
Contributor

would be better to accompany this change with a test in src/test/pybind/test_rados.py.

@Songweibin
Copy link
Contributor Author

@tchaikov Done, added a full test just like class TestIoctx(object), Thank you.

@@ -891,6 +891,627 @@ def test_applications(self):
self.ioctx.application_metadata_remove("app1", "key1")
eq([("key2", "val2")], self.ioctx.application_metadata_list("app1"))


class TestIoctx2(object):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need to duplicate the whole TestIoctx just for testing rados.open_ioctx2.

Copy link
Contributor Author

@Songweibin Songweibin Sep 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah! i do not want to take a whole test at the beginning, but i have no idea which ones should be testing, so...your suggestions is appreciate. thanks.

@Songweibin
Copy link
Contributor Author

@tchaikov only take a simple test, would you please help to have a look again? thanks.

Signed-off-by: songweibin <song.weibin@zte.com.cn>
Copy link
Member

@jdurgin jdurgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the simple test looks good enough to me. thanks!

@liewegas liewegas merged commit 4341f27 into ceph:master Oct 5, 2017
@Songweibin Songweibin deleted the wip-add-pybind branch October 5, 2017 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants