Skip to content

Commit

Permalink
Modify requires section for the job using wifi_interface_mode resourc…
Browse files Browse the repository at this point in the history
…e job
  • Loading branch information
rickwu666666 committed Sep 2, 2024
1 parent 13dcdb6 commit e48cbca
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions providers/base/units/wireless/nm-hotspot.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ category_id: wifi_ap
estimated_duration: 10
flags: preserve-locale also-after-suspend
requires:
wifi_interface_mode.{{ interface }}_AP == 'supported'
( wifi_interface_mode.interface == '{{ interface }}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{{ interface }}' and net_if_management.master_mode_managed_by == 'NetworkManager'
{%- if __on_ubuntucore__ %}
connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
Expand All @@ -39,7 +39,7 @@ category_id: wifi_ap
estimated_duration: 10
flags: preserve-locale also-after-suspend
requires:
wifi_interface_mode.{{ interface }}_AP == 'supported'
( wifi_interface_mode.interface == '{{ interface }}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{{ interface }}' and net_if_management.master_mode_managed_by == 'NetworkManager'
{%- if __on_ubuntucore__ %}
connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
Expand Down
58 changes: 29 additions & 29 deletions providers/base/units/wireless/wifi-ap.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ category_id: wifi_ap
_summary: Create open 802.11a Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -65,7 +65,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -81,7 +81,7 @@ category_id: wifi_ap
_summary: Create open 802.11b Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -138,7 +138,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -154,7 +154,7 @@ category_id: wifi_ap
_summary: Create open 802.11g Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -211,7 +211,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -227,7 +227,7 @@ category_id: wifi_ap
_summary: Create open 802.11ad Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -284,7 +284,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -300,7 +300,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11a Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -359,7 +359,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -375,7 +375,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11b Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{{ interface }}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -434,7 +434,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -450,7 +450,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11g Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -507,7 +507,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -523,7 +523,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with no STA (Manual)
plugin: manual
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
_purpose:
Expand Down Expand Up @@ -582,7 +582,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand All @@ -598,7 +598,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11a Wi-Fi AP on {interface} with active STA (Manual)
plugin: user-interact-verify
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
Expand Down Expand Up @@ -637,7 +637,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11a Wi-Fi Access Point on {interface} with active STA
plugin: shell
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
Expand Down Expand Up @@ -686,7 +686,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11b Wi-Fi AP on {interface} with active STA (Manual)
plugin: user-interact-verify
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
Expand Down Expand Up @@ -725,7 +725,7 @@ category_id: wifi_ap
_summary: Create a WPA2 802.11b Wi-Fi Access Point on {interface} with active STA
plugin: shell
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
Expand Down Expand Up @@ -774,7 +774,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11g Wi-Fi AP on {interface} with active STA (Manual)
plugin: user-interact-verify
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
Expand Down Expand Up @@ -813,7 +813,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11g Wi-Fi Access Point on {interface} with active STA
plugin: shell
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
Expand Down Expand Up @@ -862,7 +862,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with active STA (Manual)
plugin: user-interact-verify
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
Expand Down Expand Up @@ -901,7 +901,7 @@ category_id: wifi_ap
_summary: Create WPA2 802.11ad Wi-Fi Access Point on {interface} with active STA
plugin: shell
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
Expand Down Expand Up @@ -950,7 +950,7 @@ category_id: wifi_ap
_summary: Create Access Point on {interface} using wifi-ap.setup-wizard
plugin: shell
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 20.0
user: root
Expand Down Expand Up @@ -998,7 +998,7 @@ command:
echo "Rebooting"
reboot
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand Down Expand Up @@ -1035,7 +1035,7 @@ command:
sleep "${{WIFI_AP_SETUPTIME:-10}}"
reboot
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
estimated_duration: 120.0
environ: WIFI_AP_SETUPTIME
Expand Down Expand Up @@ -1067,7 +1067,7 @@ command:
exit 1;
fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
depends: wireless/wifi_ap_across_reboot_{interface}_setup
estimated_duration: 120.0
Expand All @@ -1093,7 +1093,7 @@ command:
wifi-ap.config set disabled=true
if [ "$RES" -eq 2 ]; then exit 0; else exit 1; fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
( wifi_interface_mode.interface == '{interface}' and wifi_interface_mode.AP == 'supported' )
net_if_management.device == '{interface}' and net_if_management.master_mode_managed_by == 'wifi-ap'
depends: wireless/wifi_ap_across_reboot_{interface}_setup_manual
estimated_duration: 120.0
Expand Down

0 comments on commit e48cbca

Please sign in to comment.