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

Added support for updated behavior of linode API's (networkingip, rdns, instance) #1658

Open
wants to merge 64 commits into
base: dev
Choose a base branch
from

Conversation

AniJ98
Copy link
Contributor

@AniJ98 AniJ98 commented Nov 12, 2024

📝 Description

This PR implements functionality and tests for managing Reserved IP addresses in the Linodego client. These changes align with the updated Linode API, providing comprehensive support for Reserved IP operations. The changes include:

Implementation of core operations:

  • Deleting a Linode while retaining the Reserved IP
  • Retrieving IP information for Linodes, including Reserved IPs
  • Listing all IP addresses, including Reserved IPs
  • Allocating and assigning new Reserved IP addresses
  • Assigning Reserved IPs to Linodes
  • Fetching particular IP address, including Reserved IPs
  • Converting between Ephemeral and Reserved IPs

Test Coverage:

  • TestAccResourceInstance_deleteWithReservedIP - Verifies that deleting an instance created with a reserved IP does not delete the reserved IP.
  • TestAccDataSourceInstanceNetworking_basicwithReseved - Confirms that the IP addresses of a Linode are returned with the updated reserved status.
  • TestAccDataSourceNetworkingIP_list, TestAccDataSourceNetworkingIP_filterReserved - Tests the listing of IP addresses and the ability to filter them based on their reserved status.
  • TestAccResourceNetworkingIP_reserved - Evaluates the allocation of reserved and ephemeral IP addresses to Linodes, as well as the creation of both types of IP addresses.
  • TestAccResourceNetworkingIPsAssign - Tests the assignment of multiple reserved and ephemeral IP addresses to Linodes within a specific region.
  • TestAccResourceRDNS_unreservedToReserved - Verifies the conversion of ephemeral IP addresses into reserved IP addresses
  • TestAccDataSourceNetworkingIP_basic - Tests fetching a specific IP address, including its updated reserved status.

✔️ How to Test

  1. Ensure you have a valid Linode API token.
Set up your environment:


    export LINODE_TOKEN="your_token_here"

  2. To test the above mentioned functionalities individually :


    make int-test PKG_NAME="linode/networkingip" ARGS="-run TestAccResourceNetworkingIP_reserved"

  3. Verify the test output for any failures or unexpected behavior.

Note:

Ensure you have proper permissions and sufficient quota in your Linode account to perform Reserved IP operations. Some tests may create and delete resources, so use a testing environment if possible.

Merging changes from dev into ipreservation-remainingednpoints-final
…n a region and fetching the updated IP address model
…s, removed dummy reserved IP from test functions
@AniJ98 AniJ98 requested a review from a team as a code owner November 12, 2024 23:41
@AniJ98 AniJ98 requested review from jriddle-linode and lgarber-akamai and removed request for a team November 12, 2024 23:41
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.

1 participant