diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index e0be02aa9f..a72cefdfc9 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -820,6 +820,7 @@ linux_iwlist_wlan0_scanning.textfsm, .*, linux, iwlist \S+ sc[[anning]] linux_nmcli_connection_show.textfsm, .*, linux, nmcli c[[onnection]] s[[how]] linux_dmidecode_-t_memory.textfsm, .*, linux, dmidecode -t memory linux_dmidecode_-t_system.textfsm, .*, linux, dmidecode -t system +linux_bluetoothctl_show.textfsm, .*, linux, bluetoothctl show linux_dmidecode_-t_bios.textfsm, .*, linux, dmidecode -t bios linux_ip_address_show.textfsm, .*, linux, ip a[[ddress]] [[show]] linux_ip_route_show.textfsm, .*, linux, ip r[[oute]] [[show]] diff --git a/ntc_templates/templates/linux_bluetoothctl_show.textfsm b/ntc_templates/templates/linux_bluetoothctl_show.textfsm new file mode 100644 index 0000000000..e4f3b309ae --- /dev/null +++ b/ntc_templates/templates/linux_bluetoothctl_show.textfsm @@ -0,0 +1,73 @@ +Value CONTROLLER_ID (\S+\s+\(\S+\)) +Value MANUFACTURER_ID (\S+\s+\(\d+\)) +Value VERSION (\S+\s+\(\d+\)) +Value NAME (\S.+\S|\S+) +Value ALIAS (\S.+\S|\S+) +Value CLASS (\S+\s+\(\d+\)) +Value POWERED (\S+) +Value DISCOVERABLE (\S+) +Value DISCOVERABLE_TIMEOUT (\S+\s+\(\d+\)) +Value PAIRABLE (\S+) +Value UUID_MESSAGE_NOTIFICATION_SERVER (\S+) +Value UUID_A_V_REMOTE_CONTROL (\S+) +Value UUID_OBEX_OBJECT_PUSH (\S+) +Value UUID_MESSAGE_ACCESS_SERVER (\S+) +Value UUID_PNP_INFORMATION (\S+) +Value UUID_IRMC_SYNC (\S+) +Value UUID_VENDOR_SPECIFIC (\S+) +Value UUID_AV_REMOTE_CONTROL_TARGET (\S+) +Value UUID_GENERIC_ATTRIBUTE_PROFILE (\S+) +Value UUID_PHONEBOOK_ACCESS_SERVER (\S+) +Value UUID_AUDIO_SINK (\S+) +Value UUID_DEVICE_INFORMATION (\S+) +Value UUID_GENERIC_ACCESS_PROFILE (\S+) +Value UUID_HANDSFREE_AUDIO_GATEWAY (\S+) +Value UUID_AUDIO_SOURCE (\S+) +Value UUID_OBEX_FILE_TRANSFER (\S+) +Value UUID_HANDSFREE (\S+) +Value MODALIAS (\S+) +Value DISCOVERING (\S+) +Value List ROLES (\S+) +Value ACTIVE_INSTANCES (\S+\s+\(\d+\)) +Value SUPPORTED_INSTANCES (\S+\s+\(\d+\)) +Value List SUPPORTED_INCLUDES (\S+) +Value List SUPPORTED_SECONDARY_CHANNELS (\S+) + +Start + ^\s*Controller\s+${CONTROLLER_ID}\s*$$ + ^\s*Manufacturer:\s+${MANUFACTURER_ID}\s*$$ + ^\s*Version:\s+${VERSION}\s*$$ + ^\s*Name:\s+${NAME}\s*$$ + ^\s*Alias:\s+${ALIAS}\s*$$ + ^\s*Class:\s+${CLASS}\s*$$ + ^\s*Powered:\s+${POWERED}\s*$$ + ^\s*Discoverable:\s+${DISCOVERABLE}\s*$$ + ^\s*DiscoverableTimeout:\s+${DISCOVERABLE_TIMEOUT}\s*$$ + ^\s*Pairable:\s+${PAIRABLE}\s*$$ + ^\s*UUID:\s+Message\s+Notification\s+Se\.\.\s+\(${UUID_MESSAGE_NOTIFICATION_SERVER}\)\s*$$ + ^\s*UUID:\s+A\/V\s+Remote\s+Control\s+\(${UUID_A_V_REMOTE_CONTROL}\)\s*$$ + ^\s*UUID:\s+OBEX\s+Object\s+Push\s+\(${UUID_OBEX_OBJECT_PUSH}\)\s*$$ + ^\s*UUID:\s+Message\s+Access\s+Server\s+\(${UUID_MESSAGE_ACCESS_SERVER}\)\s*$$ + ^\s*UUID:\s+PnP\s+Information\s+\(${UUID_PNP_INFORMATION}\)\s*$$ + ^\s*UUID:\s+IrMC\s+Sync\s+\(${UUID_IRMC_SYNC}\)\s*$$ + ^\s*UUID:\s+Vendor\s+specific\s+\(${UUID_VENDOR_SPECIFIC}\)\s*$$ + ^\s*UUID:\s+A\/V\s+Remote\s+Control\s+Target\s+\(${UUID_AV_REMOTE_CONTROL_TARGET}\)\s*$$ + ^\s*UUID:\s+Generic\s+Attribute\s+Profile\s+\(${UUID_GENERIC_ATTRIBUTE_PROFILE}\)\s*$$ + ^\s*UUID:\s+Phonebook\s+Access\s+Server\s+\(${UUID_PHONEBOOK_ACCESS_SERVER}\)\s*$$ + ^\s*UUID:\s+Audio\s+Sink\s+\(${UUID_AUDIO_SINK}\)\s*$$ + ^\s*UUID:\s+Device\s+Information\s+\(${UUID_DEVICE_INFORMATION}\)\s*$$ + ^\s*UUID:\s+Generic\s+Access\s+Profile\s+\(${UUID_GENERIC_ACCESS_PROFILE}\)\s*$$ + ^\s*UUID:\s+Handsfree\s+Audio\s+Gateway\s+\(${UUID_HANDSFREE_AUDIO_GATEWAY}\)\s*$$ + ^\s*UUID:\s+Audio\s+Source\s+\(${UUID_AUDIO_SOURCE}\)\s*$$ + ^\s*UUID:\s+OBEX\s+File\s+Transfer\s+\(${UUID_OBEX_FILE_TRANSFER}\)\s*$$ + ^\s*UUID:\s+Handsfree\s+\(${UUID_HANDSFREE}\)\s*$$ + ^\s*Modalias:\s+${MODALIAS}\s*$$ + ^\s*Discovering:\s+${DISCOVERING}\s*$$ + ^\s*Roles:\s+${ROLES}\s*$$ + ^\s*Advertising\s+Features:\s*$$ + ^\s*ActiveInstances:\s+${ACTIVE_INSTANCES}\s*$$ + ^\s*SupportedInstances:\s+${SUPPORTED_INSTANCES}\s*$$ + ^\s*SupportedIncludes:\s+${SUPPORTED_INCLUDES}\s*$$ + ^\s*SupportedSecondaryChannels:\s+${SUPPORTED_SECONDARY_CHANNELS}\s*$$ + ^\s*$$ + ^. -> Error diff --git a/tests/linux/bluetoothctl_show/linux_bluetoothctl_show.raw b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show.raw new file mode 100644 index 0000000000..dfd74547c7 --- /dev/null +++ b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show.raw @@ -0,0 +1,40 @@ +Controller AA:AA:AA:AA:AA:AA (public) + Manufacturer: 0x005d (93) + Version: 0x0a (10) + Name: ntc-AA-AAAA + Alias: ntc-AA-AAAA + Class: 0x00000000 (0) + Powered: no + Discoverable: no + DiscoverableTimeout: 0x000000b4 (180) + Pairable: yes + UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb) + UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) + UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb) + UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb) + UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) + UUID: IrMC Sync (00001104-0000-1000-8000-00805f9b34fb) + UUID: Vendor specific (00005005-0000-1000-8000-0002ee000001) + UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) + UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) + UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb) + UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb) + UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb) + UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) + UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb) + UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) + UUID: OBEX File Transfer (00001106-0000-1000-8000-00805f9b34fb) + UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb) + Modalias: usb:v1D6Bp0246d0548 + Discovering: no + Roles: central + Roles: peripheral +Advertising Features: + ActiveInstances: 0x00 (0) + SupportedInstances: 0x04 (4) + SupportedIncludes: tx-power + SupportedIncludes: appearance + SupportedIncludes: local-name + SupportedSecondaryChannels: 1M + SupportedSecondaryChannels: 2M + SupportedSecondaryChannels: Coded diff --git a/tests/linux/bluetoothctl_show/linux_bluetoothctl_show.yml b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show.yml new file mode 100644 index 0000000000..2247a3f248 --- /dev/null +++ b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show.yml @@ -0,0 +1,44 @@ +--- +parsed_sample: + - active_instances: "0x00 (0)" + alias: "ntc-AA-AAAA" + class: "0x00000000 (0)" + controller_id: "AA:AA:AA:AA:AA:AA (public)" + discoverable: "no" + discoverable_timeout: "0x000000b4 (180)" + discovering: "no" + manufacturer_id: "0x005d (93)" + modalias: "usb:v1D6Bp0246d0548" + name: "ntc-AA-AAAA" + pairable: "yes" + powered: "no" + roles: + - "central" + - "peripheral" + supported_includes: + - "tx-power" + - "appearance" + - "local-name" + supported_instances: "0x04 (4)" + supported_secondary_channels: + - "1M" + - "2M" + - "Coded" + uuid_a_v_remote_control: "0000110e-0000-1000-8000-00805f9b34fb" + uuid_audio_sink: "0000110b-0000-1000-8000-00805f9b34fb" + uuid_audio_source: "0000110a-0000-1000-8000-00805f9b34fb" + uuid_av_remote_control_target: "0000110c-0000-1000-8000-00805f9b34fb" + uuid_device_information: "0000180a-0000-1000-8000-00805f9b34fb" + uuid_generic_access_profile: "00001800-0000-1000-8000-00805f9b34fb" + uuid_generic_attribute_profile: "00001801-0000-1000-8000-00805f9b34fb" + uuid_handsfree: "0000111e-0000-1000-8000-00805f9b34fb" + uuid_handsfree_audio_gateway: "0000111f-0000-1000-8000-00805f9b34fb" + uuid_irmc_sync: "00001104-0000-1000-8000-00805f9b34fb" + uuid_message_access_server: "00001132-0000-1000-8000-00805f9b34fb" + uuid_message_notification_server: "00001133-0000-1000-8000-00805f9b34fb" + uuid_obex_file_transfer: "00001106-0000-1000-8000-00805f9b34fb" + uuid_obex_object_push: "00001105-0000-1000-8000-00805f9b34fb" + uuid_phonebook_access_server: "0000112f-0000-1000-8000-00805f9b34fb" + uuid_pnp_information: "00001200-0000-1000-8000-00805f9b34fb" + uuid_vendor_specific: "00005005-0000-1000-8000-0002ee000001" + version: "0x0a (10)" diff --git a/tests/linux/bluetoothctl_show/linux_bluetoothctl_show_2.raw b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show_2.raw new file mode 100644 index 0000000000..7504aac673 --- /dev/null +++ b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show_2.raw @@ -0,0 +1,40 @@ +Controller AA:AA:AA:AA:AA:AA (public) + Manufacturer: 0x005d (93) + Version: 0x0a (10) + Name: ntc-AA-AAAA + Alias: ntc-AA-AAAA + Class: 0x007c0104 (8126724) + Powered: yes + Discoverable: yes + DiscoverableTimeout: 0x000000b4 (180) + Pairable: yes + UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb) + UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) + UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb) + UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb) + UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) + UUID: IrMC Sync (00001104-0000-1000-8000-00805f9b34fb) + UUID: Vendor specific (00005005-0000-1000-8000-0002ee000001) + UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) + UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) + UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb) + UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb) + UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb) + UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) + UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb) + UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) + UUID: OBEX File Transfer (00001106-0000-1000-8000-00805f9b34fb) + UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb) + Modalias: usb:v1D6Bp0246d0548 + Discovering: yes + Roles: central + Roles: peripheral +Advertising Features: + ActiveInstances: 0x00 (0) + SupportedInstances: 0x04 (4) + SupportedIncludes: tx-power + SupportedIncludes: appearance + SupportedIncludes: local-name + SupportedSecondaryChannels: 1M + SupportedSecondaryChannels: 2M + SupportedSecondaryChannels: Coded \ No newline at end of file diff --git a/tests/linux/bluetoothctl_show/linux_bluetoothctl_show_2.yml b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show_2.yml new file mode 100644 index 0000000000..82b64c43ac --- /dev/null +++ b/tests/linux/bluetoothctl_show/linux_bluetoothctl_show_2.yml @@ -0,0 +1,44 @@ +--- +parsed_sample: + - active_instances: "0x00 (0)" + alias: "ntc-AA-AAAA" + class: "0x007c0104 (8126724)" + controller_id: "AA:AA:AA:AA:AA:AA (public)" + discoverable: "yes" + discoverable_timeout: "0x000000b4 (180)" + discovering: "yes" + manufacturer_id: "0x005d (93)" + modalias: "usb:v1D6Bp0246d0548" + name: "ntc-AA-AAAA" + pairable: "yes" + powered: "yes" + roles: + - "central" + - "peripheral" + supported_includes: + - "tx-power" + - "appearance" + - "local-name" + supported_instances: "0x04 (4)" + supported_secondary_channels: + - "1M" + - "2M" + - "Coded" + uuid_a_v_remote_control: "0000110e-0000-1000-8000-00805f9b34fb" + uuid_audio_sink: "0000110b-0000-1000-8000-00805f9b34fb" + uuid_audio_source: "0000110a-0000-1000-8000-00805f9b34fb" + uuid_av_remote_control_target: "0000110c-0000-1000-8000-00805f9b34fb" + uuid_device_information: "0000180a-0000-1000-8000-00805f9b34fb" + uuid_generic_access_profile: "00001800-0000-1000-8000-00805f9b34fb" + uuid_generic_attribute_profile: "00001801-0000-1000-8000-00805f9b34fb" + uuid_handsfree: "0000111e-0000-1000-8000-00805f9b34fb" + uuid_handsfree_audio_gateway: "0000111f-0000-1000-8000-00805f9b34fb" + uuid_irmc_sync: "00001104-0000-1000-8000-00805f9b34fb" + uuid_message_access_server: "00001132-0000-1000-8000-00805f9b34fb" + uuid_message_notification_server: "00001133-0000-1000-8000-00805f9b34fb" + uuid_obex_file_transfer: "00001106-0000-1000-8000-00805f9b34fb" + uuid_obex_object_push: "00001105-0000-1000-8000-00805f9b34fb" + uuid_phonebook_access_server: "0000112f-0000-1000-8000-00805f9b34fb" + uuid_pnp_information: "00001200-0000-1000-8000-00805f9b34fb" + uuid_vendor_specific: "00005005-0000-1000-8000-0002ee000001" + version: "0x0a (10)"