added support for custom endpoint type

Change-Id: Ia79bcc5c1acd830c353550af1ec450bb182f63cc
diff --git a/_modules/neutronng.py b/_modules/neutronng.py
index e0b6831..652e612 100644
--- a/_modules/neutronng.py
+++ b/_modules/neutronng.py
@@ -43,9 +43,15 @@
                 nkwargs.update({kwarg: kwargs[kwarg]})
         kstone = __salt__['keystone.auth'](**connection_args)
         token = kstone.auth_token
+
+        if kwargs.get('connection_endpoint_type') == None:
+            endpoint_type = 'internalURL'
+        else:
+            endpoint_type = kwargs.get('connection_endpoint_type')
+
         endpoint = kstone.service_catalog.url_for(
             service_type='network',
-            endpoint_type='publicURL')
+            endpoint_type=endpoint_type)
         neutron_interface = client.Client(
             endpoint_url=endpoint, token=token)
         return_data = func_name(neutron_interface, *args, **nkwargs)