updateing virtualmachines is not idempotent
See original GitHub issuei am using this to update vm’s vcpu, memory and storage values. even at unchanged values it shows up in changelog as 'updated". please take a look at this.
updt_vals['vcpus'] = i['CPU_VALUE']
updt_vals['memory'] = i['MEM_VALUE']
updt_vals['disk'] = i['STORAGE_VALUE']
try:
node_obj = nb.virtualization.virtual_machines.get(name=i['NODE'])
resultsup = node_obj.update(updt_vals)
if resultsup is True:
updated_obj = node_obj.serialize()
logging.info('updated netbox object: "%s"' % str(updated_obj))
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
vmware_guest - not idempotent · Issue #1332 - GitHub
SUMMARY ISSUE TYPE When running either a create VM from template or a blank VM the process completes successfully but when run a...
Read more >Common errors during Classic to Azure Resource Manager ...
This error can happen if the disks of the VM have been deleted or are not accessible anymore. Make sure the disks for...
Read more >Pattern: Idempotent Consumer - Microservice Architecture
If a consumer is not idempotent, multiple invocations can cause bugs. ... the consumer to store the IDs in the business entities that...
Read more >Making retries safe with idempotent APIs - Amazon AWS
An idempotent operation is one where a request can be retransmitted or retried with no additional side effects, a property that is very...
Read more >Idempotent - MDN Web Docs Glossary: Definitions of ... - Mozilla
Successive calls may return different data to the client, if the data on the server was updated in the meantime. POST /add_row HTTP/1.1...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
worked! thank you
Make sure to set the python types to the same as the custom field types. If the CF is an integer, make sure the python variable is an integer too (and not a string) or vice versa. I found that this causes the Record._diff function to see that as a difference and update the record