[pve-devel] API documentation is buggy

Detlef Bracker bracker at 1awww.com
Wed Feb 1 02:22:30 CET 2017


Hi,

horrible, when an API has absolute buggy documentation and the examples
are wrong too (old version)!

In first I send I this via PHP-API and search minimum 6 hours for a
small problem!

Array for create an LXC-Container

(
    [ostemplate] => local:vztmpl/ubuntu-16.10-standard_16.10-1_amd64.tar.gz
    [vmid] => 494
    [hostname] => CT494.myname.mydomain.de
    [storage] => local
    [onboot] => 1
    [description] => backup:0
    [cpulimit] => 1
    [rootfs] => 20
    [memory] => 256
    [swap] => 256
)

Template are in /vz/template/cache/ 
Proxmox 4.4-5/c430a5a5

and get everytime this error and o my got, google search found many times the same problem, but erverytime without a resolution
or a not more exist page or something! So I dont know, how many hundreds hours admins has search for the right resolution?!

HTTP/1.1 500 Can't call method "map_method_by_name" on an undefined value at /usr/share/perl5/PVE/RESTHandler.pm line 287.
Cache-Control: max-age=0
Connection: close

Only when pool is not set and the rights for this user are configured for only allowed for a special pool! 
The response give not much informations! No example permission not denied about pool not set or so!

So, the example in the git-hub has paramenters in the readme.MD

cpus= "2"
disk="2"

CPUS and DISK are not possible parameter!

rootfs in API-DOC http://pve.proxmox.com/pve-docs/api-viewer/ said:

[volume=]<volume>  [,asl=1/0].......size=<DiskSize> thats all bullshit!

in Forum I read, that the parameter must been only a number and yes,
with only the number for gigabytes works fine!

then the next:

$pve2->set_debug(true);

brings nothing out - no message and no log-file entries and less infos
as without activated!
So a workarround is for the admins only to patch the class, so that get
back responses, why without an response
a search for errors is not possible!

Next the rights in documentation for create lxc containter under LXC
Post are not complete! The user need more rights:
PVEVMAdmin / PVEPoolAdmin / PVEDatastoreUser / PVETemplateUser

With wrong informations, ALL users search HOURS and DAYS, but the
developers now about what the users need, why they
make not direct better examples and correct documentations?

Sorry, but proxmox is an absolute perfect product, but the documentation
is not best!

Thanks and have a nice night
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20170201/2abffedc/attachment.sig>


More information about the pve-devel mailing list