Device
Note
Refer to Authentication for ways to authenticate to the TPP WebSDK.
Creating And Deleting A Device
from pytpp import Authenticate, Features, AttributeValues
api = Authenticate(...)
features = Features(api)
#### CREATE ####
device = features.device.create(
name='awesome_device.com',
parent_folder=r'\VED\Policy\Installations\Awesome Devices',
contacts=['local:AwesomeUser', 'AD+AwesomeAD:user123'],
description='Device description here.',
address='10.10.15.124',
agent_provisioning_mode=AttributeValues.Device.ConnectionMethod.agentless,
concurrent_connection_limit=99,
device_credential=r'\VED\Policy\Administration\Credentials',
temp_directory='/tmp',
os_type=AttributeValues.Device.OSType.linux,
jump_server=f'\VED\Policy\Installations\Awesome Devices\awesome_jump_server.com',
enforce_host_key=True,
)
#### DELETE ####
features.device.delete(device=device)
Scanning A Device For SSH Keys
Note
The device must be part of a client group with SSH Discovery work enabled and assigned to it. See Client Group for more info.
If the group type is agentless, the device must be in a folder where agentless discovery and remediation is enabled.
from pytpp import Authenticate, Features
api = Authenticate(...)
features = Features(api)
features.device.scan_for_ssh_keys(device=r'\VED\Policy\Installations\Awesome Devices\awesome_device.com')