mas-cli 11.4.0__py3-none-any.whl → 11.6.0__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.

@@ -16,6 +16,7 @@ from prompt_toolkit import print_formatted_text
16
16
  import logging
17
17
  logger = logging.getLogger(__name__)
18
18
 
19
+
19
20
  class AdditionalConfigsMixin():
20
21
  def additionalConfigs(self) -> None:
21
22
  if self.interactiveMode:
@@ -136,40 +137,40 @@ class AdditionalConfigsMixin():
136
137
 
137
138
  apps = {
138
139
  "mas_app_channel_assist": {
139
- "dir": self.getParam("mas_manual_cert_dir") + "/assist/",
140
- "keyPrefix": "assist."
141
- },
140
+ "dir": self.manualCertsDir + "/assist/",
141
+ "keyPrefix": "assist."
142
+ },
142
143
  "mas_app_channel_manage": {
143
- "dir": self.getParam("mas_manual_cert_dir") + "/manage/",
144
- "keyPrefix": "manage."
145
- },
144
+ "dir": self.manualCertsDir + "/manage/",
145
+ "keyPrefix": "manage."
146
+ },
146
147
  "mas_app_channel_iot": {
147
- "dir": self.getParam("mas_manual_cert_dir") + "/iot/",
148
- "keyPrefix": "iot."
149
- },
148
+ "dir": self.manualCertsDir + "/iot/",
149
+ "keyPrefix": "iot."
150
+ },
150
151
  "mas_app_channel_monitor": {
151
- "dir": self.getParam("mas_manual_cert_dir") + "/monitor/",
152
- "keyPrefix": "monitor."
153
- },
152
+ "dir": self.manualCertsDir + "/monitor/",
153
+ "keyPrefix": "monitor."
154
+ },
154
155
  "mas_app_channel_predict": {
155
- "dir": self.getParam("mas_manual_cert_dir") + "/predict/",
156
- "keyPrefix": "predict."
157
- },
156
+ "dir": self.manualCertsDir + "/predict/",
157
+ "keyPrefix": "predict."
158
+ },
158
159
  "mas_app_channel_visualinspection": {
159
- "dir": self.getParam("mas_manual_cert_dir") + "/visualinspection/",
160
- "keyPrefix": "visualinspection."
161
- },
160
+ "dir": self.manualCertsDir + "/visualinspection/",
161
+ "keyPrefix": "visualinspection."
162
+ },
162
163
  "mas_app_channel_optimizer": {
163
- "dir": self.getParam("mas_manual_cert_dir") + "/optimizer/",
164
- "keyPrefix": "optimizer."
165
- }
164
+ "dir": self.manualCertsDir + "/optimizer/",
165
+ "keyPrefix": "optimizer."
166
166
  }
167
+ }
167
168
 
168
169
  for file in ["ca.crt", "tls.crt", "tls.key"]:
169
- if file not in map(path.basename, glob(f'{self.getParam("mas_manual_cert_dir")}/core/*')):
170
- self.fatalError(f'{file} is not present in {self.getParam("mas_manual_cert_dir")}/core/')
170
+ if file not in map(path.basename, glob(f'{self.manualCertsDir}/core/*')):
171
+ self.fatalError(f'{file} is not present in {self.manualCertsDir}/core/')
171
172
  for ext in extensions:
172
- certsSecret = self.addFilesToSecret(certsSecret, self.getParam("mas_manual_cert_dir")+'/core/', ext, "core.")
173
+ certsSecret = self.addFilesToSecret(certsSecret, self.manualCertsDir + '/core/', ext, "core.")
173
174
 
174
175
  for app in apps:
175
176
  if self.getParam(app) != "":
@@ -181,7 +182,7 @@ class AdditionalConfigsMixin():
181
182
 
182
183
  self.certsSecret = certsSecret
183
184
 
184
- def addFilesToSecret(self, secretDict: dict, configPath: str, extension: str, keyPrefix: str='') -> dict:
185
+ def addFilesToSecret(self, secretDict: dict, configPath: str, extension: str, keyPrefix: str = '') -> dict:
185
186
  """
186
187
  Add file (or files) to pipeline-additional-configs
187
188
  """
