Skip to content

Picking a particular IP address for a Network #30

New issue

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

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

Already on GitHub? # to your account

Closed
rvalle opened this issue Sep 10, 2020 · 5 comments · Fixed by #31
Closed

Picking a particular IP address for a Network #30

rvalle opened this issue Sep 10, 2020 · 5 comments · Fixed by #31
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rvalle
Copy link
Collaborator

rvalle commented Sep 10, 2020

When using the UI it is possible to select a particular IP to acquire for a Virtual Network.

I have tried to replicate the same functionality with the cs_ip_address module, but it does not work. The documentation states that the IP address is required for the release functionality, and I guess that it is being ignored on acquisition.

For example, consider 123.123.123.123 a public IP address associated with our ACS account.

The following call:

    - name: Assign Public IP to DMZ
      cs_ip_address:
        ip_address: 123.123.123.123
        network: dmz

Will assign a random IP form the public pull, but not the requested one.

@rvalle
Copy link
Collaborator Author

rvalle commented Sep 10, 2020

mmmm, now it seems to be working.
I wonder how I tested this before.
@resmo is this functionality supposed to be implemented?

@resmo
Copy link
Member

resmo commented Sep 10, 2020

it should but I have just verified that we don't have an integration test for that particular example.

@resmo
Copy link
Member

resmo commented Sep 10, 2020

I verified in code and I confirm, this isn't implemented, it seems ipaddress field was added after this implementation.

https://cloudstack.apache.org/api/apidocs-4.9/apis/associateIpAddress.html
https://cloudstack.apache.org/api/apidocs-4.14/apis/associateIpAddress.html

@resmo resmo added enhancement New feature or request good first issue Good for newcomers labels Sep 10, 2020
@rvalle
Copy link
Collaborator Author

rvalle commented Sep 10, 2020

I think it is at least partially implemented.

Because when it happens to give the right IP will not try to assign another IP on subsequent calls.

I can implement the test case and fix it, if u want.

@rvalle
Copy link
Collaborator Author

rvalle commented Sep 11, 2020

When my testing failed a new IP got acquired on each call. Now there is idempotency in the calls.
Anyway, I am going to start by implementing the failing test.
@resmo would be good that check that the other use cases are also tested, as I don't want to introduce regressions, and I am not that familiar with ACS yet.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants