)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Don Dugger \u003cn0ano@n0ano.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2012-05-22 14:11:52 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add Trusted Computing Pool support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"[V2 - re-format to remove tabs.]"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAHX%2F%2F46g%3D","line":7,"updated":"2012-05-22 23:19:24.000000000","message":"The \"Trusted Computing Pool\" name is probably a bit out of date - \"Trusted Host Scheduling\" or similar ?\n\ni.e. there\u0027s no pool of trusted hosts here, just the ability to schedule based on whether a host is trusted","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":22,"context_line":"[V9 - restructure the files to move the trusted computing helper files out"},{"line_number":23,"context_line":"of the filters directory into their own sub-directory.]"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"[V10 - use eventlet sockets if they are available.]"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Implements blueprint trusted-computing-pools"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAHX%2F%2F47g%3D","line":25,"updated":"2012-05-22 23:19:24.000000000","message":"I\u0027m not a big fan of this v2 stuff. It\u0027s certainly the least interesting part of the commit message, so if you do include it, put it at the end of the commit message before the Signed-off-by","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":25,"context_line":"[V10 - use eventlet sockets if they are available.]"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Implements blueprint trusted-computing-pools"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Add a scheduling filter that filters based upon the trustedness of"},{"line_number":30,"context_line":"a node.  A request is sent to the attestation service to disover the"},{"line_number":31,"context_line":"trustedness of the target node and, only if it matches the `trust\u0027 key/value"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAHX%2F%2F47Y%3D","line":28,"updated":"2012-05-22 23:19:24.000000000","message":"This blueprint is a bit out of date - e.g. it talks about ZoneManager holding a cache of hosts\u0027 trusted states","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"1)  Schedule works with no trust in the extra specs"},{"line_number":42,"context_line":"2)  Schedule works with correct trust value in the extra specs"},{"line_number":43,"context_line":"3)  Schedule fails will incorrect trust value in the extra specs"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Signed-off-by: Don Dugger \u003cdonald.d.dugger@intel.com\u003e"},{"line_number":46,"context_line":"Signed-off-by: Fred Yang \u003cfred.yang@intel.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAHX%2F%2F47U%3D","line":43,"updated":"2012-05-22 23:19:24.000000000","message":"We need more test coverage than this - we\u0027re not even testing a return value of \"trusted\" or \"untrusted\" from the attestation client\n\nAlso, the attestation client code itself needs testing","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"}],"nova/scheduler/filters/trusted_attest.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from nova import flags"},{"line_number":26,"context_line":"from nova import log as logging"},{"line_number":27,"context_line":"from nova.openstack.common import cfg"},{"line_number":28,"context_line":"from nova import utils"},{"line_number":29,"context_line":"from nova.scheduler.filters import trusted_client"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"LOG \u003d logging.getLogger(\u0027nova.scheduler.filters.trusted_attest\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUk%3D","line":28,"updated":"2012-05-09 03:14:20.000000000","message":"HACKING import ordering (utils \u003e scheduler).","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import utils"},{"line_number":29,"context_line":"from nova.scheduler.filters import trusted_client"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"LOG \u003d logging.getLogger(\u0027nova.scheduler.filters.trusted_attest\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"trusted_opts \u003d ["},{"line_number":34,"context_line":"    cfg.BoolOpt(\u0027attestation_geo_required\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUg%3D","line":31,"updated":"2012-05-09 03:14:20.000000000","message":"Passing __name__ to getLogger is preferable.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(\u0027nova.scheduler.filters.trusted_attest\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"trusted_opts \u003d ["},{"line_number":34,"context_line":"    cfg.BoolOpt(\u0027attestation_geo_required\u0027,"},{"line_number":35,"context_line":"                default\u003dFalse,"},{"line_number":36,"context_line":"                help\u003d\u0027set PCR index as geo indicator tag\u0027),"},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027attestation_geo_mask\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUQ%3D","line":34,"updated":"2012-05-09 03:14:20.000000000","message":"Is it possible to use a group as in openstack.common.cfg instead of prefixing each option with \u0027attestation_\u0027?  The resulting config would be less verbose and separate out attestation config in its own section rather than cluttering up DEFAULT.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.doc_root \u003d FLAGS.attestation_doc_root"},{"line_number":69,"context_line":"        self.host \u003d FLAGS.attestation_server"},{"line_number":70,"context_line":"        super(AttestationService, self).__init__("},{"line_number":71,"context_line":"                                    self.host,"},{"line_number":72,"context_line":"                                    FLAGS.attestation_port,"},{"line_number":73,"context_line":"                                    use_ssl\u003dTrue,"},{"line_number":74,"context_line":"                                    auth_blob\u003dFLAGS.attestation_auth_blob,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUM%3D","line":71,"updated":"2012-05-09 03:14:20.000000000","message":"PEP8 - vertical alignment.  Use a 4-space indent.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                body[\u0027PCRmask\u0027] \u003d mask"},{"line_number":92,"context_line":"            body[\u0027hosts\u0027] \u003d hosts"},{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            subcmd \u003d subcmd + \u0027?requestId\u003d\u0027 + rid"},{"line_number":95,"context_line":"        cooked \u003d json.dumps(body)"},{"line_number":96,"context_line":"        headers \u003d {}"},{"line_number":97,"context_line":"        headers[\u0027content-type\u0027] \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUI%3D","line":94,"updated":"2012-05-09 03:14:20.000000000","message":"Prefer string templating to concatenation.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        return {}"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _get_hosts(self, hosts\u003dNone):"},{"line_number":120,"context_line":"        \"\"\"get result from previously posted hosts base on rid"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        if not len(self.request_id):"},{"line_number":123,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUE%3D","line":120,"updated":"2012-05-09 03:14:20.000000000","message":"HACKING docstring convention","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            if status !\u003d 0:"},{"line_number":129,"context_line":"                return {}"},{"line_number":130,"context_line":"            packet \u003d process_packet(raw, rid)"},{"line_number":131,"context_line":"            if isinstance(packet, dict):"},{"line_number":132,"context_line":"                # got result"},{"line_number":133,"context_line":"                data.append(packet)"},{"line_number":134,"context_line":"                done.append(rid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUA%3D","line":131,"updated":"2012-05-09 03:14:20.000000000","message":"Consider making this statement self-documenting rather than using a comment, e.g.\n\ngot_result \u003d isinstance(packet, dict)\nif got_result:\n  pass","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def do_attestation(self, cmd, hosts\u003dNone):"},{"line_number":164,"context_line":"        \"\"\"Service entry point with cmd: [post_hosts, get_hosts, poll_hosts]"},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        if self.host \u003d\u003d \u0027\u0027:"},{"line_number":167,"context_line":"                return {}"},{"line_number":168,"context_line":"        method \u003d self.commands[cmd.lower()]"},{"line_number":169,"context_line":"        return method(self, hosts)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BT8%3D","line":166,"updated":"2012-05-09 03:14:20.000000000","message":"Consider using implicit boolean conversion:","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    \"\"\""},{"line_number":192,"context_line":"    if not packet[\u0027requestId\u0027] \u003d\u003d rid:"},{"line_number":193,"context_line":"        LOG.warning(_(\"Incoming packet has wrong RequestId(%s)\") % packet[\u0027requestId\u0027])"},{"line_number":194,"context_line":"        return 2"},{"line_number":195,"context_line":"    status \u003d packet[\u0027jobstatus\u0027]"},{"line_number":196,"context_line":"    if status is 2:"},{"line_number":197,"context_line":"        result \u003d packet[\u0027jobresult\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BT4%3D","line":194,"updated":"2012-05-09 03:14:20.000000000","message":"Prefer a named constant to a magic number.  This comment applies to all return and conditional statements in this function.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"trusted_opts \u003d ["},{"line_number":35,"context_line":"    cfg.BoolOpt(\u0027geo_required\u0027,"},{"line_number":36,"context_line":"            default\u003dFalse,"},{"line_number":37,"context_line":"            help\u003d\u0027set PCR index as geo indicator tag\u0027),"},{"line_number":38,"context_line":"    cfg.StrOpt(\u0027geo_mask\u0027,"},{"line_number":39,"context_line":"            default\u003d\u0027400000\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F95g%3D","line":36,"updated":"2012-05-09 20:05:39.000000000","message":"PEP8 vertical alignment (applies to all options in this list)","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":63,"context_line":"FLAGS.register_group(trust_group)"},{"line_number":64,"context_line":"FLAGS.register_opts(trusted_opts, group\u003d\u0027trust\u0027)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\"\"\"Return values from attestation service requests.\"\"\""},{"line_number":67,"context_line":"JOB_PROCESSING \u003d 0"},{"line_number":68,"context_line":"JOB_SUCCESS \u003d 1"},{"line_number":69,"context_line":"JOB_FAILURE \u003d 2"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F948%3D","line":66,"updated":"2012-05-09 20:05:39.000000000","message":"Format comments using hashes (#foo) instead of triple-quotes (reserved for docstrings and text block definition).","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                body[\u0027PCRmask\u0027] \u003d mask"},{"line_number":100,"context_line":"            body[\u0027hosts\u0027] \u003d hosts"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            subcmd \u003d Template(\"${c}?requestId\u003d\u0027${i}\").substitute(subcmd, rid)"},{"line_number":103,"context_line":"        cooked \u003d json.dumps(body)"},{"line_number":104,"context_line":"        headers \u003d {}"},{"line_number":105,"context_line":"        headers[\u0027content-type\u0027] \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F95I%3D","line":102,"updated":"2012-05-09 20:05:39.000000000","message":"Prefer implicit string templating to explicit function calls: \n\nsubcmd \u003d \u0027%s?requestId\u003d%s\u0027 % (subcmd, rid)","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        Service entry point with cmd: [post_hosts, get_hosts, poll_hosts]"},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        if not self.host:"},{"line_number":175,"context_line":"                return {}"},{"line_number":176,"context_line":"        method \u003d self.commands[cmd.lower()]"},{"line_number":177,"context_line":"        return method(self, hosts)"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F95E%3D","line":175,"updated":"2012-05-09 20:05:39.000000000","message":"PEP8 - use 4 spaces to indent a level","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"94d3ffe806871e03b768ce225a81a8c6348bc13c","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class AttestationService(trusted_client.BaseClient):"},{"line_number":73,"context_line":"    \"\"\"Privide access wrapper to attestation server to get integrity report.\"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def __init__(self):"},{"line_number":76,"context_line":"        self.doc_root \u003d FLAGS.trust.doc_root"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAHX%2F%2F9fQ%3D","line":73,"updated":"2012-05-10 19:06:20.000000000","message":"Spelling?","commit_id":"f178e751c7cc6e4f00b003e7f209269cbaf7da0f"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"d7f862471a11ca43cb457440916e082f73e70d0f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return {}"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_hosts(self, hosts\u003dNone):"},{"line_number":128,"context_line":"        \"\"\"get result from previously posted hosts based on rid.\"\"\""},{"line_number":129,"context_line":"        if not len(self.request_id):"},{"line_number":130,"context_line":"            return {}"},{"line_number":131,"context_line":"        data \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAHX%2F%2F9MM%3D","line":128,"updated":"2012-05-11 03:29:52.000000000","message":"Capitalize the first word and rid \u003d\u003e request_id (short names are convenient in code but confusing in docstrings).","commit_id":"5cd37d2a3abe81d28df9260d0b5ec12fdfdcbbf6"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e474660f3d53cd1fde191aea085848c424a5b42a","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return {}"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_hosts(self, hosts\u003dNone):"},{"line_number":128,"context_line":"        \"\"\"Get result from previously posted hosts based on request_rid.\"\"\""},{"line_number":129,"context_line":"        if not len(self.request_id):"},{"line_number":130,"context_line":"            return {}"},{"line_number":131,"context_line":"        data \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAHX%2F%2F9LQ%3D","line":128,"updated":"2012-05-11 04:23:00.000000000","message":"Oops, request_rid \u003d\u003e request_id","commit_id":"fe8a6b890bc4c1433e76b88d2c531caff43fc281"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"93a6fcf9bccfbb18709884e7b0ea63a48a6733c2","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":18,"context_line":"#    under the License."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"Provide access to attestation server for integrity report."},{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import httplib"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F8u4%3D","line":20,"updated":"2012-05-11 19:43:18.000000000","message":"Expand Docstring\n\nHow does this provide access?  How do you use it.","commit_id":"7b6a45fce2e087282dbae44834ade8e7bbe4d7f6"}],"nova/scheduler/filters/trusted_client.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.timeout \u003d timeout"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def connect(self):"},{"line_number":46,"context_line":"        \"\"\" Connect to a server node on a given (SSL) port."},{"line_number":47,"context_line":"            Use ca_file as certificate to verify Server identity."},{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        sock \u003d socket.create_connection((self.host, self.port), self.timeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BTg%3D","line":46,"updated":"2012-05-09 03:14:20.000000000","message":"Please follow the HACKING docstring format.  This comment applies to all docstrings in this module.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                               httplib.CREATED,"},{"line_number":117,"context_line":"                               httplib.ACCEPTED,"},{"line_number":118,"context_line":"                               httplib.NO_CONTENT):"},{"line_number":119,"context_line":"                return 0, res"},{"line_number":120,"context_line":"            return status_code, None"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        except (socket.error, IOError), e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BTY%3D","line":119,"updated":"2012-05-09 03:14:20.000000000","message":"Prefer named constants to magic numbers.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                return 0, res"},{"line_number":120,"context_line":"            return status_code, None"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        except (socket.error, IOError), e:"},{"line_number":123,"context_line":"            return IOError, None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BTU%3D","line":122,"updated":"2012-05-09 03:14:20.000000000","message":"Prefer \u0027as e\u0027 syntax to \u0027, e\u0027.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"class ValidatedHTTPSConnection(httplib.HTTPSConnection):"},{"line_number":31,"context_line":"    \"\"\""},{"line_number":32,"context_line":"    Class to make a HTTPS connection,"},{"line_number":33,"context_line":"    with support for full client-based SSL Authentication"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __init__(self, host, port, key_file, cert_file, ca_file, timeout\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F95w%3D","line":33,"updated":"2012-05-09 20:05:39.000000000","message":"HACKING - end sentences with a period.","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"class BaseClient(object):"},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    Client object to connect to attestation Https server"},{"line_number":67,"context_line":"    supports server identify and client userID/password authentication"},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def __init__(self, host, port, use_ssl, auth_blob,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F95s%3D","line":67,"updated":"2012-05-09 20:05:39.000000000","message":"HACKING - end sentences with a period.","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b4da66de65ebd01a4089a9155cd773120311e48d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def do_request(self, method, action_url, body\u003dNone, headers\u003dNone):"},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        Connects to the server and issues a request."},{"line_number":105,"context_line":"        Returns the result data, or raises an appropriate exception."},{"line_number":106,"context_line":"        \"\"\""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F95o%3D","line":105,"updated":"2012-05-09 20:05:39.000000000","message":"HACKING if describing return values and exceptions, consider using sphinx syntax in the docstring:\n\n:returns: result data\n\n:raises: IOError if the request fails","commit_id":"215109feaef122fdd7808705251bad5841857094"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"94d3ffe806871e03b768ce225a81a8c6348bc13c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def __init__(self, host, port, use_ssl, auth_blob,"},{"line_number":71,"context_line":"                 key_file\u003dNone, cert_file\u003dNone, ca_file\u003dNone):"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        Creates a new client to connect to HTTPS attestaion server."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        :param host: The host where service resides"},{"line_number":76,"context_line":"        :param port: The port where service resides"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAHX%2F%2F9eo%3D","line":73,"updated":"2012-05-10 19:06:20.000000000","message":"Spelling","commit_id":"f178e751c7cc6e4f00b003e7f209269cbaf7da0f"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"93a6fcf9bccfbb18709884e7b0ea63a48a6733c2","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":18,"context_line":"#    under the License."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"Attestation Client service connection to attestation Https server."},{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import httplib"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F8vE%3D","line":20,"updated":"2012-05-11 19:43:18.000000000","message":"A more detailed docstring here would be very helpful.","commit_id":"7b6a45fce2e087282dbae44834ade8e7bbe4d7f6"}],"nova/scheduler/filters/trusted_filter.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova import flags"},{"line_number":21,"context_line":"from nova import log as logging"},{"line_number":22,"context_line":"from nova import utils"},{"line_number":23,"context_line":"from nova.scheduler import filters"},{"line_number":24,"context_line":"from nova.scheduler.filters import trusted_attest"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BS8%3D","line":22,"updated":"2012-05-09 03:14:20.000000000","message":"HACKING rules on import ordering (utils \u003e scheduler).","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class TrustedFilter(filters.BaseHostFilter):"},{"line_number":30,"context_line":"    \"\"\"Trusted filter to support Trusted Compute Pools\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        self.attestation_service \u003d trusted_attest.AttestationService()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BTI%3D","line":30,"updated":"2012-05-09 03:14:20.000000000","message":"HACKING docstring format - this applies to all docstrings in this module.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        extra \u003d instance.get(\u0027extra_specs\u0027, {})"},{"line_number":57,"context_line":"        trust \u003d extra.get(\u0027trust\u0027)"},{"line_number":58,"context_line":"        host \u003d host_state.host"},{"line_number":59,"context_line":"        if trust !\u003d None:"},{"line_number":60,"context_line":"            return self.is_trusted(host, trust)"},{"line_number":61,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BS4%3D","line":59,"updated":"2012-05-09 03:14:20.000000000","message":"Consider using implicit boolean conversion.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":23,"context_line":"of that host matches the trust requested in the `extra_specs\u0027 for the"},{"line_number":24,"context_line":"flavor.  The `extra_specs\u0027 will contain a key/value pair where the"},{"line_number":25,"context_line":"key is `trust\u0027.  The value of this pair (`trusted\u0027/`untrusted\u0027) must"},{"line_number":26,"context_line":"match the integrity of that host (obtained from the Attesatation"},{"line_number":27,"context_line":"service) before the task can be scheduled on that host."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Note that the parameters to control access to the Attestation Service"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5jQ%3D","line":26,"updated":"2012-05-21 17:21:24.000000000","message":"femto-nit:\n\ns/Attesatation/Attestation/","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"from nova import flags"},{"line_number":49,"context_line":"from nova import log as logging"},{"line_number":50,"context_line":"from nova.scheduler import filters"},{"line_number":51,"context_line":"from nova.scheduler import trusted"},{"line_number":52,"context_line":"from nova.scheduler.trusted import trusted_attest"},{"line_number":53,"context_line":"from nova import utils"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5jM%3D","line":51,"updated":"2012-05-21 17:21:24.000000000","message":"This import is not used.","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":22,"context_line":"Filter that only schedules tasks on a host if the integrity (trust)"},{"line_number":23,"context_line":"of that host matches the trust requested in the `extra_specs\u0027 for the"},{"line_number":24,"context_line":"flavor.  The `extra_specs\u0027 will contain a key/value pair where the"},{"line_number":25,"context_line":"key is `trust\u0027.  The value of this pair (`trusted\u0027/`untrusted\u0027) must"},{"line_number":26,"context_line":"match the integrity of that host (obtained from the Attestation"},{"line_number":27,"context_line":"service) before the task can be scheduled on that host."},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F47M%3D","line":25,"updated":"2012-05-22 23:19:24.000000000","message":"I think I\u0027d prefer host_trusted \u003d True/False\n\ni.e. the properties of an instance type describe the instance, whereas \"trust\" describes a properties of the host","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def post_get_host(self, host):"},{"line_number":69,"context_line":"        \"\"\"Send POST request and wait for a host\u0027s integrity report.\"\"\""},{"line_number":70,"context_line":"        integrity_report \u003d self._do_attestation(\u0027POLL_HOSTS\u0027, [host])"},{"line_number":71,"context_line":"        for h, s in integrity_report.iteritems():"},{"line_number":72,"context_line":"            if host \u003d\u003d h:"},{"line_number":73,"context_line":"                return s[\u0027trust_lvl\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F464%3D","line":70,"updated":"2012-05-22 23:19:24.000000000","message":"The attestation API should be as simple as:\n\n  self.attestation_service.poll(host)\n\nand return trusted/untrusted/unknown","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        for h, s in integrity_report.iteritems():"},{"line_number":72,"context_line":"            if host \u003d\u003d h:"},{"line_number":73,"context_line":"                return s[\u0027trust_lvl\u0027]"},{"line_number":74,"context_line":"        return \"noserver\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def is_trusted(self, host, trust):"},{"line_number":77,"context_line":"        level \u003d self.post_get_host(host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46s%3D","line":74,"updated":"2012-05-22 23:19:24.000000000","message":"I don\u0027t like this feature of being able to put trust\u003d\"noserver\" in extra specs\n\nIf extra specs contains a host_trusted spec and the attestation server doesn\u0027t know about the host, just skip that host","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def is_trusted(self, host, trust):"},{"line_number":77,"context_line":"        level \u003d self.post_get_host(host)"},{"line_number":78,"context_line":"        LOG.debug(_(\"TCP: trust state of \""},{"line_number":79,"context_line":"                    \"%(host)s:%(level)s(%(trust)s)\") % locals())"},{"line_number":80,"context_line":"        return trust \u003d\u003d level"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46o%3D","line":78,"updated":"2012-05-22 23:19:24.000000000","message":"The \"TCP\" prefix isn\u0027t needed - the logger will include a prefix and \"TCP\" \u003d\u003d \"Transmission Control Protocol\" for most people :)","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        trust \u003d extra.get(\u0027trust\u0027)"},{"line_number":86,"context_line":"        host \u003d host_state.host"},{"line_number":87,"context_line":"        if trust:"},{"line_number":88,"context_line":"            return self.is_trusted(host, trust)"},{"line_number":89,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F47A%3D","line":88,"updated":"2012-05-22 23:19:24.000000000","message":"The obvious problem here is that we\u0027re polling the attestation service for each host individually when scheduling an instance. This is an obvious scaling issue.\n\nHowever, I think you\u0027re taking a reasonably pragmatic approach here - the caching of host states was a problem with the previous patch, so you\u0027re punting this as an optimization detail for later. Fair enough IMHO","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"}],"nova/scheduler/trusted/trusted_attest.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        self.host \u003d FLAGS.trust.server"},{"line_number":83,"context_line":"        super(AttestationService, self).__init__("},{"line_number":84,"context_line":"                self.host,"},{"line_number":85,"context_line":"                FLAGS.trust.port,"},{"line_number":86,"context_line":"                use_ssl\u003dTrue,"},{"line_number":87,"context_line":"                auth_blob\u003dFLAGS.trust.auth_blob,"},{"line_number":88,"context_line":"                key_file\u003dNone,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5jE%3D","line":85,"updated":"2012-05-21 17:21:24.000000000","message":"Why not have this variable as a self attribute, too? Any reason?","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                help\u003d\u0027set PCR index as geo indicator tag\u0027),"},{"line_number":43,"context_line":"    cfg.StrOpt(\u0027geo_mask\u0027,"},{"line_number":44,"context_line":"               default\u003d\u0027400000\u0027,"},{"line_number":45,"context_line":"               help\u003d\u0027Mask for index register(22) - right to left bit mask\u0027),"},{"line_number":46,"context_line":"    cfg.IntOpt(\u0027max_hosts\u0027,"},{"line_number":47,"context_line":"               default\u003d100,"},{"line_number":48,"context_line":"               help\u003d\u0027max number of hosts per request\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46c%3D","line":45,"updated":"2012-05-22 23:19:24.000000000","message":"What\u0027s the use case for geo_required and geo_mask in Nova?","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":45,"context_line":"               help\u003d\u0027Mask for index register(22) - right to left bit mask\u0027),"},{"line_number":46,"context_line":"    cfg.IntOpt(\u0027max_hosts\u0027,"},{"line_number":47,"context_line":"               default\u003d100,"},{"line_number":48,"context_line":"               help\u003d\u0027max number of hosts per request\u0027),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027server\u0027,"},{"line_number":50,"context_line":"               default\u003d\u0027\u0027,"},{"line_number":51,"context_line":"               help\u003d\u0027attestation server http\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46Y%3D","line":48,"updated":"2012-05-22 23:19:24.000000000","message":"Irrelevant, we only ever do one host at a time","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":47,"context_line":"               default\u003d100,"},{"line_number":48,"context_line":"               help\u003d\u0027max number of hosts per request\u0027),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027server\u0027,"},{"line_number":50,"context_line":"               default\u003d\u0027\u0027,"},{"line_number":51,"context_line":"               help\u003d\u0027attestation server http\u0027),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027server_ca_file\u0027,"},{"line_number":53,"context_line":"               default\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46U%3D","line":50,"updated":"2012-05-22 23:19:24.000000000","message":"a default of None would be better","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":50,"context_line":"               default\u003d\u0027\u0027,"},{"line_number":51,"context_line":"               help\u003d\u0027attestation server http\u0027),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027server_ca_file\u0027,"},{"line_number":53,"context_line":"               default\u003dNone,"},{"line_number":54,"context_line":"               help\u003d\u0027attestation server Cert file for Identity verification\u0027),"},{"line_number":55,"context_line":"    cfg.StrOpt(\u0027port\u0027,"},{"line_number":56,"context_line":"               default\u003d\u00278443\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46M%3D","line":53,"updated":"2012-05-22 23:19:24.000000000","message":"No need to be explicit about default\u003dNone","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    cfg.StrOpt(\u0027port\u0027,"},{"line_number":56,"context_line":"               default\u003d\u00278443\u0027,"},{"line_number":57,"context_line":"               help\u003d\u0027attestation server port\u0027),"},{"line_number":58,"context_line":"    cfg.StrOpt(\u0027doc_root\u0027,"},{"line_number":59,"context_line":"               default\u003d\u0027/OpenAttestationWebServices/V1.0\u0027,"},{"line_number":60,"context_line":"               help\u003d\u0027attestation web API root\u0027),"},{"line_number":61,"context_line":"    cfg.StrOpt(\u0027auth_blob\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F450%3D","line":58,"updated":"2012-05-22 23:19:24.000000000","message":"Why *doc* root - why not \"base URL\" or similar?\n\ndoc root sounds like the root entity in an XML document","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               default\u003d\u0027/OpenAttestationWebServices/V1.0\u0027,"},{"line_number":60,"context_line":"               help\u003d\u0027attestation web API root\u0027),"},{"line_number":61,"context_line":"    cfg.StrOpt(\u0027auth_blob\u0027,"},{"line_number":62,"context_line":"               default\u003d\u0027MustSetupAuthorizationBlob\u0027,"},{"line_number":63,"context_line":"               help\u003d\u0027attestation authorization blob - must change\u0027),"},{"line_number":64,"context_line":"]"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46Q%3D","line":62,"updated":"2012-05-22 23:19:24.000000000","message":"Just default to None","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":64,"context_line":"]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"FLAGS \u003d flags.FLAGS"},{"line_number":67,"context_line":"trust_group \u003d cfg.OptGroup(name\u003d\u0027trust\u0027, title\u003d\u0027Trust parameters\u0027)"},{"line_number":68,"context_line":"FLAGS.register_group(trust_group)"},{"line_number":69,"context_line":"FLAGS.register_opts(trusted_opts, group\u003d\u0027trust\u0027)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46I%3D","line":67,"updated":"2012-05-22 23:19:24.000000000","message":"\u0027trust\u0027 is a bit generic, maybe \u0027trusted_computing\u0027","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":71,"context_line":"# Return values from attestation service requests."},{"line_number":72,"context_line":"JOB_PROCESSING \u003d 0"},{"line_number":73,"context_line":"JOB_SUCCESS \u003d 1"},{"line_number":74,"context_line":"JOB_FAILURE \u003d 2"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class AttestationService(trusted_client.BaseClient):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F46A%3D","line":74,"updated":"2012-05-22 23:19:24.000000000","message":"These are unused","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":74,"context_line":"JOB_FAILURE \u003d 2"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class AttestationService(trusted_client.BaseClient):"},{"line_number":78,"context_line":"    \"\"\"Provide access wrapper to attestation server to get integrity report.\"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F448%3D","line":77,"updated":"2012-05-22 23:19:24.000000000","message":"If you simplify AttestationService, I don\u0027t think BaseClient needs to be a separate subclass","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                cert_file\u003dNone,"},{"line_number":93,"context_line":"                ca_file\u003dself.server_ca_file)"},{"line_number":94,"context_line":"        self.request_count \u003d FLAGS.trust.max_hosts"},{"line_number":95,"context_line":"        self.request_id \u003d []"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def do_request(self, method, action, body\u003dNone, headers\u003dNone):"},{"line_number":98,"context_line":"        action \u003d \"%s/%s\" % (self.doc_root, action)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45s%3D","line":95,"updated":"2012-05-22 23:19:24.000000000","message":"request_id is unused","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                body[\u0027PCRmask\u0027] \u003d mask"},{"line_number":108,"context_line":"            body[\u0027hosts\u0027] \u003d hosts"},{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            subcmd \u003d \u0027%s?requestId\u003d%s\u0027 % (subcmd, rid)"},{"line_number":111,"context_line":"        cooked \u003d json.dumps(body)"},{"line_number":112,"context_line":"        headers \u003d {}"},{"line_number":113,"context_line":"        headers[\u0027content-type\u0027] \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45U%3D","line":110,"updated":"2012-05-22 23:19:24.000000000","message":"Only need to support POST with a single host","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        else:"},{"line_number":119,"context_line":"            return status, None"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _post_hosts(self, hosts, mask\u003dNone):"},{"line_number":122,"context_line":"        total \u003d len(hosts)"},{"line_number":123,"context_line":"        if FLAGS.trust.geo_required:"},{"line_number":124,"context_line":"            mask \u003d FLAGS.trust.geo_mask"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45k%3D","line":121,"updated":"2012-05-22 23:19:24.000000000","message":"Unused","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                self.request_id.append(raw[\u0027RequestId\u0027])"},{"line_number":133,"context_line":"        return {}"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _get_hosts(self, hosts\u003dNone):"},{"line_number":136,"context_line":"        \"\"\"Get result from previously posted hosts based on request_id.\"\"\""},{"line_number":137,"context_line":"        if not len(self.request_id):"},{"line_number":138,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45g%3D","line":135,"updated":"2012-05-22 23:19:24.000000000","message":"Unused","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            self.request_id.remove(rid)"},{"line_number":152,"context_line":"        return _unpack_host_data(data)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _poll_hosts(self, hosts, mask\u003dNone):"},{"line_number":155,"context_line":"        total \u003d len(hosts)"},{"line_number":156,"context_line":"        if FLAGS.trust.geo_required:"},{"line_number":157,"context_line":"            mask \u003d FLAGS.trust.geo_mask"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45c%3D","line":154,"updated":"2012-05-22 23:19:24.000000000","message":"Method should simply be:\n\n  def poll(self, host):\n      ...","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            if x + self.request_count \u003c total:"},{"line_number":162,"context_line":"                list \u003d hosts[x:x + self.request_count]"},{"line_number":163,"context_line":"            else:"},{"line_number":164,"context_line":"                list \u003d hosts[x:total]"},{"line_number":165,"context_line":"            status, data \u003d self._request(\"POST\", \"PollHosts\", list, mask\u003dmask)"},{"line_number":166,"context_line":"            if status !\u003d httplib.OK:"},{"line_number":167,"context_line":"                return {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45Q%3D","line":164,"updated":"2012-05-22 23:19:24.000000000","message":"Only supporting a single host greatly simplifies this","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            status, data \u003d self._request(\"POST\", \"PollHosts\", list, mask\u003dmask)"},{"line_number":166,"context_line":"            if status !\u003d httplib.OK:"},{"line_number":167,"context_line":"                return {}"},{"line_number":168,"context_line":"            if isinstance(data, dict):"},{"line_number":169,"context_line":"                states.append(data)"},{"line_number":170,"context_line":"        return _unpack_host_data(states)"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45M%3D","line":168,"updated":"2012-05-22 23:19:24.000000000","message":"Looks like data is always a dict","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                return {}"},{"line_number":168,"context_line":"            if isinstance(data, dict):"},{"line_number":169,"context_line":"                states.append(data)"},{"line_number":170,"context_line":"        return _unpack_host_data(states)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    commands \u003d {"},{"line_number":173,"context_line":"        \u0027post_hosts\u0027: _post_hosts,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45I%3D","line":170,"updated":"2012-05-22 23:19:24.000000000","message":"Make _unpack_host_data() a method on the class","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        \u0027get_hosts\u0027: _get_hosts,"},{"line_number":175,"context_line":"        \u0027poll_hosts\u0027: _poll_hosts,"},{"line_number":176,"context_line":"    }"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def do_attestation(self, cmd, hosts\u003dNone):"},{"line_number":179,"context_line":"        \"\"\""},{"line_number":180,"context_line":"        Service entry point with cmd: [post_hosts, get_hosts, poll_hosts]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45E%3D","line":177,"updated":"2012-05-22 23:19:24.000000000","message":"Not needed","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        return method(self, hosts)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"def process_packet(packet, rid):"},{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    Expected input format"},{"line_number":191,"context_line":"        { \u0027requestId\u0027 : rid,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F45A%3D","line":188,"updated":"2012-05-22 23:19:24.000000000","message":"Unused","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"}],"nova/scheduler/trusted/trusted_client.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import httplib"},{"line_number":27,"context_line":"import socket"},{"line_number":28,"context_line":"import ssl"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from nova import exception"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5i8%3D","line":27,"updated":"2012-05-21 17:21:24.000000000","message":"I believe you need to monkey-patch for eventlet here. If this code will be run inside an eventlet, you will need to use the eventlet.socket code.\n\nTo see an example, feel free to look at the glance SSL client classes (and the use of eventlet socket):\n\nhttps://github.com/openstack/glance/blob/master/glance/common/client.py","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            self._tunnel()"},{"line_number":58,"context_line":"        # If there\u0027s no CA File, don\u0027t force Server Certificate Check"},{"line_number":59,"context_line":"        if self.ca_file:"},{"line_number":60,"context_line":"            self.sock \u003d ssl.wrap_socket(sock, self.key_file, self.cert_file,"},{"line_number":61,"context_line":"                                        ca_certs\u003dself.ca_file,"},{"line_number":62,"context_line":"                                        cert_reqs\u003dssl.CERT_REQUIRED)"},{"line_number":63,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5jA%3D","line":60,"updated":"2012-05-21 17:21:24.000000000","message":"This needs to be eventlet-ified if it is to be run within an eventlet.","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                        cert_reqs\u003dssl.CERT_NONE)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"class BaseClient(object):"},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    Client object to connect to attestation Https server."},{"line_number":83,"context_line":"    Supports server identify and authentication via server defined blob."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F444%3D","line":80,"updated":"2012-05-22 23:19:24.000000000","message":"If this is to remain a separate subclass, call it HttpClient or something. It\u0027s totally generic","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"}],"nova/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"be90dfac2fe1d32aa115e8371ea5e56ef3efe3ac","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        filt_cls \u003d self.class_map[\u0027TrustedFilter\u0027]()"},{"line_number":572,"context_line":"        extra_specs \u003d {\u0027trust\u0027: \u0027noserver\u0027}"},{"line_number":573,"context_line":"        service \u003d {\u0027disabled\u0027: False}"},{"line_number":574,"context_line":"        filter_properties \u003d {\u0027instance_type\u0027: {\u0027memory_mb\u0027: 1024,"},{"line_number":575,"context_line":"                                               \u0027extra_specs\u0027: extra_specs}}"},{"line_number":576,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027compute\u0027, {})"},{"line_number":577,"context_line":"        self.assertTrue(filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F%2BUw%3D","line":574,"updated":"2012-05-09 03:14:20.000000000","message":"HACKING requires dictionaries/lists longer than 80 chars to be formatted differently.","commit_id":"fb175d7916097fbbabdf87ec931ab04670f5b756"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":570,"context_line":"        self._stub_service_is_up(True)"},{"line_number":571,"context_line":"        filt_cls \u003d self.class_map[\u0027TrustedFilter\u0027]()"},{"line_number":572,"context_line":"        extra_specs \u003d {\u0027trust\u0027: \u0027noserver\u0027}"},{"line_number":573,"context_line":"        service \u003d {\u0027disabled\u0027: False}"},{"line_number":574,"context_line":"        filter_properties \u003d {\u0027instance_type\u0027: {\u0027memory_mb\u0027: 1024,"},{"line_number":575,"context_line":"                                               \u0027extra_specs\u0027: extra_specs}}"},{"line_number":576,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027compute\u0027, {})"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5i4%3D","line":573,"updated":"2012-05-21 17:21:24.000000000","message":"I don\u0027t see where this service variable is being used?","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c6ad0338100b0fd383e2cfebd75945fa63e6888d","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        self._stub_service_is_up(True)"},{"line_number":581,"context_line":"        filt_cls \u003d self.class_map[\u0027TrustedFilter\u0027]()"},{"line_number":582,"context_line":"        extra_specs \u003d {\u0027trust\u0027: \u0027trusted\u0027}"},{"line_number":583,"context_line":"        service \u003d {\u0027disabled\u0027: False}"},{"line_number":584,"context_line":"        filter_properties \u003d {\u0027instance_type\u0027: {\u0027memory_mb\u0027: 1024,"},{"line_number":585,"context_line":"                                               \u0027extra_specs\u0027: extra_specs}}"},{"line_number":586,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027compute\u0027, {})"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAHX%2F%2F5i0%3D","line":583,"updated":"2012-05-21 17:21:24.000000000","message":"I don\u0027t see where this service variable is being used?","commit_id":"cd94676ed994fadc159e7b41065f495e4e9cf1b6"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"056fd6acf666d2e9932bc3ece1674681377de213","unresolved":false,"context_lines":[{"line_number":583,"context_line":"                                               \u0027extra_specs\u0027: extra_specs}}"},{"line_number":584,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027compute\u0027, {})"},{"line_number":585,"context_line":"        self.assertFalse(filt_cls.host_passes(host, filter_properties))"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def test_core_filter_passes(self):"},{"line_number":588,"context_line":"        filt_cls \u003d self.class_map[\u0027CoreFilter\u0027]()"},{"line_number":589,"context_line":"        filter_properties \u003d {\u0027instance_type\u0027: {\u0027vcpus\u0027: 1}}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F44s%3D","line":586,"updated":"2012-05-22 23:19:24.000000000","message":"As I said, I don\u0027t think this is enough test coverage - it doesn\u0027t test most of the code in this patch","commit_id":"0038429960e378ba4f197c270e65ef529a3ff6c9"}]}
