Closed andinod closed 2 years ago
in src/bosh_openstack_cpi/lib/cloud/openstack/cloud.rb
if statement you use project
first
in src/bosh_openstack_cpi/lib/cloud/openstack/openstack.rbanother
you uses project_id
first
is there a specific reason for this that i overlooked?
Hi @ramonskie,
Thanks for the comment.
In this case the project value (which is the name) is considered in the same level as the project_id. Both can be used to stablish the connection to Openstack, so that's the reason why in the validations it's checking if the version is 3 then check if one of them is provided.
The project, due to the fog openstack gem, it is only related to the name of the project not the id and that's the reason why I specify the project_id as a parameter.
So project_id is not required if the project is provided, but you can also provide the project_id without the usage of the project's name and then also will work. (perhaps in the validation that can be improved better?, just wondering...)
The reason?, I had a case where the project name changed (because it can be changed) and I had to recreate/redeploy the bosh directors and I realized also that the current bosh doesn't have the support for the project_id connection, which in our case didn't change, So if we would have been connected through the project_id, that change would not affect us at all.
I hope that clarifies a bit the situation
Best
David
oh and there is no reason for checking the project_id first.
It is an if, so in the validation if it is prefered to check the project first it should not be any problem.
:-)
thanks for the clarification looks good to me than
Hello everybody,
I have added the feature to stablish the connection to Openstack not only with the name of the project but also using the project id.
I have tested it and it works without issues, however if you feel that there are necessary some more changes, please don't hesitate in suggest them.
Best
David