问题

我想用类别更新VM,但询问spec_version

  • 19月19日11月19日
  • 1回复
  • 54意见

以下是索取详细信息

URL:HTTPS:// Addressofserver:9440 / API / Nutanix / V3 / VMS / V.

方法:放置

要求身体:

{
“spec”:{
“姓名”:“my_vm_name”,
“资源”: {
“power_state”:“开”,
“硬件_clock_timezone”:“亚洲/加尔各答”
}
},
“元数据”:{
“善良”:“VM”,
“类别”:{
“环境”:“测试”,
“部门”:“开发”
},
“entity_version”:“”,
“spec_version”:5,
“spec_hash”:“”
}
}

回复:

{
“api_version”:“3.1”,
“代码”:409,
“善良”:“VM”,
“message_list”:[
{
“消息”:“您尝试更新的实体可能已经修改。请在更新之前再次检索实体。规范版本不匹配:指定版本5,请求9”,
“原因”:“spec_version_mismatch”
}
],
“州”:“错误”
}

我如何找到或设置entity_version,spec_version,spec_hash?


1回复

UserLevel 3.
徽章 +4

@maheshnikam.要获取spec_version和entity_version,您需要首先使用得到REST API调用VM(https:// addressofserver:9440 / api / nutanix / v3 / vms / {vm-uuid}),一旦获得这些细节,就可以在上面提到的Put API呼叫中使用它来通过REST API更新VM。

回复


Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu