Stefan,
Committed as df5078c9d5e803a875896dba654d45f0b7a63af5.  Thanks for the patch.

/aron
________________________________________
From: stefan.me...@generali.de
To: spacewalk-devel@redhat.com
Subject: [Spacewalk-devel] spacecmd: system_schedulehardwarerefresh
        and     system_schedulepackagerefresh
Message-ID:
        <ofad572d26.e0fe1e69-onc1257a4d.00402665-c1257a4d.00406...@generali.de>

Content-Type: text/plain; charset=US-ASCII

Hi,

we needed a function in spacecmd to start a hardware and software refresh
and i extended "spacecmd/src/lib/system.py" with 2 new options:

1. system_schedulehardwarerefresh  => Schedules a hardware refresh on a
given system, ssm, group
2. system_schedulepackagerefresh  => Schedules a software packagee refresh
on a given system, ssm, group

This is the working patch for spacecmd-1.8.4-1.el5.noarch (sorry, i didn't
checkout the Git repository):

182a183,246
> def help_system_schedulehardwarerefresh(self):
>     print 'system_schedulehardwarerefresh: Schedule a hardware refresh
for a system'
>     print 'usage: system_schedulehardwarerefresh <SYSTEMS>'
>     print
>     print self.HELP_SYSTEM_OPTS
>
> def complete_system_schedulehardwarerefresh(self, text, line, beg, end):
>     return self.tab_complete_systems(text)
>
> def do_system_schedulehardwarerefresh(self, args):
>     (args, options) = parse_arguments(args)
>
>     if not len(args):
>         self.help_system_schedulehardwarerefresh()
>         return
>
>     # use the systems listed in the SSM
>     if re.match('ssm', args[0], re.I):
>         systems = self.ssm.keys()
>     else:
>         systems = self.expand_systems(args)
>
>     action_time = parse_time_input('now')
>
>     for system in systems:
>         system_id = self.get_system_id(system)
>         if not system_id: continue
>
>         self.client.system.scheduleHardwareRefresh(self.session,
system_id, action_time)
>
> ####################
>
> def help_system_schedulepackagerefresh(self):
>     print 'system_schedulepackagerefresh: Schedule a software package
refresh for a system'
>     print 'usage: system_schedulepackagerefresh <SYSTEMS>'
>     print
>     print self.HELP_SYSTEM_OPTS
>
> def complete_system_schedulepackagerefresh(self, text, line, beg, end):
>     return self.tab_complete_systems(text)
>
> def do_system_schedulepackagerefresh(self, args):
>     (args, options) = parse_arguments(args)
>
>     if not len(args):
>         self.help_system_schedulepackagerefresh()
>         return
>
>     # use the systems listed in the SSM
>     if re.match('ssm', args[0], re.I):
>         systems = self.ssm.keys()
>     else:
>         systems = self.expand_systems(args)
>
>     action_time = parse_time_input('now')
>
>     for system in systems:
>         system_id = self.get_system_id(system)
>         if not system_id: continue
>
>         self.client.system.schedulePackageRefresh(self.session,
system_id, action_time)
>
> ####################

Kind regards

Stefan

___________________________________________________________________________

Stefan Meyer
Generali Deutschland Informatik Services GmbH
Infrastructure Engineering (IE-c)




------------------------------

Message: 7
Date: Wed, 01 Aug 2012 14:02:44 +0200
From: Uwe Gansert <u...@suse.de>
To: spacewalk-devel@redhat.com
Subject: Re: [Spacewalk-devel] Bootstrap image feature
Message-ID: <50191ae4.9090...@suse.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 01.08.2012 11:22, Jonathan Hoser wrote:

> from the user-side this is a cool feature,
> and seeing it implemented and working would be a great enhancement of
> spacewalk.

thanks

> If there was an additional way of putting that 'pre-Image' onto a USB
> stick,
> to boot from it (with Manager/Spacewalk Details for registration) that
> would be even better!

in theory that's possible but I'm not sure if I understand the sense in
that.
If you can not PXE boot the server, the complete "Create Cobbler System
Record" button is useless and you can not do much with the machine in
Spacewalk then - except for seeing the hardware.

> (We have to preregister MACs to get them to PXEboot,
> so a prestart without PXE (showing the MACs) would a big boon, thought
> only for me!?!)

I'm not sure if I understand that scenario.
You have to boot locally and then you can PXE boot later?
Sounds weird but if that's the case, then yes, it would make sense to
put the image on a USB stick.

--
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG N?rnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net
listening to: "Flux" by Covenant




------------------------------

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

End of Spacewalk-devel Digest, Vol 51, Issue 1
**********************************************

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to