[Kimchi-devel] [PATCH 2/2] Support ppc64 isos in Templates: Filter remote isos and change UI

Paulo Ricardo Paz Vital pvital at linux.vnet.ibm.com
Wed Mar 5 20:27:54 UTC 2014


-- 
Tested-by: Paulo Vital <pvital at linux.vnet.ibm.com>
Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>


On Wed, 2014-03-05 at 15:18 -0300, Rodrigo Trujillo wrote:
> This patche filters remote isos that should be showed to user by the
> system architecture. The UI now shows the architecture of the remote
> iso as well.
> 
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
> Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
> ---
>  src/kimchi/distroloader.py      | 3 ++-
>  ui/pages/template-add.html.tmpl | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/kimchi/distroloader.py b/src/kimchi/distroloader.py
> index daa5d5b..7745e0d 100644
> --- a/src/kimchi/distroloader.py
> +++ b/src/kimchi/distroloader.py
> @@ -49,9 +49,10 @@ class DistroLoader(object):
>              raise OperationFailed("KCHDL0002E", msg_args)
> 
>      def get(self):
> +        arch = os.uname()[4]
>          all_json_files = glob.glob("%s/%s" % (self.location, "*.json"))
>          distros = []
>          for f in all_json_files:
>              distros.extend(self._get_json_info(f))
> 
> -        return dict([(distro['name'], distro) for distro in distros])
> +        return dict([(distro['name'], distro) for distro in distros if distro['os_arch'] == arch])
> diff --git a/ui/pages/template-add.html.tmpl b/ui/pages/template-add.html.tmpl
> index edce8d2..8d20f66 100644
> --- a/ui/pages/template-add.html.tmpl
> +++ b/ui/pages/template-add.html.tmpl
> @@ -158,6 +158,9 @@
>                                                  <div class="iso-info-item" title="{os_distro}">
>                                                      $_("OS: "){os_distro}
>                                                  </div>
> +                                                <div class="iso-info-item" title="{os_arch}">
> +                                                    $_("Arch: "){os_arch}
> +                                                </div>
>                                              </div>
>                                              <div class="iso-info-col">
>                                                  <div class="iso-info-item" title="{os_version}">




More information about the Kimchi-devel mailing list