Add org scoping to lifecycle_environments variable#1980
Conversation
| name=dict(required=True), | ||
| url=dict(required=True), | ||
| lifecycle_environments=dict(required=False, type='entity_list'), | ||
| lifecycle_environments=dict(required=False, type='entity_list', scope=['organization']), |
There was a problem hiding this comment.
Does this work given the smart proxy module gets a list of organizations, not a single one?
There was a problem hiding this comment.
Hi @evgeni the lifecycle_environments variable is a list in all of its invocations (content_view, content_view_version and smart_proxy modules). I have tested against the content_view module with both a single string "Library" and also a list with multiple items and can confirm it works ok.
There was a problem hiding this comment.
So whu are tests failing with
[ERROR]: Task failed: Module failed: Failed to lookup scope ['organization'] while searching for lifecycle_environments.
There was a problem hiding this comment.
Hi evgeni, I've fixed the unit tests for content_view.
The fix for smart_proxy is more involved, so I thought it best to separate the fixes. It looks like the remaining failing tests are not related to the changes I have made.
9e2895c to
bbc8bb6
Compare
This fixes the
Found too many (3) results while searching for lifecycle_environments with name="Library"error message seen when specifing lifecycle_environments for both thecontent_viewandsmart_proxy modules.This related to 1463 theforeman.foreman.smart_proxy lifecycle_environments not working with duplicate LCEs names.