Skip to content

Commit

Permalink
feat: IsWirelessSynchronized is optional in wireless configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
madhavilosetty-intel committed Nov 5, 2024
1 parent 8937ac1 commit ce0fa4f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ enterpriseAssistant:
eaAddress: '' # Address of the EA server (example: https://<your EA Address>:8000)
eaUsername: '' # Username for the EA server given in EA Settings
eaPassword: '' # Password for the EA server given in EA Settings
isWirelessSynchronized: true
wifiConfigs:
- profileName: 'exampleWifiWPA2' # friendly name, alphanumeric only
ssid: 'exampleSSID'
Expand Down
17 changes: 9 additions & 8 deletions internal/config/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ package config

type (
Config struct {
Password string `yaml:"password"`
TlsConfig TlsConfig `yaml:"tlsConfig"`
WiredConfig EthernetConfig `yaml:"wiredConfig"`
WifiConfigs []WifiConfig `yaml:"wifiConfigs"`
Ieee8021xConfigs []Ieee8021xConfig `yaml:"ieee8021xConfigs"`
ACMSettings ACMSettings `yaml:"acmactivate"`
EnterpriseAssistant EnterpriseAssistant `yaml:"enterpriseAssistant"`
CCMSettings CCMSettings `yaml:"ccmactivate"`
Password string `yaml:"password"`
TlsConfig TlsConfig `yaml:"tlsConfig"`
WiredConfig EthernetConfig `yaml:"wiredConfig"`
WifiConfigs []WifiConfig `yaml:"wifiConfigs"`
IsWirelessSynchronized bool `yaml:"isWirelessSynchronized"`
Ieee8021xConfigs []Ieee8021xConfig `yaml:"ieee8021xConfigs"`
ACMSettings ACMSettings `yaml:"acmactivate"`
EnterpriseAssistant EnterpriseAssistant `yaml:"enterpriseAssistant"`
CCMSettings CCMSettings `yaml:"ccmactivate"`
}
TlsConfig struct {
Delay int `yaml:"delay" env-default:"3"`
Expand Down
1 change: 1 addition & 0 deletions internal/flags/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ func (f *Flags) handleAddWifiSettings() error {
}

f.LocalConfig.WifiConfigs = append(f.LocalConfig.WifiConfigs, newWifiConfig)
f.LocalConfig.IsWirelessSynchronized = f.LocalConfigV2.Configuration.Network.Wireless.IsWirelessSynchronized
}

} else {
Expand Down
8 changes: 5 additions & 3 deletions internal/local/wifi.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ func (service *ProvisioningService) AddWifiSettings() (err error) {
return utils.WiFiConfigurationFailed
}

err = service.EnableWifiPort()
if err != nil {
return err
if service.flags.LocalConfig.IsWirelessSynchronized {
err = service.EnableWifiPort()
if err != nil {
return err
}
}

return service.ProcessWifiConfigs()
Expand Down

0 comments on commit ce0fa4f

Please sign in to comment.