mas-cli 13.19.0__py3-none-any.whl → 13.21.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.

mas/cli/update/app.py CHANGED
@@ -242,13 +242,13 @@ class UpdateApp(BaseApp):
242
242
  self.printH1("Select IBM Maximo Operator Catalog Version")
243
243
  self.printDescription([
244
244
  "Select MAS Catalog",
245
- " 1) Apr 03 2025 Update (MAS 9.0.10, 8.11.21, & 8.10.24)",
246
- " 2) Mar 06 2025 Update (MAS 9.0.9, 8.11.20, & 8.10.23)",
247
- " 3) Feb 06 2025 Update (MAS 9.0.8, 8.11.19, & 8.10.22)",
245
+ " 1) May 01 2025 Update (MAS 9.0.11, 8.11.22, & 8.10.25)",
246
+ " 2) Apr 03 2025 Update (MAS 9.0.10, 8.11.21, & 8.10.24)",
247
+ " 3) Mar 06 2025 Update (MAS 9.0.9, 8.11.20, & 8.10.23)",
248
248
  ])
249
249
 
250
250
  catalogOptions = [
251
- "v9-250403-amd64", "v9-250306-amd64", "v9-250206-amd64",
251
+ "v9-250501-amd64", "v9-250403-amd64", "v9-250306-amd64",
252
252
  ]
253
253
  self.promptForListSelect("Select catalog version", catalogOptions, "mas_catalog_version", default=1)
254
254
 
@@ -362,6 +362,7 @@ class UpdateApp(BaseApp):
362
362
  "v9-250206-amd64": "7.0.12",
363
363
  "v9-250306-amd64": "7.0.12",
364
364
  "v9-250403-amd64": "7.0.12",
365
+ "v9-250501-amd64": "7.0.12",
365
366
  }
366
367
  catalogVersion = self.getParam('mas_catalog_version')
367
368
  if catalogVersion in mongoVersions:
@@ -494,7 +495,8 @@ class UpdateApp(BaseApp):
494
495
  "v9-250109-amd64": "5.0.0",
495
496
  "v9-250206-amd64": "5.0.0",
496
497
  "v9-250306-amd64": "5.0.0",
497
- "v9-250403-amd64": "5.0.0"
498
+ "v9-250403-amd64": "5.0.0",
499
+ "v9-250501-amd64": "5.0.0",
498
500
  }
499
501
 
500
502
  with Halo(text='Checking for IBM Cloud Pak for Data', spinner=self.spinner) as h:
mas/cli/upgrade/app.py CHANGED
@@ -20,15 +20,16 @@ from halo import Halo
20
20
  from ..cli import BaseApp
21
21
  from ..validators import InstanceIDValidator
22
22
  from .argParser import upgradeArgParser
23
+ from .settings import UpgradeSettingsMixin
23
24
 
24
25
  from mas.devops.ocp import createNamespace
25
- from mas.devops.mas import listMasInstances, getMasChannel
26
+ from mas.devops.mas import listMasInstances, getMasChannel, getWorkspaceId, verifyAppInstance
26
27
  from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline
27
28
 
28
29
  logger = logging.getLogger(__name__)
29
30
 
30
31
 
31
- class UpgradeApp(BaseApp):
32
+ class UpgradeApp(BaseApp, UpgradeSettingsMixin):
32
33
  def upgrade(self, argv):
