Bug 868979 - [RFE] Add convenience function to retrieve the string representation of a IPv4 and IPv6 address
[RFE] Add convenience function to retrieve the string representation of a IPv...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lubomir Rintel
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-22 11:51 EDT by Fabian Deutsch
Modified: 2015-08-18 11:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-18 11:25:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabian Deutsch 2012-10-22 11:51:34 EDT
Description of problem:
Summary says it all.
It is quite common to need the string repr. of a IPv4 or v6 address, but the current NMClient API (via gobject introspection) does no't provide a direct way to retrieve those strings, they have to be converted manually.

I'd love to see these convenience functions in the IPv4/IPv6Address classes.
Comment 1 Fabian Deutsch 2012-10-22 13:14:46 EDT
Maybe as a utility function
Comment 2 Fedora Admin XMLRPC Client 2015-08-18 10:56:47 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Dan Winship 2015-08-18 11:25:21 EDT
The new "libnm" in NetworkManager 1.0 (available in F22 and later) represents IP addresses as strings in all places in its API:

>>> from gi.repository import NM
>>> client = NM.Client.new()
>>> client.get_devices()[0].get_ip4_config().get_addresses()[0].get_address()
'10.10.50.165'

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