summaryrefslogtreecommitdiff
path: root/units
diff options
authorPMR <pmr@pmr-lander>2019-05-29 15:17:12 +0000
committerPMR <pmr@pmr-lander>2019-05-29 15:17:12 +0000
commitf6c2e95152a8ad2fd77b68a8b1d7946be056fbaf (patch)
treeb8b82062475f94d25d9cc5b2ad78ca5fd6f4d455 /units
parentb0d1e33fb407dfa299574396c868dce33c639ff4 (diff)
parent5d905d4a9bee69919589e85dca7ab9980f213081 (diff)
Merge #367991 from ~jocave/plainbox-provider-checkbox:network-device-info-rework
Diffstat (limited to 'units')
-rw-r--r--units/ethernet/jobs.pxu19
-rw-r--r--units/ethernet/test-plan.pxu6
-rw-r--r--units/info/jobs.pxu2
-rw-r--r--units/networking/jobs.pxu3
-rw-r--r--units/wireless/jobs.pxu12
-rw-r--r--units/wireless/manifest.pxu4
6 files changed, 37 insertions, 9 deletions
diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu
index b5f068a..103a7b3 100644
--- a/units/ethernet/jobs.pxu
+++ b/units/ethernet/jobs.pxu
@@ -2,7 +2,7 @@ plugin: shell
category_id: com.canonical.plainbox::ethernet
id: ethernet/detect
flags: also-after-suspend
-command: network_device_info.py detect
+command: network_device_info.py detect NETWORK
estimated_duration: 2.0
_summary:
Detect if at least one ethernet device is detected
@@ -18,14 +18,27 @@ id: ethernet/info_automated
requires:
executable.name == 'ip'
device.category == 'NETWORK'
-command: udev_resource -f NETWORK | awk "/interface: / { print \$2 }" | xargs -n 1 network_info
-estimated_duration: 30.0
+command: network_device_info.py detect NETWORK
+estimated_duration: 2.0
_summary:
Gather info on current state of network devices
_description:
Gathers some info on the current state of your network devices. If no devices
are found, the test will exit with an error.
+plugin: shell
+category_id: com.canonical.plainbox::ethernet
+id: ethernet/info_automated_server
+requires:
+ device.category == 'NETWORK'
+user: root
+command: network_device_info.py info NETWORK --no-nm
+estimated_duration: 2.0
+_summary:
+ Provide information about detected ethernet devices
+_description:
+ This job provides detailed information about detected ethernet devices.
+
plugin: user-interact-verify
category_id: com.canonical.plainbox::ethernet
id: ethernet/wired_connection
diff --git a/units/ethernet/test-plan.pxu b/units/ethernet/test-plan.pxu
index ec2310f..986c886 100644
--- a/units/ethernet/test-plan.pxu
+++ b/units/ethernet/test-plan.pxu
@@ -62,8 +62,7 @@ _name: Server Ethernet Tests
_description: Automated ethernet tests for server certification
estimated_duration: 4h
include:
- ethernet/detect
- ethernet/info_automated
+ ethernet/info_automated_server
ethernet/ethtool_info
ethernet/ethertool_check_.*
ethernet/multi_iperf3_nic_device.*
@@ -74,8 +73,7 @@ _name: Server Ethernet Tests (Speed Check Disabled)
_description: Automated ethernet tests for server certification without speed check
estimated_duration: 4h
include:
- ethernet/detect
- ethernet/info_automated
+ ethernet/info_automated_server
ethernet/ethtool_info
ethernet/ethertool_check_.*
ethernet/multi_iperf3_nic_underspeed_device.*
diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu
index 2e1b120..69448a5 100644
--- a/units/info/jobs.pxu
+++ b/units/info/jobs.pxu
@@ -310,7 +310,7 @@ _description: Lists the device driver and version for all audio devices.
plugin: attachment
category_id: com.canonical.plainbox::info
id: info/network_devices
-command: network_device_info.py info
+command: network_device_info.py info NETWORK
estimated_duration: 0.550
_description: Provides information about network devices
diff --git a/units/networking/jobs.pxu b/units/networking/jobs.pxu
index 360aaf2..c5f5c9f 100644
--- a/units/networking/jobs.pxu
+++ b/units/networking/jobs.pxu
@@ -14,7 +14,8 @@ category_id: com.canonical.plainbox::networking
id: networking/info_device{__index__}_{interface}
_summary: Network Information of device {__index__} ({interface})
estimated_duration: 1.0
-command: network_info {interface} | zenity --text-info --title="{interface}"
+command:
+ network_device_info.py info NETWORK --interface {interface} | zenity --text-info --title="{interface}"
_description:
PURPOSE:
This test will check the network device {__index__} ({interface})
diff --git a/units/wireless/jobs.pxu b/units/wireless/jobs.pxu
index b3d6604..80fde85 100644
--- a/units/wireless/jobs.pxu
+++ b/units/wireless/jobs.pxu
@@ -1,3 +1,15 @@
+
+id: wireless/detect
+category_id: com.canonical.plainbox::wireless
+plugin: shell
+flags: also-after-suspend
+estimated_duration: 2.0
+_summary: Detect if at least one Wireless LAN device is detected
+imports: from com.canonical.plainbox import manifest
+requires: manifest.has_wlan_adapter == 'True'
+command:
+ network_device_info.py detect WIRELESS
+
unit: template
template-resource: device
template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN'
diff --git a/units/wireless/manifest.pxu b/units/wireless/manifest.pxu
new file mode 100644
index 0000000..ed92bf6
--- /dev/null
+++ b/units/wireless/manifest.pxu
@@ -0,0 +1,4 @@
+unit: manifest entry
+id: has_wlan_adapter
+_name: A WLAN Adapter
+value-type: bool