Device

class Device(api)

Bases: _DeviceBase

create(name, parent_folder, description=None, contacts=None, address=None, agent_provisioning_mode=None, concurrent_connection_limit=None, device_credential=None, temp_directory=None, os_type=None, jump_server=None, use_sudo=None, sudo_credential=None, enforce_host_key=None, attributes=None, get_if_already_exists=True)
Parameters
  • name (str) – Name of the device object .

  • parent_folder (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the parent folder.

  • description (str) – Description of the device object.

  • contacts (List[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name of the contacts.

  • address (str) – Hostname or IP address of the device.

  • agent_provisioning_mode (bool) – Set provisioning mode to connect via Agent if True.

  • concurrent_connection_limit (int) – Concurrent connection limit to this device.

  • device_credential (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the device credential.

  • temp_directory (str) – Temp directory.

  • os_type (str) – Operating System type.

  • jump_server (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the jump server.

  • use_sudo (bool) – Use sudo.

  • sudo_credential (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the sudo user credential.

  • enforce_host_key (bool) – Enforce host key policy.

  • attributes (dict) – List of attributes pertaining to the device object.

  • get_if_already_exists (bool) – If the objects already exists, just return it as is.

Returns

Config Object of the device object.

delete(device)

Deletes the device object specified.

Parameters

device (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of to the device object.

get(device_dn, raise_error_if_not_exists=True)
Parameters
  • device_dn (str) – Distinguished Name (DN) of the device object.

  • raise_error_if_not_exists (bool) – Raise an exception if the device DN does not exist.

Returns

Config Object of the device object.

scan_for_ssh_keys(device)

Submits Agentless discovery work for the given device.

Parameters

device (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the device object.