FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 01-03-2008, 02:47 PM
Matt Hyclak
 
Default Fix for Cobbler import running triggers

This is a fix to the patch yesterday to run triggers on cobbler import
(changeset f22f6b18149029e073c3db3ff812bb4c06e24036)

Matt

--
Matt Hyclak
Department of Mathematics
Department of Social Work
Ohio University
(740) 593-1263


diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 952c663..ca78dc1 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -195,7 +195,7 @@ class Importer:
profile.set_kickstart(kickstart_file)

self.configure_tree_location(distro)
- self.distros.add(distro,save=True) # re-save
+ self.distros.add(distro,with_copy=True) # re-save
self.api.serialize()

# --------------------------------------------------------------------
@@ -480,7 +480,7 @@ class Importer:
distro.set_initrd(initrd)
distro.set_arch(pxe_arch)
distro.source_repos = []
- self.distros.add(distro,save=True)
+ self.distros.add(distro,with_copy=True)
self.distros_added.append(distro)

existing_profile = self.profiles.find(name=name)
@@ -495,7 +495,7 @@ class Importer:
profile.set_name(name)
profile.set_distro(name)

- self.profiles.add(profile,save=True)
+ self.profiles.add(profile,with_copy=True)
self.api.serialize()

return distro
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 01-03-2008, 03:27 PM
Matt Hyclak
 
Default Fix for Cobbler import running triggers

On Thu, Jan 03, 2008 at 10:47:28AM -0500, Matt Hyclak enlightened us:
> This is a fix to the patch yesterday to run triggers on cobbler import
> (changeset f22f6b18149029e073c3db3ff812bb4c06e24036)
>
> Matt

> diff --git a/cobbler/action_import.py b/cobbler/action_import.py
> index 952c663..ca78dc1 100644
> --- a/cobbler/action_import.py
> +++ b/cobbler/action_import.py
> @@ -195,7 +195,7 @@ class Importer:
> profile.set_kickstart(kickstart_file)
>
> self.configure_tree_location(distro)
> - self.distros.add(distro,save=True) # re-save
> + self.distros.add(distro,with_copy=True) # re-save
> self.api.serialize()
>
> # --------------------------------------------------------------------
> @@ -480,7 +480,7 @@ class Importer:
> distro.set_initrd(initrd)
> distro.set_arch(pxe_arch)
> distro.source_repos = []
> - self.distros.add(distro,save=True)
> + self.distros.add(distro,with_copy=True)
> self.distros_added.append(distro)
>
> existing_profile = self.profiles.find(name=name)
> @@ -495,7 +495,7 @@ class Importer:
> profile.set_name(name)
> profile.set_distro(name)
>
> - self.profiles.add(profile,save=True)
> + self.profiles.add(profile,with_copy=True)
> self.api.serialize()
>
> return distro


I should clarify - this fixes the patch for running on the 0.6.x branch of
cobbler, not needed for the devel branch.

Matt

--
Matt Hyclak
Department of Mathematics
Department of Social Work
Ohio University
(740) 593-1263

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 05:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org