User

class baboossh.User(name)[source]

A username to authenticate with on servers.

name

the username

Type

str

id

the User’s id

Type

int

scope

whether the User is in the scope or not

Type

bool

found

the endpoint the user was discovered on

Type

Endpoint

__init__(name)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(name)

Initialize self.

delete()

Delete a User from the Workspace

find_all([scope, found])

Find all Users corresponding to criteria

find_one([user_id, name])

Find a user matching the criteria

get_id(name)

save()

Save the user in database

delete()[source]

Delete a User from the Workspace

classmethod find_all(scope=None, found=None)[source]

Find all Users corresponding to criteria

Parameters
  • scope (bool) – List Users in scope (True), out of scope (False), or both (None)

  • found (Endpoint) – the Endpoint the users were discovered on

Returns

A list of all User s in the Workspace matching the criteria

classmethod find_one(user_id=None, name=None)[source]

Find a user matching the criteria

Parameters
  • user_id (int) – the user id to search

  • name (str) – the username to search

Returns

A single User or None.

save()[source]

Save the user in database

If the User object has an id it means it is already stored in database, so it is updated. Else it is inserted and the id is set in the object.