)]}'
{"barbican/plugin/dc.py":[{"author":{"_account_id":11970,"name":"Chelsea Winfree","email":"chelsea.winfree@gmail.com","username":"chellygel"},"change_message_id":"c5a97f24f89c1c0e609fcb788f20abb44262204f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"RESULT_INTERMEDIATES \u003d \u0027intermediates\u0027"},{"line_number":92,"context_line":"RESULT_RETRY_MSEC \u003d \u0027retry_msec\u0027"},{"line_number":93,"context_line":"RESULT_RETRY_METHOD \u003d \u0027retry_method\u0027"},{"line_number":94,"context_line":"RESULT_STATUS_ATTRS \u003d {RESULT_STATUS: \u0027\u0027, RESULT_STATUS_MESSAGE: \u0027\u0027, RESULT_CERTIFICATE: \u0027\u0027, RESULT_INTERMEDIATES: \u0027\u0027, RESULT_RETRY_MSEC: \u0027\u0027, RESULT_RETRY_METHOD: \u0027\u0027}"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class DigiCertCertificatePlugin(cert.CertificatePluginBase):"},{"line_number":97,"context_line":"    \"\"\"DigiCert certificate plugin to OpenStack Barbican secret store.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_ff5462c7","line":94,"updated":"2014-12-02 17:48:56.000000000","message":"This is one of the 80+ character lines. You can click on the test name to see the results. \n\nI\u0027ve linked it here, it will show you all results! Let us know if you have questions.\n\nhttp://logs.openstack.org/99/138199/1/check/gate-barbican-pep8/7ba4fd1/console.html","commit_id":"8de10991a57d8693a9c3acb40bacfe8595a95371"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5a890539_5e8c6fd7","updated":"2014-12-03 16:12:35.000000000","message":"Please rename this file to \u0027digicert.py\u0027.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5a890539_5b42bcab","in_reply_to":"5a890539_5e8c6fd7","updated":"2014-12-03 16:59:45.000000000","message":"+1","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027fish\u0027"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"import six"},{"line_number":4,"context_line":"from barbican.openstack.common import gettextutils as u"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_fb3e0828","line":1,"updated":"2014-12-03 16:59:45.000000000","message":"Remove this","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":91,"context_line":"RESULT_INTERMEDIATES \u003d \u0027intermediates\u0027"},{"line_number":92,"context_line":"RESULT_RETRY_MSEC \u003d \u0027retry_msec\u0027"},{"line_number":93,"context_line":"RESULT_RETRY_METHOD \u003d \u0027retry_method\u0027"},{"line_number":94,"context_line":"RESULT_STATUS_ATTRS \u003d {RESULT_STATUS: \u0027\u0027, RESULT_STATUS_MESSAGE: \u0027\u0027, RESULT_CERTIFICATE: \u0027\u0027, RESULT_INTERMEDIATES: \u0027\u0027, RESULT_RETRY_MSEC: \u0027\u0027, RESULT_RETRY_METHOD: \u0027\u0027}"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class DigiCertCertificatePlugin(cert.CertificatePluginBase):"},{"line_number":97,"context_line":"    \"\"\"DigiCert certificate plugin to OpenStack Barbican secret store.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2e1cccc1","line":94,"updated":"2014-12-03 16:59:45.000000000","message":"Is there a reason you declared this many \"constants\" opposed to handling the values on a per-context basis?","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.dc_host \u003d conf.digicert_plugin.dc_host"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        LOG.info(\u0027............. in digicert cert plugin init...........\u0027)"},{"line_number":105,"context_line":"        LOG.info(\u0027AccountID: %s   API Key:   %s \u0027 % (self.account_id, self.api_key))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if self.api_key is None:"},{"line_number":108,"context_line":"            raise ValueError(u._(\"Api Key is required\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1e5bc754","line":105,"updated":"2014-12-03 16:12:35.000000000","message":"Please use the args format for LOG calls...so like this:\nLOG.info(\u0027AccountID: %s   API Key:   %s \u0027, self.account_id, self.api_key)\n\nI\u0027m thinking these LOG.info\u0027s are better as LOG.debug\u0027s as well, but I\u0027ll let others comment. Eventually, non-debug LOGs need to be translated for other languages though, so they are more heavy weight to deal with.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        result \u003d \u0027\u0027"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        LOG.info(\u0027............. in digicert cert plugin issue cert request...........\u0027)"},{"line_number":135,"context_line":"        if response.get(RESULT_RETRY_MSEC):"},{"line_number":136,"context_line":"            result \u003d cert.ResultDTO(cert.CertificateStatus.CLIENT_DATA_ISSUE_SEEN, status_message\u003dresponse.get(RESULT_STATUS, \u0027\u0027) + \u0027 : \u0027 + response.get(RESULT_STATUS_MESSAGE, \u0027\u0027))"},{"line_number":137,"context_line":"            LOG.info(\u0027............. there was an error sending the request to the server.  Error: %s...........\u0027, result)"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_69c1734d","line":135,"updated":"2014-12-03 16:12:35.000000000","message":"If this is really a retry scenario, whereby barbican could call this method again at some time in the future to try to get the cert initiated, then you should use the CA_UNAVAILABLE_FOR_REQUEST response. Returning CLIENT_DATA_ISSUE_SEEN will terminate the Barbican order processing.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        LOG.info(\u0027............. in digicert cert plugin issue cert request...........\u0027)"},{"line_number":135,"context_line":"        if response.get(RESULT_RETRY_MSEC):"},{"line_number":136,"context_line":"            result \u003d cert.ResultDTO(cert.CertificateStatus.CLIENT_DATA_ISSUE_SEEN, status_message\u003dresponse.get(RESULT_STATUS, \u0027\u0027) + \u0027 : \u0027 + response.get(RESULT_STATUS_MESSAGE, \u0027\u0027))"},{"line_number":137,"context_line":"            LOG.info(\u0027............. there was an error sending the request to the server.  Error: %s...........\u0027, result)"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            result \u003d cert.ResultDTO(cert.CertificateStatus.WAITING_FOR_CA, status_message\u003dresponse.get(RESULT_STATUS_MESSAGE, \u0027\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_498cb780","line":136,"updated":"2014-12-03 16:12:35.000000000","message":"Just noting that the pep8 gate job must eventually pass...so things like long lines (\u003e80 chars) need to be wrapped for example. Some folks don\u0027t review CRs unless this gate job passes, so please work on a patch to address those as soon as possible.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        # raise NotImplementedError  # pragma: no cover"},{"line_number":208,"context_line":"        return True"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"def _create_order(self, order_id, order_meta, plugin_meta):"},{"line_number":211,"context_line":"    # TODO: future input validation or certificate type mapping or attribute key mapping"},{"line_number":212,"context_line":"    order \u003d CertificateOrder(self.dc_host, self.api_key, customer_name\u003dself.account_id)"},{"line_number":213,"context_line":"    response \u003d order.place(**order_meta)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_aeefdc1b","line":210,"updated":"2014-12-03 16:59:45.000000000","message":"This function/method have \"self\" on them, but it doesn\u0027t appear to be nested within a class.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":210,"context_line":"def _create_order(self, order_id, order_meta, plugin_meta):"},{"line_number":211,"context_line":"    # TODO: future input validation or certificate type mapping or attribute key mapping"},{"line_number":212,"context_line":"    order \u003d CertificateOrder(self.dc_host, self.api_key, customer_name\u003dself.account_id)"},{"line_number":213,"context_line":"    response \u003d order.place(**order_meta)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    if len(response.get(\u0027id\u0027)):"},{"line_number":216,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_c4efae1b","line":213,"updated":"2014-12-03 16:12:35.000000000","message":"So I\u0027m curious...is \u0027id\u0027 the unique ID for the Digicert order? If so, why are you setting that to the RESULT_STATUS_MESSAGE in #216? Also, if so, then you need to do something like this at some point: plugin_meta[\u0027id\u0027] \u003d response.get(\u0027id\u0027). The plugin_meta is persisted by Barbican on behalf of plugins, and then handed back to the plugin on subsequent calls.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    # TODO: future input validation or certificate type mapping or attribute key mapping"},{"line_number":212,"context_line":"    order \u003d CertificateOrder(self.dc_host, self.api_key, customer_name\u003dself.account_id)"},{"line_number":213,"context_line":"    response \u003d order.place(**order_meta)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    if len(response.get(\u0027id\u0027)):"},{"line_number":216,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027id\u0027)"},{"line_number":217,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_c4fa4e76","line":214,"updated":"2014-12-03 16:12:35.000000000","message":"BTW, it would be more clear to not pass **order_meta in, but rather spell out the individual kwargs being set.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    order \u003d CertificateOrder(self.dc_host, self.api_key, customer_name\u003dself.account_id)"},{"line_number":213,"context_line":"    response \u003d order.place(**order_meta)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    if len(response.get(\u0027id\u0027)):"},{"line_number":216,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027id\u0027)"},{"line_number":217,"context_line":"    else:"},{"line_number":218,"context_line":"        LOG.info(response.get(\u0027response\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_497d97b1","line":215,"updated":"2014-12-03 16:12:35.000000000","message":"If \u0027id\u0027 is not set in response, then len(None) will result in a TypeError. Please just do \u0027if response.get(\u0027id\u0027)\u0027, or store into a local \u0027id\u0027 var before hand and then just use \u0027id\u0027 for testing.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    response \u003d order.place(**order_meta)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    if len(response.get(\u0027id\u0027)):"},{"line_number":216,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027id\u0027)"},{"line_number":217,"context_line":"    else:"},{"line_number":218,"context_line":"        LOG.info(response.get(\u0027response\u0027))"},{"line_number":219,"context_line":"        RESULT_STATUS_ATTRS[RESULT_RETRY_MSEC] \u003d 300000"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_c46a4eb4","line":216,"updated":"2014-12-03 16:12:35.000000000","message":"As this plugin might be used concurrently, please don\u0027t use global variables for mutable state. You could just make a dict() in this method, then return that dict below.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    response \u003d order.place(**order_meta)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    if len(response.get(\u0027id\u0027)):"},{"line_number":216,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027id\u0027)"},{"line_number":217,"context_line":"    else:"},{"line_number":218,"context_line":"        LOG.info(response.get(\u0027response\u0027))"},{"line_number":219,"context_line":"        RESULT_STATUS_ATTRS[RESULT_RETRY_MSEC] \u003d 300000"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1bff5435","line":216,"in_reply_to":"5a890539_c46a4eb4","updated":"2014-12-03 16:59:45.000000000","message":"More than that. This won\u0027t work consistently as you are manipulating global state.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    if len(response.get(\u0027id\u0027)):"},{"line_number":216,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027id\u0027)"},{"line_number":217,"context_line":"    else:"},{"line_number":218,"context_line":"        LOG.info(response.get(\u0027response\u0027))"},{"line_number":219,"context_line":"        RESULT_STATUS_ATTRS[RESULT_RETRY_MSEC] \u003d 300000"},{"line_number":220,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027response\u0027, response.get(\u0027description\u0027))"},{"line_number":221,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS] \u003d response.get(\u0027result\u0027, response.get(\u0027code\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_0413765c","line":218,"updated":"2014-12-03 16:12:35.000000000","message":"Better to say LOG.debug(\u0027Response is %s\u0027, response.get(\u0027response\u0027))","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027response\u0027, response.get(\u0027description\u0027))"},{"line_number":221,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS] \u003d response.get(\u0027result\u0027, response.get(\u0027code\u0027))"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    return dict(RESULT_STATUS_ATTRS)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def _get_order_status(self, order_id, order_meta, plugin_meta):"},{"line_number":226,"context_line":"    order \u003d CertificateOrder(self.dc_host, self.api_key, customer_name\u003dself.account_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_ee12c456","line":223,"updated":"2014-12-03 16:59:45.000000000","message":"This will still retain the global references due to the way Python works with dictionaries. Please construct a dictionary within this function and return that instead of using a global ref.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def _get_order_status(self, order_id, order_meta, plugin_meta):"},{"line_number":226,"context_line":"    order \u003d CertificateOrder(self.dc_host, self.api_key, customer_name\u003dself.account_id)"},{"line_number":227,"context_line":"    response \u003d order.view(order_id\u003dorder_id)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    if response.get(RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"},{"line_number":230,"context_line":"        order_meta[\u0027order_id\u0027] \u003d order_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_a4a622bf","line":227,"updated":"2014-12-03 16:12:35.000000000","message":"The \u0027order_id\u0027 is the Barbican order record ID. That is probably not what you want here, rather you probably want that response.get(\u0027id\u0027) that I suggested being stored in \u0027plugin_meta\u0027 above. In which case here, you would say \u0027order_id\u003dplugin_meta.get(\u0027id\u0027)\u0027","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    response \u003d order.view(order_id\u003dorder_id)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    if response.get(RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"},{"line_number":230,"context_line":"        order_meta[\u0027order_id\u0027] \u003d order_id"},{"line_number":231,"context_line":"        certificate \u003d order.download(**order_meta)"},{"line_number":232,"context_line":"        RESULT_STATUS_ATTRS[RESULT_CERTIFICATE] \u003d certificate.get(\u0027certificates\u0027).get(\u0027certificate\u0027)"},{"line_number":233,"context_line":"        RESULT_STATUS_ATTRS[RESULT_INTERMEDIATES] \u003d certificate.get(\u0027certificates\u0027).get(\u0027intermediate\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_24231206","line":230,"updated":"2014-12-03 16:12:35.000000000","message":"See comment about the \u0027order_id\u0027 above...this is very likely not what you want here. Also see comments about **order_meta above...that order_meta dict is not intended to be modified, but rather read-only info about what the client provided for the \u0027meta\u0027 tag in the order request.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        RESULT_STATUS_ATTRS[RESULT_INTERMEDIATES] \u003d certificate.get(\u0027certificates\u0027).get(\u0027intermediate\u0027)"},{"line_number":234,"context_line":"    elif response.get(\u0027status\u0027) \u003d\u003d \u0027pending issuance\u0027:"},{"line_number":235,"context_line":"        RESULT_STATUS_ATTRS[RESULT_STATUS_MESSAGE] \u003d response.get(\u0027status\u0027)"},{"line_number":236,"context_line":"    return dict(RESULT_STATUS_ATTRS)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def _map_attributes(input_attrs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_a4654246","line":236,"updated":"2014-12-03 16:12:35.000000000","message":"SEe comments above about not using that global RESULT_STATUS_ATTRS as mutable global state.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    :param input_attrs:"},{"line_number":243,"context_line":"    :return:"},{"line_number":244,"context_line":"    \"\"\""},{"line_number":245,"context_line":"    for old, new in DIGICERT_API_REQUEST_ATTRS.iteritems():"},{"line_number":246,"context_line":"        value \u003d input_attrs.get(old, None)"},{"line_number":247,"context_line":"        if value is None:"},{"line_number":248,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_0e6f1093","line":245,"updated":"2014-12-03 16:59:45.000000000","message":"If you\u0027re gonna keep this, you\u0027ll need to switch to six.iteritems(...)","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            continue"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        input_attrs[new] \u003d value"},{"line_number":251,"context_line":"        del input_attrs[old]"},{"line_number":252,"context_line":"    return input_attrs"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_e46e6aff","line":251,"updated":"2014-12-03 16:12:35.000000000","message":"What is the old and new names are identical? Also, please stay abreast of blueprint efforts related to standardizing fields for certificate orders, or else allowing for clients to discover specific plugins and their input templates. A 9am CST meeting to review blueprints is planned for tomorrow.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ef620797aa609029dd77797af5d8456d72503962","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    return input_attrs"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":256,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_045e1645","line":255,"updated":"2014-12-03 16:12:35.000000000","message":"Please don\u0027t include this block, as plugins are not intended to be run standalone.","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"3a961159_ae9f375e","updated":"2014-12-18 19:46:18.000000000","message":"Please rename this to digicert.py","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        # TODO(Jeff Fischer) future input validation or"},{"line_number":75,"context_line":"        # TODO(Jeff Fischer) product type mapping or attribute key mapping"},{"line_number":76,"context_line":"        # TODO(Jeff Fischer) returned id to be persisted through plugin_meta"},{"line_number":77,"context_line":"        response \u003d self.orderclient.place(**order_meta)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        result \u003d \u0027\u0027"},{"line_number":80,"context_line":"        if not response.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ee8f7f21","line":77,"updated":"2014-12-18 19:46:18.000000000","message":"So it is possible that multiple threads would share this code (cooperatively) and block on the IO to the CA...do you know if CertificateOrder instances are thread safe off hand?\n\nSo each invocation of this call should return a unique \u0027order\u0027 ID as determined by the CA.","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        response \u003d self.orderclient.place(**order_meta)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        result \u003d \u0027\u0027"},{"line_number":80,"context_line":"        if not response.get(\u0027id\u0027):"},{"line_number":81,"context_line":"            status_message \u003d \u0027%s : %s\u0027 % (response.get(RESULT_STATUS),"},{"line_number":82,"context_line":"                                          response.get(RESULT_STATUS_MESSAGE))"},{"line_number":83,"context_line":"            cert_status \u003d cert.CertificateStatus.CA_UNAVAILABLE_FOR_REQUEST"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ce9ac36d","line":80,"updated":"2014-12-18 19:46:18.000000000","message":"Just checking...If the ID is not responded with, does that really mean the CA is unavailable, and that we could retry this call again in the future (say 10 min from now)?","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        result \u003d \u0027\u0027"},{"line_number":80,"context_line":"        if not response.get(\u0027id\u0027):"},{"line_number":81,"context_line":"            status_message \u003d \u0027%s : %s\u0027 % (response.get(RESULT_STATUS),"},{"line_number":82,"context_line":"                                          response.get(RESULT_STATUS_MESSAGE))"},{"line_number":83,"context_line":"            cert_status \u003d cert.CertificateStatus.CA_UNAVAILABLE_FOR_REQUEST"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_8e90bb4f","line":81,"updated":"2014-12-18 19:46:18.000000000","message":"Please use something like this instead:\n\u0027{0} : {1}\u0027.format(...)","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            result \u003d cert.ResultDTO(cert_status, status_message\u003dstatus_message)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            # plugin_meta[\u0027id\u0027] \u003d response.get(\u0027id\u0027)"},{"line_number":88,"context_line":"            status_message \u003d response.get(RESULT_STATUS_MESSAGE)"},{"line_number":89,"context_line":"            result \u003d cert.ResultDTO(cert.CertificateStatus.WAITING_FOR_CA,"},{"line_number":90,"context_line":"                                    status_message\u003dstatus_message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_2e834705","line":87,"updated":"2014-12-18 19:46:18.000000000","message":"You do need to do this, so that this ID can be used for subsequent calls for this specific order.","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # TODO(Jeff Fischer) order_id coming through belongs to Barbican."},{"line_number":108,"context_line":"        response \u003d self.orderclient.view(order_id\u003dorder_id)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if response.get(RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"},{"line_number":111,"context_line":"            order_meta[\u0027order_id\u0027] \u003d order_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_2e9a6763","line":108,"updated":"2014-12-18 19:46:18.000000000","message":"So instead of the order_id, use: plugin_meta.get(\u0027id\u0027)\n\nThis will be the same \u0027id\u0027 from line #87 above.","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        response \u003d self.orderclient.view(order_id\u003dorder_id)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if response.get(RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"},{"line_number":111,"context_line":"            order_meta[\u0027order_id\u0027] \u003d order_id"},{"line_number":112,"context_line":"            certificate \u003d self.orderclient.download(**order_meta)"},{"line_number":113,"context_line":"            result_cert \u003d certificate.get(\u0027certificates\u0027).get(\u0027certificate\u0027)"},{"line_number":114,"context_line":"            result_inter \u003d certificate.get(\u0027certificates\u0027).get(\u0027intermediate\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_aead778a","line":111,"updated":"2014-12-18 19:46:18.000000000","message":"The \u0027order_meta\u0027 is read only, and is what the client passed as part of the POST /orders call, so you should not try to set things onto it.","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"82d07bcf2bf541779cc3d7f78bb404a4fddf5f60","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if response.get(RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"},{"line_number":111,"context_line":"            order_meta[\u0027order_id\u0027] \u003d order_id"},{"line_number":112,"context_line":"            certificate \u003d self.orderclient.download(**order_meta)"},{"line_number":113,"context_line":"            result_cert \u003d certificate.get(\u0027certificates\u0027).get(\u0027certificate\u0027)"},{"line_number":114,"context_line":"            result_inter \u003d certificate.get(\u0027certificates\u0027).get(\u0027intermediate\u0027)"},{"line_number":115,"context_line":"            cert_status \u003d cert.CertificateStatus.CERTIFICATE_GENERATED"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_0eba0bc0","line":112,"updated":"2014-12-18 19:46:18.000000000","message":"I would expect this call to take the digicert ID as an input (so the one from plugin_meta.get(\u0027id\u0027) above), so that I only get that specific digicert order\u0027s certificate?","commit_id":"d3e05d57e5424b2a85bb35f29833b05b463a0dce"}],"barbican/plugin/digicert.py":[{"author":{"_account_id":11970,"name":"Chelsea Winfree","email":"chelsea.winfree@gmail.com","username":"chellygel"},"change_message_id":"5f4d1da29ed8ba2c43375f0e2162d3a9193839ce","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.dc_host \u003d conf.digicert_plugin.dc_host"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if self.api_key is None:"},{"line_number":53,"context_line":"            raise ValueError(u._(\"Api Key is required\"))"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        if self.dc_host is None:"},{"line_number":56,"context_line":"            raise ValueError(u._(\"API Host is required\"))"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_adba376c","line":53,"updated":"2015-03-10 21:14:03.000000000","message":"nit: below you have API, here you have Api... I think API should be fine though.","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":11970,"name":"Chelsea Winfree","email":"chelsea.winfree@gmail.com","username":"chellygel"},"change_message_id":"5f4d1da29ed8ba2c43375f0e2162d3a9193839ce","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        if self.dc_host is None:"},{"line_number":56,"context_line":"            raise ValueError(u._(\"API Host is required\"))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self.orderclient \u003d CertificateOrder(self.dc_host, self.api_key,"},{"line_number":59,"context_line":"                                            customer_name\u003dself.account_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def check_certificate_status(self, order_id, order_meta, plugin_meta):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_e8d6ddc2","line":58,"updated":"2015-03-10 21:14:03.000000000","message":"nit: order_client ?","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"ede21fb75383429eb9aad49f0319b4f981c108c7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.orderclient \u003d CertificateOrder(self.dc_host, self.api_key,"},{"line_number":59,"context_line":"                                            customer_name\u003dself.account_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def check_certificate_status(self, order_id, order_meta, plugin_meta):"},{"line_number":62,"context_line":"        \"\"\"Check status of the order"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        :param order_id: ID associated with the order"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_50d61950","line":61,"updated":"2015-03-13 14:52:55.000000000","message":"Note: there has been a change in the cert api - ie. the addition of barbican_meta_dto object.  This applies to all the methods in the interface.  Please adjust accordingly.","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":11970,"name":"Chelsea Winfree","email":"chelsea.winfree@gmail.com","username":"chellygel"},"change_message_id":"5f4d1da29ed8ba2c43375f0e2162d3a9193839ce","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        :rtype: :class:`ResultDTO`"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        oid \u003d plugin_meta.get(\u0027id\u0027)"},{"line_number":76,"context_line":"        response \u003d self.orderclient.view(oid, **order_meta)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if response.get(self.RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_e8917d9b","line":75,"updated":"2015-03-10 21:14:03.000000000","message":"is this order id?","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"ede21fb75383429eb9aad49f0319b4f981c108c7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        :rtype: :class:`ResultDTO`"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        oid \u003d plugin_meta.get(\u0027id\u0027)"},{"line_number":76,"context_line":"        response \u003d self.orderclient.view(oid, **order_meta)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if response.get(self.RESULT_STATUS) \u003d\u003d \u0027issued\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_0b52b434","line":75,"in_reply_to":"9a80dd14_e8917d9b","updated":"2015-03-13 14:52:55.000000000","message":"Just offhand, I dont think this is order_id.  This is what was stored in the plugin_meta when the cert request was issued. (line 122).  You might want to use a constant to refer to this field.  Like self.REQUEST_ID \u003d \"id\"\n\nIs there a case where oid might not be defined?","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"ede21fb75383429eb9aad49f0319b4f981c108c7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            result \u003d cert.ResultDTO(cert_status)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        return result"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def issue_certificate_request(self, order_id, order_meta, plugin_meta):"},{"line_number":98,"context_line":"        \"\"\"Create the initial order"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_46bca3bb","line":96,"updated":"2015-03-13 14:52:55.000000000","message":"What if the CA is unavailable when the check_certificate_status call is made?  Is response {} then?\n\nAre these the only possible status results?","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"ede21fb75383429eb9aad49f0319b4f981c108c7","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                  populated by the plugin implementation"},{"line_number":108,"context_line":"        :rtype: :class:`ResultDTO`"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        response \u003d self.orderclient.place(**order_meta)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if not response.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_70579d5a","line":110,"updated":"2015-03-13 14:52:55.000000000","message":"With the addition of the common cert api, things get a little more complicated here.  See the dogtag ca plugin for details.  \n\nYou have implemented what is known as the custom_request type.  Because the API method supported_request_types() by default specifies that you support only the custom_request type, you don\u0027t have to change anything here.\n\nBut if you want to support other types in the cert api, you need to implement the supported_request_types() and check for request types in this method.","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"ede21fb75383429eb9aad49f0319b4f981c108c7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            result \u003d cert.ResultDTO(cert.CertificateStatus.WAITING_FOR_CA,"},{"line_number":125,"context_line":"                                    status_message\u003dstatus_message)"},{"line_number":126,"context_line":"        return result"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def modify_certificate_request(self, order_id, order_meta, plugin_meta):"},{"line_number":129,"context_line":"        \"\"\"Update the order meta-data  This operation is not supported"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_eb4ac0ab","line":127,"updated":"2015-03-13 14:52:55.000000000","message":"I\u0027m unfamiliar with the digicert API or its client, but from the code here, it looks like a cert request (with an associated id is always created, right?  (assuming that the CA is available).\n\nWhat if you sent in a blank request?  Or did not have the credentials to submit a request?\n\nJust checking that the only two options on cert request issuance are ca unavailable and request issued.\n\nIf the CA is unavailable, response will be {} and not None, right?","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"}],"barbican/tests/plugin/test_digicert.py":[{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"ede21fb75383429eb9aad49f0319b4f981c108c7","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        )"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        self.assertEqual(result.status, \"waiting for CA\")"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_no_api_key(self):"},{"line_number":87,"context_line":"        \"\"\"tests validation for no api key passed in"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_8badc49d","line":85,"updated":"2015-03-13 14:52:55.000000000","message":"Its probably better to use the constants provided in the API -- ie. CertificateStatus.WAITING_FOR_CA\n\nAlso, if I recall correctly, the call is \nself.assertEqual(expected, observed)","commit_id":"ed809bf3f6707ee1d7fb750ad16c662f5ed16787"}],"setup.cfg":[{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"e76c3b968e7a656117b127dcfe903fc2ca1f4843","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    simple_certificate \u003d barbican.plugin.simple_certificate_manager:SimpleCertificatePlugin"},{"line_number":39,"context_line":"    symantec \u003d barbican.plugin.symantec:SymantecCertificatePlugin"},{"line_number":40,"context_line":"    dogtag \u003d barbican.plugin.dogtag:DogtagCAPlugin"},{"line_number":41,"context_line":"    dc \u003d barbican.plugin.dc:DigiCertCertificatePlugin"},{"line_number":42,"context_line":"barbican.certificate.event.plugin \u003d"},{"line_number":43,"context_line":"    simple_certificate_event \u003d barbican.plugin.simple_certificate_manager:SimpleCertificateEventPlugin"},{"line_number":44,"context_line":"barbican.test.crypto.plugin \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"5a890539_4e703808","line":41,"updated":"2014-12-03 16:59:45.000000000","message":"Please rename \"dc\" to \"digicert\"","commit_id":"ceeaada9662cde85a3e57fde9d1ffa2cb0931531"}]}