33
34
  """
34
35
  Upgrade MAS instance
@@ -38,6 +39,7 @@ class UpgradeApp(BaseApp):
38
39
  self.noConfirm = args.no_confirm
39
40
  self.skipPreCheck = args.skip_pre_check
40
41
  self.licenseAccepted = args.accept_license
42
+ self.devMode = args.dev_mode
41
43
 
42
44
  if instanceId is None:
43
45
  self.printH1("Set Target OpenShift Cluster")
@@ -45,6 +47,8 @@ class UpgradeApp(BaseApp):
45
47
  self.connect()
46
48
  else:
47
49
  logger.debug("MAS instance ID is set, so we assume already connected to the desired OCP")
50
+ # Need to lookup target architecture because configDb2 will try to access self.architecture
51
+ self.lookupTargetArchitecture()
48
52
 
49
53
  if self.dynamicClient is None:
50
54
  print_formatted_text(HTML("<Red>Error: The Kubernetes dynamic Client is not available. See log file for details</Red>"))
@@ -71,16 +75,21 @@ class UpgradeApp(BaseApp):
71
75
 
72
76
  currentChannel = getMasChannel(self.dynamicClient, instanceId)
73
77
  if currentChannel is not None:
74
- if currentChannel not in self.upgrade_path:
75
- self.fatalError(f"No upgrade available, {instanceId} is are already on the latest release {currentChannel}")
76
- nextChannel = self.upgrade_path[currentChannel]
78
+ if self.devMode:
79
+ # This is mainly used for the scenario where Manage Foundation would be installed, because core-upgrade does not use the value of nextChannel,
80
+ # it uses a compatibility_matrix object in ansible-devops to determine the next channel, so nextChannel is only informative for core upgrade purposes
81
+ nextChannel = prompt(HTML('<Yellow>Custom channel</Yellow> '))
82
+ else:
83
+ if currentChannel not in self.upgrade_path:
84
+ self.fatalError(f"No upgrade available, {instanceId} is are already on the latest release {currentChannel}")
85
+ nextChannel = self.upgrade_path[currentChannel]
77
86
  else:
78
87
  # We still allow the upgrade to proceed even though we can't detect the MAS instance. The upgrade may be being
79
88
  # queued up to run after install for instance
80
89
  currentChannel = "Unknown"
81
90
  nextChannel = "Unknown"
82
91
 
83
- if not self.licenseAccepted:
92
+ if not self.licenseAccepted and not self.devMode:
84
93
  self.printH1("License Terms")
85
94
  self.printDescription([
86
95
  "To continue with the upgrade, you must accept the license terms:",
@@ -93,6 +102,30 @@ class UpgradeApp(BaseApp):
93
102
  if not self.yesOrNo("Do you accept the license terms"):
94
103
  exit(1)
95
104
 
105
+ # The only scenario where Manage Foundation needs to be installed during an upgrade is from 9.0.x to 9.1.x (if Manage was not already installed in 9.0.x).
106
+ self.setParam("should_install_manage_foundation", "false")
107
+ if nextChannel.startswith("9.1") and not verifyAppInstance(self.dynamicClient, instanceId, "manage"):
108
+ self.manageAppName = "Manage foundation"
109
+ self.showAdvancedOptions = False
110
+ self.installIoT = False
111
+ self.installManage = True
112
+ self.isManageFoundation = True
113
+ self.printDescription([f"{self.manageAppName} installs the following capabilities: User, Security groups, Application configurator and Mobile configurator."])
114
+ self.printH1("Configure IBM Container Registry")
115
+ self.promptForString("IBM entitlement key", "ibm_entitlement_key", isPassword=True)
116
+ if self.devMode:
117
+ self.promptForString("Artifactory username", "artifactory_username")
118
+ self.promptForString("Artifactory token", "artifactory_token", isPassword=True)
119
+ self.setParam("should_install_manage_foundation", "true")
120
+ self.setParam("is_full_manage", "false")
121
+ self.setParam("mas_appws_components", "")
122
+ self.setParam("mas_app_settings_aio_flag", "false")
123
+ self.setParam("mas_app_channel_manage", nextChannel)
124
+ self.setParam("mas_workspace_id", getWorkspaceId(self.dynamicClient, instanceId))
125
+ # It has been decided that we don't need to ask for any specific Manage Settings
126
+ # self.manageSettings()
127
+ self.configDb2(silentMode=True)
128
+
96
129
  self.printH1("Review Settings")
97
130
  print_formatted_text(HTML(f"<LightSlateGrey>Instance ID ..................... {instanceId}</LightSlateGrey>"))
98
131
  print_formatted_text(HTML(f"<LightSlateGrey>Current MAS Channel ............. {currentChannel}</LightSlateGrey>"))
@@ -101,7 +134,7 @@ class UpgradeApp(BaseApp):
101
134
 
102
135
  if not self.noConfirm:
103
136
  print()
104
- continueWithUpgrade = self.yesOrNo("Proceed with these settings?")
137
+ continueWithUpgrade = self.yesOrNo("Proceed with these settings")
105
138
 
106
139
  if self.noConfirm or continueWithUpgrade:
107
140
  self.createTektonFileWithDigest()
@@ -122,7 +155,7 @@ class UpgradeApp(BaseApp):
122
155
  h.stop_and_persist(symbol=self.successIcon, text=f"Latest Tekton definitions are installed (v{self.version})")
123
156
 
124
157
  with Halo(text='Submitting PipelineRun for {instanceId} upgrade', spinner=self.spinner) as h:
125
- pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId, self.skipPreCheck)
158
+ pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId, self.skipPreCheck, params=self.params)
126
159
  if pipelineURL is not None:
127
160
  h.stop_and_persist(symbol=self.successIcon, text=f"PipelineRun for {instanceId} upgrade submitted")
128
161
  print_formatted_text(HTML(f"\nView progress:\n <Cyan><u>{pipelineURL}</u></Cyan>\n"))
@@ -53,6 +53,13 @@ otherArgGroup.add_argument(
53
53
  default=False,
54
54
  help="Accept all license terms without prompting"
55
55
  )
56
+ otherArgGroup.add_argument(
57
+ "--dev-mode",
58
+ required=False,
59
+ action="store_true",
60
+ default=False,
61
+ help="Configure upgrade for development mode",
62
+ )
56
63
  otherArgGroup.add_argument(
57
64
  '-h', "--help",
58
65
  action='help',
@@ -0,0 +1,19 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2025 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
+ from ...install.settings.db2Settings import Db2SettingsMixin
12
+ from ...install.settings.manageSettings import ManageSettingsMixin
13
+
14
+
15
+ class UpgradeSettingsMixin(Db2SettingsMixin, ManageSettingsMixin):
16
+ """
17
+ This class collects all the Mixins providing interactive prompts for mas-upgrade
18
+ """
19
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mas-cli
3
- Version: 13.19.0
3
+ Version: 13.21.0
4
4
  Summary: Python Admin CLI for Maximo Application Suite
5
5
  Home-page: https://github.com/ibm-mas/cli
6
6
  Author: David Parker
@@ -1,23 +1,23 @@
1
- mas/cli/__init__.py,sha256=Vd4MFMI_IlPP5X9hgPB6CuHfCqSYauzOXY7IKk1juRg,527
2
- mas/cli/cli.py,sha256=eoLuAEjpdOxthaThTo5fDw0u31jIof9dNradOoEURBI,18175
1
+ mas/cli/__init__.py,sha256=JkiETBbfS9ndjAIPG4aZi2f8RCN2L3tgda2CsrJWF1w,527
2
+ mas/cli/cli.py,sha256=wjuiU50CH9cKl_RzlbE1lzIr8zKE_vOoHZWnaI9qv4s,18175
3
3
  mas/cli/displayMixins.py,sha256=e3lAx1DIOwsriDcNI0M2JyP1jeLOZKvId6sPrvWLyqs,5984
4
4
  mas/cli/gencfg.py,sha256=p38Ss_ooiNHOZTJT8l0YxDaEaPwD4ZXgxEbW-S9YLNY,3311
5
5
  mas/cli/validators.py,sha256=vi1pFA8QtqMhqtGk1NlkkNDUrlFCi53kS5wJqFGDgOU,5108
6
6
  mas/cli/install/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc,508
7
- mas/cli/install/app.py,sha256=dje7_VUpX08t-MEvkmTSa-YB1-0ZWKHse1DRxReASkY,61406
8
- mas/cli/install/argBuilder.py,sha256=a_D8vvqBj7jH83iCKTb1kj4Py_OJpGIDEgdQ13wpHJw,25078
9
- mas/cli/install/argParser.py,sha256=Of8zxZ7iIkSEusvTRXteR34kWM-P9QnqOUrVPtaqHGQ,36004
10
- mas/cli/install/catalogs.py,sha256=4Mgv_nUHuT5lwoPbiJdkn58_k1RvGxmlueJLMrnJNak,751
11
- mas/cli/install/params.py,sha256=JB0yqyv4FRb0ZJN56sGQv0TGGgCMCTzdEzY-E_xrnUE,5080
7
+ mas/cli/install/app.py,sha256=VXNMR7PVbQqT21sbtpsASN5jLzhI5ypFEFoRYxTRuHo,61273
8
+ mas/cli/install/argBuilder.py,sha256=G_aNIjWQPMILm-SntgvFyKd4Ywmgfi51ouE075v2fqY,25059
9
+ mas/cli/install/argParser.py,sha256=awQRyiin70wYh1UX6U9PoNN9MWmZ55Z-iZSZq_81PBs,36107
10
+ mas/cli/install/catalogs.py,sha256=jAYpqTuMwhJcsjv-ez7BZY0Y0T-w782G6h2s8x3g2tY,751
11
+ mas/cli/install/params.py,sha256=YsgMLtToqiMI2g5SeX-q_IIil2uQB5TVpN8_ad4op8s,5061
12
12
  mas/cli/install/summarizer.py,sha256=zlMMx7raa_2MCGr6_S5OsEw9skeA1GTDo9Hh4cCEq84,21874
13
13
  mas/cli/install/settings/__init__.py,sha256=RdyBSh-rM0wkuvILVzJ1gxjOtLuQ1mF6QbEL0MyiKIY,1034
14
14
  mas/cli/install/settings/additionalConfigs.py,sha256=u9DTwGZkPLIGfbNrz6yXsBi39EZgk2bwJuDUrNm_Nio,10008
15
- mas/cli/install/settings/db2Settings.py,sha256=-RTejDTgvnA-bbEnPWXO4imjy0IMfAlW6J71UyNUsZc,13278
15
+ mas/cli/install/settings/db2Settings.py,sha256=YaCu1mLyRIk_bkkKPlBRv7x4gsh8YTrJ_NDelaIL8HQ,14513
16
16
  mas/cli/install/settings/kafkaSettings.py,sha256=r1uK-IApqB9IQiSNt_8sP0wa4FPJcXU_qnadhElEOuI,7241
17
17
  mas/cli/install/settings/manageSettings.py,sha256=whoAT3B-qQjLD6SaS_9OEmmIvbSXbcI9m-wCDyu4alI,17853
18
18
  mas/cli/install/settings/mongodbSettings.py,sha256=UVt8vMLNpgyewlcymSystIhICnHsd0uoM9qpgezVjGg,2567
19
19
  mas/cli/install/settings/turbonomicSettings.py,sha256=ul4eWf53b1NCzJTFsEPX6DWM23YUlWILYBygplqXYlU,1631
20
- mas/cli/templates/ibm-mas-tekton.yaml,sha256=fBuIRnCxFDfFAuGsdDGV9QJwgU5NO1ALOa8DTOGP7aM,879516
20
+ mas/cli/templates/ibm-mas-tekton.yaml,sha256=aFlpv8sduA01wQnHo8r3fEDVtYNyAUph-usJcolZXpQ,931645
21
21
  mas/cli/templates/jdbccfg.yml.j2,sha256=cANbwkUkKEPQp-P3_BB_Llbt94457Ciagah2hOdySIM,1644
22
22
  mas/cli/templates/suite_mongocfg.yml.j2,sha256=WrgJUfGyvfaRIHjY5VR_zLZ5irTpV5khKNq76ejIxKU,1606
23
23
  mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml,sha256=8VG_FDFcEjWNaAOZTcS58Pe0tWOXC10SJLloNqzEMC8,757
@@ -94,13 +94,14 @@ mas/cli/uninstall/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc
94
94
  mas/cli/uninstall/app.py,sha256=uPJy3z-1Yt66MSFdZz1Qh8MjA97ZrQmjSgTx-Gqua9I,10047
95
95
  mas/cli/uninstall/argParser.py,sha256=VVG4myUvFOtg98L6HAzpgGg7s5c-vub_UMZPGuNQko4,3452
96
96
  mas/cli/update/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc,508
97
- mas/cli/update/app.py,sha256=ts6VLgDXz8pB17LbdoEl4y9i19IcBfb2ndYp7X9SIE0,39001
97
+ mas/cli/update/app.py,sha256=QeG-hH-QudpeoD7MEFx1e2NATyudnQSgNMLmRJbt480,39096
98
98
  mas/cli/update/argParser.py,sha256=oOIXzB_rsI2p3og_5X5SFt_g7LURyEdLxZeiGCKq1nU,4711
99
99
  mas/cli/upgrade/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc,508
100
- mas/cli/upgrade/app.py,sha256=EuEZayc0nw9kA6Hz8M9Mv7uk0hgmspJSZCYhNEfCECk,6428
101
- mas/cli/upgrade/argParser.py,sha256=pqzNDSHy6l13JunHWQLyOI-NFnDGDoVJ_HM07FLYJSc,2033
102
- mas_cli-13.19.0.data/scripts/mas-cli,sha256=BbibIX0psLEOZdcNaFcO4mJvStD0pKLAe-p-NwVTrBs,3439
103
- mas_cli-13.19.0.dist-info/METADATA,sha256=_TXHFb3O5kP0YJO9uO8ntvJ_lSjBlDyBrk-KxW7bH5k,2259
104
- mas_cli-13.19.0.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
105
- mas_cli-13.19.0.dist-info/top_level.txt,sha256=_Hlsp7pvMvyV14LFg-vk1hULq30j61EILnnxMFIhhc8,4
106
- mas_cli-13.19.0.dist-info/RECORD,,
100
+ mas/cli/upgrade/app.py,sha256=9P6Jy42JwUiErsOk8uIDQXpITuC7JR-1gn7W8w_SWwQ,8883
101
+ mas/cli/upgrade/argParser.py,sha256=5JxAcbwKjFKCKnbucCxg7Xacdhjphb9nRORfsgB1h_0,2196
102
+ mas/cli/upgrade/settings/__init__.py,sha256=QI2CUsj-NXBU1qrPOsOk4MbeWnfNq0UOF3rYYc_1l2A,775
103
+ mas_cli-13.21.0.data/scripts/mas-cli,sha256=BbibIX0psLEOZdcNaFcO4mJvStD0pKLAe-p-NwVTrBs,3439
104
+ mas_cli-13.21.0.dist-info/METADATA,sha256=yQBYGqmsODpJ5aO8DKcmc-zfdPfdxYKYntysYE_T7V4,2259
105
+ mas_cli-13.21.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
106
+ mas_cli-13.21.0.dist-info/top_level.txt,sha256=_Hlsp7pvMvyV14LFg-vk1hULq30j61EILnnxMFIhhc8,4
107
+ mas_cli-13.21.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.1)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5