Created
January 12, 2018 14:06
-
-
Save abrodersen/b36ed6d8ac6277e379d829db6e95759b to your computer and use it in GitHub Desktop.
Reconfix schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
config_txt: { | |
type: 'json', | |
location: { | |
partition: adaptPartition(config.partition), | |
path: adaptPath(config.path) | |
}, | |
properties: [ | |
{ | |
definition: { | |
persistentLogging: { | |
type: ['string'], | |
mapping: ['/persistentLogging'], | |
optional: true, | |
}, | |
hostname: { | |
type: ['string'], | |
mapping: ['/hostname'], | |
optional: true, | |
} | |
} | |
} | |
] | |
}, | |
resin_wifi: { | |
type: 'ini', | |
location: { | |
partition: adaptPartition(config.partition), | |
path: adaptPath(config.path) | |
}, | |
properties: [{ | |
definition: { | |
wifi: { | |
properties: [{ | |
definition: { | |
enabled: { | |
type: ['boolean'], | |
optional: true, | |
mapping: [{ | |
value: true, | |
template: { | |
connection: { | |
id: 'resin-wifi', | |
type: 'wifi' | |
}, | |
wifi: { | |
hidden: true, | |
mode: 'infrastructure', | |
ssid: '[[string]]' | |
}, | |
'wifi-security': { | |
'auth-alg': 'open', | |
'key-mgmt': 'wpa-psk', | |
'psk': '[[string]]' | |
}, | |
ipv4: { | |
method: 'auto' | |
}, | |
ipv6: { | |
'addr-gen-mode': 'stable-privacy', | |
method: 'auto' | |
} | |
} | |
}] | |
}, | |
} | |
}, | |
{ | |
when: { | |
wifi: { | |
enabled: true | |
} | |
}, | |
definition: { | |
'networkSsid': { | |
type: ['string'], | |
mapping: ['/wifi/ssid'] | |
}, | |
'networkKey': { | |
type: ['string'], | |
mapping: ['/wifi-security/psk'] | |
} | |
} | |
}] | |
} | |
} | |
}] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment