Hello Everybody 

I am trying to edit a host using the cobbler API however I get the below error :

---- snip ----
Fault returned from XML RPC Server, fault code 1: 
exceptions.AttributeError:'NoneType' object has no attribute 'remote_methods'

---- snip ----

The script I am using is :

---- snip ----
        1. my $conn = Frontier::Client->new( 'url' => 
"http://xxxx.xxx.xxx.com/cobbler_api" );
        2. my $token = $conn->call("login","$username","$password");
        3. my $object = $conn->call("get_system_handle","$old_hostname", 
$token);
        4. print Dumper ($object);
        5. $conn->call("modify_system",$object,"name","$new_hostname",$token);
        6. $conn->call("modify_system",$object, "hostname", "$new_hostname", 
$token);
        7. $conn->call("save_system",$object, $token);
        8. $conn->call("sync",$token);

---- snip ----

 Now the print statement gives me the following :


$VAR1 = 'system::old_hostname';


Also, I am able to fetch information about the host using " my $system = 
$booter->call("get_system","$hash{$temp}{'old_hostname'}" );"

and Dumper($system) , gives me the correct information . I wonder why modify 
system is not working as expected . 

R
Bondie
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to