)]}'
{"ansible/resource_wait.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- hosts: localhost"},{"line_number":3,"context_line":"  tasks:"},{"line_number":4,"context_line":"    - name: Check that OpenStack credentials exist in the environment"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_3dcdbeb9","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":3},"updated":"2018-11-06 19:29:22.000000000","message":"We will need to make this optional for standalone environments where there is no placement.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"8302173107cbc3666f04000e961444c47cc47ba7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- hosts: localhost"},{"line_number":3,"context_line":"  tasks:"},{"line_number":4,"context_line":"    - name: Check that OpenStack credentials exist in the environment"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_577f2a15","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":3},"in_reply_to":"3f79a3b5_3dcdbeb9","updated":"2018-11-07 10:10:05.000000000","message":"feature flag with default disabled?","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"bad884a0bcae46ebbaacc28beb9cc54def0258a4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- hosts: localhost"},{"line_number":3,"context_line":"  tasks:"},{"line_number":4,"context_line":"    - name: Check that OpenStack credentials exist in the environment"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_dd84bb59","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":3},"in_reply_to":"3f79a3b5_577f2a15","updated":"2018-11-07 11:05:23.000000000","message":"If we could determine whether keystone is in use or not, we could then query the service catalogue for the compute service, which would make it automatic. Looks like we currently assume that keystone is in use (we\u0027ll need to fix that), but in that case we can just check the catalogue.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":33,"context_line":"      vars:"},{"line_number":34,"context_line":"        wait_for_resource_expected_count: \"{{ resource.count | int }}\""},{"line_number":35,"context_line":"        wait_for_resource_class: \"{{ \u0027CUSTOM_\u0027 ~ resource.name | upper | replace(\u0027-\u0027, \u0027_\u0027) }}\""},{"line_number":36,"context_line":"        wait_for_resources_class_traits: \"{{ resource.traits }}\""},{"line_number":37,"context_line":"        wait_for_resource_venv: \"{{ virtualenv_path }}\""},{"line_number":38,"context_line":"        wait_for_resource_python_upper_constraints_url: \u003e-"},{"line_number":39,"context_line":"          {{ python_upper_constraints_url }}"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_fdc2e687","line":36,"range":{"start_line":36,"start_character":25,"end_line":36,"end_character":26},"updated":"2018-11-06 19:29:22.000000000","message":"resource","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"8302173107cbc3666f04000e961444c47cc47ba7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"      vars:"},{"line_number":34,"context_line":"        wait_for_resource_expected_count: \"{{ resource.count | int }}\""},{"line_number":35,"context_line":"        wait_for_resource_class: \"{{ \u0027CUSTOM_\u0027 ~ resource.name | upper | replace(\u0027-\u0027, \u0027_\u0027) }}\""},{"line_number":36,"context_line":"        wait_for_resources_class_traits: \"{{ resource.traits }}\""},{"line_number":37,"context_line":"        wait_for_resource_venv: \"{{ virtualenv_path }}\""},{"line_number":38,"context_line":"        wait_for_resource_python_upper_constraints_url: \u003e-"},{"line_number":39,"context_line":"          {{ python_upper_constraints_url }}"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_17753233","line":36,"range":{"start_line":36,"start_character":25,"end_line":36,"end_character":26},"in_reply_to":"3f79a3b5_fdc2e687","updated":"2018-11-07 10:10:05.000000000","message":"thanks","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        wait_for_resource_venv: \"{{ virtualenv_path }}\""},{"line_number":38,"context_line":"        wait_for_resource_python_upper_constraints_url: \u003e-"},{"line_number":39,"context_line":"          {{ python_upper_constraints_url }}"},{"line_number":40,"context_line":"      loop: \"{{ tenks_expected_resources }}\""},{"line_number":41,"context_line":"      loop_control:"},{"line_number":42,"context_line":"        loop_var: resource"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_7db6d628","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":40},"updated":"2018-11-06 19:29:22.000000000","message":"Having the loop outside the role means we\u0027ll hit the package installation on each iteration.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"8302173107cbc3666f04000e961444c47cc47ba7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        wait_for_resource_venv: \"{{ virtualenv_path }}\""},{"line_number":38,"context_line":"        wait_for_resource_python_upper_constraints_url: \u003e-"},{"line_number":39,"context_line":"          {{ python_upper_constraints_url }}"},{"line_number":40,"context_line":"      loop: \"{{ tenks_expected_resources }}\""},{"line_number":41,"context_line":"      loop_control:"},{"line_number":42,"context_line":"        loop_var: resource"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_179a125f","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":40},"in_reply_to":"3f79a3b5_7db6d628","updated":"2018-11-07 10:10:05.000000000","message":"OK, I\u0027ll refactor to use a loop internally.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":19,"context_line":"        set_fact:"},{"line_number":20,"context_line":"          tenks_expected_resources: []"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"      - name: Build list of expected resources"},{"line_number":23,"context_line":"        # takes the form: [{ resource_class: CUSTOM_TEST_RC, amount: 2, traits: [] }, ]"},{"line_number":24,"context_line":"        vars:"},{"line_number":25,"context_line":"          resource:"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f79a3b5_6361d73c","line":22,"updated":"2018-11-16 14:28:49.000000000","message":"Does this work if we have two specs with the same RC but different traits?","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"ac1b0268f0a96e8d0cfeb001daf06c4268bb91eb","unresolved":false,"context_lines":[{"line_number":19,"context_line":"        set_fact:"},{"line_number":20,"context_line":"          tenks_expected_resources: []"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"      - name: Build list of expected resources"},{"line_number":23,"context_line":"        # takes the form: [{ resource_class: CUSTOM_TEST_RC, amount: 2, traits: [] }, ]"},{"line_number":24,"context_line":"        vars:"},{"line_number":25,"context_line":"          resource:"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f79a3b5_30c8d874","line":22,"in_reply_to":"3f79a3b5_2565fc4a","updated":"2018-11-16 16:08:37.000000000","message":"I think you\u0027re thinking of it like scheduling, where we specify a set of minimum constraints. But really we want an exact match, because that is what we have specified for the ironic nodes, and how they should ultimately be reported into placement. Agree?","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"c85b067ade8b328ef226aa3efc47c75cc487c375","unresolved":false,"context_lines":[{"line_number":19,"context_line":"        set_fact:"},{"line_number":20,"context_line":"          tenks_expected_resources: []"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"      - name: Build list of expected resources"},{"line_number":23,"context_line":"        # takes the form: [{ resource_class: CUSTOM_TEST_RC, amount: 2, traits: [] }, ]"},{"line_number":24,"context_line":"        vars:"},{"line_number":25,"context_line":"          resource:"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f79a3b5_f06ee02b","line":22,"in_reply_to":"3f79a3b5_30c8d874","updated":"2018-11-16 16:23:10.000000000","message":"Sounds reasonable - was trying to make it more general purpose and probably over-complicated things.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"ddf3cf8c7745b8bd64bb06378554f21c2e1eac91","unresolved":false,"context_lines":[{"line_number":19,"context_line":"        set_fact:"},{"line_number":20,"context_line":"          tenks_expected_resources: []"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"      - name: Build list of expected resources"},{"line_number":23,"context_line":"        # takes the form: [{ resource_class: CUSTOM_TEST_RC, amount: 2, traits: [] }, ]"},{"line_number":24,"context_line":"        vars:"},{"line_number":25,"context_line":"          resource:"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f79a3b5_2565fc4a","line":22,"in_reply_to":"3f79a3b5_6361d73c","updated":"2018-11-16 15:38:29.000000000","message":"It depends on what we expect to happen in that case. At the moment, it works in the sense that it guarantees that you can request the resources from any given spec, but it does not guarantee they will be available if you request resources from more than one spec at a given time i.e there is no concept of reservation.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":8,"context_line":"          credentials exist in your environment, perhaps by sourcing your RC file."},{"line_number":9,"context_line":"      when: not lookup(\u0027env\u0027, \u0027OS_USERNAME\u0027)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    - name: Check whether or not the placement api is running"},{"line_number":12,"context_line":"      command: \u003e-"},{"line_number":13,"context_line":"        {{ virtualenv_path }}/bin/openstack service list -f json"},{"line_number":14,"context_line":"      register: service_list_output"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_1537b94e","line":11,"updated":"2018-11-19 14:55:20.000000000","message":"nit: Should this be called something like: Gather list of running services?","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"f1c4902804567f8ef0f96a95a2711396225082fe","unresolved":false,"context_lines":[{"line_number":8,"context_line":"          credentials exist in your environment, perhaps by sourcing your RC file."},{"line_number":9,"context_line":"      when: not lookup(\u0027env\u0027, \u0027OS_USERNAME\u0027)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    - name: Check whether or not the placement api is running"},{"line_number":12,"context_line":"      command: \u003e-"},{"line_number":13,"context_line":"        {{ virtualenv_path }}/bin/openstack service list -f json"},{"line_number":14,"context_line":"      register: service_list_output"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_ebb26031","line":11,"in_reply_to":"3f79a3b5_1537b94e","updated":"2018-11-19 16:42:30.000000000","message":"done","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"}],"ansible/roles/wait-for-resource/defaults/main.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# not take into account the reserved amount?"},{"line_number":14,"context_line":"wait_for_resource_expected_count:"},{"line_number":15,"context_line":"# Max retries with 1 second delay between each, an iteration takes approximatly 10 seconds"},{"line_number":16,"context_line":"wait_for_resource_retry_limit: 15"},{"line_number":17,"context_line":"# The URL of the upper constraints file to pass to pip when installing Python"},{"line_number":18,"context_line":"# packages."},{"line_number":19,"context_line":"wait_for_resource_python_upper_constraints_url:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_9d48922b","line":16,"range":{"start_line":16,"start_character":31,"end_line":16,"end_character":33},"updated":"2018-11-06 19:29:22.000000000","message":"Is this long enough? What is the poll interval in nova?","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"8302173107cbc3666f04000e961444c47cc47ba7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# not take into account the reserved amount?"},{"line_number":14,"context_line":"wait_for_resource_expected_count:"},{"line_number":15,"context_line":"# Max retries with 1 second delay between each, an iteration takes approximatly 10 seconds"},{"line_number":16,"context_line":"wait_for_resource_retry_limit: 15"},{"line_number":17,"context_line":"# The URL of the upper constraints file to pass to pip when installing Python"},{"line_number":18,"context_line":"# packages."},{"line_number":19,"context_line":"wait_for_resource_python_upper_constraints_url:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_f707561d","line":16,"range":{"start_line":16,"start_character":31,"end_line":16,"end_character":33},"in_reply_to":"3f79a3b5_9d48922b","updated":"2018-11-07 10:10:05.000000000","message":"The calls to the openstack client in the loop take a very long time. The precedent in the Ironic devstack plugin is to wait approximately 2 minutes.\n\nhttps://github.com/openstack/ironic/blob/36e87dc5b472d79470b783fbba9ce396e3cbb96e/devstack/lib/ironic#L1662\n\nI will look for the poll interval in nova.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"bad884a0bcae46ebbaacc28beb9cc54def0258a4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# not take into account the reserved amount?"},{"line_number":14,"context_line":"wait_for_resource_expected_count:"},{"line_number":15,"context_line":"# Max retries with 1 second delay between each, an iteration takes approximatly 10 seconds"},{"line_number":16,"context_line":"wait_for_resource_retry_limit: 15"},{"line_number":17,"context_line":"# The URL of the upper constraints file to pass to pip when installing Python"},{"line_number":18,"context_line":"# packages."},{"line_number":19,"context_line":"wait_for_resource_python_upper_constraints_url:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_ddb27b31","line":16,"range":{"start_line":16,"start_character":31,"end_line":16,"end_character":33},"in_reply_to":"3f79a3b5_f707561d","updated":"2018-11-07 11:05:23.000000000","message":"How about we increase the delay to 10 seconds so that we\u0027re not so dependent on the variable iteration time? Better to have a timeout that\u0027s too long than too short.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":18,"context_line":"# packages."},{"line_number":19,"context_line":"wait_for_resource_python_upper_constraints_url:"},{"line_number":20,"context_line":"# Path on the remote machine to copy the python requirements file to"},{"line_number":21,"context_line":"wait_for_python_requirements_path: /tmp/wait-for-python-requirements.txt"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_fd50a6d3","line":21,"range":{"start_line":21,"start_character":8,"end_line":21,"end_character":9},"updated":"2018-11-06 19:29:22.000000000","message":"resource","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"}],"ansible/roles/wait-for-resource/tasks/main.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":27,"context_line":"- name: Copy over requirements file"},{"line_number":28,"context_line":"  copy:"},{"line_number":29,"context_line":"    src: requirements.txt"},{"line_number":30,"context_line":"    dest: \"{{ wait_for_python_requirements_path }}\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- name: Install dependencies in supplied venv"},{"line_number":33,"context_line":"  pip:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_1d0b22d4","line":30,"range":{"start_line":30,"start_character":22,"end_line":30,"end_character":23},"updated":"2018-11-06 19:29:22.000000000","message":"resource","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- name: Install dependencies in supplied venv"},{"line_number":33,"context_line":"  pip:"},{"line_number":34,"context_line":"    requirements: \"{{ wait_for_python_requirements_path }}\""},{"line_number":35,"context_line":"    extra_args: \u003e-"},{"line_number":36,"context_line":"      {%- if wait_for_resource_python_upper_constraints_url -%}"},{"line_number":37,"context_line":"      -c {{ wait_for_resource_python_upper_constraints_url }}"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_7df9f6c3","line":34,"range":{"start_line":34,"start_character":30,"end_line":34,"end_character":31},"updated":"2018-11-06 19:29:22.000000000","message":"resource","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"}],"ansible/roles/wait-for-resource/tasks/wait-for-resources-loop.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"22128f28b10ed3ccb60af692fe916127faf37289","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    - name: Pausing to allow resources to become available"},{"line_number":35,"context_line":"      pause:"},{"line_number":36,"context_line":"        seconds: 1"},{"line_number":37,"context_line":"    - include_tasks: wait-for-resources-loop.yml"},{"line_number":38,"context_line":"  when:"},{"line_number":39,"context_line":"    - count | int \u003c\u003d wait_for_resource_retry_limit"},{"line_number":40,"context_line":"    - not loop_break | default(false)"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_ddc7ea64","line":37,"range":{"start_line":37,"start_character":21,"end_line":37,"end_character":48},"updated":"2018-11-06 19:29:22.000000000","message":"Recursive include, first time I\u0027ve seen this done!\n\nCould this be done with an \u0027until\u0027 loop?","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"bad884a0bcae46ebbaacc28beb9cc54def0258a4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    - name: Pausing to allow resources to become available"},{"line_number":35,"context_line":"      pause:"},{"line_number":36,"context_line":"        seconds: 1"},{"line_number":37,"context_line":"    - include_tasks: wait-for-resources-loop.yml"},{"line_number":38,"context_line":"  when:"},{"line_number":39,"context_line":"    - count | int \u003c\u003d wait_for_resource_retry_limit"},{"line_number":40,"context_line":"    - not loop_break | default(false)"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_dd47db1a","line":37,"range":{"start_line":37,"start_character":21,"end_line":37,"end_character":48},"in_reply_to":"3f79a3b5_b7947e43","updated":"2018-11-07 11:05:23.000000000","message":"That\u0027s a shame.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"8302173107cbc3666f04000e961444c47cc47ba7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    - name: Pausing to allow resources to become available"},{"line_number":35,"context_line":"      pause:"},{"line_number":36,"context_line":"        seconds: 1"},{"line_number":37,"context_line":"    - include_tasks: wait-for-resources-loop.yml"},{"line_number":38,"context_line":"  when:"},{"line_number":39,"context_line":"    - count | int \u003c\u003d wait_for_resource_retry_limit"},{"line_number":40,"context_line":"    - not loop_break | default(false)"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_b7947e43","line":37,"range":{"start_line":37,"start_character":21,"end_line":37,"end_character":48},"in_reply_to":"3f79a3b5_ddc7ea64","updated":"2018-11-07 10:10:05.000000000","message":"Unfortunately not, see: https://github.com/ansible/ansible/issues/17098. If we ever get support for loops with blocks or they \"taskify\" includes, We could convert this to a loop.","commit_id":"fcbbff9d6fc6bdc22e18f88a35322ecbd1ef7d6a"}],"ansible/roles/wait-for-resources/defaults/main.yml":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# Virtualenv containing OpenStack client"},{"line_number":14,"context_line":"wait_for_resources_venv:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# The resources are polled this many times. They delay between each iteration"},{"line_number":17,"context_line":"# is also configurable, but default to 10 seconds"},{"line_number":18,"context_line":"wait_for_resources_retry_limit: 15"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_95bf4978","line":16,"range":{"start_line":16,"start_character":44,"end_line":16,"end_character":48},"updated":"2018-11-19 14:55:20.000000000","message":"nit: s/They/The","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"wait_for_resources_venv:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# The resources are polled this many times. They delay between each iteration"},{"line_number":17,"context_line":"# is also configurable, but default to 10 seconds"},{"line_number":18,"context_line":"wait_for_resources_retry_limit: 15"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# The delay between each iteration."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_15d339d6","line":17,"range":{"start_line":17,"start_character":35,"end_line":17,"end_character":36},"updated":"2018-11-19 14:55:20.000000000","message":"nit: s/default/defaults","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"}],"ansible/roles/wait-for-resources/library/wait_for_resources.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DOCUMENTATION \u003d \"\"\""},{"line_number":18,"context_line":"module: wait_for_resources"},{"line_number":19,"context_line":"short_description: Waits for a set of resources to become available"},{"line_number":20,"context_line":"author: Will Szumski(will@stackhpc.com)"},{"line_number":21,"context_line":"options:"},{"line_number":22,"context_line":"  - option-name: resources"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_a22fc255","line":19,"updated":"2018-11-16 14:28:49.000000000","message":"... in placement?","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":87,"context_line":"def meets_criteria(actual, requested):"},{"line_number":88,"context_line":"    \"\"\"For each resource, determines whether the total satisfies the amount"},{"line_number":89,"context_line":"    requested, ignoring any unrequested resource_classes\"\"\""},{"line_number":90,"context_line":"    for rc in requested.keys():"},{"line_number":91,"context_line":"        if rc not in actual:"},{"line_number":92,"context_line":"            return False"},{"line_number":93,"context_line":"        if actual[rc] \u003c requested[rc]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_026a3617","line":90,"range":{"start_line":90,"start_character":8,"end_line":90,"end_character":10},"updated":"2018-11-16 14:28:49.000000000","message":"this is a spec rather than an rc?","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"ddf3cf8c7745b8bd64bb06378554f21c2e1eac91","unresolved":false,"context_lines":[{"line_number":87,"context_line":"def meets_criteria(actual, requested):"},{"line_number":88,"context_line":"    \"\"\"For each resource, determines whether the total satisfies the amount"},{"line_number":89,"context_line":"    requested, ignoring any unrequested resource_classes\"\"\""},{"line_number":90,"context_line":"    for rc in requested.keys():"},{"line_number":91,"context_line":"        if rc not in actual:"},{"line_number":92,"context_line":"            return False"},{"line_number":93,"context_line":"        if actual[rc] \u003c requested[rc]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_25fc1c3f","line":90,"range":{"start_line":90,"start_character":8,"end_line":90,"end_character":10},"in_reply_to":"3f79a3b5_026a3617","updated":"2018-11-16 15:38:29.000000000","message":"good point","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        inventory[item[\"resource_class\"]] \u003d item"},{"line_number":220,"context_line":"    result \u003d {}"},{"line_number":221,"context_line":"    for specifier in specifiers:"},{"line_number":222,"context_line":"        if not specifier.traits.issubset(provider.traits):"},{"line_number":223,"context_line":"            continue"},{"line_number":224,"context_line":"        if specifier.name in inventory:"},{"line_number":225,"context_line":"            result[specifier] \u003d inventory[specifier.name]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_026b1654","line":222,"range":{"start_line":222,"start_character":32,"end_line":222,"end_character":40},"updated":"2018-11-16 14:28:49.000000000","message":"Shouldn\u0027t this be an equality? If we have one spec of RC0, T1, and another with RC0, T1, T2 it will break the accounting won\u0027t it?","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"ddf3cf8c7745b8bd64bb06378554f21c2e1eac91","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        inventory[item[\"resource_class\"]] \u003d item"},{"line_number":220,"context_line":"    result \u003d {}"},{"line_number":221,"context_line":"    for specifier in specifiers:"},{"line_number":222,"context_line":"        if not specifier.traits.issubset(provider.traits):"},{"line_number":223,"context_line":"            continue"},{"line_number":224,"context_line":"        if specifier.name in inventory:"},{"line_number":225,"context_line":"            result[specifier] \u003d inventory[specifier.name]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_a5f7cc28","line":222,"range":{"start_line":222,"start_character":32,"end_line":222,"end_character":40},"in_reply_to":"3f79a3b5_026b1654","updated":"2018-11-16 15:38:29.000000000","message":"The logic was that a provider can provide multiple traits, e.g:\n\nHW_CPU_X86_SSSE3\nHW_CPU_X86_F16C\n\nIf you you were only interested in one trait, e.g HW_CPU_X86_SSSE3, and you checked with equality, you would determine that provider did not provide the requested resource.\n\nEach request for a resource is identified by the unique combination of resource class name and set of traits (we refer to this as the specifier). We perform the accounting for every combination - so they should not interfere. At this point we only care if the provider meets the criteria of the current specifier being processed.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if not specifier.traits.issubset(provider.traits):"},{"line_number":223,"context_line":"            continue"},{"line_number":224,"context_line":"        if specifier.name in inventory:"},{"line_number":225,"context_line":"            result[specifier] \u003d inventory[specifier.name]"},{"line_number":226,"context_line":"    return result"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_c2267e22","line":225,"range":{"start_line":225,"start_character":32,"end_line":225,"end_character":57},"updated":"2018-11-16 14:28:49.000000000","message":"Couldn\u0027t we simplify this quite a bit by just storing (total - reserved) here?\n\nAlso, could we break here? Only one specifier should match.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"ddf3cf8c7745b8bd64bb06378554f21c2e1eac91","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if not specifier.traits.issubset(provider.traits):"},{"line_number":223,"context_line":"            continue"},{"line_number":224,"context_line":"        if specifier.name in inventory:"},{"line_number":225,"context_line":"            result[specifier] \u003d inventory[specifier.name]"},{"line_number":226,"context_line":"    return result"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_a587cc0a","line":225,"range":{"start_line":225,"start_character":32,"end_line":225,"end_character":57},"in_reply_to":"3f79a3b5_c2267e22","updated":"2018-11-16 15:38:29.000000000","message":"I was trying to keep the data intact in case we were interested in other fields, but you are right it could simplify things.\n\nIf we made a request like:\n\n    rc: CUSTOM_1, traits: HW_CPU_X86_SSSE3, amount: 1\n    rc: CUSTOM_1, traits: HW_CPU_X86_AVX2, amount: 1\n\nwould we deem this satisfied if only one node matched and it was the same match for both requests?\n\nIf we treated a match like a reservation, we might have to be smarter than just selecting the first match otherwise the order in which you processed the requests would mater.\n\ne.g if you had the providers as follows:\n\n    provider1 - rc: CUSTOM_1, traits: [HW_CPU_X86_AVX2]\n\n    provider2 - rc: CUSTOM_1, traits: [HW_CPU_X86_SSSE3] \n\nand the requests:\n\n    request1 - rc: CUSTOM_1, traits: [], amount: 1\n    reqeust2 - rc: CUSTOM_1, traits: [HW_CPU_X86_AVX2], amount: 1\n\nand the first request reserves provider1. You would not be able to satisfy the second request, but if you reversed the requests, such that request2 reserved provider one, this could be satisfied.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/python"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2017 StackHPC Ltd."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_f5d79dbc","line":3,"range":{"start_line":3,"start_character":16,"end_line":3,"end_character":20},"updated":"2018-11-19 14:55:20.000000000","message":"nit: 2018?","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"b499b933843ca5c6b9d16e945cb4eeefd25a194a","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        inventory[item[\"resource_class\"]] \u003d item"},{"line_number":203,"context_line":"    result \u003d {}"},{"line_number":204,"context_line":"    for specifier in specifiers:"},{"line_number":205,"context_line":"        if not specifier.traits \u003d\u003d provider.traits:"},{"line_number":206,"context_line":"            continue"},{"line_number":207,"context_line":"        if specifier.name in inventory:"},{"line_number":208,"context_line":"            reserved \u003d inventory[specifier.name][\"reserved\"]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_d5ff0101","line":205,"range":{"start_line":205,"start_character":11,"end_line":205,"end_character":50},"updated":"2018-11-19 15:17:26.000000000","message":"nit: !\u003d","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    module \u003d AnsibleModule("},{"line_number":313,"context_line":"        argument_spec\u003ddict("},{"line_number":314,"context_line":"            resources\u003ddict(required\u003dTrue, type\u003d\u0027list\u0027),"},{"line_number":315,"context_line":"            maximum_retries\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d15),"},{"line_number":316,"context_line":"            delay\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d10),"},{"line_number":317,"context_line":"            venv\u003ddict(required\u003dFalse, type\u003d\u0027str\u0027, default\u003d\"\")"},{"line_number":318,"context_line":"        ),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_156fb9fb","line":315,"range":{"start_line":315,"start_character":69,"end_line":315,"end_character":71},"updated":"2018-11-19 14:55:20.000000000","message":"Is the default here already defined in defaults?","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"f1c4902804567f8ef0f96a95a2711396225082fe","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    module \u003d AnsibleModule("},{"line_number":313,"context_line":"        argument_spec\u003ddict("},{"line_number":314,"context_line":"            resources\u003ddict(required\u003dTrue, type\u003d\u0027list\u0027),"},{"line_number":315,"context_line":"            maximum_retries\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d15),"},{"line_number":316,"context_line":"            delay\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d10),"},{"line_number":317,"context_line":"            venv\u003ddict(required\u003dFalse, type\u003d\u0027str\u0027, default\u003d\"\")"},{"line_number":318,"context_line":"        ),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ebf580ca","line":315,"range":{"start_line":315,"start_character":69,"end_line":315,"end_character":71},"in_reply_to":"3f79a3b5_156fb9fb","updated":"2018-11-19 16:42:30.000000000","message":"True, but I\u0027m not sure it should be a required parameter.","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        argument_spec\u003ddict("},{"line_number":314,"context_line":"            resources\u003ddict(required\u003dTrue, type\u003d\u0027list\u0027),"},{"line_number":315,"context_line":"            maximum_retries\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d15),"},{"line_number":316,"context_line":"            delay\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d10),"},{"line_number":317,"context_line":"            venv\u003ddict(required\u003dFalse, type\u003d\u0027str\u0027, default\u003d\"\")"},{"line_number":318,"context_line":"        ),"},{"line_number":319,"context_line":"        supports_check_mode\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_b515a54d","line":316,"range":{"start_line":316,"start_character":61,"end_line":316,"end_character":63},"updated":"2018-11-19 14:55:20.000000000","message":"Should this come from `wait_for_resources_delay`?","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"f1c4902804567f8ef0f96a95a2711396225082fe","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        argument_spec\u003ddict("},{"line_number":314,"context_line":"            resources\u003ddict(required\u003dTrue, type\u003d\u0027list\u0027),"},{"line_number":315,"context_line":"            maximum_retries\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d15),"},{"line_number":316,"context_line":"            delay\u003ddict(required\u003dFalse, type\u003d\u0027int\u0027, default\u003d10),"},{"line_number":317,"context_line":"            venv\u003ddict(required\u003dFalse, type\u003d\u0027str\u0027, default\u003d\"\")"},{"line_number":318,"context_line":"        ),"},{"line_number":319,"context_line":"        supports_check_mode\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_8bcbac7d","line":316,"range":{"start_line":316,"start_character":61,"end_line":316,"end_character":63},"in_reply_to":"3f79a3b5_b515a54d","updated":"2018-11-19 16:42:30.000000000","message":"yep, it gets passed in: \n\nhttps://git.openstack.org/cgit/openstack/tenks/tree/ansible/roles/wait-for-resources/tasks/main.yml?h\u003drefs/changes/39/615939/12#n37","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"}],"tests/test_tenks_wait_for_resources.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2018 StackHPC Ltd."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_43805b9e","line":1,"updated":"2018-11-16 14:28:49.000000000","message":"nit: some trailing spaces.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"ddf3cf8c7745b8bd64bb06378554f21c2e1eac91","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2018 StackHPC Ltd."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_454918b7","line":1,"in_reply_to":"3f79a3b5_43805b9e","updated":"2018-11-16 15:38:29.000000000","message":"I think the trailing spaces existed in the original output","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":158,"context_line":"  {"},{"line_number":159,"context_line":"    \"name\": \"HW_CPU_X86_BMI\""},{"line_number":160,"context_line":"  }"},{"line_number":161,"context_line":"]\"\"\"  # noqa"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"resource_provider_no_traits_out \u003d \"\"\"[]"},{"line_number":164,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_8257265a","line":161,"updated":"2018-11-16 14:28:49.000000000","message":"Could do with a test checking trait subsets.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"resources_spurious_keys \u003d {"},{"line_number":209,"context_line":"    \u0027CUSTOM_B\u0027: 5,"},{"line_number":210,"context_line":"    \u0027CUSTOM_A\u0027: 6"},{"line_number":211,"context_line":"}"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"resources_key_missing \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_42490eb7","line":210,"updated":"2018-11-16 14:28:49.000000000","message":"Keys look ok to me.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"c85b067ade8b328ef226aa3efc47c75cc487c375","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"resources_spurious_keys \u003d {"},{"line_number":209,"context_line":"    \u0027CUSTOM_B\u0027: 5,"},{"line_number":210,"context_line":"    \u0027CUSTOM_A\u0027: 6"},{"line_number":211,"context_line":"}"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"resources_key_missing \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_457cb8c6","line":210,"in_reply_to":"3f79a3b5_42490eb7","updated":"2018-11-16 16:23:10.000000000","message":"yeah, should be extra_resources or similar","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3fd6bb92ce34616f717371c673f095dea83167b0","unresolved":false,"context_lines":[{"line_number":298,"context_line":"    def setUp(self):"},{"line_number":299,"context_line":"        super(TestTenksWaitForResource, self).setUp()"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_meets_criteria_not_enough(self):"},{"line_number":302,"context_line":"        self.assertFalse(meets_criteria(actual\u003dresources_not_enough,"},{"line_number":303,"context_line":"                                        requested\u003dresources_expected))"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def test_meets_criteria_one_ok(self):"},{"line_number":306,"context_line":"        self.assertFalse(meets_criteria(actual\u003dresources_one_ok,"},{"line_number":307,"context_line":"                                        requested\u003dresources_expected))"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def test_meets_criteria_both_ok(self):"},{"line_number":310,"context_line":"        self.assertTrue(meets_criteria(actual\u003dresources_both_ok,"},{"line_number":311,"context_line":"                                       requested\u003dresources_expected))"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def test_meets_criteria_too_many(self):"},{"line_number":314,"context_line":"        self.assertTrue(meets_criteria(actual\u003dresources_too_many,"},{"line_number":315,"context_line":"                                       requested\u003dresources_expected))"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def test_meets_criteria_keys_we_dont_care_about(self):"},{"line_number":318,"context_line":"        self.assertTrue(meets_criteria(actual\u003dresources_spurious_keys,"},{"line_number":319,"context_line":"                                       requested\u003dresources_expected))"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def test_meets_criteria_missing_key(self):"},{"line_number":322,"context_line":"        self.assertFalse(meets_criteria(actual\u003dresources_key_missing,"},{"line_number":323,"context_line":"                                        requested\u003dresources_expected))"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    @patch.object(basic.AnsibleModule, \u0027run_command\u0027)"},{"line_number":326,"context_line":"    def test_resource_provider_list(self, run_command):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_22d3b2d6","line":323,"range":{"start_line":301,"start_character":0,"end_line":323,"end_character":70},"updated":"2018-11-16 14:28:49.000000000","message":"meets_criteria key should be a Specifier.","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"c85b067ade8b328ef226aa3efc47c75cc487c375","unresolved":false,"context_lines":[{"line_number":298,"context_line":"    def setUp(self):"},{"line_number":299,"context_line":"        super(TestTenksWaitForResource, self).setUp()"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_meets_criteria_not_enough(self):"},{"line_number":302,"context_line":"        self.assertFalse(meets_criteria(actual\u003dresources_not_enough,"},{"line_number":303,"context_line":"                                        requested\u003dresources_expected))"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def test_meets_criteria_one_ok(self):"},{"line_number":306,"context_line":"        self.assertFalse(meets_criteria(actual\u003dresources_one_ok,"},{"line_number":307,"context_line":"                                        requested\u003dresources_expected))"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def test_meets_criteria_both_ok(self):"},{"line_number":310,"context_line":"        self.assertTrue(meets_criteria(actual\u003dresources_both_ok,"},{"line_number":311,"context_line":"                                       requested\u003dresources_expected))"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def test_meets_criteria_too_many(self):"},{"line_number":314,"context_line":"        self.assertTrue(meets_criteria(actual\u003dresources_too_many,"},{"line_number":315,"context_line":"                                       requested\u003dresources_expected))"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def test_meets_criteria_keys_we_dont_care_about(self):"},{"line_number":318,"context_line":"        self.assertTrue(meets_criteria(actual\u003dresources_spurious_keys,"},{"line_number":319,"context_line":"                                       requested\u003dresources_expected))"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def test_meets_criteria_missing_key(self):"},{"line_number":322,"context_line":"        self.assertFalse(meets_criteria(actual\u003dresources_key_missing,"},{"line_number":323,"context_line":"                                        requested\u003dresources_expected))"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    @patch.object(basic.AnsibleModule, \u0027run_command\u0027)"},{"line_number":326,"context_line":"    def test_resource_provider_list(self, run_command):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_5049d4b6","line":323,"range":{"start_line":301,"start_character":0,"end_line":323,"end_character":70},"in_reply_to":"3f79a3b5_22d3b2d6","updated":"2018-11-16 16:23:10.000000000","message":"thanks","commit_id":"06275f76ddde39661334db4ff456b39ce907a1fc"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"74fc65ba1d8a832d8faad8dda6f07da11807db7c","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"inventory_list_out \u003d \"\"\"["},{"line_number":51,"context_line":"  {"},{"line_number":52,"context_line":"    \"allocation_ratio\": 1.0, "},{"line_number":53,"context_line":"    \"total\": 1, "},{"line_number":54,"context_line":"    \"reserved\": 0, "},{"line_number":55,"context_line":"    \"resource_class\": \"CUSTOM_TEST_RC\", "}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_d5514133","line":52,"range":{"start_line":52,"start_character":28,"end_line":52,"end_character":29},"updated":"2018-11-19 14:55:20.000000000","message":"nit: Lots of trailing whitespace in this file","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"f1c4902804567f8ef0f96a95a2711396225082fe","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"inventory_list_out \u003d \"\"\"["},{"line_number":51,"context_line":"  {"},{"line_number":52,"context_line":"    \"allocation_ratio\": 1.0, "},{"line_number":53,"context_line":"    \"total\": 1, "},{"line_number":54,"context_line":"    \"reserved\": 0, "},{"line_number":55,"context_line":"    \"resource_class\": \"CUSTOM_TEST_RC\", "}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_cba444a7","line":52,"range":{"start_line":52,"start_character":28,"end_line":52,"end_character":29},"in_reply_to":"3f79a3b5_d5514133","updated":"2018-11-19 16:42:30.000000000","message":"Yes, that is how the output is formatted - see for yourself:\n\n    openstack resource provider list -f json \u003e /tmp/test","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"b499b933843ca5c6b9d16e945cb4eeefd25a194a","unresolved":false,"context_lines":[{"line_number":473,"context_line":"            resources\u003dresources,"},{"line_number":474,"context_line":"        )"},{"line_number":475,"context_line":"        set_module_args(dummy_module_arguments)"},{"line_number":476,"context_line":"        try:"},{"line_number":477,"context_line":"            wait_for.main()"},{"line_number":478,"context_line":"        except AnsibleFailJson as result:"},{"line_number":479,"context_line":"            expected \u003d wait_for._RETRY_LIMIT_FAILURE_TEMPLATE.format("},{"line_number":480,"context_line":"                max_retries\u003ddummy_module_arguments[\"maximum_retries\"])"},{"line_number":481,"context_line":"            kwargs \u003d result.args[0]"},{"line_number":482,"context_line":"            self.assertIn(expected, kwargs[\"msg\"])"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    @patch.object(basic.AnsibleModule, \u0027run_command\u0027,"},{"line_number":485,"context_line":"                  create_run_cmd("}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_9887800b","line":482,"range":{"start_line":476,"start_character":0,"end_line":482,"end_character":50},"updated":"2018-11-19 15:17:26.000000000","message":"This is expected to fail, but would pass if the function returns.\n\nYou can use assertRaisesRegex to assert failure and match on the exception string.\n\nAlternatively, add an \u0027else\u0027 with a self.fail().","commit_id":"45c1a60b18730b6c65e25bc7982b98457b83c677"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"9f8df670fc190e5f7413ab17ff0963eb1ade3a65","unresolved":false,"context_lines":[{"line_number":525,"context_line":"            resources\u003ddummy_resources"},{"line_number":526,"context_line":"        )"},{"line_number":527,"context_line":"        set_module_args(dummy_module_arguments)"},{"line_number":528,"context_line":"        with self.assertRaises(AnsibleExitJson) as cm:"},{"line_number":529,"context_line":"            wait_for.main()"},{"line_number":530,"context_line":"        exception \u003d cm.exception"},{"line_number":531,"context_line":"        self.assertFalse(exception.args[0][\u0027changed\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_c9ebeca2","line":528,"range":{"start_line":528,"start_character":8,"end_line":528,"end_character":54},"updated":"2018-11-19 17:42:25.000000000","message":"Nice, not seen this usage before.","commit_id":"d4e7e58619fb84a1e1a184a64cd003e5b274b7c8"}]}
