Skip to content

v0.5.0

Choose a tag to compare

@gitkodak gitkodak released this 03 Aug 03:27
· 183 commits to main since this release

Deprecated

  • --layout sane is renamed to --layout tree, and sane will be removed in
    0.6.0
    . It still works and still selects the same layout, but it is hidden
    from --help and warns once, naming the replacement and the version.

    The old name implied the other layout was not sane, and borrowed a clinical
    word as a judgement. tree describes what the layout is: top down, leaf
    staggered, with port numbers on the links.

    A version is promised here, unlike the open-ended UDM_* deprecation, because
    this is one flag value that anyone using it can change in seconds, and an
    indefinite alias would keep the word in --help indefinitely. The target is
    0.6.0 rather than 0.5.0 because 0.5.0 is the release that introduces tree;
    removing the old name in the same version it is deprecated would leave nobody
    a release to migrate in.

Fixed

  • A support file holding more than one site is refused until --site says
    which, instead of mapping whichever site had the most devices and warning.
    The old behaviour was the only place this tool guessed: an ambiguous override
    selector is a loud error, an ambiguous product name resolves to nothing, and
    an unreported uplink gets a placeholder rather than a plausible parent. It was
    also the worst place to guess, because the result is a complete and entirely
    ordinary looking map, and nothing about the diagram says it is the wrong
    network. A single-site archive still needs no flag.
  • Every directory this tool creates is restricted, not only the last one.
    --out-dir out/private/maps created three directories and locked down one,
    leaving the other two at the umask. Output filenames come from network names,
    so a listable parent disclosed the network layout even though the files
    themselves are 0600. An existing directory is still left exactly as it is.
  • Overrides that make a loop are refused, naming the loop. Nothing crashed:
    Graphviz draws a cycle without complaint, since DOT is a digraph. It is
    refused because a switch cannot be its own uplink, so such a map asserts
    hardware that cannot exist while looking as authoritative as any other.

Changed

  • A man page, unifi-map.1, generated from the argument parser and committed
    so it works from a clone with man ./unifi-map.1. make docs regenerates it
    and make check fails when it is stale, the same guard the README flag
    reference has. It carries the sections a parser cannot supply: ENVIRONMENT,
    FILES, EXAMPLES, exit status, and the warning about support files.
  • Atomic writes live in one module, fsio.py. Three copies had grown apart:
    two called fsync before the rename and one did not, and only two set the
    file mode before putting it in place. None of the differences were intended.
  • _fetch returns a small Fetched object rather than a requests.Response
    with two private attributes assigned by hand. The body is streamed through a
    size cap rather than read by requests, which is why the response had to be
    doctored; callers only ever used three fields.
  • The example unmanaged switch is described as "unmanaged" rather than "dumb",
    in examples/overrides.toml and the README. "Unmanaged" is also the accurate
    term: it names the absent management plane, which is why such a device has to
    be declared by hand in the first place.
  • make sane is now make tree, and docs/images/example-sane-dark.png is now
    example-tree-dark.png. The old make target still works and says it is going.