mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-24 09:36:31 +00:00
Add uuid to update payload (#2070)
* Add uuid to update payload * Add it to test
This commit is contained in:
parent
9443032c2a
commit
9274a0fa17
@ -59,6 +59,11 @@ class NetworkInterface:
|
||||
"""Return the interface id."""
|
||||
return self.connection.id
|
||||
|
||||
@property
|
||||
def uuid(self) -> str:
|
||||
"""Return the interface uuid."""
|
||||
return self.connection.uuid
|
||||
|
||||
@property
|
||||
def method(self) -> InterfaceMethod:
|
||||
"""Return the interface method."""
|
||||
|
@ -2,7 +2,8 @@
|
||||
'connection':
|
||||
{
|
||||
'id': <'{{interface.id}}'>,
|
||||
'type': <'{{interface.type}}'>
|
||||
'type': <'{{interface.type}}'>,
|
||||
'uuid': <'{{interface.uuid}}'>
|
||||
},
|
||||
|
||||
{% if options.get("method") == "auto" %}
|
||||
|
@ -18,6 +18,10 @@ async def test_interface_update_payload_ethernet(network_interface):
|
||||
assert DBus.parse_gvariant(data)["ipv4"]["method"] == "manual"
|
||||
assert DBus.parse_gvariant(data)["ipv4"]["address-data"][0]["address"] == "1.1.1.1"
|
||||
assert DBus.parse_gvariant(data)["ipv4"]["dns"] == [16843009, 16777217]
|
||||
assert (
|
||||
DBus.parse_gvariant(data)["connection"]["uuid"]
|
||||
== "0c23631e-2118-355c-bbb0-8943229cb0d6"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
Loading…
x
Reference in New Issue
Block a user