@@ -206,4 +207,4 @@ class AdditionalConfigsMixin():
206
207
  secretDict["data"] = {}
207
208
  secretDict["data"][keyPrefix + fileName] = b64encode(data.encode('ascii')).decode("ascii")
208
209
 
209
- return secretDict
210
+ return secretDict
@@ -11,6 +11,7 @@
11
11
  from os import path
12
12
  from prompt_toolkit import print_formatted_text
13
13
 
14
+
14
15
  class Db2SettingsMixin():
15
16
  def configDb2(self) -> None:
16
17
  self.printH1("Configure Databases")
@@ -123,9 +124,8 @@ class Db2SettingsMixin():
123
124
  else:
124
125
  self.setParam("db2_action_manage", "none")
125
126
 
126
-
127
127
  # Do we need to configure Db2u?
128
- if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install":
128
+ if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install":
129
129
  self.printH2("Installation Namespace")
130
130
  self.promptForString("Install namespace", "db2_namespace", default="db2u")
131
131
 
@@ -11,6 +11,7 @@
11
11
  from os import path
12
12
  from prompt_toolkit import print_formatted_text
13
13
 
14
+
14
15
  class KafkaSettingsMixin():
15
16
  def configKafka(self) -> None:
16
17
  if self.installIoT:
@@ -11,6 +11,7 @@
11
11
  import logging
12
12
  logger = logging.getLogger(__name__)
13
13
 
14
+
14
15
  class ManageSettingsMixin():
15
16
 
16
17
  def arcgisSettings(self) -> None:
@@ -75,24 +76,42 @@ class ManageSettingsMixin():
75
76
  self.params["mas_appws_components"] = "base=latest,health=latest"
76
77
  if self.yesOrNo("Select components to enable"):
77
78
  self.params["mas_appws_components"] = "base=latest"
78
- if self.yesOrNo(" - Asset Configuration Manager"): self.params["mas_appws_components"] += ",acm=latest"
79
- if self.yesOrNo(" - Aviation"): self.params["mas_appws_components"] += ",acm=latest"
80
- if self.yesOrNo(" - Civil Infrastructure"): self.params["mas_appws_components"] += ",civil=latest"
81
- if self.yesOrNo(" - Envizi"): self.params["mas_appws_components"] += ",envizi=latest"
82
- if self.yesOrNo(" - Health"): self.params["mas_appws_components"] += ",health=latest"
83
- if self.yesOrNo(" - Health, Safety and Environment"): self.params["mas_appws_components"] += ",hse=latest"
84
- if self.yesOrNo(" - Maximo IT"): self.params["mas_appws_components"] += ",icd=latest"
85
- if self.yesOrNo(" - Nuclear"): self.params["mas_appws_components"] += ",nuclear=latest"
86
- if self.yesOrNo(" - Oil & Gas"): self.params["mas_appws_components"] += ",oilandgas=latest"
87
- if self.yesOrNo(" - Connector for Oracle Applications"): self.params["mas_appws_components"] += ",oracleadapter=latest"
88
- if self.yesOrNo(" - Connector for SAP Application"): self.params["mas_appws_components"] += ",sapadapter=latest"
89
- if self.yesOrNo(" - Service Provider"): self.params["mas_appws_components"] += ",serviceprovider=latest"
90
- if self.yesOrNo(" - Spatial"): self.params["mas_appws_components"] += ",spatial=latest"
91
- if self.yesOrNo(" - Strategize"): self.params["mas_appws_components"] += ",strategize=latest"
92
- if self.yesOrNo(" - Transportation"): self.params["mas_appws_components"] += ",transportation=latest"
93
- if self.yesOrNo(" - Tririga"): self.params["mas_appws_components"] += ",tririga=latest"
94
- if self.yesOrNo(" - Utilities"): self.params["mas_appws_components"] += ",utilities=latest"
95
- if self.yesOrNo(" - Workday Applications"): self.params["mas_appws_components"] += ",workday=latest"
79
+ if self.yesOrNo(" - Asset Configuration Manager"):
80
+ self.params["mas_appws_components"] += ",acm=latest"
81
+ if self.yesOrNo(" - Aviation"):
82
+ self.params["mas_appws_components"] += ",acm=latest"
83
+ if self.yesOrNo(" - Civil Infrastructure"):
84
+ self.params["mas_appws_components"] += ",civil=latest"
85
+ if self.yesOrNo(" - Envizi"):
86
+ self.params["mas_appws_components"] += ",envizi=latest"
87
+ if self.yesOrNo(" - Health"):
88
+ self.params["mas_appws_components"] += ",health=latest"
89
+ if self.yesOrNo(" - Health, Safety and Environment"):
90
+ self.params["mas_appws_components"] += ",hse=latest"
91
+ if self.yesOrNo(" - Maximo IT"):
92
+ self.params["mas_appws_components"] += ",icd=latest"
93
+ if self.yesOrNo(" - Nuclear"):
94
+ self.params["mas_appws_components"] += ",nuclear=latest"
95
+ if self.yesOrNo(" - Oil & Gas"):
96
+ self.params["mas_appws_components"] += ",oilandgas=latest"
97
+ if self.yesOrNo(" - Connector for Oracle Applications"):
98
+ self.params["mas_appws_components"] += ",oracleadapter=latest"
99
+ if self.yesOrNo(" - Connector for SAP Application"):
100
+ self.params["mas_appws_components"] += ",sapadapter=latest"
101
+ if self.yesOrNo(" - Service Provider"):
102
+ self.params["mas_appws_components"] += ",serviceprovider=latest"
103
+ if self.yesOrNo(" - Spatial"):
104
+ self.params["mas_appws_components"] += ",spatial=latest"
105
+ if self.yesOrNo(" - Strategize"):
106
+ self.params["mas_appws_components"] += ",strategize=latest"
107
+ if self.yesOrNo(" - Transportation"):
108
+ self.params["mas_appws_components"] += ",transportation=latest"
109
+ if self.yesOrNo(" - Tririga"):
110
+ self.params["mas_appws_components"] += ",tririga=latest"
111
+ if self.yesOrNo(" - Utilities"):
112
+ self.params["mas_appws_components"] += ",utilities=latest"
113
+ if self.yesOrNo(" - Workday Applications"):
114
+ self.params["mas_appws_components"] += ",workday=latest"
96
115
  logger.debug(f"Generated mas_appws_components = {self.params['mas_appws_components']}")
