[Libvirt-cim] [PATCH] Remove test for duplicate mac address
Chip Vincent
cvincent at linux.vnet.ibm.com
Tue Feb 22 02:54:56 UTC 2011
+1. Very good catch, Sharad. Pushed.
On 02/17/2011 03:02 PM, Sharad Mishra wrote:
> # HG changeset patch
> # User Sharad Mishra<snmishra at us.ibm.com>
> # Date 1297972851 28800
> # Node ID f3d3d546da029d62d3e5bceec52152a010e2e4b2
> # Parent a1bb536dcf5ca836a2b09d7682134c88a4fbeb6e
> Remove test for duplicate mac address.
>
> This test has been removed since it was interfering with modifying network resources. This is an extra piece of check that was added in libvirt-cim, libvirt already does this check. Removing it should not cause any problem.
> When a user modified an existing active net RASD, libvirt-cim clones the RASD and changes the properties to the new values. But if mac was not one of the changing property, then this extra check, took it to be a duplicate mac and gave error.
>
> Signed-off-by: Sharad Mishra<snmishra at us.ibm.com>
>
> diff -r a1bb536dcf5c -r f3d3d546da02 src/Virt_VirtualSystemManagementService.c
> --- a/src/Virt_VirtualSystemManagementService.c Wed Feb 16 09:51:44 2011 -0800
> +++ b/src/Virt_VirtualSystemManagementService.c Thu Feb 17 12:00:51 2011 -0800
> @@ -623,6 +623,7 @@
> return _mac;
> }
>
> +/*
> static const char *filter_by_address(struct inst_list *src,
> const char *address)
> {
> @@ -665,8 +666,8 @@
> goto out;
> }
>
> - /* FIXME: This is a Pegasus work around. Pegsus loses the namespace
> - when an ObjectPath is pulled from an instance */
> + FIXME: This is a Pegasus work around. Pegsus loses the namespace
> + when an ObjectPath is pulled from an instance
>
> if (STREQ(NAMESPACE(op), ""))
> CMSetNameSpace(op, ns);
> @@ -684,7 +685,7 @@
> inst_list_free(&in_list);
> return msg;
> }
> -
> +*/
>
> static const char *net_rasd_to_vdev(CMPIInstance *inst,
> struct virt_device *dev,
> @@ -709,10 +710,12 @@
> }
> }
>
> +/*
> msg = check_duplicate_mac(inst, val, ns);
> if (msg != NULL) {
> goto out;
> }
> +*/
>
> free(dev->dev.net.mac);
> dev->dev.net.mac = strdup(val);
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list