# OpenShift Get commands with configuration file¶

The commands set is similar to the oc get commands. It is used to display openshift resources. It uses the master configuration file rather than the default configuration when communicated with the client API. It makes sure this command will only be executed on the master node of an OpenShift cluster. This command will also not include the commands which display large size outputs.

Parsers included in this module are:

## OcGetClusterRoleBindingWithConfig - command oc get clusterrolebinding --config /etc/origin/master/admin.kubeconfig¶

class insights.parsers.openshift_get_with_config.OcGetClusterRoleBindingWithConfig(context, extra_bad_lines=None)[source]

Class to parse oc get clusterrolebinding --config /etc/origin/master/admin.kubeconfig

data

List of dicts, each dict containing one row of the table

Type

list

rolebinding

It is a dictionary in which the key is rolebinding name and the value is the role.

Type

dict

A typical sample of the content of this file looks like:

NAME                                                                  ROLE                                                                   USERS                            GROUPS                                         SERVICE ACCOUNTS                                                                   SUBJECTS
asb-access                                                            /asb-access                                                                                                                                            openshift-ansible-service-broker/asb-client
asb-auth                                                              /asb-auth                                                                                                                                              openshift-ansible-service-broker/asb
auth-delegator-openshift-template-service-broker                      /system:auth-delegator                                                                                                                                 openshift-template-service-broker/apiserver
basic-users                                                           /basic-user                                                                                             system:authenticated


Examples

>>> type(oc_get_clusterrolebinding_with_config)
<class 'insights.parsers.openshift_get_with_config.OcGetClusterRoleBindingWithConfig'>

parse_content(content)[source]

This method must be implemented by classes based on this class.

class insights.parsers.openshift_get_with_config.OcGetClusterRoleWithConfig(context, extra_bad_lines=None)[source]

Class to parse oc get clusterrole --config /etc/origin/master/admin.kubeconfig

A typical sample of the content of this file looks like:

NAME
asb-access
asb-auth
basic-user
cluster-debugger
cluster-status
edit
namespace-viewer

>>> type(oc_get_cluster_role_with_config)

parse_content(content)[source]