97
116
 
98
117
  if ",icd=" in self.params["mas_appws_components"]:
@@ -154,7 +173,7 @@ class ManageSettingsMixin():
154
173
  else:
155
174
  self.fatalError("Invalid selection")
156
175
 
157
- def manageSettingsJMS (self) -> None:
176
+ def manageSettingsJMS(self) -> None:
158
177
  if self.getParam("mas_app_settings_server_bundles_size") in ["jms", "snojms"]:
159
178
  self.printDescription([
160
179
  "Only Manage JMS sequential queues (sqin and sqout) are enabled by default.",
@@ -227,3 +246,27 @@ class ManageSettingsMixin():
227
246
  self.manageSettingsTimezone()
228
247
  self.manageSettingsLanguages()
229
248
  self.manageSettingsCP4D()
249
+
250
+ def aibrokerSettings(self) -> None:
251
+ if self.installAiBroker:
252
+ self.printH2("Maximo AI Broker Settings - Storage, WatsonX, MariaDB details")
253
+ self.printDescription(["Customise AI Broker details"])
254
+ self.promptForString("Storage provider", "mas_aibroker_storage_provider")
255
+ self.promptForString("Storage access key", "mas_aibroker_storage_accesskey")
256
+ self.promptForString("Storage secret key", "mas_aibroker_storage_secretkey")
257
+ self.promptForString("Storage host", "mas_aibroker_storage_host")
258
+ self.promptForString("Storage port", "mas_aibroker_storage_port")
259
+ self.promptForString("Storage ssl", "mas_aibroker_storage_ssl")
260
+ self.promptForString("Storage region", "mas_aibroker_storage_region")
261
+ self.promptForString("Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket")
262
+ self.promptForString("Storage tenants bucket", "mas_aibroker_storage_tenants_bucket")
263
+ self.promptForString("Storage templates bucket", "mas_aibroker_storage_templates_bucket")
264
+ self.promptForString("Watsonxai api key", "mas_aibroker_watsonxai_apikey")
265
+ self.promptForString("Watsonxai machine learning url", "mas_aibroker_watsonxai_url")
266
+ self.promptForString("Watsonxai project id", "mas_aibroker_watsonxai_project_id")
267
+ self.promptForString("Database host", "mas_aibroker_db_host")
268
+ self.promptForString("Database port", "mas_aibroker_db_port")
269
+ self.promptForString("Database user", "mas_aibroker_db_user")
270
+ self.promptForString("Database name", "mas_aibroker_db_database")
271
+ self.promptForString("Database Secretname", "mas_aibroker_db_secret_name")
272
+ self.promptForString("Database password", "mas_aibroker_db_secret_value")
@@ -10,6 +10,7 @@
10
10
 
11
11
  from mas.devops.mas import isAirgapInstall
12
12
 
13
+
13
14
  class TurbonomicSettingsMixin():
14
15
 
15
16
  def configTurbonomic(self) -> None:
@@ -16,6 +16,7 @@ from mas.devops.ocp import getConsoleURL
16
16
 
17
17
  logger = logging.getLogger(__name__)
18
18
 
19
+
19
20
  class InstallSummarizerMixin():
20
21
  def ocpSummary(self) -> None:
21
22
  self.printH2("OpenShift Container Platform")
@@ -42,7 +43,7 @@ class InstallSummarizerMixin():
42
43
  self.printSummary("Artifactory Token", f"{self.params['artifactory_token'][0:8]}<snip>")
43
44
 
44
45
  def masSummary(self) -> None:
45
- operationalModeNames=["", "Production", "Non-Production"]
46
+ operationalModeNames = ["", "Production", "Non-Production"]
46
47
 
47
48
  self.printH2("IBM Maximo Application Suite")
48
49
  self.printParamSummary("Instance ID", "mas_instance_id")
@@ -50,7 +51,7 @@ class InstallSummarizerMixin():
50
51
  self.printParamSummary("Workspace Name", "mas_workspace_name")
51
52
 
52
53
  print()
53
- self.printSummary(f"Operational Mode", operationalModeNames[self.operationalMode])
54
+ self.printSummary("Operational Mode", operationalModeNames[self.operationalMode])
54
55
  if isAirgapInstall(self.dynamicClient):
55
56
  self.printSummary("Install Mode", "Disconnected Install")
56
57
  else:
@@ -76,7 +77,7 @@ class InstallSummarizerMixin():
76
77
 
77
78
  if self.getParam("mas_manual_cert_mgmt") != "":
78
79
  print()
79
- self.printParamSummary("Manual Certificates", "mas_manual_cert_dir")
80
+ self.printSummary("Manual Certificates", self.manualCertsDir)
80
81
  else:
81
82
  print()
82
83
  self.printSummary("Manual Certificates", "Not Configured")
@@ -128,7 +129,6 @@ class InstallSummarizerMixin():
128
129
  else:
129
130
  self.printSummary("Loc Srv Esri (arcgis)", "Do Not Install")
130
131
 
131
-
132
132
  def predictSummary(self) -> None:
133
133
  if self.installPredict:
134
134
  self.printSummary("Predict", self.params["mas_app_channel_predict"])
@@ -155,10 +155,36 @@ class InstallSummarizerMixin():
155
155
  else:
156
156
  self.printSummary("Visual Inspection", "Do Not Install")
157
157
 
158
+ def aibrokerSummary(self) -> None:
159
+ if self.installAiBroker:
160
+ self.printSummary("AI Broker", self.params["mas_app_channel_aibroker"])
161
+ print_formatted_text(HTML(" <SkyBlue>+ Maximo AI Broker Settings</SkyBlue>"))
162
+ self.printParamSummary(" + Storage provider", "mas_aibroker_storage_provider")
163
+ self.printParamSummary(" + Storage access key", "mas_aibroker_storage_accesskey")
164
+ self.printParamSummary(" + Storage secret key", "mas_aibroker_storage_secretkey")
165
+ self.printParamSummary(" + Storage host", "mas_aibroker_storage_host")
166
+ self.printParamSummary(" + Storage port", "mas_aibroker_storage_port")
167
+ self.printParamSummary(" + Storage ssl", "mas_aibroker_storage_ssl")
168
+ self.printParamSummary(" + Storage region", "mas_aibroker_storage_region")
169
+ self.printParamSummary(" + Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket")
170
+ self.printParamSummary(" + Storage tenants bucket", "mas_aibroker_storage_tenants_bucket")
171
+ self.printParamSummary(" + Storage templates bucket", "mas_aibroker_storage_templates_bucket")
172
+ self.printParamSummary(" + Watsonxai api key", "mas_aibroker_watsonxai_apikey")
173
+ self.printParamSummary(" + Watsonxai machine learning url", "mas_aibroker_watsonxai_url")
174
+ self.printParamSummary(" + Watsonxai project id", "mas_aibroker_watsonxai_project_id")
175
+ self.printParamSummary(" + Database host", "mas_aibroker_db_host")
176
+ self.printParamSummary(" + Database port", "mas_aibroker_db_port")
177
+ self.printParamSummary(" + Database user", "mas_aibroker_db_user")
178
+ self.printParamSummary(" + Database name", "mas_aibroker_db_database")
179
+ self.printParamSummary(" + Database Secretname", "mas_aibroker_db_secret_name")
180
+ self.printParamSummary(" + Database password", "mas_aibroker_db_secret_value")
181
+ else:
182
+ self.printSummary("AI Broker", "Do Not Install")
183
+
158
184
  def manageSummary(self) -> None:
159
185
  if self.installManage:
160
186
  self.printSummary("Manage", self.params["mas_app_channel_manage"])
161
- print_formatted_text(HTML(f" <SkyBlue>+ Components</SkyBlue>"))
187
+ print_formatted_text(HTML(" <SkyBlue>+ Components</SkyBlue>"))
162
188
  self.printSummary(" + ACM", "Enabled" if "acm=" in self.getParam("mas_appws_components") else "Disabled")
163
189
  self.printSummary(" + Aviation", "Enabled" if "aviation=" in self.getParam("mas_appws_components") else "Disabled")
164
190
  self.printSummary(" + Civil Infrastructure", "Enabled" if "acm=" in self.getParam("mas_appws_components") else "Disabled")
@@ -184,7 +210,7 @@ class InstallSummarizerMixin():
184
210
  self.printParamSummary("+ Base Language", "mas_app_settings_base_lang")
185
211
  self.printParamSummary("+ Additional Languages", "mas_app_settings_secondary_langs")
186
212
 
187
- print_formatted_text(HTML(f" <SkyBlue>+ Database Settings</SkyBlue>"))
213
+ print_formatted_text(HTML(" <SkyBlue>+ Database Settings</SkyBlue>"))
188
214
  self.printParamSummary(" + Schema", "mas_app_settings_indexspace")
189
215
  self.printParamSummary(" + Username", "mas_app_settings_db2_schema")
190
216
  self.printParamSummary(" + Tablespace", "mas_app_settings_tablespace")
@@ -253,8 +279,8 @@ class InstallSummarizerMixin():
253
279
  self.printH2("Cloud Object Storage")
254
280
  if self.getParam("cos_type") != "":
255
281
  self.printParamSummary("Type", "cos_type")
256
- if self.getParam("cos_resourcegroup") != "":
257
- self.printParamSummary("Resource Group", "cos_resourcegroup")
282
+ if self.getParam("ibmcos_resourcegroup") != "":
283
+ self.printParamSummary("Resource Group", "ibmcos_resourcegroup")
258
284
  else:
259
285
  self.printSummary("Type", "None")
260
286
 
@@ -323,7 +349,7 @@ class InstallSummarizerMixin():
323
349
  ])
324
350
 
325
351
  logger.debug("PipelineRun parameters:")
326
- logger.debug(yaml.dump(self.params, default_flow_style = False))
352
+ logger.debug(yaml.dump(self.params, default_flow_style=False))
327
353
 
328
354
  # Cluster Config & Dependencies
329
355
  self.ocpSummary()
@@ -341,6 +367,7 @@ class InstallSummarizerMixin():
341
367
  self.optimizerSummary()
342
368
  self.assistSummary()
343
369
  self.inspectionSummary()
370
+ self.aibrokerSummary()
344
371
 
345
372
  # Application Dependencies
346
373
  self.mongoSummary()