ensureNetwork abstract method

Future<void> ensureNetwork(
  1. String name,
  2. Map<String, String> labels
)

Creates a network named name carrying labels if none exists yet.

Idempotent: an existing network with this name is left alone and treated as success. That is what makes it safe to call with no coordination when two specs name the same network at once — whichever request the daemon serves first wins, and the other sees "already there" rather than an error.

Implementation

Future<void> ensureNetwork(String name, Map<String, String> labels);