mas-cli 5.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mas-cli might be problematic. Click here for more details.

Files changed (114) hide show
  1. mas/cli/__init__.py +11 -0
  2. mas/cli/aiservice/install/__init__.py +11 -0
  3. mas/cli/aiservice/install/app.py +894 -0
  4. mas/cli/aiservice/install/argBuilder.py +180 -0
  5. mas/cli/aiservice/install/argParser.py +507 -0
  6. mas/cli/aiservice/install/params.py +100 -0
  7. mas/cli/aiservice/install/summarizer.py +134 -0
  8. mas/cli/cli.py +432 -0
  9. mas/cli/displayMixins.py +132 -0
  10. mas/cli/gencfg.py +113 -0
  11. mas/cli/install/__init__.py +11 -0
  12. mas/cli/install/app.py +1316 -0
  13. mas/cli/install/argBuilder.py +465 -0
  14. mas/cli/install/argParser.py +1176 -0
  15. mas/cli/install/catalogs.py +27 -0
  16. mas/cli/install/params.py +172 -0
  17. mas/cli/install/settings/__init__.py +23 -0
  18. mas/cli/install/settings/additionalConfigs.py +227 -0
  19. mas/cli/install/settings/db2Settings.py +252 -0
  20. mas/cli/install/settings/kafkaSettings.py +103 -0
  21. mas/cli/install/settings/manageSettings.py +273 -0
  22. mas/cli/install/settings/mongodbSettings.py +46 -0
  23. mas/cli/install/settings/turbonomicSettings.py +29 -0
  24. mas/cli/install/summarizer.py +398 -0
  25. mas/cli/templates/facilities-configs.yml.j2 +25 -0
  26. mas/cli/templates/ibm-mas-tekton.yaml +49772 -0
  27. mas/cli/templates/jdbccfg.yml.j2 +52 -0
  28. mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml +26 -0
  29. mas/cli/templates/pod-templates/best-effort/ibm-mas-bascfg.yml +56 -0
  30. mas/cli/templates/pod-templates/best-effort/ibm-mas-coreidp.yml +21 -0
  31. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-actions.yml +28 -0
  32. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-auth.yml +32 -0
  33. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-datapower.yml +12 -0
  34. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-devops.yml +14 -0
  35. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dm.yml +22 -0
  36. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dsc.yml +40 -0
  37. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-edgeconfig.yml +10 -0
  38. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-fpl.yml +24 -0
  39. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-guardian.yml +20 -0
  40. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-iot.yml +10 -0
  41. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mbgx.yml +18 -0
  42. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mfgx.yml +14 -0
  43. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-monitor.yml +18 -0
  44. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-orgmgmt.yml +48 -0
  45. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-provision.yml +28 -0
  46. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-registry.yml +26 -0
  47. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-state.yml +40 -0
  48. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-webui.yml +22 -0
  49. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextaccelerator.yml +13 -0
  50. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextworkspace.yml +10 -0
  51. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-imagestitching.yml +10 -0
  52. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageaccelerators.yml +10 -0
  53. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageapp.yml +46 -0
  54. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageworkspace.yml +48 -0
  55. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-slackproxy.yml +10 -0
  56. mas/cli/templates/pod-templates/best-effort/ibm-mas-pushnotificationcfg.yml +13 -0
  57. mas/cli/templates/pod-templates/best-effort/ibm-mas-scimcfg.yml +14 -0
  58. mas/cli/templates/pod-templates/best-effort/ibm-mas-slscfg.yml +10 -0
  59. mas/cli/templates/pod-templates/best-effort/ibm-mas-smtpcfg.yml +10 -0
  60. mas/cli/templates/pod-templates/best-effort/ibm-mas-suite.yml +136 -0
  61. mas/cli/templates/pod-templates/best-effort/ibm-mas-visualinspection.yml +34 -0
  62. mas/cli/templates/pod-templates/best-effort/ibm-sls-licenseservice.yml +10 -0
  63. mas/cli/templates/pod-templates/guaranteed/ibm-data-dictionary-assetdatadictionary.yml +56 -0
  64. mas/cli/templates/pod-templates/guaranteed/ibm-mas-bascfg.yml +140 -0
  65. mas/cli/templates/pod-templates/guaranteed/ibm-mas-coreidp.yml +45 -0
  66. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-actions.yml +70 -0
  67. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-auth.yml +80 -0
  68. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-datapower.yml +24 -0
  69. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-devops.yml +26 -0
  70. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dm.yml +52 -0
  71. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dsc.yml +106 -0
  72. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-edgeconfig.yml +16 -0
  73. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-fpl.yml +62 -0
  74. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-guardian.yml +44 -0
  75. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-iot.yml +16 -0
  76. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mbgx.yml +42 -0
  77. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mfgx.yml +32 -0
  78. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-monitor.yml +42 -0
  79. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-orgmgmt.yml +126 -0
  80. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-provision.yml +70 -0
  81. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-registry.yml +62 -0
  82. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-state.yml +106 -0
  83. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-webui.yml +52 -0
  84. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextaccelerator.yml +28 -0
  85. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextworkspace.yml +18 -0
  86. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-imagestitching.yml +16 -0
  87. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageaccelerators.yml +16 -0
  88. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageapp.yml +106 -0
  89. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageworkspace.yml +126 -0
  90. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-slackproxy.yml +16 -0
  91. mas/cli/templates/pod-templates/guaranteed/ibm-mas-pushnotificationcfg.yml +25 -0
  92. mas/cli/templates/pod-templates/guaranteed/ibm-mas-scimcfg.yml +26 -0
  93. mas/cli/templates/pod-templates/guaranteed/ibm-mas-slscfg.yml +16 -0
  94. mas/cli/templates/pod-templates/guaranteed/ibm-mas-smtpcfg.yml +16 -0
  95. mas/cli/templates/pod-templates/guaranteed/ibm-mas-suite.yml +340 -0
  96. mas/cli/templates/pod-templates/guaranteed/ibm-mas-visualinspection.yml +76 -0
  97. mas/cli/templates/pod-templates/guaranteed/ibm-sls-licenseservice.yml +16 -0
  98. mas/cli/templates/suite_mongocfg.yml.j2 +55 -0
  99. mas/cli/uninstall/__init__.py +11 -0
  100. mas/cli/uninstall/app.py +197 -0
  101. mas/cli/uninstall/argParser.py +115 -0
  102. mas/cli/update/__init__.py +11 -0
  103. mas/cli/update/app.py +673 -0
  104. mas/cli/update/argParser.py +156 -0
  105. mas/cli/upgrade/__init__.py +11 -0
  106. mas/cli/upgrade/app.py +164 -0
  107. mas/cli/upgrade/argParser.py +68 -0
  108. mas/cli/upgrade/settings/__init__.py +19 -0
  109. mas/cli/validators.py +151 -0
  110. mas_cli-5.1.4.data/scripts/mas-cli +87 -0
  111. mas_cli-5.1.4.dist-info/METADATA +73 -0
  112. mas_cli-5.1.4.dist-info/RECORD +114 -0
  113. mas_cli-5.1.4.dist-info/WHEEL +5 -0
  114. mas_cli-5.1.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,465 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2024 IBM Corporation and other Contributors.
