-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Add params zone_id to cloudstack ipaddress resource #11306
Add params zone_id to cloudstack ipaddress resource #11306
Conversation
@sawanoboly thanks for the PR, but I wonder if this is really needed and if we would really want to customize the generic CloudStack provider to fix a specific private implementation. So I am trying to get in contact with the provider (using their contact form) to discuss if they really have a fork of CloudStack running which requires this field (opposed to the Apache CloudStack API). I'll wait for their response and get back to you when I have their feedback. |
@sawanoboly did you (I suppose you did, but still asking to be sure) try to associate an IP address with the existing If not, could you give it a try? And if so, could you share the results of those tests (and possibly the error response if any)? The initial response from the cloud provider seems to indicate it should also work if
I asked again (for clarity) if But in the meantime (while waiting for their response), it would be nice if you could test it as well. Thx! |
@svanharmelen Thanks!
network_idFirst of all, I attempted to acquire the IP address by network_id. Resource definition is as below.
But, I caught error
This network_id used the same one used for other public addresses. vpc_idNext, I'd tried to investigate
The vpc_id may only be masked, but it can not be examined. zone_idAccording to the first error message(
|
Thanks @sawanoboly! I'll take this info back to the provider... |
f193236
to
9684c8b
Compare
Sorry. I mistakenly merged 0-8-stable and pushed, so I overwrote it with the difference from master. |
No worries 😉 I'm still in conversation with the cloud provider. Will update when I got an answer. It seems they are going to fix their docs/setup so it works as standard CloudStack should work. But let's wait it out first... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's taken long enough, so let's get this in 😉 But please first fix the one comment I've added. Thx!
return fmt.Errorf( | ||
"You must supply a value for either (so not both) the 'network_id' or 'vpc_id' parameter") | ||
"You must supply one value for either (so not more than two) the 'network_id' or 'vpc_id' or 'zone_id' parameter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to keep this function as it was. The zone_id
is optional so still only one of network
or vpc
is needed right? The fact that zone_id
is required by your cloud provider seems to be a somewhat wierd choice they made, which makes them divert from standard CloudStack. So I'm good with adding this feature, but we should not make it required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks,
I will check if I can create a resource even if I give both zone_id and network_id at that provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I confirmed that it allows pass both zone_id and network_id together.
cloudstack_ipaddress.ip-vm01: Creating...
ip_address: "" => "<computed>"
network_id: "" => "xxxxxxxxxxxxxxxxxx"
project: "" => "<computed>"
zone_id: "" => "xxxxxxxxxxxxxxxxxxx"
cloudstack_ipaddress.ip-vm01: Creation complete
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
I will restore few functions.
I've cleaned up Code. It just add zone_id as new option. Should I rebase ? |
LGTM! Thanks! |
* add option zone_id - Ref: http://docs.idcf.jp/cloud/api/address/#listpublicipaddresses * Exclusion of `network_id`, `vpc_id` and `zone_id` * Revert "Exclusion of `network_id`, `vpc_id` and `zone_id`" This reverts commit 9684c8b. * remove zone_id from one of required option.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi, I've add zone_id to cloudstack_ipaddress for CloudStack based provider IDCF. Their API only allows associate new IPAddress by zone_id.
Ref: http://docs.idcf.jp/cloud/api/address/#listpublicipaddresses