moby/docs/userguide/networking
Sebastiaan van Stijn fd7161bb30
Fix incorrect aux-address examples and test
The (host)name for aux-addresses should
be unique, otherwise later values overwrite
earlier values.

Before this change, the example command
would send this API request;

    {
      "Attachable": false,
      "CheckDuplicate": true,
      "Driver": "overlay",
      "EnableIPv6": false,
      "IPAM": {
        "Config": [
          {
            "Gateway": "192.168.0.100",
            "IPRange": "192.168.1.0/24",
            "Subnet": "192.168.0.0/16"
          },
          {
            "AuxiliaryAddresses": {
              "a": "192.170.1.5",
              "b": "192.170.1.6"
            },
            "Gateway": "192.170.0.100",
            "Subnet": "192.170.0.0/16"
          }
        ],
        "Driver": "default",
        "Options": {
        }
      },
      "Internal": false,
      "Labels": {
      },
      "Name": "my-multihost-network",
      "Options": {
      }
    }

After this change, the request looks
like this (all aux-addresses preserved);

    {
      "Attachable": false,
      "CheckDuplicate": true,
      "Driver": "overlay",
      "EnableIPv6": false,
      "IPAM": {
        "Config": [
          {
            "AuxiliaryAddresses": {
              "my-router": "192.168.1.5",
              "my-switch": "192.168.1.6"
            },
            "Gateway": "192.168.0.100",
            "IPRange": "192.168.1.0/24",
            "Subnet": "192.168.0.0/16"
          },
          {
            "AuxiliaryAddresses": {
              "my-printer": "192.170.1.5",
              "my-nas": "192.170.1.6"
            },
            "Gateway": "192.170.0.100",
            "Subnet": "192.170.0.0/16"
          }
        ],
        "Driver": "default",
        "Options": {
        }
      },
      "Internal": false,
      "Labels": {
      },
      "Name": "my-multihost-network",
      "Options": {
      }
    }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-09-27 01:12:29 +02:00
..
default_network fix some incorrect symbols before executing command 2016-09-14 22:28:09 +08:00
images Updates to macvlan/ipvlan experimental docs 2016-03-18 18:46:46 -04:00
configure-dns.md Rename --net to --network 2016-07-12 13:01:35 -07:00
get-started-overlay.md Merge pull request #26156 from mstanleyjones/24905_swarm_noun_usage 2016-09-07 10:38:59 -07:00
index.md Labels info ommitted while inspecting self-defined network 2016-09-08 17:27:33 +08:00
menu.md add overlay networking security model node 2016-08-12 13:17:24 -07:00
overlay-security-model.md add overlay networking security model node 2016-08-12 13:17:24 -07:00
work-with-networks.md Fix incorrect aux-address examples and test 2016-09-27 01:12:29 +02:00