Repository: docker/docker-py

Issue:
No documentation for network api
The following have missing documentation ([readthedocs](http://docker-py.readthedocs.org/)).
- [x] `Client.networks`
- [x] `Client.create_network`
- [x] `Client.remove_network`
- [x] `Client.inspect_network`
- [x] `Client.connect_container_to_network`
- [x] `Client.disconnect_container_from_network`



Discussion:

Resolving patch:
diff --git a/docker/api/network.py b/docker/api/network.py
--- a/docker/api/network.py
+++ b/docker/api/network.py
@@ -19,10 +19,14 @@ def networks(self, names=None, ids=None):
         return self._result(res, json=True)
 
     @minimum_version('1.21')
-    def create_network(self, name, driver=None):
+    def create_network(self, name, driver=None, options=None):
+        if options is not None and not isinstance(options, dict):
+            raise TypeError('options must be a dictionary')
+
         data = {
             'name': name,
             'driver': driver,
+            'options': options
         }
         url = self._url("/networks/create")
         res = self._post_json(url, data=data)
diff --git a/docker/api/volume.py b/docker/api/volume.py
--- a/docker/api/volume.py
+++ b/docker/api/volume.py
@@ -33,4 +33,3 @@ def remove_volume(self, name):
         url = self._url('/volumes/{0}', name)
         resp = self._delete(url)
         self._raise_for_status(resp)
-        return True


Test patch:
diff --git a/tests/integration/volume_test.py b/tests/integration/volume_test.py
--- a/tests/integration/volume_test.py
+++ b/tests/integration/volume_test.py
@@ -47,8 +47,7 @@ def test_remove_volume(self):
         name = 'shootthebullet'
         self.tmp_volumes.append(name)
         self.client.create_volume(name)
-        result = self.client.remove_volume(name)
-        self.assertTrue(result)
+        self.client.remove_volume(name)
 
     def test_remove_nonexistent_volume(self):
         name = 'shootthebullet'
diff --git a/tests/unit/network_test.py b/tests/unit/network_test.py
--- a/tests/unit/network_test.py
+++ b/tests/unit/network_test.py
@@ -70,11 +70,15 @@ def test_create_network(self):
                 json.loads(post.call_args[1]['data']),
                 {"name": "foo"})
 
-            self.client.create_network('foo', 'bridge')
+            opts = {
+                'com.docker.network.bridge.enable_icc': False,
+                'com.docker.network.bridge.enable_ip_masquerade': False,
+            }
+            self.client.create_network('foo', 'bridge', opts)
 
             self.assertEqual(
                 json.loads(post.call_args[1]['data']),
-                {"name": "foo", "driver": "bridge"})
+                {"name": "foo", "driver": "bridge", "options": opts})
 
     @base.requires_api_version('1.21')
     def test_remove_network(self):
diff --git a/tests/unit/volume_test.py b/tests/unit/volume_test.py
--- a/tests/unit/volume_test.py
+++ b/tests/unit/volume_test.py
@@ -89,8 +89,7 @@ def test_inspect_volume(self):
     @base.requires_api_version('1.21')
     def test_remove_volume(self):
         name = 'perfectcherryblossom'
-        result = self.client.remove_volume(name)
-        self.assertTrue(result)
+        self.client.remove_volume(name)
         args = fake_request.call_args
 
         self.assertEqual(args[0][0], 'DELETE')