Add a new client method: "get_loaded_network_extensions"

This method retrieves the extensions loaded by the Neutron API, instead
of reading the configured extensions in the tempest configuration.

This method can help during a extension implementation, as for example
in "subnet-external-network". This extension cannot be declared yet in
the neutron-tempest-plugin job definitions, because the extension has
not been implemented in Neutron. However, when the Neutron patch is
tested, the extension is missing in the configuration and the test
cannot correctly modify the API calls.

Related-Bug: #2051831
Change-Id: I3e6f570cd63e44df7ceb8f5013c2b4adebfe4286
diff --git a/neutron_tempest_plugin/api/base.py b/neutron_tempest_plugin/api/base.py
index 7af3711..99fa946 100644
--- a/neutron_tempest_plugin/api/base.py
+++ b/neutron_tempest_plugin/api/base.py
@@ -1221,6 +1221,16 @@
         client = client or ndp_proxy.get('client') or cls.client
         client.delete_ndp_proxy(ndp_proxy['id'])
 
+    @classmethod
+    def get_loaded_network_extensions(cls):
+        """Return the network service loaded extensions
+
+        :return: list of strings with the alias of the network service loaded
+                 extensions.
+        """
+        body = cls.client.list_extensions()
+        return [net_ext['alias'] for net_ext in body['extensions']]
+
 
 class BaseAdminNetworkTest(BaseNetworkTest):