3
+ #
4
+ # All rights reserved. This program and the accompanying materials
5
+ # are made available under the terms of the Eclipse Public License v1.0
6
+ # which accompanies this distribution, and is available at
7
+ # http://www.eclipse.org/legal/epl-v10.html
8
+ #
9
+ # *****************************************************************************
10
+
11
+ import logging
12
+
13
+ logger = logging.getLogger(__name__)
14
+
15
+
16
+ class installArgBuilderMixin():
17
+ def buildCommand(self) -> str:
18
+ # MAS Catalog Selection & Entitlement
19
+ # -----------------------------------------------------------------------------
20
+ newline = " \\\n"
21
+ command = "export IBM_ENTITLEMENT_KEY=x\n"
22
+ if self.getParam('ibmcloud_apikey') != "":
23
+ command += "export IBMCLOUD_APIKEY=x\n"
24
+ if self.getParam('aws_access_key_id') != "":
25
+ command += "export AWS_ACCESS_KEY_ID=x\n"
26
+ if self.getParam('secret_access_key') != "":
27
+ command += "export SECRET_ACCESS_KEY=x\n"
28
+ if self.getParam('artifactory_username') != "":
29
+ command += "export ARTIFACTORY_USERNAME=x\nexport ARTIFACTORY_TOKEN=x\n"
30
+
31
+ if self.getParam('mas_superuser_password') != "":
32
+ command += "export SUPERUSER_PASSWORD=x\n"
33
+
34
+ if self.getParam('eck_remote_es_password') != "":
35
+ command += "export ES_PASSWORD=x\n"
36
+ if self.getParam('kafka_password') != "":
37
+ command += "export KAFKA_PASSWORD=x\n"
38
+
39
+ if self.getParam('mas_app_settings_customization_archive_password') != "":
40
+ command += "export CUSTOMIZATION_PASSWORD=x\n"
41
+ if self.getParam('mas_app_settings_crypto_key') != "":
42
+ command += "export CRYPTO_KEY=x\n"
43
+ if self.getParam('mas_app_settings_cryptox_key') != "":
44
+ command += "export CRYPTOX_KEY=x\n"
45
+ if self.getParam('mas_app_settings_old_crypto_key') != "":
46
+ command += "export OLD_CRYPTO_KEY=x\n"
47
+ if self.getParam('mas_app_settings_old_cryptox_key') != "":
48
+ command += "export OLD_CRYTPOX_KEY=x\n"
49
+
50
+ command += f"mas install --mas-catalog-version {self.getParam('mas_catalog_version')}"
51
+
52
+ if self.getParam('mas_catalog_digest') != "":
53
+ command += f" --mas-catalog-digest {self.getParam('mas_catalog_digest')}"
54
+
55
+ command += f" --ibm-entitlement-key $IBM_ENTITLEMENT_KEY{newline}"
56
+
57
+ # MAS Basic Configuration
58
+ # -----------------------------------------------------------------------------
59
+ command += f" --mas-channel {self.getParam('mas_channel')}"
60
+ command += f" --mas-instance-id {self.getParam('mas_instance_id')}"
61
+ command += f" --mas-workspace-id {self.getParam('mas_workspace_id')}"
62
+ command += f" --mas-workspace-name \"{self.getParam('mas_workspace_name')}\"{newline}"
63
+
64
+ if self.getParam('mas_special_characters') == "true":
65
+ command += f" --allow-special-chars \"{self.getParam('mas_special_characters')}\"{newline}"
66
+
67
+ # ECK Integration
68
+ # -----------------------------------------------------------------------------
69
+ if self.getParam('eck_action') == "install":
70
+ command += "--eck"
71
+ if self.getParam('eck_enable_logstash') == "true":
72
+ command += f"--eck-enable-logstash{newline}"
73
+ if self.getParam('eck_remote_es_hosts') != "":
74
+ command += f"--eck-remote-es-hosts \"{self.getParam('eck_remote_es_hosts')}\"{newline}"
75
+ if self.getParam('eck_remote_es_username') != "":
76
+ command += f"--eck-remote-es-username \"{self.getParam('eck_remote_es_username')}\""
77
+ if self.getParam('eck_remote_es_password') != "":
78
+ command += f"--eck-remote-es-password $ES_PASSWORD{newline}"
79
+
80
+ # MAS Advanced Configuration
81
+ # -----------------------------------------------------------------------------
82
+ if self.getParam('mas_superuser_username') != "":
83
+ command += f" --mas-superuser-username \"{self.getParam('mas_superuser_username')}\""
84
+ if self.getParam('mas_superuser_password') != "":
85
+ command += f" --mas-superuser-password $SUPERUSER_PASSWORD{newline}"
86
+
87
+ if self.localConfigDir is not None:
88
+ command += f" --additional-configs \"{self.localConfigDir}\"{newline}"
89
+ if self.getParam('pod_templates') != "":
90
+ command += f" --pod-templates \"{self.getParam('pod_templates')}\"{newline}"
91
+
92
+ if self.operationalMode == 2:
93
+ command += f" --non-prod{newline}"
94
+
95
+ if self.getParam('mas_trust_default_cas') == "false":
96
+ command += f" --disable-ca-trust{newline}"
97
+
98
+ if self.getParam('mas_manual_cert_mgmt') is True:
99
+ command += f" --manual-certificates \"{self.manualCertsDir}\"{newline}"
100
+
101
+ if self.getParam('mas_domain') is True:
102
+ command += f" --domain \"{self.getParam('mas_domain')}\"{newline}"
103
+
104
+ if self.getParam('--dns-provider') == "cis":
105
+ command += f" --dns-provider cis --cis-apikey \"{self.getParam('cis_apikey')}\""
106
+ command += f" --cis-subdomain \"{self.getParam('cis_subdomain')}\""
107
+ command += f" --cis-crn \"{self.getParam('cis_crn')}\""
108
+ command += f" --cis-email \"{self.getParam('cis_email')}\"{newline}"
109
+
110
+ if self.getParam('--mas-cluster-issuer') != "":
111
+ command += f" --mas-cluster-issuer \"{self.getParam('mas_cluster_issuer')}\"{newline}"
112
+
113
+ if self.getParam('mas_enable_walkme') == "false":
114
+ command += f" --disable-walkme{newline}"
115
+
116
+ if self.getParam('enable_ipv6') is True:
117
+ command += f" --enable-ipv6{newline}"
118
+
119
+ # Storage
120
+ # -----------------------------------------------------------------------------
121
+ command += f" --storage-class-rwo \"{self.getParam('storage_class_rwo')}\""
122
+ command += f" --storage-class-rwx \"{self.getParam('storage_class_rwx')}\"{newline}"
123
+ command += f" --storage-pipeline \"{self.pipelineStorageClass}\""
124
+ command += f" --storage-accessmode \"{self.pipelineStorageAccessMode}\"{newline}"
125
+
126
+ # IBM Suite License Service
127
+ # -----------------------------------------------------------------------------
128
+ if self.getParam("sls_namespace") and self.getParam("sls_namespace") != "ibm-sls":
129
+ if self.getParam("mas_instance_id") and self.getParam("sls_namespace") == f"mas-{self.getParam('mas_instance_id')}-sls":
130
+ command += " --dedicated-sls"
131
+ else:
132
+ command += f" --sls-namespace \"{self.getParam('sls_namespace')}\""
133
+ if self.slsLicenseFileLocal:
134
+ command += f" --license-file \"{self.slsLicenseFileLocal}\""
135
+ if self.getParam("sls_namespace") and self.getParam("sls_namespace") != "ibm-sls" or self.slsLicenseFileLocal:
136
+ command += newline
137
+
138
+ # IBM Data Reporting Operator (DRO)
139
+ # -----------------------------------------------------------------------------
140
+ command += f" --uds-email \"{self.getParam('uds_contact_email')}\""
141
+ command += f" --uds-firstname \"{self.getParam('uds_contact_firstname')}\""
142
+ command += f" --uds-lastname \"{self.getParam('uds_contact_lastname')}\"{newline}"
143
+ if self.getParam('dro_namespace') != "":
144
+ command += f" --dro-namespace \"{self.getParam('dro_namespace')}\"{newline}"
145
+
146
+ # MongoDb Community Operator
147
+ # -----------------------------------------------------------------------------
148
+ if self.getParam('mongodb_namespace') != "":
149
+ command += f" --mongodb-namespace \"{self.getParam('mongodb_namespace')}\"{newline}"
150
+
151
+ # OCP Configuration
152
+ # -----------------------------------------------------------------------------
153
+ if self.getParam('ocp_ingress_tls_secret_name') != "":
154
+ command += f" --ocp-ingress-tls-secret-name \"{self.getParam('ocp_ingress_tls_secret_name')}\"{newline}"
155
+
156
+ # MAS Applications
157
+ # -----------------------------------------------------------------------------
158
+ if self.installAssist:
159
+ command += f" --assist-channel \"{self.getParam('mas_app_channel_assist')}\"{newline}"
160
+ if self.installIoT:
161
+ command += f" --iot-channel \"{self.getParam('mas_app_channel_iot')}\"{newline}"
162
+ if self.installMonitor:
163
+ command += f" --monitor-channel \"{self.getParam('mas_app_channel_monitor')}\"{newline}"
164
+ if self.installManage:
165
+ command += f" --manage-channel \"{self.getParam('mas_app_channel_manage')}\"{newline}"
166
+ if self.installOptimizer:
167
+ command += f" --optimizer-channel \"{self.getParam('mas_app_channel_optimizer')}\""
168
+ command += f" --optimizer-plan \"{self.getParam('mas_app_plan_optimizer')}\"{newline}"
169
+ if self.installPredict:
170
+ command += f" --predict-channel \"{self.getParam('mas_app_channel_predict')}\"{newline}"
171
+ if self.installInspection:
172
+ command += f" --visualinspection-channel \"{self.getParam('mas_app_channel_visualinspection')}\"{newline}"
173
+ if self.installFacilities:
174
+ command += f" --facilities-channel \"{self.getParam('mas_app_channel_facilities')}\"{newline}"
175
+
176
+ # Arcgis
177
+ # -----------------------------------------------------------------------------
178
+ # TODO: Add ArcGis after we have properly fixed how it's installed
179
+
180
+ # Manage Advanced Settings
181
+ # -----------------------------------------------------------------------------
182
+ if self.installManage:
183
+ command += f" --manage-jdbc \"{self.getParam('mas_appws_bindings_jdbc_manage')}\"{newline}"
184
+ command += f" --manage-components \"{self.getParam('mas_appws_components')}\"{newline}"
185
+
186
+ if self.getParam('mas_app_settings_server_bundles_size') != "":
187
+ command += f" --manage-server-bundle-size \"{self.getParam('mas_app_settings_server_bundles_size')}\"{newline}"
188
+ if self.getParam('mas_app_settings_default_jms') != "":
189
+ command += f" --manage-jms \"{self.getParam('mas_app_settings_default_jms')}\"{newline}"
190
+ if self.getParam('mas_app_settings_persistent_volumes_flag') == "true":
191
+ command += f" --manage-persistent-volumes{newline}"
192
+ if self.getParam('mas_app_settings_demodata') == "true":
193
+ command += f" --manage-demodata{newline}"
194
+
195
+ if self.getParam('mas_app_settings_customization_archive_name') != "":
196
+ command += f" --manage-customization-archive-name \"{self.getParam('mas_app_settings_customization_archive_name')}\"{newline}"
197
+ if self.getParam('mas_app_settings_customization_archive_url') != "":
198
+ command += f" --manage-customization-archive-url \"{self.getParam('mas_app_settings_customization_archive_url')}\"{newline}"
199
+ if self.getParam('mas_app_settings_customization_archive_username') != "":
200
+ command += f" --manage-customization-archive-username \"{self.getParam('mas_app_settings_customization_archive_username')}\"{newline}"
201
+ if self.getParam('mas_app_settings_customization_archive_password') != "":
202
+ command += f" --manage-customization-archive-password $CUSTOMIZATION_PASSWORD{newline}"
203
+
204
+ if self.getParam('mas_app_settings_tablespace') != "":
205
+ command += f" --manage-db-tablespace \"{self.getParam('mas_app_settings_tablespace')}\"{newline}"
206
+ if self.getParam('mas_app_settings_indexspace') != "":
207
+ command += f" --manage-db-indexspace \"{self.getParam('mas_app_settings_indexspace')}\"{newline}"
208
+ if self.getParam('mas_app_settings_db2_schema') != "":
209
+ command += f" --manage-db-schema \"{self.getParam('mas_app_settings_db2_schema')}\"{newline}"
210
+
211
+ if self.getParam('mas_app_settings_crypto_key') != "":
212
+ command += f" --manage-crypto-key $CRYPTO_KEY{newline}"
213
+ if self.getParam('mas_app_settings_cryptox_key') != "":
214
+ command += f" --manage-cryptox-key $CRYPTOX_KEY{newline}"
215
+ if self.getParam('mas_app_settings_old_crypto_key') != "":
216
+ command += f" --manage-old-crypto-key $OLD_CRYPTO_KEY{newline}"
217
+ if self.getParam('mas_app_settings_old_cryptox_key') != "":
218
+ command += f" --manage-old-cryptox-key $OLD_CRYPTOX_KEY{newline}"
219
+ if self.getParam('mas_app_settings_override_encryption_secrets_flag') == "true":
220
+ command += f" --manage-override-encryption-secrets \"{newline}"
221
+
222
+ if self.getParam('mas_app_settings_base_lang') != "":
223
+ command += f" --manage-base-language \"{self.getParam('mas_app_settings_base_lang')}\"{newline}"
224
+ if self.getParam('mas_app_settings_secondary_langs') != "":
225
+ command += f" --manage-secondary-languages \"{self.getParam('mas_app_settings_secondary_langs')}\"{newline}"
226
+
227
+ if self.getParam('mas_app_settings_server_timezone') != "":
228
+ command += f" --manage-server-timezone \"{self.getParam('mas_app_settings_server_timezone')}\"{newline}"
229
+
230
+ if self.getParam('mas_manage_attachments_provider') != "":
231
+ command += f" --manage-attachments-provider \"{self.getParam('mas_manage_attachments_provider')}\"{newline}"
232
+
233
+ if self.getParam('mas_manage_attachment_configuration_mode') != "":
234
+ command += f" --manage-attachments-mode \"{self.getParam('mas_manage_attachment_configuration_mode')}\"{newline}"
235
+
236
+ if self.getParam('mas_appws_bindings_health_wsl_flag') == "true":
237
+ command += f" --manage-health-wsl{newline}"
238
+
239
+ if self.getParam('mas_appws_upgrade_type') == "true":
240
+ command += f" --manage-upgrade-type \"{self.getParam('mas_appws_upgrade_type')}\"{newline}"
241
+
242
+ # Facilities Advanced Settings
243
+ # -----------------------------------------------------------------------------
244
+ # TODO: Fix type for storage sizes and max conn pool size
245
+ if self.installFacilities:
246
+ if self.getParam('mas_ws_facilities_size') != "":
247
+ command += f" --facilities-size \"{self.getParam('mas_ws_facilities_size')}\"{newline}"
248
+
249
+ if self.getParam('mas_ws_facilities_pull_policy') != "":
250
+ command += f" --facilities-pull-policy \"{self.getParam('mas_ws_facilities_pull_policy')}\"{newline}"
251
+
252
+ if self.getParam('mas_ws_facilities_routes_timeout') != "":
253
+ command += f" --facilities-routes-timeout \"{self.getParam('mas_ws_facilities_routes_timeout')}\"{newline}"
254
+
255
+ if self.getParam('mas_ws_facilities_liberty_extension_XML') != "":
256
+ command += f" --facilities-xml-extension \"{self.getParam('mas_ws_facilities_liberty_extension_XML')}\"{newline}"
257
+
258
+ if self.getParam('mas_ws_facilities_vault_secret') != "":
259
+ command += f" --facilities-vault-secret \"{self.getParam('mas_ws_facilities_vault_secret')}\"{newline}"
260
+
261
+ if self.getParam('mas_ws_facilities_dwfagents') != "":
262
+ command += f" --facilities-dwfagent \'{self.getParam('mas_ws_facilities_dwfagents')}\'{newline}"
263
+
264
+ if self.getParam('mas_ws_facilities_db_maxconnpoolsize') != "":
265
+ command += f" --facilities-maxconnpoolsize \"{self.getParam('mas_ws_facilities_db_maxconnpoolsize')}\"{newline}"
266
+
267
+ if self.getParam('mas_ws_facilities_storage_log_class') != "":
268
+ command += f" --facilities-log-storage-class \"{self.getParam('mas_ws_facilities_storage_log_class')}\"{newline}"
269
+ if self.getParam('mas_ws_facilities_storage_log_mode') != "":
270
+ command += f" --facilities-log-storage-mode \"{self.getParam('mas_ws_facilities_storage_log_mode')}\"{newline}"
271
+ if self.getParam('mas_ws_facilities_storage_log_size') != "":
272
+ command += f" --facilities-log-storage-size \"{self.getParam('mas_ws_facilities_storage_log_size')}\"{newline}"
273
+
274
+ if self.getParam('mas_ws_facilities_storage_userfiles_class') != "":
275
+ command += f" --facilities-userfiles-storage-class \"{self.getParam('mas_ws_facilities_storage_userfiles_class')}\"{newline}"
276
+ if self.getParam('mas_ws_facilities_storage_userfiles_mode') != "":
277
+ command += f" --facilities-userfiles-storage-mode \"{self.getParam('mas_ws_facilities_storage_userfiles_mode')}\"{newline}"
278
+ if self.getParam('mas_ws_facilities_storage_userfiles_size') != "":
279
+ command += f" --facilities-userfiles-storage-size \"{self.getParam('mas_ws_facilities_storage_userfiles_size')}\"{newline}"
280
+
281
+ # IBM Cloud Pak for Data
282
+ # -----------------------------------------------------------------------------
283
+ if self.getParam('cpd_product_version') != "":
284
+ command += f" --cp4d-version \"{self.getParam('cpd_product_version')}\""
285
+ if self.getParam('cpd_install_spss') == "true":
286
+ command += " --cp4d-install-spss"
287
+ if self.getParam('cpd_install_cognos') == "true":
288
+ command += " --cp4d-install-cognos"
289
+ if self.getParam('cpd_install_ws') == "true":
290
+ command += " --cp4d-install-ws"
291
+ if self.getParam('cpd_install_wml') == "true":
292
+ command += " --cp4d-install-wml"
293
+ if self.getParam('cpd_install_ae') == "true":
294
+ command += " --cp4d-install-ae"
295
+ command += newline
296
+
297
+ # IBM Db2 Universal Operator
298
+ # -----------------------------------------------------------------------------
299
+ if self.getParam('db2_action_system') == "install" or self.getParam('db2_action_manage') == "install" or self.getParam('db2_action_facilities') == "install":
300
+ if self.getParam('db2_action_system') == "install":
301
+ command += f" --db2-system{newline}"
302
+ if self.getParam('db2_action_manage') == "install":
303
+ command += f" --db2-manage{newline}"
304
+ if self.getParam('db2_action_facilities') == "install":
305
+ command += f" --db2-facilities{newline}"
306
+
307
+ if self.getParam('db2_channel') != "":
308
+ command += f" --db2-channel \"{self.getParam('db2_channel')}\"{newline}"
309
+ if self.getParam('db2_namespace') != "":
310
+ command += f" --db2-namespace \"{self.getParam('db2_namespace')}\"{newline}"
311
+
312
+ if self.getParam('db2_type') != "":
313
+ command += f" --db2-type \"{self.getParam('db2_type')}\"{newline}"
314
+ if self.getParam('db2_timezone') != "":
315
+ command += f" --db2-timezone \"{self.getParam('db2_timezone')}\"{newline}"
316
+
317
+ if self.getParam('db2_affinity_key') != "":
318
+ command += f" --db2-affinity-key \"{self.getParam('db2_affinity_key')}\"{newline}"
319
+ if self.getParam('db2_affinity_value') != "":
320
+ command += f" --db2-affinity_value \"{self.getParam('db2_affinity_value')}\"{newline}"
321
+
322
+ if self.getParam('db2_tolerate_key') != "":
323
+ command += f" --db2-tolerate-key \"{self.getParam('db2_tolerate_key')}\"{newline}"
324
+ if self.getParam('db2_tolerate_value') != "":
325
+ command += f" --db2-tolerate-value \"{self.getParam('db2_tolerate_value')}\"{newline}"
326
+ if self.getParam('db2_tolerate_effect') != "":
327
+ command += f" --db2-tolerate-effect \"{self.getParam('db2_tolerate_effect')}\"{newline}"
328
+
329
+ if self.getParam('db2_cpu_requests') != "":
330
+ command += f" --db2-cpu-requests \"{self.getParam('db2_cpu_requests')}\"{newline}"
331
+ if self.getParam('db2_cpu_limits') != "":
332
+ command += f" --db2-cpu-limits \"{self.getParam('db2_cpu_limits')}\"{newline}"
333
+
334
+ if self.getParam('db2_memory_requests') != "":
335
+ command += f" --db2-memory-requests \"{self.getParam('db2_memory_requests')}\"{newline}"
336
+ if self.getParam('db2_memory_limits') != "":
337
+ command += f" --db2-memory-limits \"{self.getParam('db2_memory_limits')}\"{newline}"
338
+
339
+ if self.getParam('db2_backup_storage_size') != "":
340
+ command += f" --db2-backup-storage \"{self.getParam('db2_backup_storage_size')}\"{newline}"
341
+ if self.getParam('db2_data_storage_size') != "":
342
+ command += f" --db2-data-storage \"{self.getParam('db2_data_storage_size')}\"{newline}"
343
+ if self.getParam('db2_logs_storage_size') != "":
344
+ command += f" --db2-logs-storage \"{self.getParam('db2_logs_storage_size')}\"{newline}"
345
+ if self.getParam('db2_meta_storage_size') != "":
346
+ command += f" --db2-meta-storage \"{self.getParam('db2_meta_storage_size')}\"{newline}"
347
+ if self.getParam('db2_temp_storage_size') != "":
348
+ command += f" --db2-temp-storage \"{self.getParam('db2_temp_storage_size')}\"{newline}"
349
+
350
+ # Kafka - Common
351
+ # -----------------------------------------------------------------------------
352
+ if self.getParam('kafka_provider') != "":
353
+ command += f" --kafka-provider \"{self.getParam('kafka_provider')}\"{newline}"
354
+
355
+ if self.getParam('kafka_username') != "":
356
+ command += f" --kafka-username \"{self.getParam('kafka_username')}\"{newline}"
357
+ if self.getParam('kafka_password') != "":
358
+ command += f" --kafka-password $KAFKA_PASSWORD{newline}"
359
+
360
+ # Kafka - Strimzi & AMQ Streams
361
+ # -----------------------------------------------------------------------------
362
+ if self.getParam('kafka_namespace') != "":
363
+ command += f" --kafka-namespace \"{self.getParam('kafka_namespace')}\"{newline}"
364
+ if self.getParam('kafka_version') != "":
365
+ command += f" --kafka-version \"{self.getParam('kafka_version')}\"{newline}"
366
+
367
+ # Kafka - MSK
368
+ # -----------------------------------------------------------------------------
369
+ if self.getParam('aws_msk_instance_type') != "":
370
+ command += f" --msk-instance-type \"{self.getParam('aws_msk_instance_type')}\""
371
+ command += f" --msk-instance-nodes \"{self.getParam('aws_msk_instance_nodes')}\""
372
+ command += f" --msk-instance-volume-size \"{self.getParam('aws_msk_instance_volume_size')}\"{newline}"
373
+
374
+ command += f" --msk-cidr-az1 \"{self.getParam('aws_msk_cidr_az1')}\""
375
+ command += f" --msk-cidr-az2 \"{self.getParam('aws_msk_cidr_az1')}\""
376
+ command += f" --msk-cidr-az3 \"{self.getParam('aws_msk_cidr_az1')}\"{newline}"
377
+
378
+ command += f" --msk-cidr-egress \"{self.getParam('aws_msk_egress_cidr')}\""
379
+ command += f" --msk-cidr-ingress \"{self.getParam('aws_msk_ingress_cidr')}\"{newline}"
380
+
381
+ # Kafka - Event Streams
382
+ # -----------------------------------------------------------------------------
383
+ if self.getParam('eventstreams_instance_name') != "":
384
+ command += f" --eventstreams-resource-group \"{self.getParam('eventstreams_resourcegroup')}\""
385
+ command += f" --eventstreams-instance-name \"{self.getParam('eventstreams_name')}\""
386
+ command += f" --eventstreams-instance-location \"{self.getParam('eventstreams_location')}\"{newline}"
387
+
388
+ # COS
389
+ # -----------------------------------------------------------------------------
390
+ if self.getParam('cos_type') != "":
391
+ command += f" --cos \"{self.getParam('cos_type')}\""
392
+ if self.getParam('cos_resourcegroup') != "":
393
+ command += f" --cos-resourcegroup \"{self.getParam('cos_resourcegroup')}\""
394
+ if self.getParam('cos_apikey') != "":
395
+ command += f" --cos-apikey \"{self.getParam('cos_apikey')}\""
396
+ if self.getParam('cos_instance_name') != "":
397
+ command += f" --cos-instance-name \"{self.getParam('cos_instance_name')}\""
398
+ if self.getParam('cos_bucket_name') != "":
399
+ command += f" --cos-bucket-name \"{self.getParam('cos_bucket_name')}\"{newline}"
400
+ command += newline
401
+
402
+ # Turbonomic Integration
403
+ # -----------------------------------------------------------------------------
404
+ if self.getParam('turbonomic_target_name') != "":
405
+ command += f" --turbonomic-name \"{self.getParam('turbonomic_target_name')}\""
406
+ command += f" --turbonomic-url \"{self.getParam('turbonomic_server_url')}\""
407
+ command += f" --turbonomic-version \"{self.getParam('turbonomic_server_version')}\""
408
+ command += f" --turbonomic-username \"{self.getParam('turbonomic_username')}\""
409
+ command += f" --turbonomic-password \"{self.getParam('turbonomic_password')}\"{newline}"
410
+
411
+ # Cloud Providers
412
+ # -----------------------------------------------------------------------------
413
+ if self.getParam('ibmcloud_apikey') != "":
414
+ command += f" --ibmcloud-apikey $IBMCLOUD_APIKEY{newline}"
415
+
416
+ if self.getParam('aws_access_key_id') != "":
417
+ command += f" --aws-access-key-id $AWS_ACCESS_KEY_ID{newline}"
418
+ if self.getParam('secret_access_key') != "":
419
+ command += f" --secret-access-key $SECRET_ACCESS_KEY{newline}"
420
+ command += f" --aws-region \"{self.getParam('aws_region')}\""
421
+ command += f" --aws-vpc-id \"{self.getParam('aws_vpc_id')}\""
422
+
423
+ # Development Mode
424
+ # -----------------------------------------------------------------------------
425
+ if self.getParam('artifactory_username') != "":
426
+ command += f" --artifactory-username $ARTIFACTORY_USERNAME --artifactory-token $ARTIFACTORY_TOKEN{newline}"
427
+
428
+ # Approvals
429
+ # -----------------------------------------------------------------------------
430
+ if self.getParam('approval_core') != "":
431
+ command += f" --approval-core \"{self.getParam('approval_core')}\"{newline}"
432
+ if self.getParam('approval_assist') != "":
433
+ command += f" --approval-assist \"{self.getParam('approval_assist')}\"{newline}"
434
+ if self.getParam('approval_iot') != "":
435
+ command += f" --approval-iot \"{self.getParam('approval_iot')}\"{newline}"
436
+ if self.getParam('approval_manage') != "":
437
+ command += f" --approval-manage \"{self.getParam('approval_manage')}\"{newline}"
438
+ if self.getParam('approval_monitor') != "":
439
+ command += f" --approval-monitor \"{self.getParam('approval_monitor')}\"{newline}"
440
+ if self.getParam('approval_optimizer') != "":
441
+ command += f" --approval-optimizer \"{self.getParam('approval_optimizer')}\"{newline}"
442
+ if self.getParam('approval_predict') != "":
443
+ command += f" --approval-predict \"{self.getParam('approval_predict')}\"{newline}"
444
+ if self.getParam('approval_visualinspection') != "":
445
+ command += f" --approval-visualinspection \"{self.getParam('approval_visualinspection')}\"{newline}"
446
+ if self.getParam('approval_facilities') != "":
447
+ command += f" --approval-facilities \"{self.getParam('approval_facilities')}\"{newline}"
448
+
449
+ # More Options
450
+ # -----------------------------------------------------------------------------
451
+ if self.devMode:
452
+ command += f" --dev-mode{newline}"
453
+ if not self.waitForPVC:
454
+ command += f" --no-wait-for-pvc{newline}"
455
+ if self.getParam('skip_pre_check') is True:
456
+ command += f" --skip-pre-check{newline}"
457
+ if self.getParam('skip_grafana_install') is True:
458
+ command += f" --skip-grafana-install{newline}"
459
+ if self.getParam('image_pull_policy') != "":
460
+ command += f" --image-pull-policy {self.getParam('image_pull_policy')}{newline}"
461
+ if self.getParam('service_account_name') != "":
462
+ command += f" --service-account {self.getParam('service_account_name')}{newline}"
463
+
464
+ command += " --accept-license --no-confirm"
465
+ return command