mas-cli 10.0.5__py3-none-any.whl → 10.0.6__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/__init__.py CHANGED
@@ -8,4 +8,4 @@
8
8
  #
9
9
  # *****************************************************************************
10
10
 
11
- __version__ = "10.0.5"
11
+ __version__ = "10.0.6"
mas/cli/displayMixins.py CHANGED
@@ -10,6 +10,7 @@
10
10
 
11
11
  from os import path, getenv
12
12
  from prompt_toolkit import prompt, print_formatted_text, HTML
13
+ from prompt_toolkit.completion import WordCompleter
13
14
  from prompt_toolkit.validation import Validator
14
15
 
15
16
  from .validators import YesNoValidator, FileExistsValidator, DirectoryExistsValidator
@@ -71,11 +72,11 @@ class PromptMixin():
71
72
  self.params[param] = "true" if responseAsBool else "false"
72
73
  return responseAsBool
73
74
 
74
- def promptForString(self, message: str, param: str=None, default: str="", isPassword: bool=False, validator: Validator=None) -> str:
75
+ def promptForString(self, message: str, param: str=None, default: str="", isPassword: bool=False, validator: Validator=None, completer: WordCompleter=None) -> str:
75
76
  if param is not None and default == "":
76
77
  default = getenv(param.upper(), default="")
77
78
 
78
- response = prompt(masPromptValue(message), is_password=isPassword, default=default, validator=validator, validate_while_typing=False)
79
+ response = prompt(masPromptValue(message), is_password=isPassword, default=default, completer=completer, validator=validator, validate_while_typing=False)
79
80
  if param is not None:
80
81
  self.params[param] = response
81
82
  return response
@@ -108,7 +108,7 @@ spec:
108
108
  command:
109
109
  - /opt/app-root/src/run-role.sh
110
110
  - appconnect
111
- image: quay.io/ibmmas/cli:10.0.5
111
+ image: quay.io/ibmmas/cli:10.0.6
112
112
  imagePullPolicy: $(params.image_pull_policy)
113
113
  workingDir: /workspace/configs
114
114
 
@@ -226,7 +226,7 @@ spec:
226
226
  command:
227
227
  - /opt/app-root/src/run-role.sh
228
228
  - arcgis
229
- image: quay.io/ibmmas/cli:10.0.5
229
+ image: quay.io/ibmmas/cli:10.0.6
230
230
  imagePullPolicy: $(params.image_pull_policy)
231
231
  # --------------------------------------------------------------------------------
232
232
  # /home/runner/work/cli/cli/tekton/target/tasks/cert-manager.yaml
@@ -296,7 +296,7 @@ spec:
296
296
  command:
297
297
  - /opt/app-root/src/run-role.sh
298
298
  - cert_manager
299
- image: quay.io/ibmmas/cli:10.0.5
299
+ image: quay.io/ibmmas/cli:10.0.6
300
300
  imagePullPolicy: $(params.image_pull_policy)
301
301
  workingDir: /workspace/configs
302
302
  # --------------------------------------------------------------------------------
@@ -359,7 +359,7 @@ spec:
359
359
  command:
360
360
  - /opt/app-root/src/run-role.sh
361
361
  - common_services
362
- image: quay.io/ibmmas/cli:10.0.5
362
+ image: quay.io/ibmmas/cli:10.0.6
363
363
  imagePullPolicy: $(params.image_pull_policy)
364
364
  workingDir: /workspace/configs
365
365
  # --------------------------------------------------------------------------------
@@ -454,7 +454,7 @@ spec:
454
454
  command:
455
455
  - /opt/app-root/src/run-role.sh
456
456
  - cos
457
- image: quay.io/ibmmas/cli:10.0.5
457
+ image: quay.io/ibmmas/cli:10.0.6
458
458
  imagePullPolicy: $(params.image_pull_policy)
459
459
  workingDir: /workspace/configs
460
460
  # --------------------------------------------------------------------------------
@@ -569,7 +569,7 @@ spec:
569
569
  command:
570
570
  - /opt/app-root/src/run-role.sh
571
571
  - cos
572
- image: quay.io/ibmmas/cli:10.0.5
572
+ image: quay.io/ibmmas/cli:10.0.6
573
573
  imagePullPolicy: $(params.image_pull_policy)
574
574
  workingDir: /workspace/configs
575
575
 
@@ -689,7 +689,7 @@ spec:
689
689
  command:
690
690
  - /opt/app-root/src/run-role.sh
691
691
  - cp4d_service
692
- image: quay.io/ibmmas/cli:10.0.5
692
+ image: quay.io/ibmmas/cli:10.0.6
693
693
  imagePullPolicy: $(params.image_pull_policy)
694
694
  workingDir: /workspace/configs
695
695
  # --------------------------------------------------------------------------------
@@ -806,7 +806,7 @@ spec:
806
806
  command:
807
807
  - /opt/app-root/src/run-role.sh
808
808
  - cp4d_service
809
- image: quay.io/ibmmas/cli:10.0.5
809
+ image: quay.io/ibmmas/cli:10.0.6
810
810
  imagePullPolicy: $(params.image_pull_policy)
811
811
  workingDir: /workspace/configs
812
812
 
@@ -912,7 +912,7 @@ spec:
912
912
  command:
913
913
  - /opt/app-root/src/run-role.sh
914
914
  - cp4d
915
- image: quay.io/ibmmas/cli:10.0.5
915
+ image: quay.io/ibmmas/cli:10.0.6
916
916
  imagePullPolicy: $(params.image_pull_policy)
