Re: Enable/Disable netboot for whole profile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux