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

Connection through project_id to Openstack #258

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

andinod
Copy link
Contributor

@andinod andinod commented Nov 2, 2022

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

@beyhan beyhan requested review from a team, ragaskar, beyhan, lnguyen and ramonskie and removed request for a team, ragaskar and beyhan November 3, 2022 15:48
@ramonskie
Copy link
Contributor

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?

@andinod
Copy link
Contributor Author

andinod commented Nov 4, 2022

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

@andinod
Copy link
Contributor Author

andinod commented Nov 4, 2022

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.

:-)

@ramonskie
Copy link
Contributor

thanks for the clarification looks good to me than

Copy link
Member

@lnguyen lnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ramonskie ramonskie merged commit 34eae27 into cloudfoundry:master Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants