This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2228846 - [RFE] Python API to query the nmstate version [NEEDINFO]
Summary: [RFE] Python API to query the nmstate version
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: NetworkManager Development Team
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-03 11:49 UTC by Vijayalakshmi Candappa
Modified: 2023-08-17 12:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-17 12:31:12 UTC
Type: Story
Target Upstream Version:
Embargoed:
till: needinfo? (vcandapp)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-698 0 None None None 2023-08-04 08:31:00 UTC
Red Hat Issue Tracker   RHEL-1433 0 None None None 2023-08-17 12:31:11 UTC
Red Hat Issue Tracker RHELPLAN-164514 0 None None None 2023-08-04 08:31:12 UTC

Description Vijayalakshmi Candappa 2023-08-03 11:49:28 UTC
Description of problem:
Request for python API to query the nmstate package version from application

eg: rpm -qi nmstate
Name        : nmstate
Version     : 2.2.14
Release     : 0.20230728051556224558.pr2199.1.g38654c09.el9
Architecture: x86_64

Comment 2 Till Maas 2023-08-04 08:29:59 UTC
RPM has this python API already:

import rpm

transaction_set = rpm.TransactionSet()
for header in transaction_set.dbMatch("name", "nmstate"):
    print(f"{header['name']}-{header['version']}-{header['release']}.{header['arch']}")


Also, providing access to the RPM DB does not seem to be in scope for Nmstate. What is your use case?

Comment 4 RHEL Program Management 2023-08-17 12:28:59 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.


Note You need to log in before you can comment on or make changes to this bug.