]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: do not use cached tokens for neutron
authorLoic Dachary <ldachary@redhat.com>
Mon, 22 Aug 2016 16:20:05 +0000 (18:20 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 14 Oct 2019 14:47:01 +0000 (16:47 +0200)
Signed-off-by: Loic Dachary <loic@dachary.org>
teuthology/openstack/__init__.py

index 66d8ffda02ceb91167d79103e11b93e9f7d9bf7b..5d7164b76f0dea4545f5a402d9c1813aef858d8d 100644 (file)
@@ -112,14 +112,16 @@ class OpenStackInstance(object):
                 self.set_info()
 
     def get_ip_neutron(self):
-        subnets = json.loads(misc.sh("neutron subnet-list -f json -c id -c ip_version"))
+        subnets = json.loads(misc.sh("unset OS_AUTH_TYPE OS_TOKEN ; "
+                                     "neutron subnet-list -f json -c id -c ip_version"))
         subnet_ids = []
         for subnet in subnets:
             if subnet['ip_version'] == 4:
                 subnet_ids.append(subnet['id'])
         if not subnet_ids:
             raise Exception("no subnet with ip_version == 4")
-        ports = json.loads(misc.sh("neutron port-list -f json -c fixed_ips -c device_id"))
+        ports = json.loads(misc.sh("unset OS_AUTH_TYPE OS_TOKEN ; "
+                                   "neutron port-list -f json -c fixed_ips -c device_id"))
         fixed_ips = None
         for port in ports:
             if port['device_id'] == self['id']: