Giter VIP home page Giter VIP logo

satellite-cert-pprint's Introduction

Overview

Script to 'pretty print' a Red Hat Satellite 5 certificate. As a Satellite 5 user, I work with a LOT of Satellite certificates, and I needed a means to print them out in a manner more conducive to email/pastebin.

Requirements

  • Python >= 2.6
  • One Satellite 5.x entitlement cert.

Usage

↪ ./satellite-cert-pprint.py -f ~/Megacorp-sat5.cert

Help Output

↪ ./satellite-cert-pprint.py -h
Usage: satellite-cert-pprint.py [options]

Options:
  -h, --help            show this help message and exit
  -f FILENAME, --filename=FILENAME
                        path to Satellite Entitlement certificate
  --family=FAMILY       print only channel families that have this string

Example Output

↪ ./satellite-cert-pprint.py -f ~/Megacorp-sat5.cert
================================================================================
Filename                                       /home/satadmin/Megacorp-sat5.cert
Showing all channel families
================================================================================
product                                                         MegaCorp - Sat 5
owner                                                                   MEGACORP
issued                                                       2015-10-21 16:27:34
expires                                                      2021-12-31 00:00:00
slots                                                                    1026466
monitoring-slots                                                          525000
provisioning-slots                                                       1026461
virtualization_host                                                        25460
virtualization_host_platform                                               25000
================================================================================
Channel Family                                         Quantity             Flex
================================================================================
rhel-server-7                                            526005           500500
rhel-server-7-eus                                        525003           500000
rhel-server-7-fastrack                                     1001              500
rhel-server-7-ha                                         525966           500500
rhel-server-7-ha-eus                                     525000           500000
rhel-server-7-ha-htb                                     525000           500000
rhel-server-7-htb                                        525000           500000
rhel-server-7-lb                                         525000           500000
rhel-server-7-lb-htb                                     525000           500000
rhel-server-7-optional                                   526001           500500
rhel-server-7-optional-eus                               525000           500000
rhel-server-7-optional-htb                               525000           500000
rhel-server-7-oracle-java                                526003           500500
rhel-server-7-oracle-java-eus                            525003           500000
rhel-server-7-rh-common                                  526001           500500
rhel-server-7-rhgs                                       525003           500000
rhel-server-7-rhgs-bigdata                               525003           500000
rhel-server-7-rhgs-rhsc                                  525003           500000
rhel-server-7-rhscl-1                                    525541           500500
rhel-server-7-rhscl-1-eus                                525000           500000
rhel-server-7-rhsclient                                   20000            10000
rhel-server-7-rs                                         525000           500000
rhel-server-7-rs-eus                                     525000           500000
rhel-server-7-rs-htb                                     525000           500000
rhel-server-7-sap                                        525000           500000
rhel-server-7-v2vwin                                     526001           500500
================================================================================
satellite-version                                                            5.7
generation                                                                     2
================================================================================

Example Output using the --family option

The --family option can be used to limit which channel families I wish to print. For instance, if I wanted to limit the output to only families which included sap and rhgs, I could run:

↪ ./satellite-cert-pprint.py -f ~/Megacorp-sat5.cert --family sap --family rhgs
================================================================================
Filename                                       /home/satadmin/Megacorp-sat5.cert
Viewing only channel families listed below
sap
rhgs
================================================================================
product                                                         MegaCorp - Sat 5
owner                                                                   MEGACORP
issued                                                       2015-10-21 16:27:34
expires                                                      2021-12-31 00:00:00
slots                                                                    1026466
monitoring-slots                                                          525000
provisioning-slots                                                       1026461
virtualization_host                                                        25460
virtualization_host_platform                                               25000
================================================================================
Channel Family                                         Quantity             Flex
================================================================================
rhel-server-7-rhgs                                       525003           500000
rhel-server-7-rhgs-bigdata                               525003           500000
rhel-server-7-rhgs-rhsc                                  525003           500000
rhel-server-7-sap                                        525000           500000
================================================================================
satellite-version                                                            5.7
generation                                                                     2
================================================================================

satellite-cert-pprint's People

Contributors

sideangleside avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.