Daniel P. Berrangé
6d3cb071b4
vmx: fix logic handling mac address type
...
With the current formatter, the XML snippets:
<interface type='bridge'>
<mac address='00:0c:29:dd:ee:fe' type='static'/>
<source bridge='br1'/>
</interface>
<interface type='bridge'>
<mac address='aa:bb:cc:dd:ee:fd' type='generated'/>
<source bridge='br2'/>
</interface>
result in
ethernet1.present = "true"
ethernet1.networkName = "br1"
ethernet1.connectionType = "bridged"
ethernet1.addressType = "static"
ethernet1.address = "00:0c:29:dd:ee:fe"
ethernet1.checkMACAddress = "false"
ethernet2.present = "true"
ethernet2.networkName = "br2"
ethernet2.connectionType = "bridged"
ethernet2.addressType = "static"
ethernet2.address = "aa:bb:cc:dd:ee:fd"
ethernet2.checkMACAddress = "false"
which is flawed, as both type='static' and type='generated' in the XML
turn into 'static' in the VMX config.
The existence of the 'static' attribute is further overriding whether
the checkMACAddress config option is set as a side effect.
Both these pieces of flawed logic were introduced in
commit 454e5961abf40c14f8b6d7ee216229e68fd170bf
Author: Bastien Orivel <bastien.orivel@diateam.net>
Date: Mon Jul 13 16:28:53 2020 +0200
Add a type attribute on the mac address element
which intentionally added the 'checkMACAddress' side effect based on
the 'type' attribute.
With this change, we're reverting the handling of checkMACAddress
to match what existed historically. The 'type' attribute now directly
maps to the addressType attribute, so the above config becomes:
ethernet1.present = "true"
ethernet1.networkName = "br1"
ethernet1.connectionType = "bridged"
ethernet1.addressType = "static"
ethernet1.address = "00:0c:29:dd:ee:fe"
ethernet2.present = "true"
ethernet2.networkName = "br2"
ethernet2.connectionType = "bridged"
ethernet2.addressType = "generated"
ethernet2.generatedAddress = "aa:bb:cc:dd:ee:fd"
ethernet2.generatedAddressOffset = "0"
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-07-23 16:11:31 +01:00
..
2019-12-03 13:57:44 +00:00
2020-03-25 09:04:49 +01:00
2020-06-19 21:59:31 +02:00
2020-07-08 08:40:30 +02:00
2020-07-08 08:40:30 +02:00
2020-06-19 21:59:31 +02:00
2019-12-03 13:57:44 +00:00
2020-03-16 15:51:44 +01:00
2019-12-13 17:52:10 +00:00
2020-05-07 17:38:41 -06:00
2020-02-06 15:00:57 +01:00
2020-04-23 10:59:33 +02:00
2020-06-15 17:10:15 +01:00
2020-06-15 17:10:15 +01:00
2020-06-15 17:10:15 +01:00
2020-06-19 10:39:55 +02:00
2020-06-19 10:39:55 +02:00
2019-08-09 12:17:19 +02:00
2019-12-03 13:57:44 +00:00
2020-07-21 09:52:59 +02:00
2020-07-17 07:41:21 +02:00
2019-11-13 08:16:04 +01:00
2019-07-26 16:48:58 -05:00
2019-12-03 13:57:44 +00:00
2019-07-08 16:10:22 -05:00
2019-12-03 13:57:44 +00:00
2020-03-05 11:31:38 +01:00
2020-03-12 08:04:40 +01:00
2020-03-12 08:04:40 +01:00
2020-03-16 16:00:27 +00:00
2020-07-17 07:41:20 +02:00
2019-09-24 13:19:08 -04:00
2020-07-17 07:41:21 +02:00
2020-07-08 12:05:24 +02:00
2019-07-26 09:59:27 +01:00
2019-12-20 14:31:08 +01:00
2019-06-25 17:11:56 +02:00
2019-06-25 17:11:56 +02:00
2020-06-10 14:00:38 +02:00
2020-01-16 15:11:55 +00:00
2019-11-15 12:58:43 +01:00
2020-06-26 15:36:40 +01:00
2019-07-19 10:52:06 +02:00
2020-05-25 16:09:58 +02:00
2020-03-20 09:47:16 +01:00
2019-07-12 16:55:39 +01:00
2019-07-16 13:42:39 +02:00
2020-02-25 15:43:56 +00:00
2019-12-17 10:04:43 +01:00
2020-03-19 11:25:33 +01:00
2020-04-21 09:22:14 -06:00
2019-04-16 13:11:08 -04:00
2020-07-23 16:11:31 +01:00
2020-03-09 15:46:42 +01:00
2020-01-09 18:05:17 +00:00
2019-12-09 10:17:27 +00:00
2020-02-20 23:13:15 -05:00
2020-02-24 01:52:22 +01:00
2019-11-12 16:15:59 +01:00
2020-07-10 09:40:55 +02:00
2020-07-08 16:34:09 -04:00
2020-07-08 16:34:09 -04:00
2020-04-07 15:26:10 +02:00
2019-12-09 10:17:27 +00:00
2019-10-15 16:14:19 +02:00
2020-02-06 13:41:03 +01:00
2019-11-12 16:15:59 +01:00
2020-02-24 23:15:49 +01:00
2020-07-08 08:40:30 +02:00
2019-11-12 16:15:59 +01:00
2020-02-25 12:05:01 +01:00
2020-04-09 15:45:05 -06:00
2019-12-09 10:17:27 +00:00
2020-01-03 15:42:12 +00:00
2020-07-10 09:40:06 +02:00
2020-04-23 12:38:01 +02:00
2020-07-08 16:34:09 -04:00
2020-06-15 17:10:15 +01:00
2019-11-12 16:15:59 +01:00
2020-07-08 16:34:09 -04:00
2019-11-12 16:15:59 +01:00
2019-10-15 11:25:25 +02:00
2020-07-10 09:40:58 +02:00
2020-07-10 09:40:58 +02:00
2020-07-08 16:34:09 -04:00
2020-07-08 16:34:09 -04:00
2019-11-12 16:15:59 +01:00
2020-02-24 23:15:50 +01:00
2019-12-09 14:46:13 +00:00
2020-06-26 15:36:40 +01:00
2020-04-27 08:13:52 +02:00
2020-07-17 07:41:20 +02:00
2019-12-23 16:39:38 +00:00
2019-12-13 14:57:32 +01:00
2020-05-25 16:10:04 +02:00
2020-07-08 16:34:09 -04:00
2019-10-15 11:25:25 +02:00
2020-07-07 12:58:19 +02:00
2020-01-03 15:42:12 +00:00
2020-01-03 15:42:12 +00:00
2020-07-20 19:08:07 -04:00
2020-06-29 12:38:22 +02:00
2020-05-07 22:31:04 +02:00
2020-07-08 16:34:09 -04:00
2020-07-08 16:34:09 -04:00
2020-07-08 16:34:09 -04:00
2020-05-20 08:53:29 +02:00
2019-11-12 16:15:59 +01:00
2020-02-04 14:00:45 +00:00
2019-07-03 08:36:04 +02:00
2020-01-03 15:42:12 +00:00
2020-01-17 10:02:01 +00:00
2020-07-08 12:05:24 +02:00
2020-07-08 12:05:24 +02:00
2020-06-15 10:27:37 +02:00
2019-10-14 10:54:42 +01:00
2019-11-12 16:15:59 +01:00
2020-07-15 14:31:07 +02:00
2020-07-15 14:31:07 +02:00
2020-07-15 14:31:07 +02:00
2019-10-15 11:25:25 +02:00
2020-02-04 14:00:45 +00:00
2019-08-23 11:26:26 +01:00
2020-02-04 14:00:45 +00:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-06-10 14:00:38 +02:00
2019-10-07 11:34:24 +01:00
2020-07-08 16:34:09 -04:00
2020-02-11 16:30:18 +01:00
2019-10-15 16:14:19 +02:00
2019-12-09 10:15:16 +00:00
2019-12-09 10:15:16 +00:00
2020-06-23 17:33:30 +01:00
2020-05-20 09:41:58 +02:00
2020-05-20 09:41:58 +02:00
2020-05-20 09:41:58 +02:00
2020-02-25 12:05:00 +01:00
2019-12-09 10:15:16 +00:00
2020-06-16 09:43:34 +02:00
2020-07-08 16:34:09 -04:00
2019-10-21 12:51:59 +02:00
2020-06-16 15:01:05 +02:00
2020-03-20 09:47:16 +01:00
2020-07-08 16:35:54 -04:00
2020-01-16 15:11:55 +00:00
2020-01-27 14:55:03 +01:00
2020-02-04 14:00:45 +00:00
2020-07-08 16:34:09 -04:00
2019-11-12 16:15:59 +01:00
2019-08-23 11:26:26 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2019-10-11 12:20:08 -04:00
2019-11-19 15:22:43 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-06-23 17:33:30 +01:00
2020-01-03 15:42:13 +00:00
2020-02-24 23:15:50 +01:00
2019-11-12 16:15:59 +01:00
2019-06-19 17:12:34 +02:00
2020-07-08 16:36:19 -04:00
2019-06-19 17:12:34 +02:00
2020-01-24 13:45:38 +01:00
2020-07-08 16:34:09 -04:00
2020-05-06 16:24:31 +02:00
2020-05-06 16:24:31 +02:00
2020-07-15 14:31:07 +02:00
2019-10-21 12:51:55 +02:00
2020-03-20 09:47:16 +01:00
2020-02-24 23:15:49 +01:00
2020-07-08 16:34:09 -04:00
2020-02-25 10:02:15 +00:00
2019-08-27 15:49:48 +02:00
2019-11-19 15:22:43 +01:00
2019-10-15 11:25:25 +02:00
2019-10-16 12:06:43 +02:00
2020-07-23 14:58:16 +01:00
2020-03-19 14:39:38 +01:00
2019-07-09 15:01:54 +02:00
2020-07-08 16:34:09 -04:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-19 15:22:43 +01:00
2020-01-29 14:51:40 +00:00
2019-10-15 11:25:25 +02:00
2020-03-19 14:39:38 +01:00
2020-07-15 12:52:24 +02:00
2020-02-24 23:15:49 +01:00
2020-07-01 13:26:04 +02:00
2019-06-19 17:12:34 +02:00
2020-01-29 14:51:40 +00:00
2020-02-25 15:43:56 +00:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-01-03 15:42:13 +00:00
2020-01-03 15:42:12 +00:00
2019-11-19 15:22:43 +01:00
2020-01-29 14:51:40 +00:00
2020-02-24 23:15:49 +01:00
2019-10-15 11:25:25 +02:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-10-15 16:14:19 +02:00
2020-06-05 16:27:33 +02:00
2020-02-24 23:15:50 +01:00
2020-03-06 17:02:10 +00:00
2020-03-06 17:02:10 +00:00
2019-08-02 09:44:41 -05:00
2019-12-03 13:57:44 +00:00
2019-07-29 15:56:46 +02:00
2019-08-02 09:44:41 -05:00
2020-02-11 16:30:18 +01:00
2020-05-12 06:55:00 +02:00
2019-10-16 12:06:43 +02:00
2020-02-07 15:03:54 +00:00
2020-04-07 15:26:19 +02:00
2019-11-21 08:27:03 +01:00
2020-01-29 14:51:40 +00:00
2020-01-29 14:51:40 +00:00
2019-10-15 16:14:19 +02:00
2020-01-29 14:51:40 +00:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-03-19 11:25:33 +01:00
2020-02-04 14:00:45 +00:00
2020-04-21 09:22:14 -06:00
2020-06-15 10:27:37 +02:00
2020-07-13 18:47:44 +02:00