pve-manager/PVE/pvecfg.pm.in
Dietmar Maurer af05769e85 add API to query version info
Normaly all nodes should have the same version, so /api2/json/version is
good enough for most situations. But you can also query the version on
each node using /api2/json/nodes/{node}/version
2011-12-20 07:04:39 +01:00

38 lines
483 B
Perl

package PVE::pvecfg;
use strict;
use vars qw(@ISA);
use Carp;
sub package {
return '@PACKAGE@';
}
sub version {
return '@VERSION@';
}
sub release {
return '@PACKAGERELEASE@';
}
sub repoid {
return '@REPOID@';
}
# this is diplayed on the GUI
sub version_text {
return '@VERSION@-@PACKAGERELEASE@/@REPOID@';
}
# this is returned by the API
sub version_info {
return {
'version' => '@VERSION@',
'release' => '@PACKAGERELEASE@',
'repoid' => '@REPOID@',
}
}
1;