917
917
  # --------------------------------------------------------------------------------
918
918
  # /home/runner/work/cli/cli/tekton/target/tasks/db2.yaml
@@ -1234,7 +1234,7 @@ spec:
1234
1234
  command:
1235
1235
  - /opt/app-root/src/run-role.sh
1236
1236
  - db2
1237
- image: quay.io/ibmmas/cli:10.0.5
1237
+ image: quay.io/ibmmas/cli:10.0.6
1238
1238
  imagePullPolicy: $(params.image_pull_policy)
1239
1239
  workingDir: /workspace/configs
1240
1240
 
@@ -1337,7 +1337,7 @@ spec:
1337
1337
  command:
1338
1338
  - /opt/app-root/src/run-role.sh
1339
1339
  - eck
1340
- image: quay.io/ibmmas/cli:10.0.5
1340
+ image: quay.io/ibmmas/cli:10.0.6
1341
1341
  imagePullPolicy: $(params.image_pull_policy)
1342
1342
  # --------------------------------------------------------------------------------
1343
1343
  # /home/runner/work/cli/cli/tekton/target/tasks/gencfg-workspace.yaml
@@ -1426,7 +1426,7 @@ spec:
1426
1426
  command:
1427
1427
  - /opt/app-root/src/run-role.sh
1428
1428
  - gencfg_workspace
1429
- image: quay.io/ibmmas/cli:10.0.5
1429
+ image: quay.io/ibmmas/cli:10.0.6
1430
1430
  imagePullPolicy: $(params.image_pull_policy)
1431
1431
  workingDir: /workspace/configs
1432
1432
 
@@ -1478,7 +1478,7 @@ spec:
1478
1478
 
1479
1479
  steps:
1480
1480
  - name: grafana
1481
- image: quay.io/ibmmas/cli:10.0.5
1481
+ image: quay.io/ibmmas/cli:10.0.6
1482
1482
  imagePullPolicy: $(params.image_pull_policy)
1483
1483
  command:
1484
1484
  - /opt/app-root/src/run-role.sh
@@ -1612,7 +1612,7 @@ spec:
1612
1612
  command:
1613
1613
  - /opt/app-root/src/run-role.sh
1614
1614
  - ibm_catalogs
1615
- image: quay.io/ibmmas/cli:10.0.5
1615
+ image: quay.io/ibmmas/cli:10.0.6
1616
1616
  imagePullPolicy: $(params.image_pull_policy)
1617
1617
  workingDir: /workspace/configs
1618
1618
  # --------------------------------------------------------------------------------
@@ -1719,7 +1719,7 @@ spec:
1719
1719
  command:
1720
1720
  - /opt/app-root/src/run-role.sh
1721
1721
  - kafka
1722
- image: quay.io/ibmmas/cli:10.0.5
1722
+ image: quay.io/ibmmas/cli:10.0.6
1723
1723
  imagePullPolicy: $(params.image_pull_policy)
1724
1724
  workingDir: /workspace/configs
1725
1725
  # --------------------------------------------------------------------------------
@@ -1961,7 +1961,7 @@ spec:
1961
1961
  command:
1962
1962
  - /opt/app-root/src/run-role.sh
1963
1963
  - kafka
1964
- image: quay.io/ibmmas/cli:10.0.5
1964
+ image: quay.io/ibmmas/cli:10.0.6
1965
1965
  imagePullPolicy: $(params.image_pull_policy)
1966
1966
  workingDir: /workspace/configs
1967
1967
 
@@ -1988,7 +1988,7 @@ spec:
1988
1988
 
1989
1989
  steps:
1990
1990
  - name: start-pipelinerun
1991
- image: quay.io/ibmmas/cli:10.0.5
1991
+ image: quay.io/ibmmas/cli:10.0.6
1992
1992
  imagePullPolicy: $(params.image_pull_policy)
1993
1993
  command:
1994
1994
  - ansible-playbook
@@ -2093,7 +2093,7 @@ spec:
2093
2093
  optional: false
2094
2094
 
2095
2095
  - name: wait-for-pipelinerun
2096
- image: quay.io/ibmmas/cli:10.0.5
2096
+ image: quay.io/ibmmas/cli:10.0.6
2097
2097
  imagePullPolicy: $(params.image_pull_policy)
2098
2098
  # 50 retries at 10 minute intervals = just over 8 hours
2099
2099
  command:
@@ -2287,7 +2287,7 @@ spec:
2287
2287
  command:
2288
2288
  - /opt/app-root/src/run-role.sh
2289
2289
  - mongodb
2290
- image: quay.io/ibmmas/cli:10.0.5
2290
+ image: quay.io/ibmmas/cli:10.0.6
2291
2291
  imagePullPolicy: $(params.image_pull_policy)
2292
2292
  workingDir: /workspace/configs
2293
2293
 
@@ -2330,7 +2330,7 @@ spec:
2330
2330
  - $(params.base_output_dir)
2331
2331
  - --extra-namespaces
2332
2332
  - selenium
2333
- image: quay.io/ibmmas/cli:10.0.5
2333
+ image: quay.io/ibmmas/cli:10.0.6
2334
2334
  imagePullPolicy: $(params.image_pull_policy)
2335
2335
  env:
2336
2336
  - name: DEVOPS_MONGO_URI
@@ -2447,7 +2447,7 @@ spec:
2447
2447
  command:
