Skip to main content

Python Admin CLI for Maximo Application Suite

Project description

mas.devops

Example

from openshift import dynamic
from kubernetes import config
from kubernetes.client import api_client

from mas.devops.ocp import createNamespace
from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline

instanceId = "mymas"
pipelinesNamespace = f"mas-{instanceId}-pipelines"

# Create an OpenShift client
dynClient = dynamic.DynamicClient(
    api_client.ApiClient(configuration=config.load_kube_config())
)

# Install OpenShift Pipelines Operator
success = installOpenShiftPipelines(dynamicClient)
assert success is True

# Create the pipelines namespace and install the MAS tekton definitions
createNamespace(dynamicClient, pipelinesNamespace)
updateTektonDefinitions(pipelinesNamespace)

# Launch the upgrade pipeline and print the URL to view the pipeline run
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId)
print(pipelineURL)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mas_cli-21.5.0.tar.gz (328.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mas_cli-21.5.0-py3-none-any.whl (393.5 kB view details)

Uploaded Python 3

File details

Details for the file mas_cli-21.5.0.tar.gz.

File metadata

  • Download URL: mas_cli-21.5.0.tar.gz
  • Upload date:
  • Size: 328.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mas_cli-21.5.0.tar.gz
Algorithm Hash digest
SHA256 a692242086318c616ae53df85c72c47065752c2b6ace46b1c8654054dbd297b1
MD5 c3caa34d72ff334d493ddac8b41e9e82
BLAKE2b-256 4c286a4835afceadcba0b64fe46fee1b1642dcc4236d0b507daa8fcbc8eb2822

See more details on using hashes here.

File details

Details for the file mas_cli-21.5.0-py3-none-any.whl.

File metadata

  • Download URL: mas_cli-21.5.0-py3-none-any.whl
  • Upload date:
  • Size: 393.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mas_cli-21.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc7d6fe45a1601f08279838dea4ce8f679c3ca25d16468102c5febcba66efd39
MD5 532bb40cb42ac3a853de046abac31ed1
BLAKE2b-256 a0b32326064b9e1f437e7e187474a5927089c48fad5779b9da7a3e5d21a97334

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page