Creds

class baboossh.Creds(creds_type, creds_content)[source]

The credentials to authenticate with on servers.

The Creds class is an interface to handle various Extension s for different authentication methods. It provides a set of methods that are agnostic of the underlying method, and delegate dedicated work to the corresponding Extension

creds_type

the key of the corresponding authentication method extension

Type

str

creds_content

the credentials content as serialized by the method’s extension class

Type

str

obj

the credentials as an Object corresponding to its type

Type

Object

id

the credentials id

Type

int

scope

Whether the Creds is in scope or not

Type

bool

found

The Endpoint on which the Creds was discovered

Type

Endpoint

__init__(creds_type, creds_content)[source]

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

Methods

__init__(creds_type, creds_content)

Initialize self.

delete()

Delete a Creds from the Workspace

edit()

Edit the Creds object parameters

find_all([scope, found])

Find all Creds

find_one(creds_id)

Find a Creds by its id

get_id(creds_type, creds_content)

save()

Save the Creds to the Workspace ‘s database

show()

Show the Creds object and its parameters

Attributes

kwargs

Return the Creds as a dict compatible with fabric.Connection

delete()[source]

Delete a Creds from the Workspace

edit()[source]

Edit the Creds object parameters

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

Find all Creds

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

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

Returns

A list of all Creds in the Workspace

classmethod find_one(creds_id)[source]

Find a Creds by its id

Parameters

creds_id (int) – the Creds id to search

Returns

A single Creds or None.

property kwargs

Return the Creds as a dict compatible with fabric.Connection

save()[source]

Save the Creds to the Workspace ‘s database

show()[source]

Show the Creds object and its parameters