2448
2448
  - /opt/app-root/src/run-role.sh
2449
2449
  - nvidia_gpu
2450
- image: quay.io/ibmmas/cli:10.0.5
2450
+ image: quay.io/ibmmas/cli:10.0.6
2451
2451
  imagePullPolicy: $(params.image_pull_policy)
2452
2452
  workingDir: /workspace/configs
2453
2453
 
@@ -2526,7 +2526,7 @@ spec:
2526
2526
  command:
2527
2527
  - /opt/app-root/src/run-role.sh
2528
2528
  - ocp_deprovision
2529
- image: quay.io/ibmmas/cli:10.0.5
2529
+ image: quay.io/ibmmas/cli:10.0.6
2530
2530
  imagePullPolicy: $(params.image_pull_policy)
2531
2531
  # --------------------------------------------------------------------------------
2532
2532
  # /home/runner/work/cli/cli/tekton/target/tasks/ocp-verify-all.yaml
@@ -2558,7 +2558,7 @@ spec:
2558
2558
  # Verify Cluster
2559
2559
  # -------------------------------------------------------------------------
2560
2560
  - name: ocp-verify-cluster
2561
- image: quay.io/ibmmas/cli:10.0.5
2561
+ image: quay.io/ibmmas/cli:10.0.6
2562
2562
  imagePullPolicy: $(params.image_pull_policy)
2563
2563
  command:
2564
2564
  - /opt/app-root/src/run-role.sh
@@ -2600,7 +2600,7 @@ spec:
2600
2600
  # Verify Catalogs
2601
2601
  # -------------------------------------------------------------------------
2602
2602
  - name: ocp-verify-catalogs
2603
- image: quay.io/ibmmas/cli:10.0.5
2603
+ image: quay.io/ibmmas/cli:10.0.6
2604
2604
  imagePullPolicy: $(params.image_pull_policy)
2605
2605
  command:
2606
2606
  - /opt/app-root/src/run-role.sh
@@ -2642,7 +2642,7 @@ spec:
2642
2642
  # Verify Subscriptions
2643
2643
  # -------------------------------------------------------------------------
2644
2644
  - name: ocp-verify-subscriptions
2645
- image: quay.io/ibmmas/cli:10.0.5
2645
+ image: quay.io/ibmmas/cli:10.0.6
2646
2646
  imagePullPolicy: $(params.image_pull_policy)
2647
2647
  command:
2648
2648
  - /opt/app-root/src/run-role.sh
@@ -2684,7 +2684,7 @@ spec:
2684
2684
  # Verify Workloads
2685
2685
  # -------------------------------------------------------------------------
2686
2686
  - name: ocp-verify-workloads
2687
- image: quay.io/ibmmas/cli:10.0.5
2687
+ image: quay.io/ibmmas/cli:10.0.6
2688
2688
  imagePullPolicy: $(params.image_pull_policy)
2689
2689
  command:
2690
2690
  - /opt/app-root/src/run-role.sh
@@ -2726,7 +2726,7 @@ spec:
2726
2726
  # Verify Catalogs - Ingress TLS
2727
2727
  # -------------------------------------------------------------------------
2728
2728
  - name: ocp-verify-ingress
2729
- image: quay.io/ibmmas/cli:10.0.5
2729
+ image: quay.io/ibmmas/cli:10.0.6
2730
2730
  imagePullPolicy: $(params.image_pull_policy)
2731
2731
  command:
2732
2732
  - /opt/app-root/src/run-role.sh
@@ -2852,7 +2852,7 @@ spec:
2852
2852
  command:
2853
2853
  - /opt/app-root/src/run-role.sh
2854
2854
  - ocp_verify
2855
- image: quay.io/ibmmas/cli:10.0.5
2855
+ image: quay.io/ibmmas/cli:10.0.6
2856
2856
  imagePullPolicy: $(params.image_pull_policy)
2857
2857
  workingDir: /workspace/configs
2858
2858
  # --------------------------------------------------------------------------------
@@ -2920,7 +2920,7 @@ spec:
2920
2920
  command:
2921
2921
  - /opt/app-root/src/run-role.sh
2922
2922
  - ocs
2923
- image: quay.io/ibmmas/cli:10.0.5
2923
+ image: quay.io/ibmmas/cli:10.0.6
2924
2924
  imagePullPolicy: $(params.image_pull_policy)
2925
2925
  workingDir: /workspace/configs
2926
2926
 
@@ -3101,7 +3101,7 @@ spec:
3101
3101
  command:
3102
3102
  - /opt/app-root/src/run-role.sh
3103
3103
  - sls
3104
- image: quay.io/ibmmas/cli:10.0.5
3104
+ image: quay.io/ibmmas/cli:10.0.6
3105
3105
  imagePullPolicy: $(params.image_pull_policy)
3106
3106
  workingDir: /workspace/configs
3107
3107
 
@@ -3476,12 +3476,12 @@ spec:
3476
3476
  command:
3477
3477
  - /opt/app-root/src/run-role.sh
3478
3478
  - suite_app_config
3479
- image: quay.io/ibmmas/cli:10.0.5
3479
+ image: quay.io/ibmmas/cli:10.0.6
3480
3480
  imagePullPolicy: $(params.image_pull_policy)
3481
3481
 
3482
3482
  # If configmap/approval-app-cfg-$(params.mas_app_id) exists then set CONFIGMAP_KEY=pending and wait for it to be changed to "approved"
3483
3483
  - name: app-cfg-post-verify
3484
- image: quay.io/ibmmas/cli:10.0.5
3484
+ image: quay.io/ibmmas/cli:10.0.6
3485
3485
  imagePullPolicy: $(params.image_pull_policy)
3486
3486
  command:
3487
3487
  - /opt/app-root/src/wait-for-configmap.sh
@@ -3682,7 +3682,7 @@ spec:
3682
3682
  command:
3683
3683
  - /opt/app-root/src/run-role.sh
3684
3684
  - suite_app_install
3685
- image: quay.io/ibmmas/cli:10.0.5
3685
+ image: quay.io/ibmmas/cli:10.0.6
3686
3686
  imagePullPolicy: $(params.image_pull_policy)
3687
3687
 
3688
3688
  workspaces:
@@ -3771,7 +3771,7 @@ spec:
3771
3771
  command:
3772
3772
  - /opt/app-root/src/run-role.sh
3773
3773
  - suite_app_rollback
3774
- image: quay.io/ibmmas/cli:10.0.5
3774
+ image: quay.io/ibmmas/cli:10.0.6
3775
3775
  imagePullPolicy: $(params.image_pull_policy)
3776
3776
  # --------------------------------------------------------------------------------
3777
3777
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-app-uninstall.yaml
@@ -3834,7 +3834,7 @@ spec:
3834
3834
  command:
3835
3835
  - /opt/app-root/src/run-role.sh
3836
3836
  - suite_app_uninstall
3837
- image: quay.io/ibmmas/cli:10.0.5
3837
+ image: quay.io/ibmmas/cli:10.0.6
3838
3838
  imagePullPolicy: $(params.image_pull_policy)
3839
3839
  # --------------------------------------------------------------------------------
3840
3840
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-app-upgrade.yaml
@@ -3909,7 +3909,7 @@ spec:
3909
3909
  command:
3910
3910
  - /opt/app-root/src/run-role.sh
3911
3911
  - suite_app_upgrade
3912
- image: quay.io/ibmmas/cli:10.0.5
3912
+ image: quay.io/ibmmas/cli:10.0.6
3913
3913
  imagePullPolicy: $(params.image_pull_policy)
3914
3914
  # --------------------------------------------------------------------------------
3915
3915
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-app-verify.yaml
@@ -4010,7 +4010,7 @@ spec:
4010
4010
  command:
4011
4011
  - /opt/app-root/src/run-role.sh
4012
4012
  - suite_app_verify
4013
- image: quay.io/ibmmas/cli:10.0.5
4013
+ image: quay.io/ibmmas/cli:10.0.6
4014
4014
  imagePullPolicy: $(params.image_pull_policy)
4015
4015
  # --------------------------------------------------------------------------------
4016
4016
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-certs.yaml
@@ -4153,7 +4153,7 @@ spec:
4153
4153
  command:
4154
4154
  - /opt/app-root/src/run-role.sh
4155
4155
  - suite_certs
4156
- image: quay.io/ibmmas/cli:10.0.5
4156
+ image: quay.io/ibmmas/cli:10.0.6
4157
4157
  imagePullPolicy: $(params.image_pull_policy)
4158
4158
 
4159
4159
  workspaces:
@@ -4220,7 +4220,7 @@ spec:
4220
4220
  command:
4221
4221
  - /opt/app-root/src/run-role.sh
4222
4222
  - suite_config
4223
- image: quay.io/ibmmas/cli:10.0.5
4223
+ image: quay.io/ibmmas/cli:10.0.6
4224
4224
  imagePullPolicy: $(params.image_pull_policy)
4225
4225
  workingDir: /workspace/configs
4226
4226
 
@@ -4291,7 +4291,7 @@ spec:
4291
4291
  command:
4292
4292
  - /opt/app-root/src/run-role.sh
4293
4293
  - suite_db2_setup_for_manage
4294
- image: quay.io/ibmmas/cli:10.0.5
4294
+ image: quay.io/ibmmas/cli:10.0.6
4295
4295
  imagePullPolicy: $(params.image_pull_policy)
4296
4296
  # --------------------------------------------------------------------------------
4297
4297
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-dns.yaml
@@ -4481,7 +4481,7 @@ spec:
4481
4481
  command:
4482
4482
  - /opt/app-root/src/run-role.sh
4483
4483
  - suite_dns
4484
- image: quay.io/ibmmas/cli:10.0.5
4484
+ image: quay.io/ibmmas/cli:10.0.6
4485
4485
  imagePullPolicy: $(params.image_pull_policy)
4486
4486
  # --------------------------------------------------------------------------------
4487
4487
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-install.yaml
@@ -4661,7 +4661,7 @@ spec:
4661
4661
  command:
4662
4662
  - /opt/app-root/src/run-role.sh
4663
4663
  - suite_install
4664
- image: quay.io/ibmmas/cli:10.0.5
4664
+ image: quay.io/ibmmas/cli:10.0.6
4665
4665
  imagePullPolicy: $(params.image_pull_policy)
4666
4666
  workingDir: /workspace/configs
4667
4667
 
@@ -4749,7 +4749,7 @@ spec:
4749
4749
  command:
4750
4750
  - /opt/app-root/src/run-role.sh
4751
4751
  - suite_rollback
4752
- image: quay.io/ibmmas/cli:10.0.5
4752
+ image: quay.io/ibmmas/cli:10.0.6
4753
4753
  imagePullPolicy: $(params.image_pull_policy)
4754
4754
  # --------------------------------------------------------------------------------
