{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/39378030","id":39378030,"diff_hunk":"@@ -577,41 +590,48 @@ public ManagedObjectReference getDecendentMoRef(ManagedObjectReference root, Str\n             return null;\n         }\n \n-        // Create PropertySpecs\n-        PropertySpec pSpec = new PropertySpec();\n-        pSpec.setType(type);\n-        pSpec.setAll(false);\n-        pSpec.getPathSet().add(\"name\");\n-\n-        ObjectSpec oSpec = new ObjectSpec();\n-        oSpec.setObj(root);\n-        oSpec.setSkip(false);\n-        oSpec.getSelectSet().addAll(constructCompleteTraversalSpec());\n-\n-        PropertyFilterSpec spec = new PropertyFilterSpec();\n-        spec.getPropSet().add(pSpec);\n-        spec.getObjectSet().add(oSpec);\n-        List<PropertyFilterSpec> specArr = new ArrayList<PropertyFilterSpec>();\n-        specArr.add(spec);\n-\n-        List<ObjectContent> ocary = vimPort.retrieveProperties(getPropCol(), specArr);\n-\n-        if (ocary == null || ocary.size() == 0) {\n-            return null;\n-        }\n+        try {\n+            // Create PropertySpecs\n+            PropertySpec pSpec = new PropertySpec();\n+            pSpec.setType(type);\n+            pSpec.setAll(false);\n+            pSpec.getPathSet().add(\"name\");\n+\n+            ObjectSpec oSpec = new ObjectSpec();\n+            oSpec.setObj(root);\n+            oSpec.setSkip(false);\n+            oSpec.getSelectSet().addAll(constructCompleteTraversalSpec());\n+\n+            PropertyFilterSpec spec = new PropertyFilterSpec();\n+            spec.getPropSet().add(pSpec);\n+            spec.getObjectSet().add(oSpec);\n+            List<PropertyFilterSpec> specArr = new ArrayList<PropertyFilterSpec>();\n+            specArr.add(spec);\n+\n+            ManagedObjectReference propCollector = getPropCol();\n+            List<ObjectContent> ocary = vimPort.retrieveProperties(propCollector, specArr);\n+\n+            if (ocary == null || ocary.size() == 0) {\n+                return null;\n+            }\n \n-        // filter through retrieved objects to get the first match.\n-        for (ObjectContent oc : ocary) {\n-            ManagedObjectReference mor = oc.getObj();\n-            List<DynamicProperty> propary = oc.getPropSet();\n-            if (type == null || type.equals(mor.getType())) {\n-                if (propary.size() > 0) {\n-                    String propval = (String)propary.get(0).getVal();\n-                    if (propval != null && name.equalsIgnoreCase(propval))\n-                        return mor;\n+            // filter through retrieved objects to get the first match.\n+            for (ObjectContent oc : ocary) {\n+                ManagedObjectReference mor = oc.getObj();\n+                List<DynamicProperty> propary = oc.getPropSet();\n+                if (type == null || type.equals(mor.getType())) {\n+                    if (propary.size() > 0) {\n+                        String propval = (String)propary.get(0).getVal();\n+                        if (propval != null && name.equalsIgnoreCase(propval))\n+                            return mor;\n+                    }\n                 }\n             }\n+        } catch (Exception e) {\n+            s_logger.debug(\"Failed to get mor for name: \" + name + \" and type: \" + type, e);","path":"vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java","position":null,"original_position":101,"commit_id":"1d73418c2c2b3881952f9dab0ed235ebfb096a50","original_commit_id":"4a6e2cdeeecae6953245ce3213513f4d5dd82e7f","user":{"login":"sureshanaparti","id":12028987,"avatar_url":"https://avatars.githubusercontent.com/u/12028987?v=3","gravatar_id":"","url":"https://api.github.com/users/sureshanaparti","html_url":"https://github.com/sureshanaparti","followers_url":"https://api.github.com/users/sureshanaparti/followers","following_url":"https://api.github.com/users/sureshanaparti/following{/other_user}","gists_url":"https://api.github.com/users/sureshanaparti/gists{/gist_id}","starred_url":"https://api.github.com/users/sureshanaparti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sureshanaparti/subscriptions","organizations_url":"https://api.github.com/users/sureshanaparti/orgs","repos_url":"https://api.github.com/users/sureshanaparti/repos","events_url":"https://api.github.com/users/sureshanaparti/events{/privacy}","received_events_url":"https://api.github.com/users/sureshanaparti/received_events","type":"User","site_admin":false},"body":"MoRef i.e VMware ManagedObjectReference. Updated the log.","created_at":"2015-09-14T10:03:36Z","updated_at":"2015-09-14T10:03:36Z","html_url":"https://github.com/apache/cloudstack/pull/806#discussion_r39378030","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/806","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/39378030"},"html":{"href":"https://github.com/apache/cloudstack/pull/806#discussion_r39378030"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/806"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/806","id":44766595,"html_url":"https://github.com/apache/cloudstack/pull/806","diff_url":"https://github.com/apache/cloudstack/pull/806.diff","patch_url":"https://github.com/apache/cloudstack/pull/806.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/806","number":806,"state":"open","locked":false,"title":"CLOUDSTACK-8820: Support for VMware vCenter 6 data center","user":{"login":"sureshanaparti","id":12028987,"avatar_url":"https://avatars.githubusercontent.com/u/12028987?v=3","gravatar_id":"","url":"https://api.github.com/users/sureshanaparti","html_url":"https://github.com/sureshanaparti","followers_url":"https://api.github.com/users/sureshanaparti/followers","following_url":"https://api.github.com/users/sureshanaparti/following{/other_user}","gists_url":"https://api.github.com/users/sureshanaparti/gists{/gist_id}","starred_url":"https://api.github.com/users/sureshanaparti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sureshanaparti/subscriptions","organizations_url":"https://api.github.com/users/sureshanaparti/orgs","repos_url":"https://api.github.com/users/sureshanaparti/repos","events_url":"https://api.github.com/users/sureshanaparti/events{/privacy}","received_events_url":"https://api.github.com/users/sureshanaparti/received_events","type":"User","site_admin":false},"body":"CLOUDSTACK-8820: Showing error when try to add advance zone using VMware ESXi 6.0 host\r\n\r\nSummary: In vCenter 6.0, response headers need to be fetched after service login for server cookie unlike previous versions of vCenter.","created_at":"2015-09-11T10:16:18Z","updated_at":"2015-09-14T10:03:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f68997a6a83fdcaa66d541a87524407d95345e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/806/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/806/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/806/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/1d73418c2c2b3881952f9dab0ed235ebfb096a50","head":{"label":"sureshanaparti:CLOUDSTACK-8820","ref":"CLOUDSTACK-8820","sha":"1d73418c2c2b3881952f9dab0ed235ebfb096a50","user":{"login":"sureshanaparti","id":12028987,"avatar_url":"https://avatars.githubusercontent.com/u/12028987?v=3","gravatar_id":"","url":"https://api.github.com/users/sureshanaparti","html_url":"https://github.com/sureshanaparti","followers_url":"https://api.github.com/users/sureshanaparti/followers","following_url":"https://api.github.com/users/sureshanaparti/following{/other_user}","gists_url":"https://api.github.com/users/sureshanaparti/gists{/gist_id}","starred_url":"https://api.github.com/users/sureshanaparti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sureshanaparti/subscriptions","organizations_url":"https://api.github.com/users/sureshanaparti/orgs","repos_url":"https://api.github.com/users/sureshanaparti/repos","events_url":"https://api.github.com/users/sureshanaparti/events{/privacy}","received_events_url":"https://api.github.com/users/sureshanaparti/received_events","type":"User","site_admin":false},"repo":{"id":40086470,"name":"cloudstack","full_name":"sureshanaparti/cloudstack","owner":{"login":"sureshanaparti","id":12028987,"avatar_url":"https://avatars.githubusercontent.com/u/12028987?v=3","gravatar_id":"","url":"https://api.github.com/users/sureshanaparti","html_url":"https://github.com/sureshanaparti","followers_url":"https://api.github.com/users/sureshanaparti/followers","following_url":"https://api.github.com/users/sureshanaparti/following{/other_user}","gists_url":"https://api.github.com/users/sureshanaparti/gists{/gist_id}","starred_url":"https://api.github.com/users/sureshanaparti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sureshanaparti/subscriptions","organizations_url":"https://api.github.com/users/sureshanaparti/orgs","repos_url":"https://api.github.com/users/sureshanaparti/repos","events_url":"https://api.github.com/users/sureshanaparti/events{/privacy}","received_events_url":"https://api.github.com/users/sureshanaparti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sureshanaparti/cloudstack","description":"Mirror of Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/sureshanaparti/cloudstack","forks_url":"https://api.github.com/repos/sureshanaparti/cloudstack/forks","keys_url":"https://api.github.com/repos/sureshanaparti/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sureshanaparti/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sureshanaparti/cloudstack/teams","hooks_url":"https://api.github.com/repos/sureshanaparti/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/sureshanaparti/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/sureshanaparti/cloudstack/events","assignees_url":"https://api.github.com/repos/sureshanaparti/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/sureshanaparti/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/sureshanaparti/cloudstack/tags","blobs_url":"https://api.github.com/repos/sureshanaparti/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sureshanaparti/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sureshanaparti/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/sureshanaparti/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sureshanaparti/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/sureshanaparti/cloudstack/languages","stargazers_url":"https://api.github.com/repos/sureshanaparti/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/sureshanaparti/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/sureshanaparti/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/sureshanaparti/cloudstack/subscription","commits_url":"https://api.github.com/repos/sureshanaparti/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/sureshanaparti/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/sureshanaparti/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/sureshanaparti/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/sureshanaparti/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/sureshanaparti/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sureshanaparti/cloudstack/merges","archive_url":"https://api.github.com/repos/sureshanaparti/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sureshanaparti/cloudstack/downloads","issues_url":"https://api.github.com/repos/sureshanaparti/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/sureshanaparti/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/sureshanaparti/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/sureshanaparti/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sureshanaparti/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/sureshanaparti/cloudstack/releases{/id}","created_at":"2015-08-02T17:06:05Z","updated_at":"2015-08-02T17:06:27Z","pushed_at":"2015-09-14T09:58:06Z","git_url":"git://github.com/sureshanaparti/cloudstack.git","ssh_url":"git@github.com:sureshanaparti/cloudstack.git","clone_url":"https://github.com/sureshanaparti/cloudstack.git","svn_url":"https://github.com/sureshanaparti/cloudstack","homepage":null,"size":493389,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"2d90f18b82a0c52fdfc815e0f8efb565f96788e3","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"name":"cloudstack","full_name":"apache/cloudstack","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cloudstack","description":"Mirror of Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","created_at":"2013-04-29T22:27:12Z","updated_at":"2015-09-12T23:24:20Z","pushed_at":"2015-09-14T09:58:08Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":null,"size":757001,"stargazers_count":284,"watchers_count":284,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":370,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":46,"forks":370,"open_issues":46,"watchers":284,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/806"},"html":{"href":"https://github.com/apache/cloudstack/pull/806"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/806"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/806/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/806/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/806/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/1d73418c2c2b3881952f9dab0ed235ebfb096a50"}}}}