Create neutronv2 module for ports

Co-Authored-By: Oleg Bondarev <obondarev@mirantis.com>
Change-Id: I605a50e92331cc6e7bb18ffb3b7a79d0aeae0880
diff --git a/_modules/neutronv2/ports.py b/_modules/neutronv2/ports.py
new file mode 100644
index 0000000..ab9482b
--- /dev/null
+++ b/_modules/neutronv2/ports.py
@@ -0,0 +1,40 @@
+from neutronv2.common import send
+from neutronv2.arg_converter import get_by_name_or_uuid_multiple
+
+try:
+    from urllib.parse import urlencode
+except ImportError:
+    from urllib import urlencode
+
+
+@get_by_name_or_uuid_multiple([('port', 'port_id')])
+@send('get')
+def port_get_details(port_id, **kwargs):
+    url = '/ports/{}?{}'.format(port_id, urlencode(kwargs))
+    return url, {}
+
+
+@get_by_name_or_uuid_multiple([('port', 'port_id')])
+@send('put')
+def port_update(port_id, **kwargs):
+    url = '/ports/{}'.format(port_id)
+    json = {
+        'port': kwargs,
+    }
+    return url, {'json': json}
+
+
+@get_by_name_or_uuid_multiple([('port', 'port_id')])
+@send('delete')
+def port_delete(port_id, **kwargs):
+    url = '/port/{}'.format(port_id)
+    return url, {}
+
+
+@send('post')
+def port_create(**kwargs):
+    url = '/ports'
+    json = {
+        'port': kwargs,
+    }
+    return url, {'json': json}