Create endpoint in different region 57/32857/1
authorliyuenan <liyuenan@huawei.com>
Sat, 1 Apr 2017 08:28:12 +0000 (16:28 +0800)
committerliyuenan <liyuenan@huawei.com>
Sat, 1 Apr 2017 08:34:57 +0000 (16:34 +0800)
JIRA: -

Edit keystone_endpoint module to support different region. Before this patch,
endpoint will be update when you use regiontwo or some other region.

Change-Id: Ib37b87892cfa485b468f7500fdabe05ad3b6be4b
Signed-off-by: liyuenan <liyuenan@huawei.com>
deploy/adapters/ansible/ansible_modules/keystone_endpoint.py

index 0201dd2..fae2ec6 100755 (executable)
@@ -180,7 +180,8 @@ def main():
 
         endpoints = [x for x in cloud.list_endpoints()
                      if (x.service_id == service.id and
-                         x.interface == interface)]
+                         x.interface == interface and
+                         x.region == region)]
 
         count = len(endpoints)
         if count > 1: