F5 LTM Advanced Onboard Discovery
- class F5LtmAdvancedOnboardDiscovery(api)
Bases:
OnboardDiscoveryBase- blackout_schedule(job, sunday=None, monday=None, tuesday=None, wednesday=None, thursday=None, friday=None, saturday=None)
Times of the week to restrict a discovery job from processing.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
sunday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Sunday.
monday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Monday.
tuesday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Tuesday.
wednesday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Wednesday.
thursday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Thursday.
friday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Friday.
saturday (list[Union[str, int]]) – List of hours without leading zeros to restrict processing on Saturday.
- cancel(job)
Cancels a currently running job.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
- create(name, certificates_to_import, port=443, devices_to_scan=None, extract_private_key_if_possible=False, folder_with_devices_to_scan=None, attributes=None, blackout=None, certificate_placement_folder=None, contacts=None, days_of_week=None, days_of_month=None, days_of_year=None, description=None, hour=None, priority=None, reschedule=True, utc='1', get_if_already_exists=True)
Creates an F5 LTM Advanced Onboard Discovery job.
- Parameters:
name (str) – Name of the discovery job.
devices_to_scan (list[Union[str, config.Object]]) – A list of Config Object or Distinguished Name (DN) of the device objects to scan.
folder_with_devices_to_scan (Union[str, config.Object]) – A Config Object or Distinguished Name (DN) of the folder having device objects to scan.
extract_private_key_if_possible (bool) – If
True, extract the private key.certificates_to_import (Union[Literal['server', 'client', 'both'], int]) – Certificate profile from which to import certificates.
port (int) – Connection port.
certificate_placement_folder (Union[str, config.Object]) – A Config Object or Distinguished Name (DN) of the folder to place the certificates.
attributes (dict) – Additional attributes.
blackout (dict[str, List]) – Period of time that TPP will not perform discovery operations. The format of this value should be as follows: [{<day>:[<hour>, <hour>, …]}, {…}] where day is the zero-based index day of the week (i.e. Sunday = ‘0’, etc.) and hour is the 24-hour hour of the day (i.e. 1, 2, 3, …, 23). For example:
contacts (list[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name as contacts.
days_of_week (list[str]) – Zero-based index value of the days of the week to run the job.
days_of_month (list[str]) – Day value(s) of the month to run the job.
days_of_year (list[str]) – Days of the year to run the job in the format “MM/DD” where leading zeros can be ignored (i.e. 1/23, 10/3).
description (str) – Description of the job.
hour (int) – 24-hour UTC hour format of the day (i.e. 20 = 8 PM UTC).
priority (int) – Priority of the job.
reschedule (bool) – When
True, the job will run again on the next scheduled interval.utc (str) – UTC offset.
get_if_already_exists (bool) – If the objects already exists, just return it as is.
- Returns:
Config Object of the discovery job.
- delete(job)
Deletes the discovery job.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
- get(name, raise_error_if_not_exists=True)
- Parameters:
name (str) – Name of the discovery job.
raise_error_if_not_exists (bool) – Raise an exception if the discovery job does not exist.
- Returns:
Config Object of the discovery job.
- get_all_jobs()
- Returns:
List of Config Object of all network discovery jobs.
- is_in_progress(job)
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
- Returns:
Trueif the job is in progress orFalseif it is not.- Return type:
bool
- pause(job)
Pauses a currently running job.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
- resume(job)
Resumes a currently paused job.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
- run_now(job, timeout=60)
Runs a job despite any scheduling. This does not return until the job is processing, or has a Processing Attribute.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
timeout (int) – Timeout in seconds within which the job should start.
- schedule(job, hour, days_of_week=None, days_of_month=None, days_of_year=None)
Schedules an existing job.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
hour (Union[str, int]) – 24-hour UTC hour format (i.e. 20 = 8PM UTC).
days_of_week (list[Union[int, str]]) – Zero-based index of the days of the week (i.e. Sunday = ‘0’).
days_of_month (list[Union[int, str]]) – Days of the month without leading zeros.
days_of_year (list[str]) – Days of the year in “MM/DD” format without leading zeros (i.e. 1/23, 10/3).
- unschedule(job)
Removes a schedule from a job. This does not delete the job.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
- wait_for_job_to_finish(job, check_interval=5, timeout=300)
Waits for the Status attribute to have a value other than Pending Execution and Running on the discovery job. An error is raised if the timeout is exceeded.
- Parameters:
job (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the discovery job.
check_interval (int) – Poll interval in seconds to validate that the job finished.
timeout (int) – Timeout in seconds to wait for the job to finish.