4755
4755
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-uninstall.yaml
@@ -4814,7 +4814,7 @@ spec:
4814
4814
  command:
4815
4815
  - /opt/app-root/src/run-role.sh
4816
4816
  - suite_uninstall
4817
- image: quay.io/ibmmas/cli:10.0.5
4817
+ image: quay.io/ibmmas/cli:10.0.6
4818
4818
  imagePullPolicy: $(params.image_pull_policy)
4819
4819
  # --------------------------------------------------------------------------------
4820
4820
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-upgrade.yaml
@@ -4884,7 +4884,7 @@ spec:
4884
4884
  command:
4885
4885
  - /opt/app-root/src/run-role.sh
4886
4886
  - suite_upgrade
4887
- image: quay.io/ibmmas/cli:10.0.5
4887
+ image: quay.io/ibmmas/cli:10.0.6
4888
4888
  imagePullPolicy: $(params.image_pull_policy)
4889
4889
  # --------------------------------------------------------------------------------
4890
4890
  # /home/runner/work/cli/cli/tekton/target/tasks/suite-verify.yaml
@@ -4946,12 +4946,12 @@ spec:
4946
4946
  command:
4947
4947
  - /opt/app-root/src/run-role.sh
4948
4948
  - suite_verify
4949
- image: quay.io/ibmmas/cli:10.0.5
4949
+ image: quay.io/ibmmas/cli:10.0.6
4950
4950
  imagePullPolicy: $(params.image_pull_policy)
4951
4951
 
4952
4952
  # If configmap/approval-suite-verify exists then set CONFIGMAP_KEY=pending and wait for it to be changed to "approved"
4953
4953
  - name: suite-post-verify
4954
- image: quay.io/ibmmas/cli:10.0.5
4954
+ image: quay.io/ibmmas/cli:10.0.6
4955
4955
  imagePullPolicy: $(params.image_pull_policy)
4956
4956
  command:
4957
4957
  - /opt/app-root/src/wait-for-configmap.sh
@@ -5080,7 +5080,7 @@ spec:
5080
5080
  command:
5081
5081
  - /opt/app-root/src/run-role.sh
5082
5082
  - turbonomic
5083
- image: quay.io/ibmmas/cli:10.0.5
5083
+ image: quay.io/ibmmas/cli:10.0.6
5084
5084
  imagePullPolicy: $(params.image_pull_policy)
5085
5085
  # --------------------------------------------------------------------------------
5086
5086
  # /home/runner/work/cli/cli/tekton/target/tasks/uds.yaml
@@ -5161,7 +5161,7 @@ spec:
5161
5161
  # IBM User Data Services (UDS)
5162
5162
  # -------------------------------------------------------------------------
5163
5163
  - name: uds
5164
- image: quay.io/ibmmas/cli:10.0.5
5164
+ image: quay.io/ibmmas/cli:10.0.6
5165
5165
  imagePullPolicy: $(params.image_pull_policy)
5166
5166
  workingDir: /workspace/configs
5167
5167
  command:
@@ -5224,7 +5224,7 @@ spec:
5224
5224
  # IBM Data Reporter Operator (DRO)
5225
5225
  # -------------------------------------------------------------------------
5226
5226
  - name: dro
5227
- image: quay.io/ibmmas/cli:10.0.5
5227
+ image: quay.io/ibmmas/cli:10.0.6
5228
5228
  imagePullPolicy: $(params.image_pull_policy)
5229
5229
  workingDir: /workspace/configs
5230
5230
  command:
@@ -5310,7 +5310,7 @@ spec:
5310
5310
 
5311
5311
  steps:
5312
5312
  - name: update-configmap
5313
- image: quay.io/ibmmas/cli:10.0.5
5313
+ image: quay.io/ibmmas/cli:10.0.6
5314
5314
  command:
5315
5315
  - /opt/app-root/src/update-configmap.sh
5316
5316
  env:
@@ -5372,7 +5372,7 @@ spec:
5372
5372
 
5373
5373
  steps:
5374
5374
  - name: wait-for-configmap
5375
- image: quay.io/ibmmas/cli:10.0.5
5375
+ image: quay.io/ibmmas/cli:10.0.6
5376
5376
  command:
5377
5377
  - /opt/app-root/src/wait-for-configmap.sh
5378
5378
  env:
@@ -5436,7 +5436,7 @@ spec:
5436
5436
 
5437
5437
  steps:
5438
5438
  - name: wait
5439
- image: quay.io/ibmmas/cli:10.0.5
5439
+ image: quay.io/ibmmas/cli:10.0.6
5440
5440
  command:
5441
5441
  - /opt/app-root/src/wait-for-tekton.sh
5442
5442
  env:
@@ -13,18 +13,24 @@ import argparse
13
13
  import sys
14
14
  import logging
15
15
  import logging.handlers
16
- from prompt_toolkit import prompt, print_formatted_text, HTML
16
+ from halo import Halo
17
+ from prompt_toolkit import print_formatted_text, HTML
17
18
  from prompt_toolkit.completion import WordCompleter
18
19
 
19
- from halo import Halo
20
+ from jinja2.exceptions import TemplateNotFound
21
+ from urllib3.exceptions import MaxRetryError
22
+ from openshift.dynamic.exceptions import NotFoundError, ResourceNotFoundError
23
+ from kubeconfig.exceptions import KubectlCommandError
24
+ from kubernetes.client.exceptions import ApiException
20
25
 
