{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/21766","labels_url":"https://api.github.com/repos/saltstack/salt/issues/21766/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/21766/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/21766/events","html_url":"https://github.com/saltstack/salt/pull/21766","id":62651393,"number":21766,"title":"New cassandra module using cql.","user":{"login":"anitakrueger","id":1795280,"avatar_url":"https://avatars.githubusercontent.com/u/1795280?v=3","gravatar_id":"","url":"https://api.github.com/users/anitakrueger","html_url":"https://github.com/anitakrueger","followers_url":"https://api.github.com/users/anitakrueger/followers","following_url":"https://api.github.com/users/anitakrueger/following{/other_user}","gists_url":"https://api.github.com/users/anitakrueger/gists{/gist_id}","starred_url":"https://api.github.com/users/anitakrueger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anitakrueger/subscriptions","organizations_url":"https://api.github.com/users/anitakrueger/orgs","repos_url":"https://api.github.com/users/anitakrueger/repos","events_url":"https://api.github.com/users/anitakrueger/events{/privacy}","received_events_url":"https://api.github.com/users/anitakrueger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Master%20Change","name":"Master Change","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-18T10:20:19Z","updated_at":"2015-03-18T22:57:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/21766","html_url":"https://github.com/saltstack/salt/pull/21766","diff_url":"https://github.com/saltstack/salt/pull/21766.diff","patch_url":"https://github.com/saltstack/salt/pull/21766.patch"},"body":"The cassandra module has been refactored to use the DataStax Python Driver.\r\nThe following functions were added to be able to manage keyspaces, users and permissions:\r\n\r\n- list_keyspaces\r\n- list_column_families\r\n- keyspace_exists\r\n- create_keyspace\r\n- drop_keyspace\r\n- list_users\r\n- create_user\r\n- list_permissions\r\n- grant_permission\r\n\r\nA state to manage keyspaces, users and permissions will follow."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/83218444","html_url":"https://github.com/saltstack/salt/pull/21766#issuecomment-83218444","issue_url":"https://api.github.com/repos/saltstack/salt/issues/21766","id":83218444,"user":{"login":"isbm","id":1073714,"avatar_url":"https://avatars.githubusercontent.com/u/1073714?v=3","gravatar_id":"","url":"https://api.github.com/users/isbm","html_url":"https://github.com/isbm","followers_url":"https://api.github.com/users/isbm/followers","following_url":"https://api.github.com/users/isbm/following{/other_user}","gists_url":"https://api.github.com/users/isbm/gists{/gist_id}","starred_url":"https://api.github.com/users/isbm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isbm/subscriptions","organizations_url":"https://api.github.com/users/isbm/orgs","repos_url":"https://api.github.com/users/isbm/repos","events_url":"https://api.github.com/users/isbm/events{/privacy}","received_events_url":"https://api.github.com/users/isbm/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T22:57:47Z","updated_at":"2015-03-18T22:57:47Z","body":"@anitakrueger Thanks for the PR! I would like to highlight few things here:\r\n* Salt does not use `\"%s\" % \"value\"`, but `\"{0}\".format(\"value\")`. Please change all formatting of strings accordingly.\r\n* Please try to avoid string concatenations, but do either formatting as above, or list joins.\r\n* The code, like `if variable is not empty then return True; else False` is better to replace with the direct variable value instead.\r\n* It is a matter of taste though, and I know @thatch45 is e.g. not a big fan of list comprehensions. But IMHO good code readability is not rely on verbosity. Sometimes compact one-liner is much better understandable than many code lines (I am Java programmer too, so there it is *that* verbose!).\r\n* Consistency of the method returns is not the strongest part of Salt so far, and data model is pretty liberal. But I think it gets better, so I would suggest to stay at least consistent across the methods within one module, at least.\r\n* You can always mix double-quotes with single quotes, so you would not need to use back-slashes.\r\n* Use logging that it would help in a future and say what *happened*, instead of what *going to* happen.\r\n\r\nHope this helps."}}