use neutron-lib auto allocated topology apidef

neutron-lib contains the auto allocated topology API definition. This
patch moves neutron over to lib's API def for it.

Note that we don't have any external (out-of-tree) consumers of this.

Change-Id: I01a3c99ae958bf0f57d27b4437065ba5b8de7908
diff --git a/neutron/tests/tempest/api/test_auto_allocated_topology.py b/neutron/tests/tempest/api/test_auto_allocated_topology.py
index 0f0de54..e7ebfa0 100644
--- a/neutron/tests/tempest/api/test_auto_allocated_topology.py
+++ b/neutron/tests/tempest/api/test_auto_allocated_topology.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from neutron_lib.api.definitions import auto_allocated_topology
 from oslo_config import cfg
 from tempest.lib import decorators
 
@@ -30,7 +31,7 @@
     # all tests are added under TestAutoAllocatedTopology,
     # nothing bad should happen.
     force_tenant_isolation = True
-    required_extensions = ['auto-allocated-topology']
+    required_extensions = [auto_allocated_topology.ALIAS]
 
     @classmethod
     def resource_setup(cls):
@@ -84,7 +85,7 @@
         self.assertEqual((0, 0, 0), resources_before)
 
         body = self.client.get_auto_allocated_topology()
-        topology = body['auto_allocated_topology']
+        topology = body[auto_allocated_topology.RESOURCE_NAME]
         self.assertIsNotNone(topology)
         self._add_topology_cleanup(self.client)
 
@@ -97,7 +98,7 @@
         self.assertEqual((1, self.num_subnetpools, 1), resources_after1)
 
         body = self.client.get_auto_allocated_topology()
-        topology = body['auto_allocated_topology']
+        topology = body[auto_allocated_topology.RESOURCE_NAME]
         network_id2 = topology['id']
         resources_after2 = self._count_topology_resources()
         # After the initial GET, the API should be idempotent
@@ -109,7 +110,7 @@
         resources_before = self._count_topology_resources()
         self.assertEqual((0, 0, 0), resources_before)
         body = self.client.get_auto_allocated_topology()
-        topology = body['auto_allocated_topology']
+        topology = body[auto_allocated_topology.RESOURCE_NAME]
         self.assertIsNotNone(topology)
         self.client.delete_auto_allocated_topology()
         resources_after = self._count_topology_resources()