mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #46111 from alexvasiu/develop
modules/nilrt_ip.py: Change get_interfaces_details
This commit is contained in:
commit
1953532b2a
@ -147,16 +147,18 @@ def _get_service_info(service):
|
||||
'''
|
||||
service_info = pyconnman.ConnService(_add_path(service))
|
||||
data = {
|
||||
'name': service,
|
||||
'label': service,
|
||||
'wireless': service_info.get_property('Type') == 'wifi',
|
||||
'connectionid': six.text_type(service_info.get_property('Ethernet')['Interface']),
|
||||
'HWAddress': six.text_type(service_info.get_property('Ethernet')['Address'])
|
||||
'hwaddr': six.text_type(service_info.get_property('Ethernet')['Address'])
|
||||
}
|
||||
|
||||
state = service_info.get_property('State')
|
||||
if state == 'ready' or state == 'online':
|
||||
data['up'] = True
|
||||
data['ipv4'] = {}
|
||||
data['ipv4'] = {
|
||||
'gateway': '0.0.0.0'
|
||||
}
|
||||
ipv4 = 'IPv4'
|
||||
if service_info.get_property('IPv4')['Method'] == 'manual':
|
||||
ipv4 += '.Configuration'
|
||||
|
Loading…
Reference in New Issue
Block a user