On Sat, Aug 08, 2009 at 11:56:10PM +0200, Matthias Bolte wrote:
> The VMX entry ethernet0.addressType may be set to 'vpx' beside
> 'static' and 'generated'. 'vpx' indicates that the MAC address was
> generated by a vCenter.
> 
> The attached patch adds 'vpx' to the valid values for ethernet0.addressType.
> 
> Matthias

> diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
> index 54c2594..70e9305 100644
> --- a/src/esx/esx_vmx.c
> +++ b/src/esx/esx_vmx.c
> @@ -276,6 +276,10 @@ def->nets[0]...
>                                          ethernet0.addressType = "static"     
>    # default to "generated"
>  ->mac = <value>                   <=>   ethernet0.address = "<value>"
>  
> +
> +                                        ethernet0.addressType = "vpx"        
>    # default to "generated"
> +->mac = <value>                   <=>   ethernet0.generatedAddress = 
> "<value>"
> +
>                                                                               
>    # 00:0c:29 prefix for autogenerated mac's
>                                                                               
>    # 00:50:56 prefix for manual configured mac's
>                                                                               
>    # 00:05:69 old prefix from esx 1.5
> @@ -1369,7 +1373,8 @@ esxVMX_ParseEthernet(virConnectPtr conn, virConfPtr 
> conf, int controller,
>          goto failure;
>      }
>  
> -    if (addressType == NULL || STRCASEEQ(addressType, "generated")) {
> +    if (addressType == NULL || STRCASEEQ(addressType, "generated") ||
> +        STRCASEEQ(addressType, "vpx")) {
>          if (generatedAddress != NULL) {
>              if (virParseMacAddr(generatedAddress, (*def)->mac) < 0) {
>                  ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
> @@ -1390,8 +1395,8 @@ esxVMX_ParseEthernet(virConnectPtr conn, virConfPtr 
> conf, int controller,
>          }
>      } else {
>          ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
> -                  "Expecting VMX entry '%s' to be 'generated' or 'static' 
> but "
> -                  "found '%s'", addressType_name, addressType);
> +                  "Expecting VMX entry '%s' to be 'generated' or 'static' or 
> "
> +                  "'vpx' but found '%s'", addressType_name, addressType);
>          goto failure;
>      }

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to