)]}'
{"src/openstack.js":[{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"1a2ccf41530d0a4f8d285ccb508cabecdf0a0a9d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"   * @returns {Promise.\u003cNeutron\u003e} A promise which will resolve with Neutron instance."},{"line_number":55,"context_line":"   * @private"},{"line_number":56,"context_line":"   */"},{"line_number":57,"context_line":"  _fetchNeutron() {"},{"line_number":58,"context_line":"    if (!this._neutronPromise) {"},{"line_number":59,"context_line":"      this._neutronPromise \u003d this._getComponentConfigFor(\u0027neutron\u0027)"},{"line_number":60,"context_line":"        .then((componentConfig) \u003d\u003e new Neutron(componentConfig));"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a95cdbc_0bf7dbf5","line":57,"updated":"2016-10-05 22:40:06.000000000","message":"This is called \"fetchNeutron\", not \"getNeutron\" because it returns a promise. Notice that \"getKeystone\" doesn\u0027t return a promise because we don\u0027t need anything to wait for.\nI first started to unify both methods, but making \"getKeystone\" to return a promise would have complexify a lot \"_getComponentConfigFor\" for nothing (I would need to do a double promise imbrication)","commit_id":"213ec3b08eaa7580eae4a22246625ba3de65c17d"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"1a2ccf41530d0a4f8d285ccb508cabecdf0a0a9d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"   * @returns {Promise.\u003cT\u003e} A promise which will resolve with the token."},{"line_number":69,"context_line":"   * @private"},{"line_number":70,"context_line":"   */"},{"line_number":71,"context_line":"  _getToken() {"},{"line_number":72,"context_line":"    if (!this._tokenPromise) {"},{"line_number":73,"context_line":"      this._tokenPromise \u003d this._getKeystone().tokenIssue();"},{"line_number":74,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a95cdbc_abd0a754","line":71,"updated":"2016-10-05 22:40:06.000000000","message":"token promise is cached so we don\u0027t reauthenticate all the time. Right now \"catalogList\" is not cached  but I could if you think it\u0027s a good idea.","commit_id":"213ec3b08eaa7580eae4a22246625ba3de65c17d"},{"author":{"_account_id":23621,"name":"Pascal Boutin","email":"pboutin@internap.com","username":"pboutin"},"change_message_id":"61900a99af1a1a8c4ce175773244235aec379cc7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"   * @returns {Promise.\u003cT\u003e} A promise which will resolve with the token."},{"line_number":69,"context_line":"   * @private"},{"line_number":70,"context_line":"   */"},{"line_number":71,"context_line":"  _getToken() {"},{"line_number":72,"context_line":"    if (!this._tokenPromise) {"},{"line_number":73,"context_line":"      this._tokenPromise \u003d this._getKeystone().tokenIssue();"},{"line_number":74,"context_line":"    }"}],"source_content_type":"text/javascript","patch_set":3,"id":"fa6399be_03d2e927","line":71,"updated":"2016-10-14 18:11:57.000000000","message":"since it returns a promise, I think we should keep the wording \"fetch\" for this one too.","commit_id":"5dcabc505dc6914dfdc167d443008a92d2e02e47"},{"author":{"_account_id":8735,"name":"Vitaly Kramskikh","email":"vkramskikh@mirantis.com","username":"vkramskikh"},"change_message_id":"7649edc62402ef2e7030756cd712090095c8433d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"   */"},{"line_number":85,"context_line":"  _getComponentConfigFor(name) {"},{"line_number":86,"context_line":"    return this._token"},{"line_number":87,"context_line":"      .then((token) \u003d\u003e this._keystone.then((k) \u003d\u003e k.catalogList(token)))"},{"line_number":88,"context_line":"      .then((catalog) \u003d\u003e catalog.find((entry) \u003d\u003e entry.name \u003d\u003d\u003d name))"},{"line_number":89,"context_line":"      .then((entry) \u003d\u003e entry.endpoints.find((endpoint) \u003d\u003e endpoint.interface \u003d\u003d\u003d \u0027public\u0027));"},{"line_number":90,"context_line":"  }"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa6399be_28d95af3","line":87,"range":{"start_line":87,"start_character":44,"end_line":87,"end_character":45},"updated":"2016-10-17 14:14:42.000000000","message":"I\u0027d use a more meaningful name","commit_id":"4455673552a84e4fc97e476a50a7f377819cf3b6"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"73549fcee0ac8ecc15078653f5adeff85fb370fb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"   */"},{"line_number":85,"context_line":"  _getComponentConfigFor(name) {"},{"line_number":86,"context_line":"    return this._token"},{"line_number":87,"context_line":"      .then((token) \u003d\u003e this._keystone.then((k) \u003d\u003e k.catalogList(token)))"},{"line_number":88,"context_line":"      .then((catalog) \u003d\u003e catalog.find((entry) \u003d\u003e entry.name \u003d\u003d\u003d name))"},{"line_number":89,"context_line":"      .then((entry) \u003d\u003e entry.endpoints.find((endpoint) \u003d\u003e endpoint.interface \u003d\u003d\u003d \u0027public\u0027));"},{"line_number":90,"context_line":"  }"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa6399be_c02fd23c","line":87,"range":{"start_line":87,"start_character":44,"end_line":87,"end_character":45},"in_reply_to":"fa6399be_28d95af3","updated":"2016-10-17 14:41:10.000000000","message":"Done","commit_id":"4455673552a84e4fc97e476a50a7f377819cf3b6"}],"test/unit/openstackTest.js":[{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"1a2ccf41530d0a4f8d285ccb508cabecdf0a0a9d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"  describe(\u0027networkList\u0027, () \u003d\u003e {"},{"line_number":34,"context_line":"    it(\u0027should fetch networkList from neutron\u0027, (done) \u003d\u003e {"},{"line_number":35,"context_line":"      const openstack \u003d new OpenStack(mockData.config);"},{"line_number":36,"context_line":"      const neutron \u003d mockNeutron(openstack);"},{"line_number":37,"context_line":"      const networksData \u003d neutronMockData.networkList(\u0027token\u0027).response.networks;"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"      spyOn(neutron, \u0027networkList\u0027).and.returnValue(Promise.resolve(networksData));"}],"source_content_type":"text/javascript","patch_set":1,"id":"1a95cdbc_2b73b781","line":36,"updated":"2016-10-05 22:40:06.000000000","message":"In this test I mock \"neutron\" instance, as we\u0027re in a unit test, not a functional test. I didn\u0027t want to mock what neutron is expected to do (meaning mock api calls)\nHowever, mocking \"neutron\" instance means the \"_fetchNeutron\" function is not entirely tested. So I test it separately, and in this case only, I need to mock api calls of both keystone and neutron.","commit_id":"213ec3b08eaa7580eae4a22246625ba3de65c17d"},{"author":{"_account_id":22670,"name":"Mitchell Smolash","email":"mitch@smolash.com","username":"msmol"},"change_message_id":"f15a51e59de518c0c4a670ecd64fd595910c7aa5","unresolved":false,"context_lines":[{"line_number":2,"context_line":"import * as mockData from \u0027./helpers/data/openstack\u0027;"},{"line_number":3,"context_line":"import * as neutronMockData from \u0027./helpers/data/neutron\u0027;"},{"line_number":4,"context_line":"import * as keystoneMockData from \u0027./helpers/data/keystone\u0027;"},{"line_number":5,"context_line":"import fetchMock from \u0027fetch-mock\u0027;"},{"line_number":6,"context_line":"import Neutron from \"../../src/neutron\";"},{"line_number":7,"context_line":"import Keystone from \"../../src/keystone\";"},{"line_number":8,"context_line":""}],"source_content_type":"text/javascript","patch_set":3,"id":"fa6399be_06b509ed","line":5,"updated":"2016-10-12 15:16:14.000000000","message":"I seem to remember there was a reason FetchMock was being imported as a commonJS module and not as a native ES6 module.\n\nDo you remember why / is this no longer required?","commit_id":"5dcabc505dc6914dfdc167d443008a92d2e02e47"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"97fbfeb99ef14ec164918a714c6032360983746e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"import * as mockData from \u0027./helpers/data/openstack\u0027;"},{"line_number":3,"context_line":"import * as neutronMockData from \u0027./helpers/data/neutron\u0027;"},{"line_number":4,"context_line":"import * as keystoneMockData from \u0027./helpers/data/keystone\u0027;"},{"line_number":5,"context_line":"import fetchMock from \u0027fetch-mock\u0027;"},{"line_number":6,"context_line":"import Neutron from \"../../src/neutron\";"},{"line_number":7,"context_line":"import Keystone from \"../../src/keystone\";"},{"line_number":8,"context_line":""}],"source_content_type":"text/javascript","patch_set":3,"id":"fa6399be_f3b8cee7","line":5,"in_reply_to":"fa6399be_06b509ed","updated":"2016-10-12 18:52:51.000000000","message":"No I don\u0027t recall that. The only thing I remember is krotscheck did use \"require\"  but it was a line he forgot to put back as \"import\" when he played with fetch-mock","commit_id":"5dcabc505dc6914dfdc167d443008a92d2e02e47"},{"author":{"_account_id":8735,"name":"Vitaly Kramskikh","email":"vkramskikh@mirantis.com","username":"vkramskikh"},"change_message_id":"7649edc62402ef2e7030756cd712090095c8433d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import OpenStack from \"../../src/openstack\";"},{"line_number":2,"context_line":"import * as mockData from \u0027./helpers/data/openstack\u0027;"},{"line_number":3,"context_line":"import * as neutronMockData from \u0027./helpers/data/neutron\u0027;"},{"line_number":4,"context_line":"import * as keystoneMockData from \u0027./helpers/data/keystone\u0027;"},{"line_number":5,"context_line":"import fetchMock from \u0027fetch-mock\u0027;"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa6399be_c8b45e83","line":2,"range":{"start_line":2,"start_character":12,"end_line":2,"end_character":20},"updated":"2016-10-17 14:14:42.000000000","message":"This probably should be renamed to openstackMockData since there are more mock data bundles imported","commit_id":"4455673552a84e4fc97e476a50a7f377819cf3b6"},{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"73549fcee0ac8ecc15078653f5adeff85fb370fb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import OpenStack from \"../../src/openstack\";"},{"line_number":2,"context_line":"import * as mockData from \u0027./helpers/data/openstack\u0027;"},{"line_number":3,"context_line":"import * as neutronMockData from \u0027./helpers/data/neutron\u0027;"},{"line_number":4,"context_line":"import * as keystoneMockData from \u0027./helpers/data/keystone\u0027;"},{"line_number":5,"context_line":"import fetchMock from \u0027fetch-mock\u0027;"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa6399be_80ff9aa9","line":2,"range":{"start_line":2,"start_character":12,"end_line":2,"end_character":20},"in_reply_to":"fa6399be_c8b45e83","updated":"2016-10-17 14:41:10.000000000","message":"Done","commit_id":"4455673552a84e4fc97e476a50a7f377819cf3b6"}]}
