(self)
| 56 | return stdout.decode() |
| 57 | |
| 58 | def primary_interace_name(self): |
| 59 | scutil_script = "get State:/Network/Global/IPv4\nd.show\n" |
| 60 | stdout = self.run_command_with_input("/usr/sbin/scutil", scutil_script) |
| 61 | (interface,) = re.findall(r"PrimaryInterface\s*:\s*(.+)", stdout) |
| 62 | return interface |
| 63 | |
| 64 | def primary_service_name(self): |
| 65 | return self.interface_name_to_service_name_map()[self.primary_interace_name()] |
no test coverage detected