Uh oh!
There was an error while loading. Please reload this page.
Ubiquiti airFiber Parser - #329
Conversation
itdependsnetworks
commented
Jul 31, 2023
I think the only thing to consider is the name of the OS. |
gt732
commented
Aug 1, 2023
@itdependsnetworks I updated the parser to be the OS of the device "airos". Let me know if you need me to update anything else. Thanks for reviewing!! |
jeffkala
commented
Aug 2, 2023
@gt732 is the airfiber not running unifiOS? Just curious if this same parser would work for the whole Ubiquiti family that run unifiOS |
gt732
commented
Aug 2, 2023
@jeffkala I don't have any other ubiquiti devices with me so I can't confirm. I work for a WISP so mostly long distance wireless radios. The airfiber/airmax radios from ubiquiti use a OS called "airOS". The configs for these devices are pretty basic flat files. |
jeffkala
commented
Aug 3, 2023
Does appear that the airfiber os config file is slightly different then the standard unifi OS config properties. I'd say in general I'm good with the os name now. Will review the rest of the PR. |
| config_lines = [] | ||
| config = self.config.strip() | ||
| for line in config.splitlines(): | ||
| if line and line != "##" and not self.is_comment(line): |
There was a problem hiding this comment.
Isn't any number of # a comment line?
| ConfigLine(config_line="#board.sysid=0xaf01", parents=()), | ||
| ConfigLine(config_line="#board.cpurevision=0x4e840102", parents=()), | ||
| ConfigLine(config_line="#board.name=airFiber 24G", parents=()), | ||
| ConfigLine(config_line="#board.shortname=AF24", parents=()), | ||
| ConfigLine(config_line="#board.subtype=", parents=()), | ||
| ConfigLine(config_line="#board.netmodes=16;", parents=()), | ||
| ConfigLine(config_line="#board.hwaddr=802AA8CF8DB6", parents=()), | ||
| ConfigLine(config_line="#board.reboot=130", parents=()), | ||
| ConfigLine(config_line="#board.upgrade=330", parents=()), | ||
| ConfigLine(config_line="#board.phycount=1", parents=()), | ||
| ConfigLine(config_line="#board.phy.1.maxmtu=1500", parents=()), | ||
| ConfigLine(config_line="#board.gps=1", parents=()), | ||
| ConfigLine(config_line="#board.airfiber=1", parents=()), | ||
| ConfigLine(config_line="#board.portnumber=1", parents=()), | ||
| ConfigLine(config_line="#board.fdd=1", parents=()), | ||
| ConfigLine(config_line="#feature.gps=1", parents=()), | ||
| ConfigLine(config_line="#feature.rssi.leds=0", parents=()), | ||
| ConfigLine(config_line="#feature.gps.leds=0", parents=()), | ||
| ConfigLine(config_line="#radio.1.name=", parents=()), | ||
| ConfigLine(config_line="#radio.1.shortname=", parents=()), | ||
| ConfigLine(config_line="#radio.1.bus=spi", parents=()), | ||
| ConfigLine(config_line="#radio.1.rf_revision=0x0000", parents=()), | ||
| ConfigLine(config_line="#radio.1.subsystemid=0xaf01", parents=()), | ||
| ConfigLine(config_line="#radio.1.subvendorid=0x0777", parents=()), | ||
| ConfigLine(config_line="#radio.1.txpower.max=43", parents=()), | ||
| ConfigLine(config_line="#radio.1.txpower.offset=0", parents=()), | ||
| ConfigLine(config_line="#radio.1.antennas=1", parents=()), | ||
| ConfigLine(config_line="#radio.1.def_antenna=4", parents=()), | ||
| ConfigLine(config_line="#radio.1.antenna.1.id=4", parents=()), | ||
| ConfigLine(config_line="#radio.1.antenna.1.name=Combined", parents=()), | ||
| ConfigLine(config_line="#radio.1.antenna.1.gain=0", parents=()), | ||
| ConfigLine(config_line="#radio.1.ccode=840", parents=()), | ||
| ConfigLine(config_line="#radio.1.ccode.fixed=0", parents=()), | ||
| ConfigLine(config_line="#radio.1.ccode.locked=1", parents=()), | ||
| ConfigLine(config_line="#radio.1.ptp_only=1", parents=()), | ||
| ConfigLine(config_line="#radio.1.ptp_sta=1", parents=()), | ||
| ConfigLine(config_line="#radio.1.chanbw=100", parents=()), | ||
| ConfigLine(config_line="#deac9d0212791db5ede667c016876ba4", parents=()), |
There was a problem hiding this comment.
In similar concept to my previous comment, I wouldn't want these in ConfigLine as to me I believe these configs are not applied. I'd expect any line starting with a # is a comment line, whether there is 1,2,or 3 of them. Is this not the case?
There was a problem hiding this comment.
@jeffkala Sorry for the late reply! Yes correct, I updated the parser to remove the "#" lines.
Thanks!
itdependsnetworks
commented
Aug 29, 2023
@gt732 can you get tests working all the way through? |
gt732
commented
Sep 1, 2023
@itdependsnetworks hey! the black issue should be fixed now. |
* Revised Ubiquiti AirFiber parser * Changed parser name to device OS instead * Corrected parser docstrings to airOS * updated parser to remove # lines * Fixed black issue
Uh oh!
There was an error while loading. Please reload this page.