From 7718ce45bc14def8528a1c8c24dab07ddf1fb39a Mon Sep 17 00:00:00 2001 From: bran-wang Date: Tue, 4 Apr 2017 09:44:59 +0800 Subject: fix get host by name Change-Id: I969f26826d0808831acf5d84894ad51303b9957a Issue-Id: MULTIVIM-36 Signed-off-by: branw --- vio/vio/pub/vim/vimapi/nova/OperateHypervisor.py | 2 +- vio/vio/swagger/views/hypervisor/views.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'vio') diff --git a/vio/vio/pub/vim/vimapi/nova/OperateHypervisor.py b/vio/vio/pub/vim/vimapi/nova/OperateHypervisor.py index 8b3de91..d48b421 100644 --- a/vio/vio/pub/vim/vimapi/nova/OperateHypervisor.py +++ b/vio/vio/pub/vim/vimapi/nova/OperateHypervisor.py @@ -24,7 +24,7 @@ class OperateHypervisor(OperateNova): def get_hypervisor(self, data, hypervisor, **kwargs): try: return self.request('get_hypervisor', data, - project_name=data['project_name'], + project_id=data['project_id'], hypervisor=hypervisor, **kwargs) except exceptions.ResourceNotFound: diff --git a/vio/vio/swagger/views/hypervisor/views.py b/vio/vio/swagger/views/hypervisor/views.py index bada577..2b96524 100644 --- a/vio/vio/swagger/views/hypervisor/views.py +++ b/vio/vio/swagger/views/hypervisor/views.py @@ -37,7 +37,9 @@ class HostView(APIView): 'username': vim_info['userName'], 'password': vim_info['password'], 'url': vim_info['url'], - 'project_id': tenantid} + 'project_id': tenantid, + 'user_domain_name': 'default', + 'project_domain_name': 'default'} hypervisor_op = OperateHypervisor.OperateHypervisor() try: -- cgit 1.2.3-korg