-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added update for composite content view
- Loading branch information
Olivier Gerbron
committed
Nov 3, 2017
1 parent
a4958c0
commit 1f17686
Showing
6 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- name: Getting versions list of current content view | ||
set_fact: | ||
current_cv_version_list: "{{ content_view_list.json | to_json | from_json | json_query(query_ccv_cv_version_list) }}" | ||
|
||
- name: Adding latest version id of each content views | ||
set_fact: | ||
sat_ccv_component_ids: "{{ sat_ccv_component_ids + [ inner_item.id ] }}" | ||
when: 1 in inner_item.environment_ids | ||
with_items: "{{ current_cv_version_list }}" | ||
loop_control: | ||
loop_var: inner_item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
#TODO | ||
#Get all content view inside | ||
#for each content view inside | ||
# get latest version ID (components[*].content_view.next_version - 1 ) | ||
# get latest version ID (version promoted to env library) | ||
# update composite view with latest version ID | ||
- debug: msg="NOT DONE YET, Updating Composite Content View" | ||
- name: Initializing list of component version ids | ||
set_fact: | ||
sat_ccv_component_ids: [] | ||
|
||
- include: build_component_ids.yml | ||
with_items: "{{ sat_cv.json | json_query(query_ccv_component_labels_list) }}" | ||
|
||
- name: Update Composite Content View | ||
uri: | ||
url: "{{ sat_url }}/v2/content_views/{{ sat_cv_id }}" | ||
method: PUT | ||
body: | ||
component_ids: "{{ sat_ccv_component_ids }}" | ||
body_format: json | ||
status_code: 200 | ||
user: "{{ sat_user }}" | ||
password: "{{ sat_password }}" | ||
validate_certs: no | ||
force_basic_auth: yes | ||
register: composite_content_view_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters