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 06-09-2008, 02:53 PM
"Eamonn Walsh"
 
Default Enable/Disable netboot for whole profile

Hi Guy,

What you would recommend as the best way to turn on or off the enable-netboot setting for systems assigned to a certain profile.

- Eamonn

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 06-09-2008, 03:03 PM
Michael DeHaan
 
Default Enable/Disable netboot for whole profile

What you would recommend as the best way to turn on or off the
enable-netboot setting for systems assigned to a certain profile.


Ideally we'd run a non-existant command like this:

cobbler system find --profile=foo | xargs cobbler system edit
--netboot-enabled=0


But wait, we can't do that yet! That's on my nice-to-have list
though. Thankfully you can do this pretty quickly now with a Python
script:


#!/usr/bin/python
import cobbler.api as capi
api = capi.BootAPI()
systems = api.find_system(profile="parent-name-goes-here",return_list=True)
for s in systems:
s.set_netboot_enabled(False)
api.add_system(s) # save it after changing it


Hopefully that gets a few more people interested in the Cobbler API too

--Michael

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 06-09-2008, 03:06 PM
"Eamonn Walsh"
 
Default Enable/Disable netboot for whole profile

Perfect, just what I was looking for.

Thanks,

Eamonn

On Mon, Jun 9, 2008 at 4:03 PM, Michael DeHaan <mdehaan@redhat.com> wrote:






What you would recommend as the best way to turn on or off the enable-netboot setting for systems assigned to a certain profile.




Ideally we'd run a non-existant command like this:



cobbler system find --profile="" | xargs cobbler system edit --netboot-enabled=0



But wait, we can't do that yet! * That's on my nice-to-have list though. * *Thankfully you can do this pretty quickly now with a Python script:



#!/usr/bin/python

import cobbler.api as capi

api = capi.BootAPI()

systems = api.find_system(profile="">
for s in systems:

* s.set_netboot_enabled(False)

* api.add_system(s) *# save it after changing it





Hopefully that gets a few more people interested in the Cobbler API too



--Michael



_______________________________________________

et-mgmt-tools mailing list

et-mgmt-tools@redhat.com

https://www.redhat.com/mailman/listinfo/et-mgmt-tools



_______________________________________________
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 10:46 AM.

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