2bit Thoughts
  • Home
  • Author
Sign in Subscribe

python

A collection of 3 posts
automation

Mute and Unmute Checks in Morpheus with Python

If you are using Morpheus for monitoring and you want to mute check in a Jenkins task or similar, here's a quick Python script to mute a task by name: from pymorpheus import MorpheusClient import os # env vars from jenkins secrets morpheusUrl = os.environ['morpheusUrl'] morpheusToken
24 Feb 2022 1 min read
ansible

Testing an Ansible Collection - Part 2 - Testing the Collection

There are different aspects to testing a collection you intend to publish to Ansible Galaxy.  Flake8 and ansible-lint are run, and meta/runtime.yml must be present in order to successfully import your collection.  Once again, test everything you can beforehand, because there is no deleting content once accepted by
18 Feb 2022 2 min read
snippet

Paging Morpheus API in Python

Using Morpheus' API is something that comes up very often, and there have been a few bad habits that I've noticed.  I myself have been guilty of using large maximum values when hitting endpoints.  eg. <api>/networks?max=10000 I came up with the following
17 Feb 2022 1 min read
Page 1 of 1
2bit Thoughts © 2025
Powered by Ghost