af05769e85
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
38 lines
483 B
Perl
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;
|