21
26
  from mas.cli import __version__ as packageVersion
22
27
  from mas.cli.cli import BaseApp, getHelpFormatter
23
- from mas.cli.validators import InstanceIDValidator, YesNoValidator
28
+ from mas.cli.validators import InstanceIDValidator
29
+
24
30
  from mas.devops.ocp import createNamespace
25
31
  from mas.devops.mas import listMasInstances, verifyMasInstance
26
32
  from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUninstallPipeline
27
- from openshift.dynamic.exceptions import NotFoundError
33
+
28
34
 
29
35
  logger = logging.getLogger(__name__)
30
36
 
@@ -61,25 +67,35 @@ class App(BaseApp):
61
67
  logger.debug("MAS instance ID is set, so we assume already connected to the desired OCP")
62
68
 
63
69
  if self.dynamicClient is None:
64
- print_formatted_text(HTML("<Red>Error: The Kubernetes dynamic Client is not available. See log file for details</Red>"))
65
- sys.exit(1)
70
+ self.fatalError("The Kubernetes dynamic Client is not available. See log file for details")
66
71
 
67
72
  if instanceId is None:
68
73
  # Interactive mode
69
74
  self.printH1("Instance Selection")
70
- print_formatted_text(HTML("<LightSlateGrey>Select a MAS instance to uninstall from the list below:</LightSlateGrey>"))
71
- suites = listMasInstances(self.dynamicClient)
75
+ self.printDescription(["Select a MAS instance to uninstall from the list below:"])
76
+
72
77
  suiteOptions = []
73
- for suite in suites:
74
- print_formatted_text(HTML(f"- <u>{suite['metadata']['name']}</u> v{suite['status']['versions']['reconciled']}"))
75
- suiteOptions.append(suite['metadata']['name'])
78
+ try:
79
+ suites = listMasInstances(self.dynamicClient)
80
+ for suite in suites:
81
+ self.printDescription([f"- <u>{suite['metadata']['name']}</u> v{suite['status']['versions']['reconciled']}"])
82
+ suiteOptions.append(suite['metadata']['name'])
83
+ except ResourceNotFoundError as e:
84
+ self.fatalError("No MAS instances were detected on the cluster (Suite.core.mas.ibm.com/v1 API is not available). See log file for details")
85
+
86
+ if len(suiteOptions) == 0:
87
+ self.fatalError("No MAS instances were detected on the cluster (No instances of Suite.core.mas.ibm.com/v1 found). See log file for details")
76
88
 
77
89
  suiteCompleter = WordCompleter(suiteOptions)
78
90
  print()
79
- instanceId = prompt(HTML(f'<Yellow>Enter MAS instance ID: </Yellow>'), completer=suiteCompleter, validator=InstanceIDValidator(), validate_while_typing=False)
91
+ instanceId = self.promptForString("MAS instance ID", completer=suiteCompleter, validator=InstanceIDValidator())
80
92
 
81
93
  self.printH1("Uninstall MAS Dependencies")
