Refactor TenantManage 13/30413/1
authorGary Wu <gary.wu1@huawei.com>
Mon, 30 Nov 2015 23:54:53 +0000 (15:54 -0800)
committerGary Wu <gary.wu1@huawei.com>
Mon, 30 Nov 2015 23:54:53 +0000 (15:54 -0800)
commitf96a07c31cbca70916cf0429d8356e8739cbd7eb
tree8ebba06eb921ecef9edcf99a19a5747113c21aeb
parent52c3de6fcbc908eeb3f08f93e51cc4082d42adfd
Refactor TenantManage

Refactor TenantManage to make the following changes:

1. Block on the retrieval of users and roles since
   the MD-SAL API is async.  Without this the calls
   will always return null since the async calls
   will not have completed yet.

2. Added new APIs to return users and roles as Maps
   to avoid linear searches.

Change-Id: Ib3ce98a3ac6adbbc66627e497d85531d12258c99
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
nemo-impl/src/main/java/org/opendaylight/nemo/user/tenantmanager/AAA.java
nemo-impl/src/main/java/org/opendaylight/nemo/user/tenantmanager/RegisterUser.java
nemo-impl/src/main/java/org/opendaylight/nemo/user/tenantmanager/TenantManage.java
nemo-impl/src/test/java/org/opendaylight/nemo/user/tenantmanager/AAATest.java
nemo-impl/src/test/java/org/opendaylight/nemo/user/tenantmanager/RegisterUserTest.java