-
Notifications
You must be signed in to change notification settings - Fork 1.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
[Bug] Scaleway The volume is created systematically on par1 #3964
Conversation
This comment has been minimized.
This comment has been minimized.
@@ -51,10 +51,10 @@ | |||
description: | |||
- Name used to identify the volume. | |||
required: true | |||
organization: | |||
project: |
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.
This is a breaking change and will not be accepted. See #3951 for a way to do this as in a non-breaking fashion. It might also be better to rename this option to project
and keep an alias for organization
, if these two values mean the same to the API. @remyleone what do you think?
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 think you can indeed follow #3951 to add support for a project. I don't think it is necessary to remove organization. Also, I fail to see why you would need a region argument, instance API uses zone such as fr-par-1
and not region such as fr-par
. par1
is deprecated and you should use fr-par-1
to talk about this zone that belongs to the fr-par
region.
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 have added the changes to support organization
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
size = module.params['size'] | ||
volume_type = module.params['volume_type'] | ||
module.params['api_url'] = SCALEWAY_LOCATION[region]["api_endpoint"] |
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.
Is this a bugfix? Is it related to the other bugfixes? If not, it should be a separate PR.
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 need this part to have the scw aliases. example par1 = fr-par-1
@@ -123,14 +130,20 @@ def core(module): | |||
|
|||
volumeByName = None | |||
for volume in volumes_json['volumes']: | |||
if volume['project'] == project and volume['name'] == name: | |||
volumeByName = volume | |||
|
|||
if volume['organization'] == organization and volume['name'] == name: |
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.
Does the API return both organization
and project
with the same value? Or only one of these two?
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 check with ansible -vvv i have 2 return from API:
organization: null
project: <ID_project>
So I guess if we pass organization has the place of project. The value of project would be null
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Rémy Léone <remy.leone@gmail.com>
shipit |
In that case, looks good to me as well! |
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #3983 🤖 @patchback |
* [Bug] The volume is created systematically on par1 * add change log * added backward compatibility with organization * add documentation * change typo doc * Update changelogs/fragments/3964-scaleway_volume_add_region.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Rémy Léone <remy.leone@gmail.com> * optimization Co-authored-by: Romain SCHARFF <rscharff@plussimple.com> Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Rémy Léone <remy.leone@gmail.com> (cherry picked from commit 125516b)
@xilmen thanks for your contribution! |
…3983) * [Bug] The volume is created systematically on par1 * add change log * added backward compatibility with organization * add documentation * change typo doc * Update changelogs/fragments/3964-scaleway_volume_add_region.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/scaleway/scaleway_volume.py Co-authored-by: Rémy Léone <remy.leone@gmail.com> * optimization Co-authored-by: Romain SCHARFF <rscharff@plussimple.com> Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Rémy Léone <remy.leone@gmail.com> (cherry picked from commit 125516b) Co-authored-by: xilmen <romain.scha@gmail.com>
SUMMARY
Change of organization to project, depreciated in the api.
Added missing region parameter.
ISSUE TYPE
COMPONENT NAME
This module allows to create volumes on the scw datacenter