82
- uninstallCertManager = prompt(HTML(f'<Yellow>Uninstall Certificate Manager? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
94
+ self.printDescription([
95
+ "If you choose to uninstall Certificate Manager, all other options will be automatically set to uninstall",
96
+ "Other workload on the cluster may be dependant on the Certificate Manager installation, so proceed with caution when choosing 'Yes'"
97
+ ])
98
+ uninstallCertManager = self.yesOrNo("Uninstall Certificate Manager")
83
99
  if uninstallCertManager:
84
100
  # If you choose to uninstall Cert-Manager, everything will be uninstalled
85
101
  uninstallGrafana = True
@@ -89,30 +105,30 @@ class App(BaseApp):
89
105
  uninstallMongoDb = True
90
106
  uninstallSLS = True
91
107
  else:
92
- uninstallMongoDb = prompt(HTML(f'<Yellow>Uninstall MongoDb? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
108
+ self.printDescription(["If you choose to uninstall MongoDb, IBM Suite License Service will be automatically set to uninstall as well"])
109
+ uninstallMongoDb = self.yesOrNo("Uninstall MongoDb")
93
110
  if uninstallMongoDb:
94
111
  # If you are removing MongoDb then SLS needs to be uninstalled too
95
112
  uninstallSLS = True
96
113
  else:
97
- uninstallSLS = prompt(HTML(f'<Yellow>Uninstall IBM Suite Licensing Service? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
114
+ uninstallSLS = self.yesOrNo("Uninstall IBM Suite Licensing Service")
98
115
 
99
- uninstallGrafana = prompt(HTML(f'<Yellow>Uninstall Grafana? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
100
- uninstallIBMCatalog = prompt(HTML(f'<Yellow>Uninstall IBM Catalog Source? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
116
+ uninstallGrafana = self.yesOrNo("Uninstall Grafana")
117
+ self.printDescription(["If you choose to uninstall the IBM Operator Catalog, IBM Common Services, IBM User Data Services, &amp; IBM Suite License Service will be automatically set to uninstall as well"])
118
+ uninstallIBMCatalog = self.yesOrNo("Uninstall IBM operator Catalog")
101
119
  if uninstallIBMCatalog:
102
120
  # If you choose to uninstall IBM Operator Catalog, everything from the catalog will be uninstalled
103
121
  uninstallCommonServices = True
104
122
  uninstallUDS = True
105
- uninstallMongoDb = True
106
123
  uninstallSLS = True
107
124
  else:
108
- uninstallCommonServices = prompt(HTML(f'<Yellow>Uninstall IBM Common Services? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
109
- uninstallUDS = prompt(HTML(f'<Yellow>Uninstall IBM User Data Services? </Yellow>'), validator=YesNoValidator()) in ["y", "yes"]
125
+ uninstallCommonServices = self.yesOrNo("Uninstall IBM Common Services")
126
+ uninstallUDS = self.yesOrNo("Uninstall IBM User Data Services")
110
127
 
111
128
  else:
112
129
  # Non-interactive mode
113
130
  if not verifyMasInstance(self.dynamicClient, instanceId):
114
- print_formatted_text(HTML(f"<Red>Error: MAS Instance {instanceId} not found on this cluster</Red>"))
115
- sys.exit(1)
131
+ self.fatalError(f"MAS Instance {instanceId} not found on this cluster</Red>")
116
132
 
117
133
  # Default to Red Hat Cert-Manager, and check if IBM cert-manager is installed
118
134
  certManagerProvider="redhat"
@@ -131,20 +147,20 @@ class App(BaseApp):
131
147
  # ibm cert manager not found, proceed with default redhat.
132
148
 
133
149
  self.printH1("Review Settings")
134
- print_formatted_text(HTML(f"<LightSlateGrey>Instance ID ..................... {instanceId}</LightSlateGrey>"))
135
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall Cert-Manager .......... {uninstallCertManager} ({certManagerProvider})</LightSlateGrey>"))
136
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall Grafana ............... {uninstallGrafana}</LightSlateGrey>"))
137
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall IBM Operator Catalog .. {uninstallIBMCatalog}</LightSlateGrey>"))
138
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall IBM Common Services ... {uninstallCommonServices}</LightSlateGrey>"))
139
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall UDS ................... {uninstallUDS}</LightSlateGrey>"))
140
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall MongoDb ............... {uninstallMongoDb}</LightSlateGrey>"))
141
- print_formatted_text(HTML(f"<LightSlateGrey>Uninstall SLS ................... {uninstallSLS}</LightSlateGrey>"))
150
+ self.printSummary("Instance ID", instanceId)
151
+ self.printSummary("Uninstall Cert-Manager", f"{uninstallCertManager} ({certManagerProvider})")
152
+ self.printSummary("Uninstall Grafana", uninstallGrafana)
153
+ self.printSummary("Uninstall IBM Operator Catalog", uninstallIBMCatalog)
154
+ self.printSummary("Uninstall IBM Common Services", uninstallCommonServices)
155
+ self.printSummary("Uninstall UDS", uninstallUDS)
156
+ self.printSummary("Uninstall MongoDb", uninstallMongoDb)
157
+ self.printSummary("Uninstall SLS", uninstallSLS)
142
158
 
143
159
  if not self.noConfirm:
144
160
  print()
145
- continueWithUninstall = prompt(HTML(f'<Yellow>Proceed with these settings?</Yellow> '), validator=YesNoValidator(), validate_while_typing=False)
161
+ continueWithUninstall = self.yesOrNo("Proceed with these settings")
146
162
 
147
- if self.noConfirm or continueWithUninstall in ["y", "yes"]:
163
+ if self.noConfirm or continueWithUninstall:
148
164
  self.printH1("Launch uninstall")
149
165
  pipelinesNamespace = f"mas-{instanceId}-pipelines"
150
166
 
@@ -160,7 +176,7 @@ class App(BaseApp):
160
176
  updateTektonDefinitions(pipelinesNamespace, self.tektonDefsPath)
161
177
  h.stop_and_persist(symbol=self.successIcon, text=f"Latest Tekton definitions are installed (v{self.version})")
162
178
 
163
- with Halo(text='Submitting PipelineRun for {instanceId} uninstall', spinner=self.spinner) as h:
179
+ with Halo(text=f'Submitting PipelineRun for {instanceId} uninstall', spinner=self.spinner) as h:
164
180
  pipelineURL = launchUninstallPipeline(
165
181
  dynClient = self.dynamicClient,
166
182
  instanceId = instanceId,
@@ -282,3 +298,15 @@ if __name__ == '__main__':
282
298
  app.uninstall(args)
283
299
  except KeyboardInterrupt as e:
284
300
  pass
301
+ except ApiException as e:
302
+ logger.exception(e, stack_info=True)
303
+ app.fatalError(message=f"An error occured communicating with the target server: {e.reason} ({e.status})")
304
+ except MaxRetryError as e:
305
+ logger.exception(e, stack_info=True)
306
+ app.fatalError(message="Unable to connect to API server", exception=e)
307
+ except TemplateNotFound as e:
308
+ logger.exception(e, stack_info=True)
309
+ app.fatalError("Could not find template", exception=e)
310
+ except KubectlCommandError as e:
311
+ logger.exception(e, stack_info=True)
312
+ app.fatalError("Could not execute kubectl command", exception=e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mas-cli
3
- Version: 10.0.5
3
+ Version: 10.0.6
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,6 +1,6 @@
1
- mas/cli/__init__.py,sha256=-DVgjebGXVy-3F51xwssmiVp5V0TLDLXO40qf2kKqd4,491
1
+ mas/cli/__init__.py,sha256=KnkdBDbj89We8mdN3boGZ4riEJyDiPWb8CnO-RBY4j0,491
2
2
  mas/cli/cli.py,sha256=mo2z24YRNw13-vQ2QkiixIPTxB81TtadsvLx5iCbka4,8512
3
- mas/cli/displayMixins.py,sha256=Dcr-q02wjGA9Mec2nGqZD42vWKyjqLtmh92s2ZhWHZw,5013
3
+ mas/cli/displayMixins.py,sha256=aIpqoedzKJfaaE8C8FlEvxfWTVahL261rjzPZhdT5q8,5117
4
4
  mas/cli/gencfg.py,sha256=57ik5x73gQBFXPl_8h2byXmV_vhCgxfeSDZk4Wg5-Pw,2102
5
5
  mas/cli/validators.py,sha256=5QwiDQn2EIqJABJyDbHGGaSvlkE38IeJ98d1Czz682A,4550
6
6
  mas/cli/install/__init__.py,sha256=55HhFzQjZrWuEIYRC5-fyGRpiMmC5g17MZJlH9_w7rk,467
@@ -12,7 +12,7 @@ mas/cli/install/settings/db2Settings.py,sha256=mR0XL81Talvwvm1bekw0o9VOwV42QkS0j
12
12
  mas/cli/install/settings/kafkaSettings.py,sha256=bjAji5OZfSBpttiYHKM5B5Lvva8L8PUzi8QSs6opQcE,6997
13
13
  mas/cli/install/settings/manageSettings.py,sha256=3HtyR6-DKiKQDFTWnnxAr5OmkfqKwjI4xnBaAcAjOCI,13229
14
14
  mas/cli/install/settings/turbonomicSettings.py,sha256=OC-sn6_Z6MAq0kf33OC3c96gqT8FT4P7A51PenPiCXw,1368
15
- mas/cli/templates/ibm-mas-tekton.yaml,sha256=b9vOapnSwbYNp__0clGpJx5NTOgw8US2_Bgm7pjp4P8,335567
15
+ mas/cli/templates/ibm-mas-tekton.yaml,sha256=Hf5bgNP3VHBocWeqp-BISf5o7w8VzfxuJoqMdiSODnw,335567
16
16
  mas/cli/templates/jdbccfg.yml.j2,sha256=cANbwkUkKEPQp-P3_BB_Llbt94457Ciagah2hOdySIM,1644
17
17
  mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml,sha256=8VG_FDFcEjWNaAOZTcS58Pe0tWOXC10SJLloNqzEMC8,757
18
18
  mas/cli/templates/pod-templates/best-effort/ibm-mas-bascfg.yml,sha256=rkq8c2pVJoskgict9tCZzCchGSE2MBC-dJ47JyMYm7A,1559
@@ -85,10 +85,10 @@ mas/cli/templates/pod-templates/guaranteed/ibm-mas-suite.yml,sha256=aB-buCWUAqD0
85
85
  mas/cli/templates/pod-templates/guaranteed/ibm-mas-visualinspection.yml,sha256=NiXBlXKe3j2RvroEcx3kCSuD92G6WB-jcpNAYGAg3T0,1975
86
86
  mas/cli/templates/pod-templates/guaranteed/ibm-sls-licenseservice.yml,sha256=CKt1yim4L3ClloVcQDHiXLD8EMvmKXIltmDxJTxNdDs,546
87
87
  mas/cli/templates/pod-templates/saas-essentials/ibm-mas-visualinspection.yml,sha256=4skVNh-8HG55ik0O0QG4jAwiQBRxxrPSRaUwllPYZ_I,1270
88
- mas_cli-10.0.5.data/scripts/mas-install,sha256=Nk2VhyFJ3q8T9_jQnVAEc1CdlJ-G2LMkLkSpeD-iRNs,46763
89
- mas_cli-10.0.5.data/scripts/mas-uninstall,sha256=U4eZcs8UHo3K_h4VyQURMJ4P8OoZZKBOvTUSd7vWaQI,13217
90
- mas_cli-10.0.5.data/scripts/mas-upgrade,sha256=zo8qwVtb5I_37qLlRixQiKGXGUj34Ue-4k-GKliXp7Y,6914
91
- mas_cli-10.0.5.dist-info/METADATA,sha256=uWTjI3m5kUZppebHfsJ6vWrKp72s5Cap7vNwXAROJPI,2076
92
- mas_cli-10.0.5.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
93
- mas_cli-10.0.5.dist-info/top_level.txt,sha256=_Hlsp7pvMvyV14LFg-vk1hULq30j61EILnnxMFIhhc8,4
94
- mas_cli-10.0.5.dist-info/RECORD,,
88
+ mas_cli-10.0.6.data/scripts/mas-install,sha256=Nk2VhyFJ3q8T9_jQnVAEc1CdlJ-G2LMkLkSpeD-iRNs,46763
89
+ mas_cli-10.0.6.data/scripts/mas-uninstall,sha256=BWjphJmzndnfZH1fSmsPkyypSngOso2qp5lT5_YT98g,13960
90
+ mas_cli-10.0.6.data/scripts/mas-upgrade,sha256=zo8qwVtb5I_37qLlRixQiKGXGUj34Ue-4k-GKliXp7Y,6914
91
+ mas_cli-10.0.6.dist-info/METADATA,sha256=7bAyhSVRi5eIQvFeG3Ei6iDQlAQhW0SGIIWJyf7Nv00,2076
92
+ mas_cli-10.0.6.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
93
+ mas_cli-10.0.6.dist-info/top_level.txt,sha256=_Hlsp7pvMvyV14LFg-vk1hULq30j61EILnnxMFIhhc8,4
94
+ mas_cli-10.0.6.dist-info/RECORD,,