power management in cobbler
by nitin
Hello Guys,
I was trying to setup power maangement for our servers from cobbler using
API.
But, the remote.py code doesn't seem to take user/password input. From what
is explained on
http://www.cobblerd.org/manuals/2.4.0/5/6_-_Power_Management.html, I can
supply power-user and power-pass at run time.
It fails,
# cobbler system poweron --name=foo --power-user=X --power-pass=Y
Usage: cobbler [options]
cobbler: error: no such option: --power-user
For us, I want to run power commands using API. Command line wont make much
sense for security purpose.
So, I had to modify remote.py to take user/password
+++ remote.py 2014-01-27 06:13:46.766923325 +0000
@@ -1982,7 +1982,7 @@
return True
- def power_system(self,object_id,power=None,token=None,logger=None):
+ def
power_system(self,object_id,power=None,token=None,user=None,password=None,logger=None):
"""
Internal implementation used by background_power, do not call
directly if possible.
@@ -1991,13 +1991,13 @@
obj = self.__get_object(object_id)
self.check_access(token, "power_system", obj)
if power=="on":
- rc=self.api.power_on(obj, user=None, password=None,
logger=logger)
+ rc=self.api.power_on(obj, user, password, logger=logger)
elif power=="off":
- rc=self.api.power_off(obj, user=None, password=None,
logger=logger)
+ rc=self.api.power_off(obj, user, password, logger=logger)
elif power=="status":
- rc=self.api.power_status(obj, user=None, password=None,
logger=logger)
+ rc=self.api.power_status(obj, user, password, logger=logger)
elif power=="reboot":
- rc=self.api.reboot(obj, user=None, password=None,
logger=logger)
+ rc=self.api.reboot(obj, user, password, logger=logger)
Do you guys think if this could get into the main code? Or am I missing
something?
Thanks,
Nitin
Linkedin Corp
10 years, 2 months
Re: [cobbler-devel] Cobbler lib subdir in SLES
by Alan Evangelista
On 01/07/2014 01:12 PM, Michael Jansen wrote:
> On Tuesday 07 January 2014 00:32:47 Alan Evangelista wrote:
>> I had the problem described below when installing Cobbler in SLES:
>> https://github.com/cobbler/cobbler/issues/118
>>
>> The issue refers to Debian, but the same problem happens in SLES.
>> Is anybody working on this issue?
>>
>> Also, the solution (creatinga symbolic link) is described in
>> http://www.cobblerd.org/manuals/2.4.0/3/6_-_Installation_Notes.html,
>> but it is in a Debian section. I'd like to add a section for SUSE-based
>> distributions in this page and include the simbolic link creation command
>> and other details in it. Where is this documentation source? I could not
>> find it in
>> cobbler'ssource code repository.
> What did you install? A package from SUSE? If yes which. From source? If yes
> which branch.
Cobbler was installed from source, master branch, clone done in Sep
17th, 2013.
Was this fixed recently? Should I try latest Cobbler code?
> I am currently trying to improve the openSUSE/SLES support in cobbler. SLES is
> a bit hard to come by unless you have some bucks to spent so i don't know much
> about it.
I documented the issues found during Cobbler installation in SLES.
Fortunately, some were fixed recently.
I could share it with you. Is this mailing list the best medium to do that?
Regards,
Alan Evangelista
10 years, 3 months