Skip to content

Commit

Permalink
Merge pull request #890 from IBM/cpd-511
Browse files Browse the repository at this point in the history
Software Hub 5.1.1 support
  • Loading branch information
fketelaars authored Jan 29, 2025
2 parents 7a80692 + b5f842b commit 57cd5c6
Show file tree
Hide file tree
Showing 6 changed files with 486 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- name: Create header line if CR status does not exist
lineinfile:
path: /tmp/work/status.csv
line: "Component,CR Kind,CR Name,Creation Timestamp,Namespace,Expected Version,Reconciled Version,Operator Information,Progress,Progress Message,Reconcile History,Status"
line: "Components,CR Kind,CR Name,Creation Timestamp,Namespace,Expected Version,Reconciled Version,Operator Information,Progress,Progress Message,Reconcile History,Status"
insertbefore: "BOF"
state: present
create: True
Expand All @@ -50,8 +50,9 @@
head -1 {{ _cp4d_get_cr_status_file }}
register: _csv_column_headers_output

# Between CP4D 5.1.0 and 5.1.1, the Component column has been renamed to Components
- set_fact:
_csv_column_headers: "{{ _csv_column_headers_output.stdout }}"
_csv_column_headers: "{{ _csv_column_headers_output.stdout | replace('Component,','Components,') | replace(' ','_') }}"

# Try to copy the get-cr-status output file. In certain situations (Windows, SELinux), the command may fail and has to be re-run without remote_src
- block:
Expand All @@ -75,7 +76,7 @@
- name: Try to convert to json
read_csv:
path: "{{ _cp4d_get_cr_status_no_header_file }}"
fieldnames: "{{ _csv_column_headers | replace(' ','_') }}"
fieldnames: "{{ _csv_column_headers }}"
skipinitialspace: True
register: _get_cr_status_json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}}
_get_cr_status_json_item: >-
{{ _get_cr_status_json.list
| selectattr('Component','equalto',item['olm_utils_name'])
| selectattr('Components','equalto',item['olm_utils_name'])
| list
| first
| default([])
Expand Down Expand Up @@ -251,13 +251,13 @@
- set_fact:
_obsolete_cartridges: >-
{{ _get_cr_status_json.list
| rejectattr('Component','in',_surviving_cartridges_names)
| rejectattr('Components','in',_surviving_cartridges_names)
| rejectattr('CR_Kind','in',_surviving_cartridges_crs) }}
- set_fact:
_obsolete_cartridges_names: >-
{{ _obsolete_cartridges
| map(attribute='Component') }}
| map(attribute='Components') }}
- debug:
var: _obsolete_cartridges
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ cartridge_cr:
cr_name: spss-sample
cr_status_attribute: spssmodelerStatus
cr_status_completed: Completed
- name: streamsets
olm_utils_name: streamsets
cr_cr: Streamsets
cr_name: ibm-streamsets
cr_status_attribute: streamsetsStatus
cr_status_completed: Complete
- name: syntheticdata
olm_utils_name: syntheticdata
cr_cr: Syntheticdata
Expand Down
5 changes: 5 additions & 0 deletions docs/src/10-use-deployer/3-run/existing-openshift-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ data:
description: SPSS Modeler
state: removed
- name: streamsets
description: IBM StreamSets
state: removed
- name: syntheticdata
description: Synthetic Data Generator
state: removed
Expand Down Expand Up @@ -345,6 +349,7 @@ data:
state: removed
installation_options:
tuning_disabled: true
lite_install: false
models:
- model_id: allam-1-13b-instruct
state: removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ cp4d:
state: removed
installation_options:
tuning_disabled: true
lite_install: false
models:
- model_id: allam-1-13b-instruct
state: removed
Expand Down
Loading

0 comments on commit 57cd5c6

Please sign in to comment.