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

add sr_get_module_ds_access API #61

Merged
merged 1 commit into from
Mar 28, 2024
Merged

Conversation

tbsuht
Copy link
Contributor

@tbsuht tbsuht commented Mar 4, 2024

In order to read the owner, group and permissions of a module, this PR adds binding for the sr_get_module_ds_access C function.

I'm not an expert with cffi, so let me know if there are things to improve :)
Do you think returning a tuple from the function is fine or would you expect a dedicated type?

Thanks in advance!

@tbsuht
Copy link
Contributor Author

tbsuht commented Mar 4, 2024

I'm not sure about the failing CI tests: is this related to my changes? Seems unrelated, but I'm not sure.
build/temp.linux-x86_64-cpython-312/_libyang.c:578:2: error: #error "This version of libyang bindings only works with libyang 2.x"

@tbsuht
Copy link
Contributor Author

tbsuht commented Mar 7, 2024

@rjarry I guess this is because libyang-python is running against the devel branch of libyang, which is already preparing for version 3.x?

tests/test_connection.py Outdated Show resolved Hide resolved
tests/test_connection.py Outdated Show resolved Hide resolved
sysrepo/connection.py Show resolved Hide resolved
sysrepo/connection.py Outdated Show resolved Hide resolved
@tbsuht tbsuht force-pushed the module_info branch 2 times, most recently from d6d19b3 to d0d9c0e Compare March 28, 2024 08:50
cffi/cdefs.h Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.93%. Comparing base (59f456b) to head (fe32b83).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
+ Coverage   66.75%   66.93%   +0.17%     
==========================================
  Files           8        8              
  Lines        1107     1113       +6     
==========================================
+ Hits          739      745       +6     
  Misses        368      368              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tbsuht
Copy link
Contributor Author

tbsuht commented Mar 28, 2024

Can you create a new tag once merged or what's the policy?

Copy link
Collaborator

@rjarry rjarry left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. One last thing, could you update your commit message following the rules I am putting in place?

#64

In a nutshell, your commit message should look like this:

connection: add sr_get_module_ds_access API

Add a new function to get owner, group and permissions of a module based
on its name.

Signed-off-by: Bagg Tobias (ETAS-DAP/XPC-Fe3) <[email protected]>

Thanks!

@rjarry
Copy link
Collaborator

rjarry commented Mar 28, 2024

Can you create a new tag once merged or what's the policy?

Yes, I can make a release if you want.

Add a new function to get owner, group and permissions of a module based
on its name.

Signed-off-by: Bagg Tobias (ETAS-DAP/XPC-Fe3) <[email protected]>
@tbsuht
Copy link
Contributor Author

tbsuht commented Mar 28, 2024

Thanks for the changes. One last thing, could you update your commit message following the rules I am putting in place?

#64

In a nutshell, your commit message should look like this:

connection: add sr_get_module_ds_access API

Add a new function to get owner, group and permissions of a module based
on its name.

Signed-off-by: Bagg Tobias (ETAS-DAP/XPC-Fe3) <[email protected]>

Thanks!

Done

@rjarry rjarry merged commit ddac638 into sysrepo:master Mar 28, 2024
13 checks passed
@rjarry
Copy link
Collaborator

rjarry commented Mar 28, 2024

Thanks!

@rjarry
Copy link
Collaborator

rjarry commented Mar 28, 2024

pypi.org uploads are suspended temporarily.

https://github.com/sysrepo/sysrepo-python/actions/runs/8466165185/job/23194386178#step:9:32

I'll re-run the failed deploy job later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants