Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPT 1880: Fixed issue with updating non-populated NodeBalancerNode #276

Closed
wants to merge 6 commits into from

Conversation

ezilber-akamai-zz
Copy link
Contributor

📝 Description

Previously, attempting to update a non-populated NodeBalancerNode would result in the update actually updating the resource silently. This change fixes the issue.

✔️ How to Test

pytest test

Note: Since this change deals with making updates to real resources as opposed to fixtures, it cannot be tested using mocks and must therefore be tested manually. To do this, first create a NodeBalancerNode in your Linode account if one does not already exist, and then run this python script and verify that the weight of the node was actually updated.

#!/usr/bin/env python3

from linode_api4 import LinodeClient
from linode_api4.objects import  NodeBalancerNode

client = LinodeClient(<personal_access_token>)

node = NodeBalancerNode(client, <node_id>, <config_id>, <nodebalancer_id>)

node.weight = 60

node.save()

Resolves #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NodebalancerNode not found.
2 participants