{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cloudstack/issues/876","repository_url":"https://api.github.com/repos/apache/cloudstack","labels_url":"https://api.github.com/repos/apache/cloudstack/issues/876/labels{/name}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/876/comments","events_url":"https://api.github.com/repos/apache/cloudstack/issues/876/events","html_url":"https://github.com/apache/cloudstack/pull/876","id":107856900,"number":876,"title":"CLOUDSTACK-8865: Adding SR doesn't create Storage_pool_host_ref entry…","user":{"login":"SudharmaJain","id":12229259,"avatar_url":"https://avatars.githubusercontent.com/u/12229259?v=3","gravatar_id":"","url":"https://api.github.com/users/SudharmaJain","html_url":"https://github.com/SudharmaJain","followers_url":"https://api.github.com/users/SudharmaJain/followers","following_url":"https://api.github.com/users/SudharmaJain/following{/other_user}","gists_url":"https://api.github.com/users/SudharmaJain/gists{/gist_id}","starred_url":"https://api.github.com/users/SudharmaJain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SudharmaJain/subscriptions","organizations_url":"https://api.github.com/users/SudharmaJain/orgs","repos_url":"https://api.github.com/users/SudharmaJain/repos","events_url":"https://api.github.com/users/SudharmaJain/events{/privacy}","received_events_url":"https://api.github.com/users/SudharmaJain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-09-23T06:13:21Z","updated_at":"2016-04-21T08:02:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/876","html_url":"https://github.com/apache/cloudstack/pull/876","diff_url":"https://github.com/apache/cloudstack/pull/876.diff","patch_url":"https://github.com/apache/cloudstack/pull/876.patch"},"body":"… for disabled host\r\n\r\nThis causes VM deployment failure on the host that was disabled while adding the storage repository.\r\nIn the attachCluster function of the PrimaryDataStoreLifeCycle, we were only selecting hosts that are up and are in enabled state. Here if we select all up hosts, it will populate the DB properly and will fix this issue.\r\n\r\nAlso added a unit test for attachCluster function. \r\n"},"comment":{"url":"https://api.github.com/repos/apache/cloudstack/issues/comments/212794906","html_url":"https://github.com/apache/cloudstack/pull/876#issuecomment-212794906","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/876","id":212794906,"user":{"login":"SudharmaJain","id":12229259,"avatar_url":"https://avatars.githubusercontent.com/u/12229259?v=3","gravatar_id":"","url":"https://api.github.com/users/SudharmaJain","html_url":"https://github.com/SudharmaJain","followers_url":"https://api.github.com/users/SudharmaJain/followers","following_url":"https://api.github.com/users/SudharmaJain/following{/other_user}","gists_url":"https://api.github.com/users/SudharmaJain/gists{/gist_id}","starred_url":"https://api.github.com/users/SudharmaJain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SudharmaJain/subscriptions","organizations_url":"https://api.github.com/users/SudharmaJain/orgs","repos_url":"https://api.github.com/users/SudharmaJain/repos","events_url":"https://api.github.com/users/SudharmaJain/events{/privacy}","received_events_url":"https://api.github.com/users/SudharmaJain/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T08:02:17Z","updated_at":"2016-04-21T08:02:17Z","body":"@alexandrelimassantana This method is about a query execution on database. Could you suggest how can i add a unit test for it? "}}