Get uid of user nova and nova_migration

The parser class in this module uses base parser class CommandParser to get uids of the user nova and nova_migration.

Parsers included in this module are:

NovaUID - command id -u nova

NovaMigrationUID - command id -u nova_migration

class insights.parsers.nova_user_ids.NovaMigrationUID(context, extra_bad_lines=None)[source]

Bases: NovaUID

Parse output of id -u nova_migration and get the uid (int).

Typical output of the id -u nova_migration command is:

153

However the id number may vary.

Examples

>>> nova_migration_uid.data
153
data

int if ‘nova_migration’ user exist.

Raises:
  • SkipComponent -- If ‘nova_migration’ user not found or output is empty.

  • ParseException -- For any other output which is not a number or multi-line. Output of such kind are not yet expected from the command id.

class insights.parsers.nova_user_ids.NovaUID(context, extra_bad_lines=None)[source]

Bases: CommandParser

Parse output of id -u nova and get the uid (int).

Typical output of the id -u nova command is:

162

However the id number may vary.

Examples

>>> nova_uid.data
162
data

int if ‘nova’ user exist.

Raises:
  • SkipComponent -- If ‘nova’ user not found or output is empty.

  • ParseException -- For any other output which is not a number or multi-line. Outputs of such kind are not yet expected from the command id.

parse_content(content)[source]

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