Description of problem: >> According the code the the returned version is content of web.version >> >> /etc/rhn/default/rhn_web.conf >> >> I see as best option to create new config option web.apiversion which we >> >> bump up independently on spacewalk version. And ideally return it back to >> >> 5.2 at least and act as API version 0.x never exist. >> >> Yes maybe we can bump it to 100 or 10 to clearly state that it has nothing >> >> to do with spacewalk versioning. >> >> > > > > +1 I'm ok with this, seems like using the web_version has caused some problems with some scripts. So to summarize what should happen, 1) add web.apiversion to /etc/rhn/default/rhn_web.conf 2) set the initial value to be 5.2 3) change api.get_version() to to return the value of web.apiversion. At current it returns web.version + " Java" http://tinyurl.com/5c2egq 4) api.get_system_version() should continue to return the value of web.version. 5) if you are relying on the value of api.get_system_version() please switch the appropriate api.get_version() method. Mirek, feel free to make the above changes as part of your proxy changes. jesus
Commited as 4d7d115fbec1410251baae92ea51714c08f4d721. Tagged and built: spacewalk-java-0.4.2-1 spacewalk-web-0.4.2-1
# grep version /etc/rhn/default/rhn_web.conf # the version of this RHN install as a whole web.version = 0.4 # the version of API web.apiversion = 10.0 # perl get-api-version.pl Gimme password for [admin] on [dhcp77-206.rhndev.redhat.com]: <password> $VAR1 = [ '10.0' ]; $VAR1 = [ '0.4' ]; # cat get-api-version.pl #!/usr/bin/perl use strict; use warnings FATAL => 'all'; use Frontier::Client (); use Data::Dumper; my $idle_time; my ($host, $username) = ( '<hostname>', 'admin' ); $| = 1; print "Gimme password for [$username] on [$host]: "; my $passwd = <STDIN>; chomp $passwd; my $client = new Frontier::Client(url => "http://$host/rpc/api"); my $session = $client->call('auth.login', $username, $passwd) or die "Failed to login to [$host]\n"; my @data = $client->call('api.get-version'); print Dumper \@data; @data = $client->call('api.system-version'); print Dumper \@data; # I had to add RewriteRule ^/rpc/api /rhn/rpc/api [P] to /etc/httpd/conf.d/zz-spacewalk-server.conf for the API calls to work but once it works, it does what this bugzilla wanted it to do.