On Sep 24, 2009, at 5:08 PM, Derek Yarnell wrote:
> use XMLRPC::Lite;
>
> # Build the connection
> my $xmlrpc = XMLRPC::Lite->proxy($uri);
> # Login to cobbler xmlrpm and get session token back.
> my $token = $xmlrpc->login($user, $password)->result();
> # Create new system object
> my $object = $cobbler->new_system($token)->result();
> $cobbler->modify_system($object, "name", $hostname, $token)->result();
> $cobbler->modify_system($object, "hostname", $hostname, $token)- 
> >result();
> $cobbler->modify_system($object, "profile", $profile, $token)->result 
> ();
> $cobbler->modify_system($object, "gateway", $gateway, $token)->result 
> ();
> ###
> my %eth0 = (
>       "macaddress-eth0" => $mac,
>       "ipaddress-eth0" => $ip,
>       "static-eth0" => 1,
>       "subnet-eth0" => $netmask,
> );
>
> $cobbler->modify_system($object, "modify-interface", \%eth0, $token)- 
> >result();
> # Commit the system object
> my $result = $cobbler->save_system($object, $token)->result();

Answering my own questions!  This changed between 1.6.x and 2.x  
instead of modify-interface in the XMLRPC call it should be  
modify_interface now in 2.x.  Sigh dunno why this had to change but my  
friend remote.py has all the answers :)

As for the other issue, I see that it is already in as a defect.  I am  
gonna update the entry with a little bit more info.

Thanks,
derek

Derek Yarnell
UNIX Systems Administrator
University of Maryland
Institute for Advanced Computer Studies



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

Reply via email to