5 Essential Tips for Maximizing Your Experience at Nutanix .NEXT for Bloggers
Hello MattI didn’t tested your code but i noticed the following:it seems that you don’t have spec_version in metadata. When you edit an entity from Nutanix APIv3, you have to first read the spec_version and add it. Timezone format it’s wrong, see my example below.The steps to edit a VM are: read the entity with API get the current vm[‘metadata’][‘spec_version’] compose the edit query containing the spec version you read(sometimes increase by 1 or 2 than what is read) and submit the request to the api.About increasing the spec_version, I can’t really tell when and why but sometimes I had to read the spec_version, increase it by 2 and then send the edit request. Try first without incrementing the spec_version. An example which worked for me:# I read spec_version: 2 and i didn’t modified it.{ "spec": { "name": "test_vm", "resources": { "power_state": "OFF", "hardware_clock_timezone": "Europe/Zurich", "num_sockets": 2 } }, "metadata": { "kind": "vm", "spec_
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.