简体   繁体   English

如何获取Opennebula XML-RPC所需的参数 api

[英]How to get paremeters required by Opennebula XML-RPC api

I am trying to create a VM using Opennebula XML-RPC API. That shouldn't be a problem, according to their documentation .我正在尝试使用 Opennebula XML-RPC API 创建虚拟机。根据他们的文档,这应该不是问题。

However, parameters required for this method are nowhere to be seen (as well as for all other methods).但是,此方法所需的参数无处可寻(以及所有其他方法)。

So far, I have managed to list all VMs, by diving into Opennebula CLI scripts and finding that onevm list ( one.vmpool.info in context of pyone) requires 4 parameters that have to be integers:到目前为止,我已经成功地列出了所有的虚拟机,通过深入研究 Opennebula CLI 脚本并发现onevm list (在one.vmpool.info的上下文中是 one.vmpool.info)需要 4 个必须是整数的参数:

In [1]: import pyone
In [2]: one = pyone.OneServer('http://oneserver:2633/RPC2', session='admin:pass')
In [3]: one.vmpool.info(-1, -1, -1, -1)
Out[3]: <pyone.bindings.VM_POOLSub at 0x103be9190>

This approach is quite ridiculous, however.然而,这种做法非常荒谬。

I'm sure there is a way to get the required RPC method parameters more easily, I just can't find one.我确定有一种方法可以更轻松地获取所需的 RPC 方法参数,但我找不到。

Hoping for your help!希望得到您的帮助!

The parameters for IN and OUT are located in the documentation link you mentioned - https://docs.opennebula.io/6.0/integration_and_development/system_interfaces/api.html#actions-for-templates-management IN 和 OUT 的参数位于您提到的文档链接中 - https://docs.opennebula.io/6.0/integration_and_development/system_interfaces/api.html#actions-for-templates-management

You can find all the necessary parameters here.您可以在此处找到所有必要的参数。 In case you still have issues, do let me know!如果您仍有问题,请告诉我!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM