Skip to content

Commit

Permalink
Convert parent resource type to parent object type
Browse files Browse the repository at this point in the history
fq_name_to_id now only accepts object type. Before calling it, we should convert
resource type to object type

Change-Id: Idb963dc7ac91d849b274c2c85edb1407ab4f5c38
Closes-Bug: 1605528
(cherry picked from commit 71e1a79)
  • Loading branch information
Sachin Bansal committed Jul 28, 2016
1 parent 44d1f55 commit c0e8cff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/config/api-server/vnc_cfg_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,9 @@ def http_resource_list(self, obj_type):
if (('parent_fq_name_str' in get_request().query) and
('parent_type' in get_request().query)):
parent_fq_name = get_request().query.parent_fq_name_str.split(':')
parent_type = get_request().query.parent_type
parent_res_type = get_request().query.parent_type
parent_class = self.get_resource_class(parent_res_type)
parent_type = parent_class.object_type
parent_uuids = [self._db_conn.fq_name_to_uuid(parent_type, parent_fq_name)]
elif 'parent_id' in get_request().query:
parent_ids = get_request().query.parent_id.split(',')
Expand Down
1 change: 0 additions & 1 deletion src/config/vnc_openstack/vnc_openstack/tests/test_kvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def test_post_project_create_default_sg(self):
proj_name = self.id()
test_case.get_keystone_client().tenants.add_tenant(proj_id, proj_name)
proj_obj = self._vnc_lib.project_read(id=proj_id)
self._vnc_lib.project_create(proj_obj)
sg_obj = self._vnc_lib.security_group_read(
fq_name=proj_obj.fq_name+['default'])
self._vnc_lib.security_group_delete(id=sg_obj.uuid)
Expand Down

0 comments on commit c0e8cff

Please sign in to comment.