WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] [PATCH] CA-40882: In the SLES 10SP2 kernel the 3 VIF limit

To: Alex Zeffertt <Alex.Zeffertt@xxxxxxxxxxxxx>
Subject: Re: [Xen-API] [PATCH] CA-40882: In the SLES 10SP2 kernel the 3 VIF limit was removed so remove this limit in the template
From: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Date: Tue, 27 Apr 2010 17:25:54 +0100
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 27 Apr 2010 09:26:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <05274dded7d6c3a78b44.1272380329@galois>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <05274dded7d6c3a78b44.1272380329@galois>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0
Hi Alex

Thanks for sending in this patch.

This patch duplicates the sles10 template function, so that we end
up with two almost identical copies of the same section of code:

On 27/04/10 15:58, Alex Zeffertt wrote:
+let sles10sp1_template name architecture flags =
+       let name = make_long_name name architecture in
+       let install_arch = technical_string_of_architecture architecture in
+       let bt = eli_install_template (default_memory_parameters 512L) name "sleslike" 
true "console=ttyS0 xencons=ttyS" in
+       { bt with
+               vM_other_config = (install_methods_otherconfig_key, "cdrom,nfs,http,ftp") 
:: ("install-arch",install_arch) :: bt.vM_other_config;
+               vM_recommendations = recommendations ~memory:32 ~vifs:3 ();
+       }
+
  let sles10_template name architecture flags =
        let name = make_long_name name architecture in
        let install_arch = technical_string_of_architecture architecture in
        let bt = eli_install_template (default_memory_parameters 512L) name "sleslike" 
true "console=ttyS0 xencons=ttyS" in
        { bt with
                vM_other_config = (install_methods_otherconfig_key, "cdrom,nfs,http,ftp") 
:: ("install-arch",install_arch) :: bt.vM_other_config;
-               vM_recommendations = recommendations ~memory:32 ~vifs:3 ();
+               vM_recommendations = recommendations ~memory:32 ();
        }

Why not instead parameterize the function, so that we have something like:

  let sles10_template name architecture flags ?vifs =
        let name = make_long_name name architecture in
        let install_arch = technical_string_of_architecture architecture in
        let bt = eli_install_template (default_memory_parameters 512L) name "sleslike" 
true "console=ttyS0 xencons=ttyS" in
        { bt with
                vM_other_config = (install_methods_otherconfig_key, "cdrom,nfs,http,ftp") 
:: ("install-arch",install_arch) :: bt.vM_other_config;
                vM_recommendations = recommendations ~memory:32 ?vifs ();
        }

And then at the call sites we can write:

        sles_9_template "SUSE Linux Enterprise Server 9 SP4"  X32 [    ]  ;
        sles10_template "SUSE Linux Enterprise Server 10 SP1" X32 [    ] 3;
        sles10_template "SUSE Linux Enterprise Server 10 SP2" X32 [    ]  ;
        sles11_template "SUSE Linux Enterprise Server 11"     X32 [    ]  ;
        sles10_template "SUSE Linux Enterprise Server 10 SP1" X64 [    ] 3;
        sles10_template "SUSE Linux Enterprise Server 10 SP2" X64 [    ]  ;
        sles10_template "SUSE Linux Enterprise Server 10 SP3" X64 [    ]  ;
        sles11_template "SUSE Linux Enterprise Server 11"     X64 [    ]  ;

Or similar?

Cheers,
Jonathan

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>